diff --git a/webapp/src/app/pacman-features/modules/admin/sticky-exceptions/create-sticky-exceptions/create-sticky-exceptions.component.ts b/webapp/src/app/pacman-features/modules/admin/sticky-exceptions/create-sticky-exceptions/create-sticky-exceptions.component.ts index bc01a95a13..8d703897b3 100644 --- a/webapp/src/app/pacman-features/modules/admin/sticky-exceptions/create-sticky-exceptions/create-sticky-exceptions.component.ts +++ b/webapp/src/app/pacman-features/modules/admin/sticky-exceptions/create-sticky-exceptions/create-sticky-exceptions.component.ts @@ -234,7 +234,7 @@ export class CreateStickyExceptionsComponent implements OnInit, OnDestroy { this.state = 'open'; this.menuState = 'in'; this.selectedallPolicies = attributeDetail.allPolicies; - this.selectedRules = attributeDetail.rules; + this.selectedRules = attributeDetail.policies; this.selectedIndex = index; attributeDetail.rules; diff --git a/webapp/src/app/pacman-features/modules/compliance/compliance-dashboard/compliance-dashboard.component.ts b/webapp/src/app/pacman-features/modules/compliance/compliance-dashboard/compliance-dashboard.component.ts index 7ecd42079d..95d0bc90cb 100644 --- a/webapp/src/app/pacman-features/modules/compliance/compliance-dashboard/compliance-dashboard.component.ts +++ b/webapp/src/app/pacman-features/modules/compliance/compliance-dashboard/compliance-dashboard.component.ts @@ -453,8 +453,8 @@ export class ComplianceDashboardComponent implements OnInit { ngOnInit() { const state = this.tableStateService.getState("dashboard") || {}; - this.headerColName = state.headerColName || ''; - this.direction = state.direction || ''; + this.headerColName = state.headerColName || 'Severity'; + this.direction = state.direction || 'asc'; // this.bucketNumber = state.bucketNumber || 0; this.displayedColumns = Object.keys(this.columnWidths); diff --git a/webapp/src/app/pacman-features/secondary-components/multiline-brush-zoom/multiline-brush-zoom.component.ts b/webapp/src/app/pacman-features/secondary-components/multiline-brush-zoom/multiline-brush-zoom.component.ts index e0375bded9..df296f3a97 100644 --- a/webapp/src/app/pacman-features/secondary-components/multiline-brush-zoom/multiline-brush-zoom.component.ts +++ b/webapp/src/app/pacman-features/secondary-components/multiline-brush-zoom/multiline-brush-zoom.component.ts @@ -73,9 +73,9 @@ export class MultilineBrushZoomComponent implements OnInit, OnChanges { Compliance: "#00B946", // Green patching: "#00569D", // Dark blue(shade) "other policies": "#F2425F", // Red - costOptimization: "#289cf7", // Light Blue + cost: "#289cf7", // Light Blue certificate: "#289CF7", // Sky Blue - governance: "#26ba9d", // Green + operations: "#26ba9d", // Green vulnerability: "#645EC5", // Purple high: "#F75C03", // Orange low: "#FFE00D", // Green @@ -1501,7 +1501,7 @@ export class MultilineBrushZoomComponent implements OnInit, OnChanges { const rectData = {}; const dateData = {}; const yearData = {}; - valueData["dx"] = mousePosition < axisRange / 4 ? "12.5em" : "-4.7em"; + valueData["dx"] = mousePosition < axisRange / 4 ? "16.5em" : "-4.7em"; rectText["dx"] = mousePosition < axisRange / 4 ? "6.7em" : "-14.5em"; rectData["dx"] = mousePosition < axisRange / 4 ? "70" : "-140"; rectCoverData["dx"] = mousePosition < axisRange / 4 ? "180" : "-45"; @@ -1513,10 +1513,10 @@ export class MultilineBrushZoomComponent implements OnInit, OnChanges { : "25"; dateData["dx"] = mousePosition < axisRange / 4 - ? "1em" + ? "2em" : mousePosition > axisRange * 0.75 - ? "-16em" - : "2em"; + ? "-17em" + : "3em"; dateData["dy"] = mousePosition < axisRange / 4 ? ".35em" @@ -1525,10 +1525,10 @@ export class MultilineBrushZoomComponent implements OnInit, OnChanges { : ".35em"; yearData["dx"] = mousePosition < axisRange / 4 - ? "1em" + ? "2em" : mousePosition > axisRange * 0.75 - ? "-16em" - : "2em"; + ? "-17em" + : "3em"; yearData["dy"] = mousePosition < axisRange / 4 ? "1.5em" @@ -1570,7 +1570,7 @@ export class MultilineBrushZoomComponent implements OnInit, OnChanges { ) .text(dobj["value" + m]) .attr("dx", valueData["dx"]) - .attr("dy", 0.5 + m * 2.5 + "em"); + .attr("dy", 0.3 + m * 2.8 + "em"); }); const legend = self.graphLinesData[numOfLines - m].key; diff --git a/webapp/src/app/shared/multiline-zoom-graph/multiline-zoom-graph.component.ts b/webapp/src/app/shared/multiline-zoom-graph/multiline-zoom-graph.component.ts index 3b2e551e1a..b73c431ea4 100644 --- a/webapp/src/app/shared/multiline-zoom-graph/multiline-zoom-graph.component.ts +++ b/webapp/src/app/shared/multiline-zoom-graph/multiline-zoom-graph.component.ts @@ -1392,7 +1392,7 @@ export class MultilineZoomGraphComponent implements OnInit, AfterViewInit { .attr("fill", "#fff") // .attr("fill-opacity", "0.9") .attr("height", "69px") - .attr("width", "149px") + .attr("width", "169px") .attr("stroke", "#DFE6EE") .attr("display", "none") .attr("text-align", "middle") @@ -1531,7 +1531,7 @@ export class MultilineZoomGraphComponent implements OnInit, AfterViewInit { mousePosition < axisRange / 4 ? "4em" : mousePosition > axisRange * 0.75 - ? "-16em" + ? "-14em" : "5em"; // rectData["dx"] = mousePosition < axisRange / 4 ? "70" : "-140"; valueData["dx"] = @@ -1550,7 +1550,7 @@ export class MultilineZoomGraphComponent implements OnInit, AfterViewInit { mousePosition < axisRange / 4 ? "2.1em" : mousePosition > axisRange * 0.75 - ? "-7em" + ? "-5em" : "3.1em"; rectData["dy"] = mousePosition < axisRange / 4 @@ -1567,7 +1567,7 @@ export class MultilineZoomGraphComponent implements OnInit, AfterViewInit { mousePosition < axisRange / 4 ? "15" : mousePosition > axisRange * 0.75 - ? "-200" + ? "-198" : "25"; dateData["dx"] = mousePosition < axisRange / 4 @@ -1585,7 +1585,7 @@ export class MultilineZoomGraphComponent implements OnInit, AfterViewInit { mousePosition < axisRange / 4 ? "1em" : mousePosition > axisRange * 0.75 - ? "-16em" + ? "-14em" : "2em"; yearData["dy"] = mousePosition < axisRange / 4 diff --git a/webapp/src/app/shared/table/table.component.ts b/webapp/src/app/shared/table/table.component.ts index 1bcdd1de8c..1eecfa1a9d 100644 --- a/webapp/src/app/shared/table/table.component.ts +++ b/webapp/src/app/shared/table/table.component.ts @@ -96,10 +96,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { }else{ this.allSelected=false; } - if(this.doLocalSearch && this.dataSource?.data?.length){ - this.customSearch(); - } - if(this.onScrollDataLoader){ + if (this.onScrollDataLoader) { this.onScrollDataLoader.subscribe(data => { this.isDataLoading = false; if(data && data.length>0){ @@ -139,7 +136,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { }) if(this.doLocalSearch && this.dataSource?.data?.length){ - this.customSearch(); + this.filterAndSort(); }else{ this.chips = this.filteredArray.map(obj => {return {...obj}}); // cloning filteredArray @@ -163,6 +160,15 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { } } + filterAndSort(){ + if(this.doLocalSearch && this.dataSource?.data?.length){ + this.customSearch(); + } + if(this.headerColName && this.direction && this.doLocalSort){ + this.customSort(this.headerColName, this.direction); + } + } + scrollFilterModalToBottom(forceScroll?){ if(this.filtersContainer){ if(this.totalChips > 2 || forceScroll){ @@ -294,7 +300,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { this.filteredArray[currIdx].value = e; if(this.doLocalFilter){ - this.customSearch(); + this.filterAndSort(); }else{ let event = { index: currIdx, @@ -342,7 +348,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { if(this.doLocalFilter){ this.filteredArray.splice(i, 1); - this.customSearch(); + this.filterAndSort(); return; } let event = { @@ -354,7 +360,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { removeAllFilters(){ if(this.doLocalFilter){ this.filteredArray = []; - this.customSearch(); + this.filterAndSort(); return; } let event = { @@ -441,7 +447,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { // this.customTable.first.nativeElement.scrollTop = 0; this.tableErrorMessage = ''; if(this.doLocalSearch){ - this.customSearch(); + this.filterAndSort(); }else{ this.searchCalledEventEmitter.emit(searchTxt); } @@ -452,7 +458,7 @@ export class TableComponent implements OnInit,AfterViewInit, OnChanges { this.searchQuery = ""; if(this.tableErrorMessage == 'noSearchFound') this.tableErrorMessage = ""; if(this.doLocalSearch){ - this.customSearch(); + this.filterAndSort(); }else{ this.searchCalledEventEmitter.emit(this.searchQuery); }