diff --git a/visualization/app/codeCharta/assets/sample1.cc.json b/visualization/app/codeCharta/assets/sample1.cc.json index 7a0d4dac7d..bfc6abd944 100755 --- a/visualization/app/codeCharta/assets/sample1.cc.json +++ b/visualization/app/codeCharta/assets/sample1.cc.json @@ -14,7 +14,7 @@ "attributes": { "rloc": 400, "functions": 10, - "mcc": 100, + "complexity": 100, "pairingRate": 32, "avgCommits": 17 }, @@ -26,7 +26,7 @@ "attributes": { "rloc": 100, "functions": 10, - "mcc": 1, + "complexity": 1, "pairingRate": 77, "avgCommits": 56 }, @@ -43,7 +43,7 @@ "attributes": { "rloc": 30, "functions": 100, - "mcc": 100, + "complexity": 100, "pairingRate": 60, "avgCommits": 51 } @@ -54,7 +54,7 @@ "attributes": { "rloc": 70, "functions": 1000, - "mcc": 10, + "complexity": 10, "pairingRate": 65, "avgCommits": 22 } @@ -91,7 +91,7 @@ } ], "attributeTypes": { - "nodes": { "rloc": "absolute", "functions": "absolute", "mcc": "absolute", "pairingRate": "relative" }, + "nodes": { "rloc": "absolute", "functions": "absolute", "complexity": "absolute", "pairingRate": "relative" }, "edges": { "pairingRate": "relative", "avgCommits": "absolute" } } } diff --git a/visualization/app/codeCharta/assets/sample2.cc.json b/visualization/app/codeCharta/assets/sample2.cc.json index 91b7d90ed7..bcb88065c0 100755 --- a/visualization/app/codeCharta/assets/sample2.cc.json +++ b/visualization/app/codeCharta/assets/sample2.cc.json @@ -11,7 +11,7 @@ { "name": "bigLeaf.ts", "type": "File", - "attributes": { "rloc": 120, "functions": 10, "mcc": 1 }, + "attributes": { "rloc": 120, "functions": 10, "complexity": 1 }, "link": "http://www.google.de" }, { @@ -22,17 +22,17 @@ { "name": "smallLeaf.html", "type": "File", - "attributes": { "rloc": 30, "functions": 101, "mcc": 80 } + "attributes": { "rloc": 30, "functions": 101, "complexity": 80 } }, { "name": "otherSmallLeaf.ts", "type": "File", - "attributes": { "rloc": 70, "functions": 10, "mcc": 100 } + "attributes": { "rloc": 70, "functions": 10, "complexity": 100 } }, { "name": "sample2LeafMergedIn.kt", "type": "File", - "attributes": { "rloc": 600, "functions": 10, "mcc": 1 }, + "attributes": { "rloc": 600, "functions": 10, "complexity": 1 }, "link": "http://www.google.de" } ] @@ -41,6 +41,6 @@ } ], "attributeTypes": { - "nodes": { "rloc": "absolute", "functions": "absolute", "mcc": "absolute" } + "nodes": { "rloc": "absolute", "functions": "absolute", "complexity": "absolute" } } } diff --git a/visualization/app/codeCharta/assets/sample3.cc.json b/visualization/app/codeCharta/assets/sample3.cc.json index 59fc398884..28e5695ccb 100755 --- a/visualization/app/codeCharta/assets/sample3.cc.json +++ b/visualization/app/codeCharta/assets/sample3.cc.json @@ -11,7 +11,7 @@ { "name": "bigLeaf.ts", "type": "File", - "attributes": { "rloc": 120, "functions": 10, "mcc": 1 }, + "attributes": { "rloc": 120, "functions": 10, "complexity": 1 }, "link": "http://www.google.de" }, { @@ -22,12 +22,12 @@ { "name": "smallLeaf.html", "type": "File", - "attributes": { "rloc": 30, "functions": 19, "mcc": 80 } + "attributes": { "rloc": 30, "functions": 19, "complexity": 80 } }, { "name": "otherSmallLeaf.ts", "type": "File", - "attributes": { "rloc": 80, "functions": 10, "mcc": 100 } + "attributes": { "rloc": 80, "functions": 10, "complexity": 100 } } ] } @@ -35,6 +35,6 @@ } ], "attributeTypes": { - "nodes": { "rloc": "absolute", "functions": "absolute", "mcc": "absolute" } + "nodes": { "rloc": "absolute", "functions": "absolute", "complexity": "absolute" } } } diff --git a/visualization/app/codeCharta/assets/sample4.cc.json b/visualization/app/codeCharta/assets/sample4.cc.json index ada34250a5..ef81667b3d 100644 --- a/visualization/app/codeCharta/assets/sample4.cc.json +++ b/visualization/app/codeCharta/assets/sample4.cc.json @@ -11,7 +11,7 @@ { "name": "aLeaf.ts", "type": "File", - "attributes": { "rloc": 120, "functions": 10, "mcc": 1 }, + "attributes": { "rloc": 120, "functions": 10, "complexity": 1 }, "link": "http://www.google.de" }, { @@ -22,17 +22,17 @@ { "name": "smallLeafOne.html", "type": "File", - "attributes": { "rloc": 100, "functions": 28, "mcc": 80 } + "attributes": { "rloc": 100, "functions": 28, "complexity": 80 } }, { "name": "smallLeafTwo.ts", "type": "File", - "attributes": { "rloc": 300, "functions": 5, "mcc": 150 } + "attributes": { "rloc": 300, "functions": 5, "complexity": 150 } }, { "name": "smallLeafThree.ts", "type": "File", - "attributes": { "rloc": 50, "functions": 5, "mcc": 150 } + "attributes": { "rloc": 50, "functions": 5, "complexity": 150 } } ] } @@ -40,6 +40,6 @@ } ], "attributeTypes": { - "nodes": { "rloc": "absolute", "functions": "absolute", "mcc": "absolute" } + "nodes": { "rloc": "absolute", "functions": "absolute", "complexity": "absolute" } } } diff --git a/visualization/app/codeCharta/state/effects/resetChosenMetrics/utils/metricHelper.ts b/visualization/app/codeCharta/state/effects/resetChosenMetrics/utils/metricHelper.ts index df32b2cebd..829385b9a0 100644 --- a/visualization/app/codeCharta/state/effects/resetChosenMetrics/utils/metricHelper.ts +++ b/visualization/app/codeCharta/state/effects/resetChosenMetrics/utils/metricHelper.ts @@ -1,7 +1,14 @@ import { NodeMetricData, RecursivePartial, Settings } from "../../../../codeCharta.model" const sizeMetrics = ["rloc", "real_lines_of_code", "loc", "lines_of_code", "lines", "statements", "functions"] -const complexityMetrics = ["mcc", "cognitive_complexity", "sonar_cognitive_complexity", "max_nesting_level", "indentation_level"] +const complexityMetrics = [ + "complexity", + "mcc", + "cognitive_complexity", + "sonar_cognitive_complexity", + "max_nesting_level", + "indentation_level" +] export function isAnyMetricAvailable[]>(metricData: T) { return metricData.some(x => x.maxValue > 0)