import { ColorMetrics , leakPeriodCommitsScmColorMetric , noColorMetric , numberOfAuthorsScmColorMetric , packageNameColorMetric , } from "../../../constants/ColorMetrics" ; import { lazyInject } from "../../../inversify.config" ; import VisualizationOptionStore from "../../../stores/VisualizationOptionStore" ; export default class SonarQubeMeasuresMetricService { @ lazyInject ( "VisualizationOptionStore" ) private readonly visualizationOptions ! : VisualizationOptionStore ; public getMetricRequestValues ( ) { const result = new Set ( ) ; result . add ( this . visualizationOptions . profile . footprintMetric . id ) ; result . add ( this . visualizationOptions . profile . heightMetric . id ) ; for ( const colorMetric of ColorMetrics . colorMetrics . keys ) { if ( colorMetric !== noColorMetric . id && colorMetric !== packageNameColorMetric . id && colorMetric !== numberOfAuthorsScmColorMetric . id && colorMetric !== leakPeriodCommitsScmColorMetric . id ) { result . add ( colorMetric ) ; } } return Array . from ( result ) . join ( "," ) ; } }