From f23fb3e4621cf4452ee13a61273142020560b7a4 Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Tue, 17 Dec 2024 23:38:13 +0530 Subject: [PATCH 1/6] fix: fixed vul and ignored testing counts # Conflicts: # apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java --- .../akto/action/testing/StartTestAction.java | 27 ++++++++++++---- .../action/testing_issues/IssuesAction.java | 23 ++++++++++++- apps/dashboard/src/main/resources/struts.xml | 4 +-- .../SingleTestRunPage/SingleTestRunPage.js | 32 +++---------------- .../VulnerabilityReport.jsx | 10 +++--- 5 files changed, 54 insertions(+), 42 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index 8f2a26fdc8..84ab986d2e 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -595,7 +595,25 @@ public String fetchTestingRunResults() { if (testingRunResultSummaryHexId != null) loggerMaker.infoAndAddToDb("fetchTestingRunResults called for hexId=" + testingRunResultSummaryHexId); if (queryMode != null) loggerMaker.infoAndAddToDb("fetchTestingRunResults called for queryMode="+queryMode); + Bson ignoredIssuesFilters = Filters.and( + Filters.in(TestingRunIssues.TEST_RUN_ISSUES_STATUS, "IGNORED"), + Filters.in(TestingRunIssues.LATEST_TESTING_RUN_SUMMARY_ID, testingRunResultSummaryId) + ); + List issueslist = TestingRunIssuesDao.instance.findAll(ignoredIssuesFilters, Projections.include("_id")); + List apiInfoKeyList = new ArrayList<>(); + List testSubCategoryList = new ArrayList<>(); + for(TestingRunIssues issue : issueslist) { + apiInfoKeyList.add(issue.getId().getApiInfoKey()); + testSubCategoryList.add(issue.getId().getTestSubCategory()); + } + List testingRunResultFilters = prepareTestRunResultsFilters(testingRunResultSummaryId, queryMode); + testingRunResultFilters.add( + Filters.and( + Filters.nin(TestingRunResult.API_INFO_KEY, apiInfoKeyList), + Filters.nin(TestingRunResult.TEST_SUB_TYPE, testSubCategoryList) + ) + ); if(queryMode == QueryMode.SKIPPED_EXEC || queryMode == QueryMode.SKIPPED_EXEC_NEED_CONFIG){ TestError[] testErrors = TestResult.TestError.values(); @@ -635,13 +653,8 @@ public String fetchTestingRunResults() { testCountMap.put(qm.toString(), count); } - Bson ignoredIssuesFilters = Filters.and( - Filters.in(TestingRunIssues.TEST_RUN_ISSUES_STATUS, Arrays.asList("IGNORED", "FIXED")), - Filters.in(TestingRunIssues.LATEST_TESTING_RUN_SUMMARY_ID, testingRunResultSummaryId) - ); - int count = (int) TestingRunIssuesDao.instance.count(ignoredIssuesFilters); - testCountMap.put(QueryMode.VULNERABLE.name(), Math.abs(testCountMap.getOrDefault(QueryMode.VULNERABLE.name(), 0)-count)); - testCountMap.put("IGNORED_ISSUES", count); + testCountMap.put(QueryMode.VULNERABLE.name(), Math.abs(testCountMap.getOrDefault(QueryMode.VULNERABLE.name(), 0)- issueslist.size())); + testCountMap.put("IGNORED_ISSUES", issueslist.size()); } catch (Exception e) { loggerMaker.errorAndAddToDb(e, "error in fetchLatestTestingRunResult: " + e); } diff --git a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java index b831f63d8e..f246cda633 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java @@ -527,12 +527,29 @@ public String bulkUpdateIssueStatus () { String latestTestingRunSummaryId; List issueStatusQuery; + List testingRunResultList; public String fetchIssuesByStatusAndSummaryId() { Bson filters = Filters.and( Filters.in(TestingRunIssues.TEST_RUN_ISSUES_STATUS, issueStatusQuery), Filters.in(TestingRunIssues.LATEST_TESTING_RUN_SUMMARY_ID, new ObjectId(latestTestingRunSummaryId)) ); - issues = TestingRunIssuesDao.instance.findAll(filters); + issues = TestingRunIssuesDao.instance.findAll(filters, Projections.include("_id")); + + List apiInfoKeyList = new ArrayList<>(); + List testSubCategoryList = new ArrayList<>(); + for(TestingRunIssues issue : issues) { + apiInfoKeyList.add(issue.getId().getApiInfoKey()); + testSubCategoryList.add(issue.getId().getTestSubCategory()); + } + + Bson trsFilters = Filters.and( + Filters.in(TestingRunResult.API_INFO_KEY, apiInfoKeyList), + Filters.in(TestingRunResult.TEST_SUB_TYPE, testSubCategoryList), + Filters.in(TestingRunResult.VULNERABLE, true) + ); + + testingRunResultList = TestingRunResultDao.instance.findAll(trsFilters); + return SUCCESS.toUpperCase(); } @@ -824,6 +841,10 @@ public TestingRunResultSummary getTestingRunResultSummary() { return testingRunResultSummary; } + public List getTestingRunResultList() { + return testingRunResultList; + } + public void setReportFilterList(Map> reportFilterList) { this.reportFilterList = reportFilterList; } diff --git a/apps/dashboard/src/main/resources/struts.xml b/apps/dashboard/src/main/resources/struts.xml index 0381d57e7b..e9536f35af 100644 --- a/apps/dashboard/src/main/resources/struts.xml +++ b/apps/dashboard/src/main/resources/struts.xml @@ -7538,9 +7538,7 @@ false ^actionErrors.* - - issues - + 422 false diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js index 7a8013c8f1..c0ba3122b7 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js @@ -261,35 +261,13 @@ function SingleTestRunPage() { setSelectedTestRun(localSelectedTestRun); if(localSelectedTestRun.testingRunResultSummaryHexId) { - if(selectedTab === 'ignored_issues' || selectedTab === 'vulnerable') { - let vulnerableTestingRunResults = [] - await api.fetchTestingRunResults(localSelectedTestRun.testingRunResultSummaryHexId, "VULNERABLE", sortKey, sortOrder, skip, limit, filters, queryValue).then(({ testingRunResults, testCountMap }) => { - testRunCountMap = testCountMap - vulnerableTestingRunResults = testingRunResults - testRunResultsRes = transform.prepareTestRunResults(hexId, testingRunResults, subCategoryMap, subCategoryFromSourceConfigMap) - const orderedValues = tableTabsOrder.map(key => testCountMap[tableTabMap[key]] || 0) - setTestRunResultsCount(orderedValues) - }) + if(selectedTab === 'ignored_issues') { let ignoredTestRunResults = [] - await api.fetchIssuesByStatusAndSummaryId(localSelectedTestRun.testingRunResultSummaryHexId, ["IGNORED", "FIXED"]).then((issues) => { - const ignoredTestingResults = vulnerableTestingRunResults.filter(result => { - return issues.some(issue => - issue.id.apiInfoKey.apiCollectionId === result.apiInfoKey.apiCollectionId && - issue.id.apiInfoKey.method === result.apiInfoKey.method && - issue.id.apiInfoKey.url === result.apiInfoKey.url && - issue.id.testSubCategory === result.testSubType - ) - }) - - ignoredTestRunResults = transform.prepareTestRunResults(hexId, ignoredTestingResults, subCategoryMap, subCategoryFromSourceConfigMap) - }) - - const updatedVulnerableTestRunResults = testRunResultsRes.filter(result => { - return !ignoredTestRunResults.some(ignoredResult => { - return JSON.stringify(result) === JSON.stringify(ignoredResult) - }) + await api.fetchIssuesByStatusAndSummaryId(localSelectedTestRun.testingRunResultSummaryHexId, ["IGNORED"]).then((resp) => { + const ignoredIssuesTestingResult = resp?.testingRunResultList || []; + ignoredTestRunResults = transform.prepareTestRunResults(hexId, ignoredIssuesTestingResult, subCategoryMap, subCategoryFromSourceConfigMap) }) - testRunResultsRes = selectedTab === 'vulnerable' ? updatedVulnerableTestRunResults : ignoredTestRunResults + testRunResultsRes = ignoredTestRunResults } else { await api.fetchTestingRunResults(localSelectedTestRun.testingRunResultSummaryHexId, tableTabMap[selectedTab], sortKey, sortOrder, skip, limit, filters, queryValue).then(({ testingRunResults, testCountMap, errorEnums }) => { testRunCountMap = testCountMap diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/vulnerability_report/VulnerabilityReport.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/vulnerability_report/VulnerabilityReport.jsx index bfb8cfcc93..c2ba3f14b2 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/vulnerability_report/VulnerabilityReport.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/vulnerability_report/VulnerabilityReport.jsx @@ -81,18 +81,20 @@ const VulnerabilityReport = () => { if (window.location.pathname.includes('testing')) { const testingRunSummaryId = currentFilters.testingRunResultSummaryId[0] await api.fetchTestingRunResultsSummary(testingRunSummaryId).then((resp) => { - let startTimestamp = '-' if(resp == null) { setScanTime('-') } else if(resp?.state === 'COMPLETED') { const time = func.getTimeTakenByTest(resp?.startTimestamp, resp?.endTimestamp) setScanTime(time || '-') - startTimestamp = func.getFormattedDate(resp?.startTimestamp) } else { setScanTime("-") - startTimestamp = func.getFormattedDate(resp?.startTimestamp) } - setCurrentDate(startTimestamp) + + if(resp?.startTimestamp) { + setCurrentDate(func.getFormattedDate(resp?.startTimestamp)) + } else { + setCurrentDate('-') + } }) while (true) { From 2149d881968cff6e05627d48b9131fc4bff7349b Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:09:57 +0530 Subject: [PATCH 2/6] fixed a bug --- .../com/akto/action/testing/StartTestAction.java | 14 ++++++++------ .../testing/SingleTestRunPage/SingleTestRunPage.js | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index 84ab986d2e..13a8df76c1 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -608,12 +608,14 @@ public String fetchTestingRunResults() { } List testingRunResultFilters = prepareTestRunResultsFilters(testingRunResultSummaryId, queryMode); - testingRunResultFilters.add( - Filters.and( - Filters.nin(TestingRunResult.API_INFO_KEY, apiInfoKeyList), - Filters.nin(TestingRunResult.TEST_SUB_TYPE, testSubCategoryList) - ) - ); + if(queryMode == QueryMode.VULNERABLE) { + testingRunResultFilters.add( + Filters.and( + Filters.nin(TestingRunResult.API_INFO_KEY, apiInfoKeyList), + Filters.nin(TestingRunResult.TEST_SUB_TYPE, testSubCategoryList) + ) + ); + } if(queryMode == QueryMode.SKIPPED_EXEC || queryMode == QueryMode.SKIPPED_EXEC_NEED_CONFIG){ TestError[] testErrors = TestResult.TestError.values(); diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js index c0ba3122b7..8b998c8d96 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js @@ -246,6 +246,7 @@ function SingleTestRunPage() { const fetchTableData = async (sortKey, sortOrder, skip, limit, filters, filterOperators, queryValue) => { let testRunResultsRes = [] let testRunCountMap = [] + let totalIgnoredIssuesCount = 0 const { testingRun, workflowTest, testingRunType } = testingRunResultSummariesObj if(testingRun === undefined){ return {value: [], total: 0} @@ -268,6 +269,7 @@ function SingleTestRunPage() { ignoredTestRunResults = transform.prepareTestRunResults(hexId, ignoredIssuesTestingResult, subCategoryMap, subCategoryFromSourceConfigMap) }) testRunResultsRes = ignoredTestRunResults + totalIgnoredIssuesCount = ignoredTestRunResults.length } else { await api.fetchTestingRunResults(localSelectedTestRun.testingRunResultSummaryHexId, tableTabMap[selectedTab], sortKey, sortOrder, skip, limit, filters, queryValue).then(({ testingRunResults, testCountMap, errorEnums }) => { testRunCountMap = testCountMap @@ -283,7 +285,7 @@ function SingleTestRunPage() { } } fillTempData(testRunResultsRes, selectedTab) - return {value: transform.getPrettifiedTestRunResults(testRunResultsRes), total: testRunCountMap[tableTabMap[selectedTab]]} + return {value: transform.getPrettifiedTestRunResults(testRunResultsRes), total: selectedTab === 'ignored_issues' ? totalIgnoredIssuesCount : testRunCountMap[tableTabMap[selectedTab]]} } useEffect(() => { From dc3bc605c6a5e10232bee26b9de66a783e98af4f Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Mon, 23 Dec 2024 01:04:12 +0530 Subject: [PATCH 3/6] fix: fixed testing run table ignored issues and vul issues count --- .../akto/action/testing/StartTestAction.java | 113 +++++++++++------- .../action/testing_issues/IssuesAction.java | 30 ++--- .../SingleTestRunPage/SingleTestRunPage.js | 2 +- .../src/apps/dashboard/pages/testing/api.js | 4 +- 4 files changed, 88 insertions(+), 61 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index 13a8df76c1..f065f97caf 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -510,26 +510,7 @@ private List prepareTestRunResultsFilters(ObjectId testingRunResultSummary List filterList = new ArrayList<>(); filterList.add(Filters.eq(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, testingRunResultSummaryId)); - if(filters != null && !filters.isEmpty()) { - for(Map.Entry filterEntry : filters.entrySet()) { - String key = filterEntry.getKey(); - switch (key) { - case "severityStatus": - filterList.add(Filters.in(TestingRunResult.TEST_RESULTS+"."+GenericTestResult._CONFIDENCE, filterEntry.getValue())); - break; - case "apiCollectionId": - case "collectionIds": - filterList.add(Filters.in(TestingRunResult.API_INFO_KEY+"."+ApiInfo.ApiInfoKey.API_COLLECTION_ID, filterEntry.getValue())); - break; - case "method": - filterList.add(Filters.in(TestingRunResult.API_INFO_KEY+"."+ApiInfo.ApiInfoKey.METHOD, filterEntry.getValue())); - break; - case "categoryFilter": - filterList.add(Filters.in(TestingRunResult.TEST_SUPER_TYPE, filterEntry.getValue())); - break; - } - } - } + prepareTestingRunResultTableFilters(filterList, filters); if(queryMode == null) { if(fetchOnlyVulnerable) { @@ -572,6 +553,44 @@ private List prepareTestRunResultsFilters(ObjectId testingRunResultSummary return filterList; } + public static void prepareTestingRunResultTableFilters(List filterList, Map filters) { + if(filters != null && !filters.isEmpty()) { + for(Map.Entry filterEntry : filters.entrySet()) { + String key = filterEntry.getKey(); + switch (key) { + case "severityStatus": + filterList.add(Filters.in(TestingRunResult.TEST_RESULTS+"."+GenericTestResult._CONFIDENCE, filterEntry.getValue())); + break; + case "apiCollectionId": + case "collectionIds": + filterList.add(Filters.in(TestingRunResult.API_INFO_KEY+"."+ApiInfo.ApiInfoKey.API_COLLECTION_ID, filterEntry.getValue())); + break; + case "method": + filterList.add(Filters.in(TestingRunResult.API_INFO_KEY+"."+ApiInfo.ApiInfoKey.METHOD, filterEntry.getValue())); + break; + case "categoryFilter": + filterList.add(Filters.in(TestingRunResult.TEST_SUPER_TYPE, filterEntry.getValue())); + break; + } + } + } + } + + public static Bson prepareTestingRunResultCustomSorting(String sortKey, int sortOrder) { + Bson sortStage = null; + if (TestingRunIssues.KEY_SEVERITY.equals(sortKey)) { + sortStage = (sortOrder == 1) ? + Aggregates.sort(Sorts.ascending("severityValue", TestingRunResult.END_TIMESTAMP)) : + Aggregates.sort(Sorts.descending("severityValue", TestingRunResult.END_TIMESTAMP)); + } else if ("time".equals(sortKey)) { + sortStage = (sortOrder == 1) ? + Aggregates.sort(Sorts.ascending(TestingRunResult.END_TIMESTAMP)) : + Aggregates.sort(Sorts.descending(TestingRunResult.END_TIMESTAMP)); + } + + return sortStage; + } + String testingRunResultSummaryHexId; List testingRunResults; private boolean fetchOnlyVulnerable; @@ -600,22 +619,8 @@ public String fetchTestingRunResults() { Filters.in(TestingRunIssues.LATEST_TESTING_RUN_SUMMARY_ID, testingRunResultSummaryId) ); List issueslist = TestingRunIssuesDao.instance.findAll(ignoredIssuesFilters, Projections.include("_id")); - List apiInfoKeyList = new ArrayList<>(); - List testSubCategoryList = new ArrayList<>(); - for(TestingRunIssues issue : issueslist) { - apiInfoKeyList.add(issue.getId().getApiInfoKey()); - testSubCategoryList.add(issue.getId().getTestSubCategory()); - } List testingRunResultFilters = prepareTestRunResultsFilters(testingRunResultSummaryId, queryMode); - if(queryMode == QueryMode.VULNERABLE) { - testingRunResultFilters.add( - Filters.and( - Filters.nin(TestingRunResult.API_INFO_KEY, apiInfoKeyList), - Filters.nin(TestingRunResult.TEST_SUB_TYPE, testSubCategoryList) - ) - ); - } if(queryMode == QueryMode.SKIPPED_EXEC || queryMode == QueryMode.SKIPPED_EXEC_NEED_CONFIG){ TestError[] testErrors = TestResult.TestError.values(); @@ -629,20 +634,13 @@ public String fetchTestingRunResults() { try { int pageLimit = limit <= 0 ? 150 : limit; - Bson sortStage = null; - if (TestingRunIssues.KEY_SEVERITY.equals(sortKey)) { - sortStage = (sortOrder == 1) ? - Aggregates.sort(Sorts.ascending("severityValue", TestingRunResult.END_TIMESTAMP)) : - Aggregates.sort(Sorts.descending("severityValue", TestingRunResult.END_TIMESTAMP)); - } else if ("time".equals(sortKey)) { - sortStage = (sortOrder == 1) ? - Aggregates.sort(Sorts.ascending(TestingRunResult.END_TIMESTAMP)) : - Aggregates.sort(Sorts.descending(TestingRunResult.END_TIMESTAMP)); - } + Bson sortStage = prepareTestingRunResultCustomSorting(sortKey, sortOrder); this.testingRunResults = TestingRunResultDao.instance .fetchLatestTestingRunResultWithCustomAggregations(Filters.and(testingRunResultFilters), pageLimit, skip, sortStage); + removeTestingRunResultsByIssues(testingRunResults, issueslist, false); + testCountMap = new HashMap<>(); for(QueryMode qm : QueryMode.values()) { if(qm.equals(QueryMode.ALL) || qm.equals(QueryMode.SKIPPED_EXEC_NO_ACTION)) { @@ -664,6 +662,33 @@ public String fetchTestingRunResults() { return SUCCESS.toUpperCase(); } + public static void removeTestingRunResultsByIssues(List testingRunResults, + List testingRunIssues, + boolean retainByIssues) { + Set issuesSet = new HashSet<>(); + for (TestingRunIssues issue : testingRunIssues) { + String apiInfoKeyString = issue.getId().getApiInfoKey().toString(); + String key = apiInfoKeyString + "|" + issue.getId().getTestSubCategory(); + issuesSet.add(key); + } + + Iterator resultIterator = testingRunResults.iterator(); + + while (resultIterator.hasNext()) { + TestingRunResult result = resultIterator.next(); + String apiInfoKeyString = result.getApiInfoKey().toString(); + String resultKey = apiInfoKeyString + "|" + result.getTestSubType(); + + boolean matchFound = issuesSet.contains(resultKey); + + if (retainByIssues && !matchFound) { + resultIterator.remove(); + } else if (!retainByIssues && matchFound) { + resultIterator.remove(); + } + } + } + private Map> reportFilterList; public String fetchVulnerableTestRunResults() { diff --git a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java index f246cda633..eb3b2e66c4 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java @@ -528,27 +528,25 @@ public String bulkUpdateIssueStatus () { String latestTestingRunSummaryId; List issueStatusQuery; List testingRunResultList; + private Map filters; public String fetchIssuesByStatusAndSummaryId() { - Bson filters = Filters.and( + Bson triFilters = Filters.and( Filters.in(TestingRunIssues.TEST_RUN_ISSUES_STATUS, issueStatusQuery), Filters.in(TestingRunIssues.LATEST_TESTING_RUN_SUMMARY_ID, new ObjectId(latestTestingRunSummaryId)) ); - issues = TestingRunIssuesDao.instance.findAll(filters, Projections.include("_id")); + issues = TestingRunIssuesDao.instance.findAll(triFilters, Projections.include("_id")); - List apiInfoKeyList = new ArrayList<>(); - List testSubCategoryList = new ArrayList<>(); - for(TestingRunIssues issue : issues) { - apiInfoKeyList.add(issue.getId().getApiInfoKey()); - testSubCategoryList.add(issue.getId().getTestSubCategory()); - } + List filterList = new ArrayList<>(); + filterList.add(Filters.and( + Filters.eq(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, new ObjectId(latestTestingRunSummaryId)), + Filters.eq(TestingRunResult.VULNERABLE, true) + )); + StartTestAction.prepareTestingRunResultTableFilters(filterList, filters); + Bson sortStage = StartTestAction.prepareTestingRunResultCustomSorting(sortKey, sortOrder); - Bson trsFilters = Filters.and( - Filters.in(TestingRunResult.API_INFO_KEY, apiInfoKeyList), - Filters.in(TestingRunResult.TEST_SUB_TYPE, testSubCategoryList), - Filters.in(TestingRunResult.VULNERABLE, true) - ); + testingRunResultList = TestingRunResultDao.instance.fetchLatestTestingRunResultWithCustomAggregations(Filters.and(filterList), 1_000_000, 0, sortStage); - testingRunResultList = TestingRunResultDao.instance.findAll(trsFilters); + StartTestAction.removeTestingRunResultsByIssues(testingRunResultList, issues, true); return SUCCESS.toUpperCase(); } @@ -845,6 +843,10 @@ public List getTestingRunResultList() { return testingRunResultList; } + public void setFilters(Map filters) { + this.filters = filters; + } + public void setReportFilterList(Map> reportFilterList) { this.reportFilterList = reportFilterList; } diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js index 8b998c8d96..2010d2e148 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js @@ -264,7 +264,7 @@ function SingleTestRunPage() { if(localSelectedTestRun.testingRunResultSummaryHexId) { if(selectedTab === 'ignored_issues') { let ignoredTestRunResults = [] - await api.fetchIssuesByStatusAndSummaryId(localSelectedTestRun.testingRunResultSummaryHexId, ["IGNORED"]).then((resp) => { + await api.fetchIssuesByStatusAndSummaryId(localSelectedTestRun.testingRunResultSummaryHexId, ["IGNORED"], sortKey, sortOrder, filters).then((resp) => { const ignoredIssuesTestingResult = resp?.testingRunResultList || []; ignoredTestRunResults = transform.prepareTestRunResults(hexId, ignoredIssuesTestingResult, subCategoryMap, subCategoryFromSourceConfigMap) }) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js index df331de45c..f59c578d19 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js @@ -450,11 +450,11 @@ export default { data: {deltaTimeForScheduledSummaries} }) }, - fetchIssuesByStatusAndSummaryId(latestTestingRunSummaryId, issueStatusQuery) { + fetchIssuesByStatusAndSummaryId(latestTestingRunSummaryId, issueStatusQuery, sortKey, sortOrder, filters) { return request({ url: '/api/fetchIssuesByStatusAndSummaryId', method: 'post', - data: { latestTestingRunSummaryId, issueStatusQuery } + data: { latestTestingRunSummaryId, issueStatusQuery, sortKey, sortOrder, filters } }) }, modifyTestingRunConfig(testingRunConfigId, testConfigsAdvancedSettings){ From 8c49b0d277c754f322bdfdc9b654d8fc4fb98ffd Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:01:58 +0530 Subject: [PATCH 4/6] fix: using bulk filters to fetch ignored issues --- .../akto/action/testing/StartTestAction.java | 7 ++++- .../action/testing_issues/IssuesAction.java | 26 +++++++++++++------ .../SingleTestRunPage/SingleTestRunPage.js | 2 +- .../src/apps/dashboard/pages/testing/api.js | 4 +-- .../akto/dao/testing/TestingRunResultDao.java | 3 +++ 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index f065f97caf..0ff9b438de 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -550,6 +550,10 @@ private List prepareTestRunResultsFilters(ObjectId testingRunResultSummary } } + if(filterList.isEmpty()) { + filterList.add(Filters.empty()); + } + return filterList; } @@ -636,8 +640,9 @@ public String fetchTestingRunResults() { int pageLimit = limit <= 0 ? 150 : limit; Bson sortStage = prepareTestingRunResultCustomSorting(sortKey, sortOrder); + Bson filters = testingRunResultFilters.isEmpty() ? Filters.empty() : Filters.and(testingRunResultFilters); this.testingRunResults = TestingRunResultDao.instance - .fetchLatestTestingRunResultWithCustomAggregations(Filters.and(testingRunResultFilters), pageLimit, skip, sortStage); + .fetchLatestTestingRunResultWithCustomAggregations(filters, pageLimit, skip, sortStage); removeTestingRunResultsByIssues(testingRunResults, issueslist, false); diff --git a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java index eb3b2e66c4..73c4518bc1 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java @@ -536,17 +536,27 @@ public String fetchIssuesByStatusAndSummaryId() { ); issues = TestingRunIssuesDao.instance.findAll(triFilters, Projections.include("_id")); - List filterList = new ArrayList<>(); - filterList.add(Filters.and( - Filters.eq(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, new ObjectId(latestTestingRunSummaryId)), - Filters.eq(TestingRunResult.VULNERABLE, true) - )); - StartTestAction.prepareTestingRunResultTableFilters(filterList, filters); + List testingRunResultsFilterList = new ArrayList<>(); + for(TestingRunIssues issue: issues) { + testingRunResultsFilterList.add(Filters.and( + Filters.eq(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, new ObjectId(latestTestingRunSummaryId)), + Filters.eq(TestingRunResult.VULNERABLE, true), + Filters.eq(TestingRunResult.API_INFO_KEY, issue.getId().getApiInfoKey()), + Filters.eq(TestingRunResult.TEST_SUB_TYPE, issue.getId().getTestSubCategory()) + )); + } + + List filtersList = new ArrayList<>(); + if(!testingRunResultsFilterList.isEmpty()) filtersList.add(Filters.or(testingRunResultsFilterList)); + StartTestAction.prepareTestingRunResultTableFilters(filtersList, filters); Bson sortStage = StartTestAction.prepareTestingRunResultCustomSorting(sortKey, sortOrder); - testingRunResultList = TestingRunResultDao.instance.fetchLatestTestingRunResultWithCustomAggregations(Filters.and(filterList), 1_000_000, 0, sortStage); + if(filtersList.isEmpty()) { + testingRunResultList = new ArrayList<>(); + return SUCCESS.toUpperCase(); + } - StartTestAction.removeTestingRunResultsByIssues(testingRunResultList, issues, true); + testingRunResultList = TestingRunResultDao.instance.fetchLatestTestingRunResultWithCustomAggregations(Filters.and(filtersList), limit, skip, sortStage); return SUCCESS.toUpperCase(); } diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js index 2010d2e148..52392bad1d 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/SingleTestRunPage/SingleTestRunPage.js @@ -264,7 +264,7 @@ function SingleTestRunPage() { if(localSelectedTestRun.testingRunResultSummaryHexId) { if(selectedTab === 'ignored_issues') { let ignoredTestRunResults = [] - await api.fetchIssuesByStatusAndSummaryId(localSelectedTestRun.testingRunResultSummaryHexId, ["IGNORED"], sortKey, sortOrder, filters).then((resp) => { + await api.fetchIssuesByStatusAndSummaryId(localSelectedTestRun.testingRunResultSummaryHexId, ["IGNORED"], sortKey, sortOrder, skip, limit, filters).then((resp) => { const ignoredIssuesTestingResult = resp?.testingRunResultList || []; ignoredTestRunResults = transform.prepareTestRunResults(hexId, ignoredIssuesTestingResult, subCategoryMap, subCategoryFromSourceConfigMap) }) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js index f59c578d19..4dab0831c3 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js @@ -450,11 +450,11 @@ export default { data: {deltaTimeForScheduledSummaries} }) }, - fetchIssuesByStatusAndSummaryId(latestTestingRunSummaryId, issueStatusQuery, sortKey, sortOrder, filters) { + fetchIssuesByStatusAndSummaryId(latestTestingRunSummaryId, issueStatusQuery, sortKey, sortOrder, skip, limit, filters) { return request({ url: '/api/fetchIssuesByStatusAndSummaryId', method: 'post', - data: { latestTestingRunSummaryId, issueStatusQuery, sortKey, sortOrder, filters } + data: { latestTestingRunSummaryId, issueStatusQuery, sortKey, sortOrder, skip, limit, filters } }) }, modifyTestingRunConfig(testingRunConfigId, testConfigsAdvancedSettings){ diff --git a/libs/dao/src/main/java/com/akto/dao/testing/TestingRunResultDao.java b/libs/dao/src/main/java/com/akto/dao/testing/TestingRunResultDao.java index 6c1afcbab7..cb915a4f0f 100644 --- a/libs/dao/src/main/java/com/akto/dao/testing/TestingRunResultDao.java +++ b/libs/dao/src/main/java/com/akto/dao/testing/TestingRunResultDao.java @@ -225,6 +225,9 @@ public void createIndicesIfAbsent() { fieldNames = new String[]{TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, TestingRunResult.TEST_SUPER_TYPE}; MCollection.createIndexIfAbsent(getDBName(), getCollName(), fieldNames, false); + + fieldNames = new String[]{TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, TestingRunResult.VULNERABLE, TestingRunResult.API_INFO_KEY, TestingRunResult.TEST_SUB_TYPE}; + MCollection.createIndexIfAbsent(getDBName(), getCollName(), fieldNames, false); } public void convertToCappedCollection() { From c3c5f84c3a3f45893f8f4362d5d74682b476a8f8 Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:28:00 +0530 Subject: [PATCH 5/6] refactor: filtered out common code for testing run results filter --- .../akto/action/testing/StartTestAction.java | 30 +++---------------- .../java/com/akto/action/testing/Utils.java | 19 +++++------- .../action/testing_issues/IssuesAction.java | 3 +- 3 files changed, 13 insertions(+), 39 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index 0ff9b438de..e3a7c4ee1b 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -510,7 +510,8 @@ private List prepareTestRunResultsFilters(ObjectId testingRunResultSummary List filterList = new ArrayList<>(); filterList.add(Filters.eq(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, testingRunResultSummaryId)); - prepareTestingRunResultTableFilters(filterList, filters); + Bson filtersForTestingRunResults = com.akto.action.testing.Utils.createFiltersForTestingReport(filters); + filterList.add(filtersForTestingRunResults); if(queryMode == null) { if(fetchOnlyVulnerable) { @@ -557,29 +558,6 @@ private List prepareTestRunResultsFilters(ObjectId testingRunResultSummary return filterList; } - public static void prepareTestingRunResultTableFilters(List filterList, Map filters) { - if(filters != null && !filters.isEmpty()) { - for(Map.Entry filterEntry : filters.entrySet()) { - String key = filterEntry.getKey(); - switch (key) { - case "severityStatus": - filterList.add(Filters.in(TestingRunResult.TEST_RESULTS+"."+GenericTestResult._CONFIDENCE, filterEntry.getValue())); - break; - case "apiCollectionId": - case "collectionIds": - filterList.add(Filters.in(TestingRunResult.API_INFO_KEY+"."+ApiInfo.ApiInfoKey.API_COLLECTION_ID, filterEntry.getValue())); - break; - case "method": - filterList.add(Filters.in(TestingRunResult.API_INFO_KEY+"."+ApiInfo.ApiInfoKey.METHOD, filterEntry.getValue())); - break; - case "categoryFilter": - filterList.add(Filters.in(TestingRunResult.TEST_SUPER_TYPE, filterEntry.getValue())); - break; - } - } - } - } - public static Bson prepareTestingRunResultCustomSorting(String sortKey, int sortOrder) { Bson sortStage = null; if (TestingRunIssues.KEY_SEVERITY.equals(sortKey)) { @@ -694,7 +672,7 @@ public static void removeTestingRunResultsByIssues(List testin } } - private Map> reportFilterList; + private Map reportFilterList; public String fetchVulnerableTestRunResults() { ObjectId testingRunResultSummaryId; @@ -1399,7 +1377,7 @@ public Map getTestCountMap() { return testCountMap; } - public void setReportFilterList(Map> reportFilterList) { + public void setReportFilterList(Map reportFilterList) { this.reportFilterList = reportFilterList; } } diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java b/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java index 7a17902d60..3a8237ceec 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java @@ -14,26 +14,21 @@ public class Utils { - public static Bson createFiltersForTestingReport(Map> filterMap){ + public static Bson createFiltersForTestingReport(Map filterMap){ List filterList = new ArrayList<>(); - for(Map.Entry> entry: filterMap.entrySet()) { + for(Map.Entry entry: filterMap.entrySet()) { String key = entry.getKey(); - List value = entry.getValue(); - - if (value.size() == 0) continue; - List collectionIds = new ArrayList<>(); - if(key.equals(SingleTypeInfo._API_COLLECTION_ID)){ - for(String str: value){ - collectionIds.add(Integer.parseInt(str)); - } - } + List value = entry.getValue(); + + if (value.isEmpty()) continue; switch (key) { case SingleTypeInfo._METHOD: filterList.add(Filters.in(TestingRunResult.API_INFO_KEY + "." + ApiInfoKey.METHOD, value)); break; + case SingleTypeInfo._COLLECTION_IDS: case SingleTypeInfo._API_COLLECTION_ID: - filterList.add(Filters.in(TestingRunResult.API_INFO_KEY + "." + ApiInfoKey.API_COLLECTION_ID, collectionIds)); + filterList.add(Filters.in(TestingRunResult.API_INFO_KEY + "." + ApiInfoKey.API_COLLECTION_ID, value)); break; case "categoryFilter": filterList.add(Filters.in(TestingRunResult.TEST_SUPER_TYPE, value)); diff --git a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java index 73c4518bc1..f1ff9206f7 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java @@ -548,7 +548,8 @@ public String fetchIssuesByStatusAndSummaryId() { List filtersList = new ArrayList<>(); if(!testingRunResultsFilterList.isEmpty()) filtersList.add(Filters.or(testingRunResultsFilterList)); - StartTestAction.prepareTestingRunResultTableFilters(filtersList, filters); + Bson filtersForTestingRunResults = com.akto.action.testing.Utils.createFiltersForTestingReport(filters); + if(!filtersForTestingRunResults.equals(Filters.empty())) filtersList.add(filtersForTestingRunResults); Bson sortStage = StartTestAction.prepareTestingRunResultCustomSorting(sortKey, sortOrder); if(filtersList.isEmpty()) { From c91e68f31f1b5dd04da6e45f6816a67a0aa54524 Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:08:41 +0530 Subject: [PATCH 6/6] fix: fixed a bug --- .../com/akto/action/testing/StartTestAction.java | 8 ++++---- .../main/java/com/akto/action/testing/Utils.java | 14 ++++++++++---- .../akto/action/testing_issues/IssuesAction.java | 7 ++++--- .../web/src/apps/dashboard/pages/testing/api.js | 4 ++-- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index e3a7c4ee1b..4270554599 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -510,8 +510,8 @@ private List prepareTestRunResultsFilters(ObjectId testingRunResultSummary List filterList = new ArrayList<>(); filterList.add(Filters.eq(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID, testingRunResultSummaryId)); - Bson filtersForTestingRunResults = com.akto.action.testing.Utils.createFiltersForTestingReport(filters); - filterList.add(filtersForTestingRunResults); + Bson filtersForTestingRunResults = com.akto.action.testing.Utils.createFiltersForTestingReport(reportFilterList); + if(!filtersForTestingRunResults.equals(Filters.empty())) filterList.add(filtersForTestingRunResults); if(queryMode == null) { if(fetchOnlyVulnerable) { @@ -672,7 +672,7 @@ public static void removeTestingRunResultsByIssues(List testin } } - private Map reportFilterList; + private Map> reportFilterList; public String fetchVulnerableTestRunResults() { ObjectId testingRunResultSummaryId; @@ -1377,7 +1377,7 @@ public Map getTestCountMap() { return testCountMap; } - public void setReportFilterList(Map reportFilterList) { + public void setReportFilterList(Map> reportFilterList) { this.reportFilterList = reportFilterList; } } diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java b/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java index 3a8237ceec..aca9c0e0dc 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/Utils.java @@ -14,13 +14,19 @@ public class Utils { - public static Bson createFiltersForTestingReport(Map filterMap){ + public static Bson createFiltersForTestingReport(Map> filterMap){ List filterList = new ArrayList<>(); - for(Map.Entry entry: filterMap.entrySet()) { + for(Map.Entry> entry: filterMap.entrySet()) { String key = entry.getKey(); - List value = entry.getValue(); + List value = entry.getValue(); if (value.isEmpty()) continue; + List collectionIds = new ArrayList<>(); + if(key.equals(SingleTypeInfo._API_COLLECTION_ID)){ + for(String str: value){ + collectionIds.add(Integer.parseInt(str)); + } + } switch (key) { case SingleTypeInfo._METHOD: @@ -28,7 +34,7 @@ public static Bson createFiltersForTestingReport(Map filterMap){ break; case SingleTypeInfo._COLLECTION_IDS: case SingleTypeInfo._API_COLLECTION_ID: - filterList.add(Filters.in(TestingRunResult.API_INFO_KEY + "." + ApiInfoKey.API_COLLECTION_ID, value)); + filterList.add(Filters.in(TestingRunResult.API_INFO_KEY + "." + ApiInfoKey.API_COLLECTION_ID, collectionIds)); break; case "categoryFilter": filterList.add(Filters.in(TestingRunResult.TEST_SUPER_TYPE, value)); diff --git a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java index f1ff9206f7..883aa251ce 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java @@ -2,6 +2,7 @@ import com.akto.action.ExportSampleDataAction; import com.akto.action.UserAction; +import com.akto.action.testing.Utils; import com.akto.dao.HistoricalDataDao; import com.akto.dao.RBACDao; import com.akto.action.testing.StartTestAction; @@ -528,7 +529,7 @@ public String bulkUpdateIssueStatus () { String latestTestingRunSummaryId; List issueStatusQuery; List testingRunResultList; - private Map filters; + private Map> filters; public String fetchIssuesByStatusAndSummaryId() { Bson triFilters = Filters.and( Filters.in(TestingRunIssues.TEST_RUN_ISSUES_STATUS, issueStatusQuery), @@ -548,7 +549,7 @@ public String fetchIssuesByStatusAndSummaryId() { List filtersList = new ArrayList<>(); if(!testingRunResultsFilterList.isEmpty()) filtersList.add(Filters.or(testingRunResultsFilterList)); - Bson filtersForTestingRunResults = com.akto.action.testing.Utils.createFiltersForTestingReport(filters); + Bson filtersForTestingRunResults = Utils.createFiltersForTestingReport(filters); if(!filtersForTestingRunResults.equals(Filters.empty())) filtersList.add(filtersForTestingRunResults); Bson sortStage = StartTestAction.prepareTestingRunResultCustomSorting(sortKey, sortOrder); @@ -854,7 +855,7 @@ public List getTestingRunResultList() { return testingRunResultList; } - public void setFilters(Map filters) { + public void setFilters(Map> filters) { this.filters = filters; } diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js index 4dab0831c3..be973bfa69 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/api.js @@ -24,12 +24,12 @@ export default { }) return resp }, - async fetchTestingRunResults(testingRunResultSummaryHexId, queryMode, sortKey, sortOrder, skip, limit, filters, queryValue) { + async fetchTestingRunResults(testingRunResultSummaryHexId, queryMode, sortKey, sortOrder, skip, limit, reportFilterList, queryValue) { const resp = await request({ url: '/api/fetchTestingRunResults', method: 'post', data: { - testingRunResultSummaryHexId, queryMode, sortKey, sortOrder, skip, limit, filters, queryValue + testingRunResultSummaryHexId, queryMode, sortKey, sortOrder, skip, limit, reportFilterList, queryValue } }) return resp