package Ġcom . thought works . arch guard . report . application Ċ Ċ import Ġcom . thought works . arch guard . metrics . infrastructure . influx . In flux DB Client Ċ import Ġcom . thought works . arch guard . report . domain . GroupData Ċ import Ġcom . thought works . arch guard . report . domain . bad s mell . Bad S mell Level Ċ import Ġcom . thought works . arch guard . report . domain . bad s mell . Bad S mell Type Ċ import Ġcom . thought works . arch guard . report . domain . bad s mell . Dashboard Group Ċ import Ġcom . thought works . arch guard . report . domain . co he sion . Data Class Service Ċ import Ġcom . thought works . arch guard . report . domain . co he sion . Shot gun Sur g ery Service Ċ import Ġcom . thought works . arch guard . report . domain . coup ling . circular dependency . Circular Dependency Service Ċ import Ġcom . thought works . arch guard . report . domain . coup ling . dat acl ump s . Data Cl ump s Service Ċ import Ġcom . thought works . arch guard . report . domain . coup ling . deep inheritance . Deep Inheritance Service Ċ import Ġcom . thought works . arch guard . report . domain . coup ling . hub . Hub Service Ċ import Ġcom . thought works . arch guard . report . domain . red undancy . Over General ization Service Ċ import Ġcom . thought works . arch guard . report . domain . red undancy . Red undancy Service Ċ import Ġcom . thought works . arch guard . report . domain . sizing . S izing Service Ċ import Ġcom . thought works . arch guard . report . domain . testing . Test Bad S mell Service Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġkotlin . math . round ToInt Ċ Ċ @ Service Ċ class ĠDashboard Service ( ĊĠĠĠ Ġval Ġs izing Service : ĠS izing Service , ĊĠĠĠ Ġval Ġhub Service : ĠHub Service , ĊĠĠĠ Ġval Ġdata Cl ump s Service : ĠData Cl ump s Service , ĊĠĠĠ Ġval Ġdeep Inheritance Service : ĠDeep Inheritance Service , ĊĠĠĠ Ġval Ġcircular Dependency Service : ĠCircular Dependency Service , ĊĠĠĠ Ġval Ġred undancy Service : ĠRed undancy Service , ĊĠĠĠ Ġval Ġover General ization Service : ĠOver General ization Service , ĊĠĠĠ Ġval Ġdata Class Service : ĠData Class Service , ĊĠĠĠ Ġval Ġshot gun Sur g ery Service : ĠShot gun Sur g ery Service , ĊĠĠĠ Ġval Ġtest Bad S mell Service : ĠTest Bad S mell Service , ĊĠĠĠ Ġval Ġin flux DB Client : ĠIn flux DB Client Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval ĠTIME : ĠString Ġ= Ġ" 1 d " ĊĠĠĠ Ġprivate Ġval ĠS IZ NG _ REPORT : ĠString Ġ= Ġ" sizing _ report " ĊĠĠĠ Ġprivate Ġval ĠCO UP LING _ REPORT : ĠString Ġ= Ġ" coup ling _ report " ĊĠĠĠ Ġprivate Ġval ĠRED UND AN CY _ REPORT : ĠString Ġ= Ġ" red undancy _ report " ĊĠĠĠ Ġprivate Ġval ĠCO H ES ION _ REPORT : ĠString Ġ= Ġ" co he sion _ report " ĊĠĠĠ Ġprivate Ġval ĠTEST _ BAD _ S ME LL _ REPORT : ĠString Ġ= Ġ" test _ report " ĊĊĠĠĠ Ġfun Ġget Dashboard ( system Id : ĠLong ): ĠList < Dashboard > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcoup ling Dashboard Ġ= Ġget Dashboard ( system Id , ĠDashboard Group . CO UP LING , ĠCO UP LING _ REPORT ) ĊĠĠĠĠĠĠĠ Ġval Ġs izing Dashboard Ġ= Ġget Dashboard ( system Id , ĠDashboard Group . SIZ ING , ĠS IZ NG _ REPORT ) ĊĠĠĠĠĠĠĠ Ġval Ġred undancy Dashboard Ġ= Ġget Dashboard ( system Id , ĠDashboard Group . RED UND AN CY , ĠRED UND AN CY _ REPORT ) ĊĠĠĠĠĠĠĠ Ġval Ġco he sion Dashboard Ġ= Ġget Dashboard ( system Id , ĠDashboard Group . CO H ES ION , ĠCO H ES ION _ REPORT ) ĊĠĠĠĠĠĠĠ Ġval Ġtest Dashboard Ġ= Ġget Dashboard ( system Id , ĠDashboard Group . TEST BAD S ME LL , ĠTEST _ BAD _ S ME LL _ REPORT ) ĊĠĠĠĠĠĠĠ Ġreturn ĠlistOf ( coup ling Dashboard , Ġs izing Dashboard , Ġred undancy Dashboard , Ġco he sion Dashboard , Ġtest Dashboard ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġsave Report ( system Id : ĠLong ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġs izing Report Ġ= Ġs izing Service . getS izing Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġin flux DB Client . save Report ( SIZ NG _ REPORT , Ġsystem Id . toString (), Ġs izing Report ) ĊĊĠĠĠĠĠĠĠ Ġval Ġhub Report Ġ= Ġhub Service . get Hub Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġval Ġdata Cl ump s Report Ġ= Ġdata Cl ump s Service . getData Cl ump Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġval Ġdeep Inheritance Report Ġ= Ġdeep Inheritance Service . get Deep Inheritance Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġval Ġcircular Dependency Report Ġ= Ġcircular Dependency Service . getC irc ular Dependency Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġin flux DB Client . save Report ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCO UP LING _ REPORT , Ġsystem Id . toString (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhub Report . plus ( data Cl ump s Report ). plus ( deep Inheritance Report ). plus ( circular Dependency Report ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġred undancy Element Report Ġ= Ġred undancy Service . get Red undant Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġval Ġover General ization Report Ġ= Ġover General ization Service . get Red undant Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġin flux DB Client . save Report ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRED UND AN CY _ REPORT , Ġsystem Id . toString (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġred undancy Element Report . plus ( over General ization Report ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġdata Class Report Ġ= Ġdata Class Service . get Co he sion Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġval Ġshot gun Sur g ery Report Ġ= Ġshot gun Sur g ery Service . get Co he sion Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġin flux DB Client . save Report ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCO H ES ION _ REPORT , Ġsystem Id . toString (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdata Class Report . plus ( shot gun Sur g ery Report ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġtest Report Ġ= Ġtest Bad S mell Service . get Testing Report ( system Id ) ĊĠĠĠĠĠĠĠ Ġin flux DB Client . save Report ( TEST _ BAD _ S ME LL _ REPORT , Ġsystem Id . toString (), Ġtest Report ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġquery Report ( system Id : ĠLong , Ġbad S mell Type : ĠBad S mell Type , Ġreport Name : ĠString ): ĠList < Graph Data > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġquery Ġ= Ġ" SELECT Ġ" Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" mean (\" ${ bad S mell Type . name }\ ") ĠAS Ġ\" ${ bad S mell Type . name }\" Ġ" Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" FROM Ġ\" ${ report Name }\" Ġ" Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" WHERE Ġ( \" system _ id \" Ġ= Ġ'$ system Id ') ĠGROUP ĠBY Ġtime ($ TIME ) Ġfill ( none )" ĊĠĠĠĠĠĠĠ Ġreturn Ġin flux DB Client . query ( query ). map Ġ{ Ġit . values Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. flatten (). map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠGraph Data ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit [ 0 ], ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit [ 1 ]. toDouble (). round ToInt () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Dashboard ( system Id : ĠLong , Ġdashboard Group : ĠDashboard Group , Ġreport Name : ĠString ): ĠDashboard Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġgroup Data Ġ= Ġdashboard Group . bad S mell s ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠGroup Data ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . calculate ( system Id )?. level ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ?: ĠBad S mell Level . A , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquery Report ( system Id , Ġit , Ġreport Name ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn ĠDashboard ( dashboard Group , Ġgroup Data ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDashboard ( e Dashboard Group : ĠDashboard Group , Ġval Ġgroup Data : ĠList < GroupData >) Ġ{ ĊĠĠĠ Ġvar Ġdashboard Group : ĠString Ġ= Ġe Dashboard Group . value Ċ } Ċ Ċ data Ġclass ĠGraph Data ( val Ġdate : ĠString , Ġval Ġvalue : ĠInt ) Ċ