From ce4d28041d2b1b9862932cee2e527a700cf89f8a Mon Sep 17 00:00:00 2001 From: Whisperity Date: Sun, 21 Jan 2024 13:01:04 +0100 Subject: [PATCH 1/2] feat(gui): Checker status auditing Extend the "Analysis Info" dialog on the Web UI to be capable of rendering the new `AnalysisInfo.checkers` data structure from the API. If the data is available, renders an expanding widget first grouped by analyser, then heuristically by checker "group". If the group is not entirely enabled or disabled, shows the number of enabled, disabled, and total checkers. Does the same for the analyser as a whole. If the data is not available, it tries doing its best to give the user a reason why. Likely it is because of two things: runs upgraded from older server versions that did not collect the data, or runs done not with `CodeChecker analyze`. --- web/server/vue-cli/package-lock.json | 5 +- web/server/vue-cli/package.json | 1 + .../src/components/AnalysisInfo/Checker.vue | 54 +++ .../components/AnalysisInfo/CheckerGroup.vue | 115 ++++++ .../components/AnalysisInfo/CheckerRows.vue | 32 ++ .../src/components/AnalysisInfo/index.js | 9 + .../src/components/AnalysisInfoDialog.vue | 371 +++++++++++++++++- .../vue-cli/src/components/CountChips.vue | 129 ++++++ .../Icons/AnalyzerStatisticsIcon.vue | 12 +- .../Run/AnalyzerStatisticsDialog.vue | 4 +- .../src/components/Run/ExpandedRun.vue | 3 +- web/server/vue-cli/src/components/index.js | 4 +- web/server/vue-cli/src/mixins/index.js | 4 +- .../vue-cli/src/mixins/version.mixin.js | 18 + web/server/vue-cli/src/views/RunList.vue | 11 +- 15 files changed, 738 insertions(+), 34 deletions(-) create mode 100644 web/server/vue-cli/src/components/AnalysisInfo/Checker.vue create mode 100644 web/server/vue-cli/src/components/AnalysisInfo/CheckerGroup.vue create mode 100644 web/server/vue-cli/src/components/AnalysisInfo/CheckerRows.vue create mode 100644 web/server/vue-cli/src/components/AnalysisInfo/index.js create mode 100644 web/server/vue-cli/src/components/CountChips.vue create mode 100644 web/server/vue-cli/src/mixins/version.mixin.js diff --git a/web/server/vue-cli/package-lock.json b/web/server/vue-cli/package-lock.json index 273e13895d..f567288e63 100644 --- a/web/server/vue-cli/package-lock.json +++ b/web/server/vue-cli/package-lock.json @@ -18,6 +18,7 @@ "jsplumb": "^2.15.6", "lodash": "^4.17.21", "marked": "^4.0.10", + "semver": "^5.7.1", "splitpanes": "^2.3.8", "vue": "^2.6.14", "vue-chartjs": "^3.5.1", @@ -13862,7 +13863,6 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, "bin": { "semver": "bin/semver" } @@ -26616,8 +26616,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "send": { "version": "0.17.1", diff --git a/web/server/vue-cli/package.json b/web/server/vue-cli/package.json index b0043acf96..68a7ca8328 100644 --- a/web/server/vue-cli/package.json +++ b/web/server/vue-cli/package.json @@ -36,6 +36,7 @@ "jsplumb": "^2.15.6", "lodash": "^4.17.21", "marked": "^4.0.10", + "semver": "^5.7.1", "splitpanes": "^2.3.8", "vue": "^2.6.14", "vue-chartjs": "^3.5.1", diff --git a/web/server/vue-cli/src/components/AnalysisInfo/Checker.vue b/web/server/vue-cli/src/components/AnalysisInfo/Checker.vue new file mode 100644 index 0000000000..185460b482 --- /dev/null +++ b/web/server/vue-cli/src/components/AnalysisInfo/Checker.vue @@ -0,0 +1,54 @@ + + + + diff --git a/web/server/vue-cli/src/components/AnalysisInfo/CheckerGroup.vue b/web/server/vue-cli/src/components/AnalysisInfo/CheckerGroup.vue new file mode 100644 index 0000000000..7ceaa19f23 --- /dev/null +++ b/web/server/vue-cli/src/components/AnalysisInfo/CheckerGroup.vue @@ -0,0 +1,115 @@ + + + + diff --git a/web/server/vue-cli/src/components/AnalysisInfo/CheckerRows.vue b/web/server/vue-cli/src/components/AnalysisInfo/CheckerRows.vue new file mode 100644 index 0000000000..ee3d579b61 --- /dev/null +++ b/web/server/vue-cli/src/components/AnalysisInfo/CheckerRows.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/web/server/vue-cli/src/components/AnalysisInfo/index.js b/web/server/vue-cli/src/components/AnalysisInfo/index.js new file mode 100644 index 0000000000..383c8aab12 --- /dev/null +++ b/web/server/vue-cli/src/components/AnalysisInfo/index.js @@ -0,0 +1,9 @@ +import Checker from "./Checker"; +import CheckerGroup from "./CheckerGroup"; +import CheckerRows from "./CheckerRows"; + +export { + Checker, + CheckerGroup, + CheckerRows +}; diff --git a/web/server/vue-cli/src/components/AnalysisInfoDialog.vue b/web/server/vue-cli/src/components/AnalysisInfoDialog.vue index cfba1c26be..7daa49c17c 100644 --- a/web/server/vue-cli/src/components/AnalysisInfoDialog.vue +++ b/web/server/vue-cli/src/components/AnalysisInfoDialog.vue @@ -18,27 +18,178 @@ mdi-close +
+ +
+ + + + + + + {{ analyzer }} + + + + + + + + + + + + + +
+
+ + + The list of checkers executed during the analysis is not + available!
+ This is likely caused by storing a run from a report directory + which was not created natively by + CodeChecker analyze. + Using the + report-converter + on the results of third-party analysers can cause this, as it + prevents CodeChecker from knowing about the analysis + configuration. +
+ + The list of checkers executed during the analysis is only + available from CodeChecker version + 6.24.
+ The analysis was executed using an older, + {{ + analysisInfo.codeCheckerVersion + }} + client, and it was also likely + stored when the server ran this older version. +
+ + The list of checkers executed during the analysis that produced + this Report is not + available!
+
+
+
diff --git a/web/server/vue-cli/src/components/Icons/AnalyzerStatisticsIcon.vue b/web/server/vue-cli/src/components/Icons/AnalyzerStatisticsIcon.vue index 94520a58d8..0124c215f7 100644 --- a/web/server/vue-cli/src/components/Icons/AnalyzerStatisticsIcon.vue +++ b/web/server/vue-cli/src/components/Icons/AnalyzerStatisticsIcon.vue @@ -1,14 +1,14 @@