From 879685994037b91c47062ae5a2d326b1cd2ed113 Mon Sep 17 00:00:00 2001 From: xb058t Date: Thu, 19 Mar 2026 22:23:41 +0100 Subject: [PATCH 01/18] first implementation --- web/server/vue-cli/config/webpack.common.js | 3 +- web/server/vue-cli/src/main.js | 2 + web/server/vue-cli/src/views/Reports.vue | 393 +++++++++++++++++++- 3 files changed, 395 insertions(+), 3 deletions(-) diff --git a/web/server/vue-cli/config/webpack.common.js b/web/server/vue-cli/config/webpack.common.js index c2e09e6fdf..5c7e51afee 100644 --- a/web/server/vue-cli/config/webpack.common.js +++ b/web/server/vue-cli/config/webpack.common.js @@ -62,7 +62,8 @@ module.exports = { '@cc/report-server-types': join('codechecker-api', 'lib', 'report_server_types.js'), '@cc/shared-types': join('codechecker-api', 'lib', 'codechecker_api_shared_types.js'), 'thrift': join('thrift', 'lib', 'nodejs', 'lib', 'thrift', 'browser.js'), - 'Vuetify': join('vuetify', 'lib', 'components') + 'Vuetify': join('vuetify', 'lib', 'components'), + 'vue$': join('vue', 'dist', 'vue.esm.js') } }, module: { diff --git a/web/server/vue-cli/src/main.js b/web/server/vue-cli/src/main.js index 86b593e7b1..fde92d51ed 100644 --- a/web/server/vue-cli/src/main.js +++ b/web/server/vue-cli/src/main.js @@ -41,6 +41,8 @@ import { eventHub } from "@cc-api"; Vue.config.productionTip = false; +Vue.config.runtimeCompiler = true; + let isFirstRouterResolve = true; // Ensure we checked auth before each page load. diff --git a/web/server/vue-cli/src/views/Reports.vue b/web/server/vue-cli/src/views/Reports.vue index 97fcf184f2..c16e87c8de 100644 --- a/web/server/vue-cli/src/views/Reports.vue +++ b/web/server/vue-cli/src/views/Reports.vue @@ -2,6 +2,7 @@ + + {{ viewMode === "table" ? "Tree view" : "Table view" }} + + + + + + + + + + + +
+
+

Old - getRunResults

+ + + + +
+ +
+

New - getFileCounts

+ + + + +
+
+
@@ -170,10 +289,11 @@ From 8c9ffe2b8140e7fa743926a915bf963eb76d2a08 Mon Sep 17 00:00:00 2001 From: xb058t Date: Mon, 23 Mar 2026 10:48:44 -0700 Subject: [PATCH 02/18] Fixed errors --- web/server/vue-cli/src/views/Reports.vue | 289 ++++++++++++----------- 1 file changed, 147 insertions(+), 142 deletions(-) diff --git a/web/server/vue-cli/src/views/Reports.vue b/web/server/vue-cli/src/views/Reports.vue index c16e87c8de..55deb98c4a 100644 --- a/web/server/vue-cli/src/views/Reports.vue +++ b/web/server/vue-cli/src/views/Reports.vue @@ -189,99 +189,102 @@ /> --> - - - - - -
-
-

Old - getRunResults

- - - - -
- -
-

New - getFileCounts

- - - - -
+ + + + + +
+
+

+ Old - getRunResults +

+ + + +
- + +
+

+ New - getFileCounts +

+ + + + +
+
@@ -333,16 +336,36 @@ import { SetCleanupPlanBtn } from "@/components/Report/CleanupPlan"; // ` // }; -// codechecker analyze enable all + store it + show in tree view DONE -// measure the time between current impelementation and the one with getCheckerCounts DONE -// implementation A and B for thesis documentation DONE +// codechecker analyze enable all + store it +// + show in tree view DONE +// measure the time between current +// impelementation and the one with +// getCheckerCounts DONE +// implementation A and B for thesis +// documentation DONE // getFileCounts(report server.thrift) DONE -// getCheckerCounts(report server.thrift) - if performance with getFileCounts is not good, we can try to implement this and use it instead, but it is needed to add new endpoint to get counts for all checkers and not only total count, so it is going to be filename, checker name -> count DONE -// Introduce new hash in table, in some cases when different checkers report to the same line they may report the same error, so it is needed to group them up -// In cases the reports are different we should do mapping table to a bug type and add that to hash again +// getCheckerCounts(report server.thrift) +// - if performance with getFileCounts is not +// good, we can try to implement this and use +// it instead, but it is needed to add new +// endpoint to get counts for all checkers +// and not only total count, so it is going +// to be filename, checker name -> count DONE +// Introduce new hash in table, in some cases +// when different checkers report to the same +// line they may report the same error, so it +// is needed to group them up +// In cases the reports are different we +// should do mapping table to a bug type and +// add that to hash again // Filename, line, bug type -> new hash -// replace to unique reports button to a drop down to be able to choose report hash and a new hash and then we count and sort, then on the top left corner the number of total reports is going to be completely unique +// replace to unique reports button to a drop +// down to be able to choose report hash and +// a new hash and then we count and sort, +// then on the top left corner the number of +// total reports is going to be completely +// unique const namespace = "report"; export default { @@ -750,36 +773,26 @@ export default { expandedItem.item.sameReports = sameReports; }); }, - loadFileCounts(){ - const start = performance.now(); - ccService.getClient().getFileCounts(this.runIds, this.reportFilter, - this.cmpData, 0, 0, handleThriftError(fileCounts => { - const apiEnd = performance.now(); - console.log("getFileCounts API time:", apiEnd - start, "ms"); - - this.allReportsRunResults = fileCounts || []; - - this.$nextTick(() => { - console.log("getFileCounts FULL time:", performance.now() - start, "ms"); - }); + loadFileCounts() { + ccService.getClient().getFileCounts( + this.runIds, this.reportFilter, + this.cmpData, 0, 0, + handleThriftError(fileCounts => { + this.allReportsRunResults = + fileCounts || []; })); }, loadReportsRunResults() { - const start = performance.now(); - ccService.getClient().getRunResults(this.runIds, 0, 0, this.sortType, - this.reportFilter, this.cmpData, this.getDetails, - handleThriftError(reports => { - const apiEnd = performance.now(); - console.log("getRunResults API time:", apiEnd - start, "ms"); - - this.allReportsRunResults = reports || []; - - this.$nextTick(() => { - console.log("getRunResults FULL time:", performance.now() - start, "ms"); - }); - }) - ); + ccService.getClient().getRunResults( + this.runIds, 0, 0, this.sortType, + this.reportFilter, this.cmpData, + this.getDetails, + handleThriftError(reports => { + this.allReportsRunResults = + reports || []; + }) + ); }, getSortMode() { @@ -890,27 +903,19 @@ export default { }); })); - const t1 = performance.now(); - ccService.getClient().getFileCounts(this.runIds, this.reportFilter, - this.cmpData, 0, 0, handleThriftError(fileCounts => { - console.log("getFileCounts API time:", - performance.now() - t1, "ms"); - console.log("getFileCounts total:", - Object.values(fileCounts || {}) - .reduce((sum, n) => sum + n, 0) - ); - this.allReportsFileCounts = fileCounts; + ccService.getClient().getFileCounts( + this.runIds, this.reportFilter, + this.cmpData, 0, 0, + handleThriftError(fileCounts => { + this.allReportsFileCounts = + fileCounts; })); - - const t2 = performance.now(); + ccService.getClient().getRunResults( this.runIds, 0, 0, sortType, - this.reportFilter, this.cmpData, getDetails, + this.reportFilter, this.cmpData, + getDetails, handleThriftError(reports => { - console.log("getRunResults API time:", - performance.now() - t2, "ms"); - console.log("getRunResults length:", - reports ? reports.length : 0); this.allReportsRunResults = reports; })); From 35ca57bde5e2a06e080eed2419f24f9608150e7f Mon Sep 17 00:00:00 2001 From: xb058t Date: Mon, 23 Mar 2026 10:55:35 -0700 Subject: [PATCH 03/18] Comment out Old-getRunResults tree and logic --- web/server/vue-cli/src/views/Reports.vue | 266 +++++++++++------------ 1 file changed, 128 insertions(+), 138 deletions(-) diff --git a/web/server/vue-cli/src/views/Reports.vue b/web/server/vue-cli/src/views/Reports.vue index 55deb98c4a..fa755e0962 100644 --- a/web/server/vue-cli/src/views/Reports.vue +++ b/web/server/vue-cli/src/views/Reports.vue @@ -226,65 +226,55 @@ --> -
+ + + -
-

- Old - getRunResults -

- - - - -
- -
-

- New - getFileCounts -

- - - - -
-
+ + @@ -584,68 +574,67 @@ export default { // return dirs; // }, - formattedDirectoriesForTreeViewRunResults() { - const items = []; - - this.allReportsRunResults.forEach(report => { - const pathParts = report.checkedFile.split("/").slice(0, -1); - let currentLevel = items; - let currentPath = ""; - pathParts.forEach(part => { - if (part === "") return; - - currentPath += "/" + part; - let existingPart = currentLevel.find( - item => item.name === part - ); - if (!existingPart) { - existingPart = { - name: part, - fullPath: currentPath, - children: [], - findings: 0 - }; - currentLevel.push(existingPart); - } - currentLevel = existingPart.children; - }); - - // append filename as a child of the last directory - const fileName = report.checkedFile - .split("/").slice(-1)[0]; - if (fileName) { - const filePath = currentPath + "/" + fileName; - const existingFile = currentLevel.find( - item => item.name === fileName - ); - if (existingFile) { - existingFile.findings += 1; - } else { - currentLevel.push({ - name: fileName, - fullPath: filePath, - children: [], - findings: 1 - }); - } - } - }); - - // count findings for directories - // try replacing with getCheckerCounts if performance is an issue - function countFindings(node) { - if (node.children.length === 0) { - return node.findings; - } else { - node.findings = node.children.reduce((sum, child) => { - return sum + countFindings(child); - }, 0); - return node.findings; - } - } - items.forEach(countFindings); - return items; - }, + // formattedDirectoriesForTreeViewRunResults() { + // const items = []; + // + // this.allReportsRunResults.forEach(report => { + // const pathParts = report.checkedFile + // .split("/").slice(0, -1); + // let currentLevel = items; + // let currentPath = ""; + // pathParts.forEach(part => { + // if (part === "") return; + // + // currentPath += "/" + part; + // let existingPart = currentLevel.find( + // item => item.name === part + // ); + // if (!existingPart) { + // existingPart = { + // name: part, + // fullPath: currentPath, + // children: [], + // findings: 0 + // }; + // currentLevel.push(existingPart); + // } + // currentLevel = existingPart.children; + // }); + // + // const fileName = report.checkedFile + // .split("/").slice(-1)[0]; + // if (fileName) { + // const filePath = currentPath + "/" + fileName; + // const existingFile = currentLevel.find( + // item => item.name === fileName + // ); + // if (existingFile) { + // existingFile.findings += 1; + // } else { + // currentLevel.push({ + // name: fileName, + // fullPath: filePath, + // children: [], + // findings: 1 + // }); + // } + // } + // }); + // + // function countFindings(node) { + // if (node.children.length === 0) { + // return node.findings; + // } else { + // node.findings = node.children.reduce( + // (sum, child) => { + // return sum + countFindings(child); + // }, 0); + // return node.findings; + // } + // } + // items.forEach(countFindings); + // return items; + // }, formattedDirectoriesForTreeViewFileCounts() { const items = []; @@ -778,22 +767,22 @@ export default { this.runIds, this.reportFilter, this.cmpData, 0, 0, handleThriftError(fileCounts => { - this.allReportsRunResults = + this.allReportsFileCounts = fileCounts || []; })); }, - loadReportsRunResults() { - ccService.getClient().getRunResults( - this.runIds, 0, 0, this.sortType, - this.reportFilter, this.cmpData, - this.getDetails, - handleThriftError(reports => { - this.allReportsRunResults = - reports || []; - }) - ); - }, + // loadReportsRunResults() { + // ccService.getClient().getRunResults( + // this.runIds, 0, 0, this.sortType, + // this.reportFilter, this.cmpData, + // this.getDetails, + // handleThriftError(reports => { + // this.allReportsRunResults = + // reports || []; + // }) + // ); + // }, getSortMode() { let type = null; @@ -911,13 +900,14 @@ export default { fileCounts; })); - ccService.getClient().getRunResults( - this.runIds, 0, 0, sortType, - this.reportFilter, this.cmpData, - getDetails, - handleThriftError(reports => { - this.allReportsRunResults = reports; - })); + // ccService.getClient().getRunResults( + // this.runIds, 0, 0, sortType, + // this.reportFilter, this.cmpData, + // getDetails, + // handleThriftError(reports => { + // this.allReportsRunResults = + // reports; + // })); } From c9cbee83a8ef5113e8fe7af541b14190747ae844 Mon Sep 17 00:00:00 2001 From: xb058t Date: Mon, 23 Mar 2026 10:59:43 -0700 Subject: [PATCH 04/18] keeping only neccesary code --- web/server/vue-cli/src/views/Reports.vue | 238 +---------------------- 1 file changed, 1 insertion(+), 237 deletions(-) diff --git a/web/server/vue-cli/src/views/Reports.vue b/web/server/vue-cli/src/views/Reports.vue index fa755e0962..6157c8d8e3 100644 --- a/web/server/vue-cli/src/views/Reports.vue +++ b/web/server/vue-cli/src/views/Reports.vue @@ -175,85 +175,6 @@ - - - - - - - - - - - -//
  • -// {{ name }} : {{ findings }} findings -//
  • -//
    -// -//
    -// -// ` -// }; - -// codechecker analyze enable all + store it -// + show in tree view DONE -// measure the time between current -// impelementation and the one with -// getCheckerCounts DONE -// implementation A and B for thesis -// documentation DONE -// getFileCounts(report server.thrift) DONE - -// getCheckerCounts(report server.thrift) -// - if performance with getFileCounts is not -// good, we can try to implement this and use -// it instead, but it is needed to add new -// endpoint to get counts for all checkers -// and not only total count, so it is going -// to be filename, checker name -> count DONE -// Introduce new hash in table, in some cases -// when different checkers report to the same -// line they may report the same error, so it -// is needed to group them up -// In cases the reports are different we -// should do mapping table to a bug type and -// add that to hash again -// Filename, line, bug type -> new hash -// replace to unique reports button to a drop -// down to be able to choose report hash and -// a new hash and then we count and sort, -// then on the top left corner the number of -// total reports is going to be completely -// unique const namespace = "report"; export default { @@ -385,7 +251,6 @@ export default { return { viewMode: "table", - // directories: [], headers: [ { text: "", @@ -460,7 +325,6 @@ export default { } ], reports: [], - allReportsRunResults: [], allReportsFileCounts: [], sameReports: {}, hasTimeStamp: true, @@ -557,85 +421,6 @@ export default { }); }, - // formattedDirectories() { - // const dirs = {}; - // this.reports.forEach(report => { - // const pathParts = report.checkedFile.split("/") - // .slice(0, -1); - // let currentDir = dirs; - // pathParts.forEach(part => { - // if (part === "") return; - // if (!currentDir[part]) { - // currentDir[part] = {}; - // } - // currentDir = currentDir[part]; - // }); - // }); - // return dirs; - // }, - - // formattedDirectoriesForTreeViewRunResults() { - // const items = []; - // - // this.allReportsRunResults.forEach(report => { - // const pathParts = report.checkedFile - // .split("/").slice(0, -1); - // let currentLevel = items; - // let currentPath = ""; - // pathParts.forEach(part => { - // if (part === "") return; - // - // currentPath += "/" + part; - // let existingPart = currentLevel.find( - // item => item.name === part - // ); - // if (!existingPart) { - // existingPart = { - // name: part, - // fullPath: currentPath, - // children: [], - // findings: 0 - // }; - // currentLevel.push(existingPart); - // } - // currentLevel = existingPart.children; - // }); - // - // const fileName = report.checkedFile - // .split("/").slice(-1)[0]; - // if (fileName) { - // const filePath = currentPath + "/" + fileName; - // const existingFile = currentLevel.find( - // item => item.name === fileName - // ); - // if (existingFile) { - // existingFile.findings += 1; - // } else { - // currentLevel.push({ - // name: fileName, - // fullPath: filePath, - // children: [], - // findings: 1 - // }); - // } - // } - // }); - // - // function countFindings(node) { - // if (node.children.length === 0) { - // return node.findings; - // } else { - // node.findings = node.children.reduce( - // (sum, child) => { - // return sum + countFindings(child); - // }, 0); - // return node.findings; - // } - // } - // items.forEach(countFindings); - // return items; - // }, - formattedDirectoriesForTreeViewFileCounts() { const items = []; @@ -772,18 +557,6 @@ export default { })); }, - // loadReportsRunResults() { - // ccService.getClient().getRunResults( - // this.runIds, 0, 0, this.sortType, - // this.reportFilter, this.cmpData, - // this.getDetails, - // handleThriftError(reports => { - // this.allReportsRunResults = - // reports || []; - // }) - // ); - // }, - getSortMode() { let type = null; switch (this.pagination.sortBy[0]) { @@ -900,18 +673,9 @@ export default { fileCounts; })); - // ccService.getClient().getRunResults( - // this.runIds, 0, 0, sortType, - // this.reportFilter, this.cmpData, - // getDetails, - // handleThriftError(reports => { - // this.allReportsRunResults = - // reports; - // })); - } - + } }; From 7f8edd47d3be7698d1b2738ab49c84ffb3989a9e Mon Sep 17 00:00:00 2001 From: xb058t Date: Thu, 26 Mar 2026 09:57:01 +0100 Subject: [PATCH 05/18] adding tables into tree view --- web/server/vue-cli/src/views/Reports.vue | 335 ++++++++++++++++++----- 1 file changed, 262 insertions(+), 73 deletions(-) diff --git a/web/server/vue-cli/src/views/Reports.vue b/web/server/vue-cli/src/views/Reports.vue index 6157c8d8e3..a8d99784f2 100644 --- a/web/server/vue-cli/src/views/Reports.vue +++ b/web/server/vue-cli/src/views/Reports.vue @@ -175,27 +175,113 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + mdi-cursor-default-click + +
    Select a file from the tree to view its reports
    +
    +
    +
    +
    +
    @@ -206,7 +292,14 @@ import { Pane, Splitpanes } from "splitpanes"; import { mapGetters, mapMutations } from "vuex"; import { ccService, handleThriftError } from "@cc-api"; -import { Checker, Order, SortMode, SortType } from "@cc/report-server-types"; +import { + Checker, + MAX_QUERY_SIZE, + Order, + SortMode, + SortType, + ReportFilter as ThriftReportFilter +} from "@cc/report-server-types"; import { SET_REPORT_FILTER } from "@/store/mutations.type"; import { FillHeight } from "@/directives"; @@ -349,7 +442,11 @@ export default { initalized: false, checkerDocDialog: false, selectedChecker: null, - expanded: [] + expanded: [], + treeItems: [], + treeSelectedFile: null, + treeReports: [], + treeReportsLoading: false }; }, @@ -421,9 +518,121 @@ export default { }); }, - formattedDirectoriesForTreeViewFileCounts() { + treeTableHeaders() { + return [ + { + text: "Line", + value: "checkedFile", + sortable: false + }, + { + text: "Message", + value: "checkerMsg", + sortable: false + }, + { + text: "Checker name", + value: "checkerId", + sortable: false + }, + { + text: "Analyzer", + value: "analyzerName", + align: "center", + sortable: false + }, + { + text: "Severity", + value: "severity", + sortable: false + }, + { + text: "Bug path length", + value: "bugPathLength", + align: "center", + sortable: false + }, + { + text: "Latest review status", + value: "reviewData", + align: "center", + sortable: false + }, + { + text: "Latest detection status", + value: "detectionStatus", + align: "center", + sortable: false + } + ]; + }, + + formattedTreeReports() { + return this.treeReports.map((report, idx) => { + const detectionStatus = + this.detectionStatusFromCodeToString(report.detectionStatus); + const detectedAt = report.detectedAt + ? this.$options.filters.prettifyDate(report.detectedAt) : null; + const fixedAt = report.fixedAt + ? this.$options.filters.prettifyDate(report.fixedAt) : null; + + const detectionStatusTitle = [ + `Status: ${detectionStatus}`, + ...(detectedAt ? [ `Detected at: ${detectedAt}` ] : []), + ...(fixedAt ? [ `Fixed at: ${fixedAt}` ] : []) + ].join("\n"); + + const reportId = report.reportId + ? report.reportId.toString() : String(idx); + + return { + ...report, + "$detectionStatusTitle": detectionStatusTitle, + "$id": reportId + report.bugHash + }; + }); + }, + + }, + + watch: { + pagination: { + handler() { + this.updateUrl(); + if (this.initalized) { + this.fetchReports(); + } + }, + deep: true + }, + formattedReports: { + handler() { + this.hasTimeStamp = + this.formattedReports.some(report => report.timestamp); + + this.hasTestCase = + this.formattedReports.some(report => report.testcase); + + this.hasChronologicalOrder = + this.formattedReports.some(report => report["chronological_order"]); + } + }, + allReportsFileCounts: { + handler() { + this.buildTreeItems(); + }, + deep: true + } + }, + + methods: { + ...mapMutations(namespace, { + setReportFilter: SET_REPORT_FILTER + }), + + buildTreeItems() { const items = []; - + Object.entries( this.allReportsFileCounts || {} ).forEach(([ filePath, count ]) => { @@ -443,7 +652,8 @@ export default { name: part, fullPath: currentPath, children: [], - findings: 0 + findings: 0, + isDirectory: true }; currentLevel.push(existingPart); } @@ -482,61 +692,33 @@ export default { } } items.forEach(countFindings); - return items; - }, - - - }, - - watch: { - pagination: { - handler() { - this.updateUrl(); - if (this.initalized) { - this.fetchReports(); - } - }, - deep: true + this.treeItems = items; }, - formattedReports: { - handler() { - this.hasTimeStamp = - this.formattedReports.some(report => report.timestamp); - - this.hasTestCase = - this.formattedReports.some(report => report.testcase); - this.hasChronologicalOrder = - this.formattedReports.some(report => report["chronological_order"]); + onTreeFileClick(activeItems) { + if (!activeItems || activeItems.length === 0) { + this.treeSelectedFile = null; + this.treeReports = []; + return; } - } - }, - methods: { - ...mapMutations(namespace, { - setReportFilter: SET_REPORT_FILTER - }), + const item = activeItems[0]; + if (!item || item.isDirectory) return; - onTreeFileClick(activeItems) { - // activeItems is an array of item-key values (fullPath) - if (!activeItems || activeItems.length === 0) return; + this.treeSelectedFile = item.fullPath; + this.treeReportsLoading = true; - const filePath = activeItems[0]; - if (!filePath) return; + const filter = new ThriftReportFilter(this.reportFilter); + filter.filepath = [ item.fullPath ]; - // Find the FilePathFilter instance inside ReportFilter - // and call its setSelectedItems to select this file. - const filters = this.$refs.reportFilter.$refs.filters; - const filePathFilter = filters.find( - f => f.id === "filepath" + ccService.getClient().getRunResults( + this.runIds, MAX_QUERY_SIZE, 0, [], + filter, this.cmpData, false, + handleThriftError(reports => { + this.treeReports = reports; + this.treeReportsLoading = false; + }) ); - if (filePathFilter) { - filePathFilter.setSelectedItems([ - { id: filePath, title: filePath, count: "N/A" } - ]); - } - - this.viewMode = "table"; }, itemExpanded(expandedItem) { @@ -547,6 +729,7 @@ export default { expandedItem.item.sameReports = sameReports; }); }, + loadFileCounts() { ccService.getClient().getFileCounts( this.runIds, this.reportFilter, @@ -698,4 +881,10 @@ export default { cursor: pointer; } } + +.tree-split { + .splitpanes__pane { + background-color: inherit; + } +} From a0e60bb5ff1527e496940db848e001f930cbbc7c Mon Sep 17 00:00:00 2001 From: xb058t Date: Thu, 26 Mar 2026 21:11:41 +0100 Subject: [PATCH 06/18] tree view in file path --- .../ReportFilter/Filters/FilePathFilter.vue | 143 +++++++++++++++++- web/server/vue-cli/src/views/Reports.vue | 139 ----------------- 2 files changed, 140 insertions(+), 142 deletions(-) diff --git a/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue b/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue index ccee7da0b0..081099ee05 100644 --- a/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue +++ b/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue @@ -12,8 +12,38 @@ @clear="clear(true)" @input="setSelectedItems" > - @@ -250,7 +218,6 @@ export default { const sortDesc = this.$router.currentRoute.query["sort-desc"]; return { - viewMode: "table", headers: [ { text: "", @@ -325,7 +292,6 @@ export default { } ], reports: [], - allReportsFileCounts: [], sameReports: {}, hasTimeStamp: true, hasTestCase : true, @@ -421,71 +387,6 @@ export default { }); }, - formattedDirectoriesForTreeViewFileCounts() { - const items = []; - - Object.entries( - this.allReportsFileCounts || {} - ).forEach(([ filePath, count ]) => { - if (!filePath) return; - const pathParts = filePath.split("/").slice(0, -1); - let currentLevel = items; - let currentPath = ""; - pathParts.forEach(part => { - if (part === "") return; - - currentPath += "/" + part; - let existingPart = currentLevel.find( - item => item.name === part - ); - if (!existingPart) { - existingPart = { - name: part, - fullPath: currentPath, - children: [], - findings: 0 - }; - currentLevel.push(existingPart); - } - currentLevel = existingPart.children; - }); - - // append filename as a child of the last directory - const fileName = filePath.split("/").slice(-1)[0]; - if (fileName) { - const existingFile = currentLevel.find( - item => item.name === fileName - ); - if (existingFile) { - existingFile.findings += count; - } else { - currentLevel.push({ - name: fileName, - fullPath: filePath, - children: [], - findings: count - }); - } - } - }); - - // count findings for directories - // try replacing with getCheckerCounts if performance is an issue - function countFindings(node) { - if (node.children.length === 0) { - return node.findings; - } else { - node.findings = node.children.reduce((sum, child) => { - return sum + countFindings(child); - }, 0); - return node.findings; - } - } - items.forEach(countFindings); - return items; - }, - - }, watch: { @@ -517,28 +418,6 @@ export default { setReportFilter: SET_REPORT_FILTER }), - onTreeFileClick(activeItems) { - // activeItems is an array of item-key values (fullPath) - if (!activeItems || activeItems.length === 0) return; - - const filePath = activeItems[0]; - if (!filePath) return; - - // Find the FilePathFilter instance inside ReportFilter - // and call its setSelectedItems to select this file. - const filters = this.$refs.reportFilter.$refs.filters; - const filePathFilter = filters.find( - f => f.id === "filepath" - ); - if (filePathFilter) { - filePathFilter.setSelectedItems([ - { id: filePath, title: filePath, count: "N/A" } - ]); - } - - this.viewMode = "table"; - }, - itemExpanded(expandedItem) { if (expandedItem.item.sameReports) return; @@ -547,16 +426,6 @@ export default { expandedItem.item.sameReports = sameReports; }); }, - loadFileCounts() { - ccService.getClient().getFileCounts( - this.runIds, this.reportFilter, - this.cmpData, 0, 0, - handleThriftError(fileCounts => { - this.allReportsFileCounts = - fileCounts || []; - })); - }, - getSortMode() { let type = null; switch (this.pagination.sortBy[0]) { @@ -665,14 +534,6 @@ export default { }); })); - ccService.getClient().getFileCounts( - this.runIds, this.reportFilter, - this.cmpData, 0, 0, - handleThriftError(fileCounts => { - this.allReportsFileCounts = - fileCounts; - })); - } From 03784abd3b510856257a496b88a65ec704da80be Mon Sep 17 00:00:00 2001 From: xb058t Date: Thu, 26 Mar 2026 21:15:53 +0100 Subject: [PATCH 07/18] minor errors fix --- .../Report/ReportFilter/Filters/FilePathFilter.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue b/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue index 081099ee05..394968cd5a 100644 --- a/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue +++ b/web/server/vue-cli/src/components/Report/ReportFilter/Filters/FilePathFilter.vue @@ -1,6 +1,7 @@