Skip to content

Commit

Permalink
NVSHAS-9741: Dashboard: run as root instruction has typo on score imp…
Browse files Browse the repository at this point in the history
…rovement panel
  • Loading branch information
xingzhang-suse authored and BinX-Suse committed Dec 30, 2024
1 parent a57a15a commit 29c6153
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions admin/webapp/websrc/app/common/constants/global.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class GlobalConstant {
KUBE: 'Kubernetes',
},
BOOLEAN_CRITERIA: {
TRUE: ['run_as_root_score', 'runAsPrivileged'],
TRUE: ['runAsRoot', 'runAsPrivileged'],
FALSE: ['imageScanned', 'imageSigned'],
},
CRITERION_TYPE: {
Expand Down Expand Up @@ -211,7 +211,7 @@ export class GlobalConstant {

public static CRITERIA_PATTERN = {
NAME_ONLY: [
'run_as_root_score',
'runAsRoot',
'runAsPrivileged',
'allowPrivEscalation',
'pspCompliance',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,21 @@
</p>
</mat-expansion-panel>
<mat-expansion-panel
[(expanded)]="expanded.run_as_root_score"
[(expanded)]="expanded.runAsRoot"
*appDisplayControl="'improve_score_on_runasroot'"
class="mat-elevation-z0"
hideToggle>
<mat-expansion-panel-header>
<mat-panel-title>
{{
'dashboard.improveScoreModal.summary.run_as_root_score.brief_1'
| translate
'dashboard.improveScoreModal.summary.runAsRoot.brief_1' | translate
}}
</mat-panel-title>
<mat-panel-description class="justify-content-end mr-0">
<div class="row align-items-center improvement-item-actions">
<div class="col">
<mat-icon>
{{ expanded.run_as_root_score ? 'expand_less' : 'expand_more' }}
{{ expanded.runAsRoot ? 'expand_less' : 'expand_more' }}
</mat-icon>
</div>
<div class="col d-flex justify-content-end">
Expand All @@ -147,10 +146,7 @@
</mat-panel-description>
</mat-expansion-panel-header>
<p>
{{
'dashboard.improveScoreModal.summary.run_as_root_score.advice_1'
| translate
}}
{{ 'dashboard.improveScoreModal.summary.runAsRoot.advice_1' | translate }}
</p>
</mat-expansion-panel>
<mat-expansion-panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class ScoreImprovementGeneralListItemComponent {
serviceRisk: false,
exposure: false,
runAsPrivileged: false,
run_as_root_score: false,
runAsRoot: false,
admissionControl: false,
};
get rawScore() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<app-score-prediction-header
message="{{
'dashboard.improveScoreModal.run_as_root_score.DESCRIPTION' | translate
'dashboard.improveScoreModal.runAsRoot.DESCRIPTION' | translate
}}"
[score]="score"
[projectedScore]="projectedScore">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class ScoreImprovementRunAsRootContainersViewComponent
this.containersService.getContainers().subscribe({
next: workloads => {
this.containers = workloads
.filter(this.run_as_root_scoreFilter)
.filter(this.runAsRootFilter)
.filter(w => w.state !== 'exit' && !w.platform_role);
this.containersService.displayContainers =
this.containersService.formatScannedWorkloads(this.containers);
Expand All @@ -93,7 +93,7 @@ export class ScoreImprovementRunAsRootContainersViewComponent
});
}

private run_as_root_scoreFilter = (w: Workload) => {
private runAsRootFilter = (w: Workload) => {
return (
w.children &&
w.children.length > 0 &&
Expand Down

0 comments on commit 29c6153

Please sign in to comment.