codecharta-visualization 1.117.0 → 1.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/app/codeCharta/services/loadInitialFile/urlExtractor.ts +2 -2
- package/app/codeCharta/state/selectors/accumulatedData/metricData/edgeMetricData.calculator.ts +5 -1
- package/app/codeCharta/state/selectors/primaryMetrics/primaryMetrics.selector.ts +7 -15
- package/app/codeCharta/state/store/dynamicSettings/colorRange/resetColorRange.effect.spec.ts +9 -0
- package/app/codeCharta/state/store/dynamicSettings/colorRange/resetColorRange.effect.ts +9 -0
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.component.scss +27 -0
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.component.spec.ts +18 -15
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.module.ts +10 -2
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarHeaderSection/nodePath/nodePath.component.spec.ts +2 -2
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetric/attributeSideBarPrimaryMetric.component.html +7 -1
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetric/attributeSideBarPrimaryMetric.component.ts +1 -0
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetrics.component.html +20 -6
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetrics.component.ts +7 -4
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/attributeSideBarSecondaryMetrics.component.html +17 -3
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/attributeSideBarSecondaryMetrics.component.ts +8 -5
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/secondaryMetrics.selector.spec.ts +4 -23
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/secondaryMetrics.selector.ts +4 -16
- package/app/codeCharta/ui/attributeSideBar/metricDeltaSelected/metricDeltaSelected.component.spec.ts +1 -1
- package/app/codeCharta/ui/attributeSideBar/util/edge.ts +0 -2
- package/app/codeCharta/ui/attributeSideBar/util/metric.ts +0 -2
- package/app/codeCharta/ui/codeMap/arrow/codeMap.arrow.service.ts +2 -5
- package/app/codeCharta/ui/customConfigs/customConfigs.module.ts +4 -3
- package/app/codeCharta/ui/customConfigs/uploadCustomConfigButton/uploadCustomConfigButton.component.ts +1 -1
- package/app/codeCharta/ui/fileExtensionBar/fileExtensionBar.component.spec.ts +3 -1
- package/app/codeCharta/ui/filePanel/filePanel.module.ts +2 -2
- package/app/codeCharta/ui/legendPanel/legendBlock/legendBlock.component.html +24 -20
- package/app/codeCharta/ui/legendPanel/legendBlock/legendBlock.component.ts +10 -3
- package/app/codeCharta/ui/legendPanel/legendPanel.component.html +7 -13
- package/app/codeCharta/ui/legendPanel/legendPanel.component.scss +16 -18
- package/app/codeCharta/ui/legendPanel/legendPanel.component.spec.ts +34 -12
- package/app/codeCharta/ui/legendPanel/legendPanel.component.ts +8 -8
- package/app/codeCharta/ui/legendPanel/legendPanel.module.ts +3 -2
- package/app/codeCharta/ui/metricChooser/metricChooser.component.html +7 -2
- package/app/codeCharta/ui/metricChooser/metricChooser.component.scss +8 -0
- package/app/codeCharta/ui/metricChooser/metricChooser.component.spec.ts +39 -11
- package/app/codeCharta/ui/metricChooser/metricChooser.component.ts +2 -2
- package/app/codeCharta/ui/metricChooser/metricChooser.module.ts +3 -2
- package/app/codeCharta/ui/ribbonBar/areaMetricChooser/areaMetricChooser.component.html +1 -0
- package/app/codeCharta/ui/ribbonBar/areaMetricChooser/areaMetricChooser.component.spec.ts +17 -6
- package/app/codeCharta/ui/ribbonBar/colorMetricChooser/colorMetricChooser.component.html +1 -0
- package/app/codeCharta/ui/ribbonBar/colorMetricChooser/colorMetricChooser.component.spec.ts +19 -6
- package/app/codeCharta/ui/ribbonBar/edgeMetricChooser/edgeMetricChooser.component.html +1 -0
- package/app/codeCharta/ui/ribbonBar/edgeMetricChooser/edgeMetricChooser.component.spec.ts +15 -5
- package/app/codeCharta/ui/ribbonBar/heightMetricChooser/heightMetricChooser.component.html +1 -0
- package/app/codeCharta/ui/ribbonBar/heightMetricChooser/heightMetricChooser.component.spec.ts +21 -8
- package/app/codeCharta/ui/ribbonBar/heightMetricChooser/heightMetricChooser.module.ts +1 -1
- package/app/codeCharta/ui/ribbonBar/ribbonBar.module.ts +1 -1
- package/app/codeCharta/util/algorithm/streetLayout/horizontalStreet.ts +2 -2
- package/app/codeCharta/util/algorithm/streetLayout/verticalStreet.ts +2 -2
- package/app/codeCharta/util/dataMocks.ts +18 -1
- package/app/codeCharta/util/gameObjectsParser/gameObjectsImporter.ts +1 -1
- package/app/codeCharta/util/pipes/AttributeDescriptorTooltipPipeModule.ts +8 -0
- package/app/codeCharta/util/pipes/RemoveExtensionPipeModule.ts +8 -0
- package/app/codeCharta/util/pipes/TruncateTextPipeModule.ts +8 -0
- package/app/codeCharta/util/pipes/attributeDescriptorTooltip.pipe.spec.ts +61 -0
- package/app/codeCharta/util/pipes/attributeDescriptorTooltip.pipe.ts +19 -0
- package/dist/webpack/index.html +1 -1
- package/dist/webpack/main.0e368e65a1bdf78b.js +1 -0
- package/package.json +3 -3
- package/app/codeCharta/ui/attributeSideBar/util/metricDescriptors.ts +0 -30
- package/app/codeCharta/ui/legendPanel/selectors/legendAreaMetric.selector.ts +0 -10
- package/app/codeCharta/ui/legendPanel/selectors/legendColorMetric.selector.ts +0 -10
- package/app/codeCharta/ui/legendPanel/selectors/legendEdgeMetric.selector.spec.ts +0 -76
- package/app/codeCharta/ui/legendPanel/selectors/legendEdgeMetric.selector.ts +0 -25
- package/app/codeCharta/ui/legendPanel/selectors/legendHeightMetric.selector.ts +0 -10
- package/app/codeCharta/util/simplePipes/SimplePipesModule.ts +0 -9
- package/app/codeCharta/util/simplePipes/metricDescriptorTitle.pipe.spec.ts +0 -62
- package/app/codeCharta/util/simplePipes/metricDescriptorTitle.pipe.ts +0 -18
- package/dist/webpack/main.276ed7d686dd2d87.js +0 -1
- /package/app/codeCharta/ui/ribbonBar/colorMetricChooser/{heightMetricChooser.module.ts → colorMetricChooser.module.ts} +0 -0
- /package/app/codeCharta/ui/ribbonBar/heightMetricChooser/{areaMetricChooser.component.ts → heightMetricChooser.component.ts} +0 -0
- /package/app/codeCharta/util/{simplePipes → pipes}/removeExtension.pipe.spec.ts +0 -0
- /package/app/codeCharta/util/{simplePipes → pipes}/removeExtension.pipe.ts +0 -0
- /package/app/codeCharta/util/{truncateText.pipe.ts → pipes/truncateText.pipe.ts} +0 -0
- /package/app/codeCharta/util/{truncateText.spec.ts → pipes/truncateText.spec.ts} +0 -0
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/MaibornWolff/codecharta.git"
|
|
11
11
|
},
|
|
12
12
|
"name": "codecharta-visualization",
|
|
13
|
-
"version": "1.
|
|
13
|
+
"version": "1.119.0",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=16"
|
|
16
16
|
},
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"bestzip": "^2.2.0",
|
|
120
120
|
"eslint": "^8.28.0",
|
|
121
121
|
"eslint-config-prettier": "^8.5.0",
|
|
122
|
-
"eslint-plugin-unicorn": "^
|
|
122
|
+
"eslint-plugin-unicorn": "^47.0.0",
|
|
123
123
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
124
124
|
"html-loader": "^4.0.0",
|
|
125
125
|
"jest": "^29.4.3",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"jest-puppeteer": "^6.1.1",
|
|
129
129
|
"lint-staged": "^13.0.0",
|
|
130
130
|
"marked": "^4.3.0",
|
|
131
|
-
"nw-builder": "
|
|
131
|
+
"nw-builder": "3.7.4",
|
|
132
132
|
"puppeteer": "^17.0.0",
|
|
133
133
|
"ts-jest": "^29.0.5",
|
|
134
134
|
"typescript": "~4.9.4",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AttributeDescriptors } from "../../../codeCharta.model"
|
|
2
|
-
import { metricTitles } from "../../../util/metric/metricTitles"
|
|
3
|
-
|
|
4
|
-
export type MetricDescriptors = {
|
|
5
|
-
key: string
|
|
6
|
-
title: string
|
|
7
|
-
description: string
|
|
8
|
-
hintLowValue: string
|
|
9
|
-
hintHighValue: string
|
|
10
|
-
link: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function getMetricDescriptors(metricKey: string, attributeDescriptors?: AttributeDescriptors): MetricDescriptors {
|
|
14
|
-
return {
|
|
15
|
-
key: metricKey,
|
|
16
|
-
title: getMetricTitle(metricKey, attributeDescriptors),
|
|
17
|
-
description: attributeDescriptors?.[metricKey]?.description,
|
|
18
|
-
hintLowValue: attributeDescriptors?.[metricKey]?.hintLowValue,
|
|
19
|
-
hintHighValue: attributeDescriptors?.[metricKey]?.hintHighValue,
|
|
20
|
-
link: attributeDescriptors?.[metricKey]?.link
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function getMetricTitle(metric: string, attributeDescriptors: AttributeDescriptors) {
|
|
25
|
-
if (attributeDescriptors?.[metric]?.title !== undefined && attributeDescriptors[metric].title !== "") {
|
|
26
|
-
return attributeDescriptors[metric].title
|
|
27
|
-
}
|
|
28
|
-
//Fallback Description can still return undefined
|
|
29
|
-
return metricTitles.get(metric)
|
|
30
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createSelector } from "@ngrx/store"
|
|
2
|
-
import { areaMetricSelector } from "../../../state/store/dynamicSettings/areaMetric/areaMetric.selector"
|
|
3
|
-
import { attributeDescriptorsSelector } from "../../../state/store/fileSettings/attributeDescriptors/attributeDescriptors.selector"
|
|
4
|
-
import { getMetricDescriptors } from "../../attributeSideBar/util/metricDescriptors"
|
|
5
|
-
|
|
6
|
-
export const legendAreaMetricSelector = createSelector(
|
|
7
|
-
areaMetricSelector,
|
|
8
|
-
attributeDescriptorsSelector,
|
|
9
|
-
(areaMetric, attributeDescriptors) => getMetricDescriptors(areaMetric, attributeDescriptors)
|
|
10
|
-
)
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { colorMetricSelector } from "../../../state/store/dynamicSettings/colorMetric/colorMetric.selector"
|
|
2
|
-
import { getMetricDescriptors } from "../../attributeSideBar/util/metricDescriptors"
|
|
3
|
-
import { attributeDescriptorsSelector } from "../../../state/store/fileSettings/attributeDescriptors/attributeDescriptors.selector"
|
|
4
|
-
import { createSelector } from "@ngrx/store"
|
|
5
|
-
|
|
6
|
-
export const legendColorMetricSelector = createSelector(
|
|
7
|
-
colorMetricSelector,
|
|
8
|
-
attributeDescriptorsSelector,
|
|
9
|
-
(colorMetric, attributeDescriptors) => getMetricDescriptors(colorMetric, attributeDescriptors)
|
|
10
|
-
)
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { _getLegendEdgeMetric } from "./legendEdgeMetric.selector"
|
|
2
|
-
import { TEST_ATTRIBUTE_DESCRIPTORS_HALF_FILLED } from "../../../util/dataMocks"
|
|
3
|
-
|
|
4
|
-
describe("_getLegendEdgeMetric", () => {
|
|
5
|
-
it("should return nothing if there are no edgeMetricData", () => {
|
|
6
|
-
expect(_getLegendEdgeMetric("rloc", [], undefined)).toBe(undefined)
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
it("should return nothing if edgeMetricData maxValue' is smaller than 0", () => {
|
|
10
|
-
expect(
|
|
11
|
-
_getLegendEdgeMetric(
|
|
12
|
-
"rloc",
|
|
13
|
-
[
|
|
14
|
-
{
|
|
15
|
-
name: "rloc",
|
|
16
|
-
maxValue: undefined,
|
|
17
|
-
minValue: undefined
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
undefined
|
|
21
|
-
)
|
|
22
|
-
).toBe(undefined)
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
it("should get existing legendEdgeMetric", () => {
|
|
26
|
-
expect(_getLegendEdgeMetric("rloc", [{ name: "rloc", maxValue: 10, minValue: 0 }], undefined)).toEqual({
|
|
27
|
-
key: "rloc",
|
|
28
|
-
title: "Real Lines of Code",
|
|
29
|
-
description: undefined
|
|
30
|
-
})
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
it("should get existing legendEdgeMetric with given attribute descriptors", () => {
|
|
34
|
-
expect(
|
|
35
|
-
_getLegendEdgeMetric(
|
|
36
|
-
"mcc",
|
|
37
|
-
[
|
|
38
|
-
{
|
|
39
|
-
name: "mcc",
|
|
40
|
-
maxValue: 10,
|
|
41
|
-
minValue: 0
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
TEST_ATTRIBUTE_DESCRIPTORS_HALF_FILLED
|
|
45
|
-
)
|
|
46
|
-
).toEqual({
|
|
47
|
-
description: "Maximum cyclic complexity",
|
|
48
|
-
hintHighValue: "",
|
|
49
|
-
hintLowValue: "",
|
|
50
|
-
key: "mcc",
|
|
51
|
-
link: "https://www.npmjs.com/package/metric-gardener",
|
|
52
|
-
title: "Maximum Cyclic Complexity"
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
expect(
|
|
56
|
-
_getLegendEdgeMetric(
|
|
57
|
-
"rloc",
|
|
58
|
-
[
|
|
59
|
-
{
|
|
60
|
-
name: "rloc",
|
|
61
|
-
maxValue: 10,
|
|
62
|
-
minValue: 0
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
TEST_ATTRIBUTE_DESCRIPTORS_HALF_FILLED
|
|
66
|
-
)
|
|
67
|
-
).toEqual({
|
|
68
|
-
description: "",
|
|
69
|
-
hintHighValue: "",
|
|
70
|
-
hintLowValue: "",
|
|
71
|
-
key: "rloc",
|
|
72
|
-
link: "https://www.npmjs.com/package/metric-gardener",
|
|
73
|
-
title: "Real Lines of Code"
|
|
74
|
-
})
|
|
75
|
-
})
|
|
76
|
-
})
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EdgeMetricData } from "../../../codeCharta.model"
|
|
2
|
-
import { edgeMetricSelector } from "../../../state/store/dynamicSettings/edgeMetric/edgeMetric.selector"
|
|
3
|
-
import { getMetricDescriptors } from "../../attributeSideBar/util/metricDescriptors"
|
|
4
|
-
import { attributeDescriptorsSelector } from "../../../state/store/fileSettings/attributeDescriptors/attributeDescriptors.selector"
|
|
5
|
-
import { metricDataSelector } from "../../../state/selectors/accumulatedData/metricData/metricData.selector"
|
|
6
|
-
import { createSelector } from "@ngrx/store"
|
|
7
|
-
|
|
8
|
-
export const _getLegendEdgeMetric = (edgeMetric: string, edgeMetricDatas: EdgeMetricData[], attributeDescriptors) => {
|
|
9
|
-
const edgeMetricData = edgeMetricDatas.find(someEdgeMetricData => {
|
|
10
|
-
return someEdgeMetricData.name === edgeMetric
|
|
11
|
-
})
|
|
12
|
-
const hasEdgeMetricEdge = edgeMetricData && edgeMetricData.maxValue > 0
|
|
13
|
-
if (!hasEdgeMetricEdge) {
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return getMetricDescriptors(edgeMetric, attributeDescriptors)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const legendEdgeMetricSelector = createSelector(
|
|
21
|
-
edgeMetricSelector,
|
|
22
|
-
metricDataSelector,
|
|
23
|
-
attributeDescriptorsSelector,
|
|
24
|
-
(edgeMetric, metricData, attributeDescriptors) => _getLegendEdgeMetric(edgeMetric, metricData.edgeMetricData, attributeDescriptors)
|
|
25
|
-
)
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { heightMetricSelector } from "../../../state/store/dynamicSettings/heightMetric/heightMetric.selector"
|
|
2
|
-
import { getMetricDescriptors } from "../../attributeSideBar/util/metricDescriptors"
|
|
3
|
-
import { attributeDescriptorsSelector } from "../../../state/store/fileSettings/attributeDescriptors/attributeDescriptors.selector"
|
|
4
|
-
import { createSelector } from "@ngrx/store"
|
|
5
|
-
|
|
6
|
-
export const legendHeightMetricSelector = createSelector(
|
|
7
|
-
heightMetricSelector,
|
|
8
|
-
attributeDescriptorsSelector,
|
|
9
|
-
(heightMetric, attributeDescriptors) => getMetricDescriptors(heightMetric, attributeDescriptors)
|
|
10
|
-
)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NgModule } from "@angular/core"
|
|
2
|
-
import { RemoveExtensionPipe } from "./removeExtension.pipe"
|
|
3
|
-
import { MetricDescriptorTitlePipe } from "./metricDescriptorTitle.pipe"
|
|
4
|
-
|
|
5
|
-
@NgModule({
|
|
6
|
-
declarations: [RemoveExtensionPipe, MetricDescriptorTitlePipe],
|
|
7
|
-
exports: [RemoveExtensionPipe, MetricDescriptorTitlePipe]
|
|
8
|
-
})
|
|
9
|
-
export class SimplePipesModule {}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { MetricDescriptors } from "app/codeCharta/ui/attributeSideBar/util/metricDescriptors"
|
|
2
|
-
import { MetricDescriptorTitlePipe } from "./metricDescriptorTitle.pipe"
|
|
3
|
-
|
|
4
|
-
const testKey = "testKey"
|
|
5
|
-
const testTitle = "testTitle"
|
|
6
|
-
const testHighValue = "testHighValue"
|
|
7
|
-
const testLowValue = "testLowValue"
|
|
8
|
-
const testDescription = "testDescription"
|
|
9
|
-
const testLink = "testLink"
|
|
10
|
-
let pipe: MetricDescriptorTitlePipe
|
|
11
|
-
let md: MetricDescriptors
|
|
12
|
-
|
|
13
|
-
describe("metricDescriptorTitlePipe", () => {
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
md = {
|
|
16
|
-
key: testKey,
|
|
17
|
-
title: null,
|
|
18
|
-
description: null,
|
|
19
|
-
hintLowValue: null,
|
|
20
|
-
hintHighValue: null,
|
|
21
|
-
link: null
|
|
22
|
-
}
|
|
23
|
-
pipe = new MetricDescriptorTitlePipe()
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
it("should return empty string for null", () => {
|
|
27
|
-
expect(pipe.transform(null)).toBe("")
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
it("should return empty string for undefined", () => {
|
|
31
|
-
expect(pipe.transform(undefined)).toBe("")
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it("should be key if only key is present", () => {
|
|
35
|
-
expect(pipe.transform(md)).toBe(testKey)
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
it('should be "title (key)" if present', () => {
|
|
39
|
-
md.title = testTitle
|
|
40
|
-
expect(pipe.transform(md)).toBe(`${testTitle} (${testKey})`)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it("should contain : if more information available", () => {
|
|
44
|
-
md.hintLowValue = testLowValue
|
|
45
|
-
expect(pipe.transform(md)).toContain(":")
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
it("should include full information", () => {
|
|
49
|
-
md.title = testTitle
|
|
50
|
-
md.description = testDescription
|
|
51
|
-
md.hintHighValue = testHighValue
|
|
52
|
-
md.hintLowValue = testLowValue
|
|
53
|
-
const result = `${testTitle} (${testKey}):\n${testDescription}\nHigh Values: ${testHighValue}\nLow Values: ${testLowValue}`
|
|
54
|
-
expect(pipe.transform(md)).toBe(result)
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
it("should not include link", () => {
|
|
58
|
-
md.description = testDescription
|
|
59
|
-
md.link = testLink
|
|
60
|
-
expect(pipe.transform(md)).toBe(`${testKey}:\n${testDescription}`)
|
|
61
|
-
})
|
|
62
|
-
})
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from "@angular/core"
|
|
2
|
-
import { MetricDescriptors } from "../../ui/attributeSideBar/util/metricDescriptors"
|
|
3
|
-
|
|
4
|
-
@Pipe({ name: "metricDescriptorTitle" })
|
|
5
|
-
export class MetricDescriptorTitlePipe implements PipeTransform {
|
|
6
|
-
transform(metricDescriptor: MetricDescriptors): string {
|
|
7
|
-
if (metricDescriptor == null) {
|
|
8
|
-
return ""
|
|
9
|
-
}
|
|
10
|
-
const title: string = metricDescriptor.title ? `${metricDescriptor.title} (${metricDescriptor.key})` : metricDescriptor.key
|
|
11
|
-
|
|
12
|
-
let subtitle: string = metricDescriptor.description ? `\n${metricDescriptor.description}` : ""
|
|
13
|
-
subtitle += metricDescriptor.hintHighValue ? `\nHigh Values: ${metricDescriptor.hintHighValue}` : ""
|
|
14
|
-
subtitle += metricDescriptor.hintLowValue ? `\nLow Values: ${metricDescriptor.hintLowValue}` : ""
|
|
15
|
-
|
|
16
|
-
return subtitle.length > 0 ? `${title}:${subtitle}` : title
|
|
17
|
-
}
|
|
18
|
-
}
|