Merge pull request #2282 from mantis-toboggan-md/cis

fix scan create, add remediation to scan detail
This commit is contained in:
Vincent Fiduccia 2021-02-03 15:19:41 -07:00 committed by GitHub
commit 12b4975a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 16 deletions

View File

@ -515,16 +515,16 @@ cis:
label: Schedule
placeholder: "e.g. 0 * * * *"
customConfigMap: Custom Benchmark ConfigMap
deleteProfileWarning: |-
{count, plural,
=1 { Any scheduled scans using this profile will no longer work. }
other { Any scheduled scans using either of these profiles will no longer work. }
}
deleteBenchmarkWarning: |-
{count, plural,
=1 { Any profiles using this benchmark version will no longer work. }
other { Any profiles using these benchmark versions will no longer work }
}
deleteProfileWarning: |-
{count, plural,
=1 { Any scheduled scans using this profile will no longer work. }
other { Any scheduled scans using either of these profiles will no longer work. }
}
downloadAllReports: Download All Saved Reports
downloadLatestReport: Download Latest Report
downloadReport: Download Report
@ -533,29 +533,30 @@ cis:
noProfiles: There are no valid ClusterScanProfiles for this cluster type to select.
noReportFound: No scan report found
profile: Profile
retention: Retention Count
reports: Reports
testID: Test ID
testsToSkip: Tests to Skip
testsSkipped: Tests Skipped
retention: Retention Count
scan:
description: Description
fail: Fail
lastScanTime: Last Scan Time
notApplicable: 'N/A'
notApplicable: N/A
number: Number
pass: Pass
remediation: Remediation
scanDate: Scan Date
scanReport: Scan Report
skip: Skip
total: Total
warn: Warn
scheduling:
enable: Run scan on a schedule
disable: Run scan once
enable: Run scan on a schedule
scoreWarning:
label: Scan state for "warn" results
protip: Scans with no failures will be marked "Pass" by default even if some of the tests generate "warn" output. This behavior can be changed by selecting the "fail" option from this section.
testID: Test ID
testsSkipped: Tests Skipped
testsToSkip: Tests to Skip
cluster:
provider:

View File

@ -668,6 +668,7 @@ $spacing: 10px;
td {
padding: 12px 5px;
border: 0;
word-break: break-word;
&.row-check {
padding-top: 16px;

View File

@ -17,7 +17,7 @@ export default {
SortableTable,
Banner,
LabeledSelect,
Loading
Loading,
},
props: {
@ -151,7 +151,7 @@ export default {
{
name: 'description',
label: this.t('cis.scan.description'),
value: 'description'
value: 'description',
}
];
},
@ -174,7 +174,6 @@ export default {
label: this.t('tableHeaders.type'),
value: 'type',
},
];
},
},
@ -233,6 +232,16 @@ export default {
return id.split('.').map(n => +n + 1000).join('.');
},
remediationDisplay(row) {
const { remediation } = row;
if (!remediation) {
} else {
return `${ this.t('cis.scan.remediation') }: ${ remediation }`;
}
},
get
}
};
@ -284,6 +293,7 @@ export default {
<template #sub-row="{row, fullColspan}">
<tr>
<td :colspan="fullColspan">
<Banner v-if="row.remediation" class="sub-banner" :label="remediationDisplay(row)" color="warning" />
<SortableTable
class="sub-table"
:rows="row.nodeRows"
@ -318,6 +328,11 @@ export default {
padding: 0px 40px 0px 40px;
}
.sub-banner{
margin: 0px 40px 0px 40px;
width: auto;
}
.table-header {
align-items: flex-end;
}

View File

@ -35,7 +35,7 @@ export default {
return this.hasCondition('Ready');
},
kubernetesVersionDisplay() {
kubernetesVersion() {
if ( this?.status?.version?.gitVersion ) {
return this.status.version.gitVersion;
} else {

View File

@ -345,7 +345,7 @@ export default {
</div>
</template>
<template #kubernetesVersion>
<h1>{{ currentCluster.kubernetesVersionDisplay }}</h1>
<h1>{{ currentCluster.kubernetesVersion }}</h1>
<label>{{ t('glance.version') }}</label>
</template>
<template #totalNodes>