mirror of
https://github.com/goharbor/harbor
synced 2024-09-21 05:25:32 +00:00
Vulnerability scan cancel editing to make UI into orginal status
Signed-off-by: Cheng Fangyuan <fangyuanc@fangyuanc-a01.vmware.com>
This commit is contained in:
parent
5cf6c04ea6
commit
8b6e72e56e
|
@ -28,7 +28,7 @@
|
||||||
<span>{{ (scanningType ? 'SCHEDULE.'+ scanningType.toUpperCase(): "") | translate }}</span>
|
<span>{{ (scanningType ? 'SCHEDULE.'+ scanningType.toUpperCase(): "") | translate }}</span>
|
||||||
<span [hidden]="scanningType===SCHEDULE_TYPE.NONE">{{'SCHEDULE.AT' | translate}}</span>
|
<span [hidden]="scanningType===SCHEDULE_TYPE.NONE">{{'SCHEDULE.AT' | translate}}</span>
|
||||||
<span [hidden]="scanningType===SCHEDULE_TYPE.NONE">{{ dailyTime | translate }}</span>
|
<span [hidden]="scanningType===SCHEDULE_TYPE.NONE">{{ dailyTime | translate }}</span>
|
||||||
<button class="btn btn-outline btn-sm" (click)="editSchedule()">{{'BUTTON.EDIT' | translate}}</button>
|
<button class="btn btn-outline btn-sm" (click)="editSchedule()" id="editSchedule">{{'BUTTON.EDIT' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group vertical-center" *ngIf="isEditMode">
|
<div class="form-group vertical-center" *ngIf="isEditMode">
|
||||||
<label for="scanAllPolicy">{{ 'CONFIG.SCANNING.SCAN_ALL' | translate }}</label>
|
<label for="scanAllPolicy">{{ 'CONFIG.SCANNING.SCAN_ALL' | translate }}</label>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
ConfigurationService
|
ConfigurationService
|
||||||
} from '../../service/index';
|
} from '../../service/index';
|
||||||
import { ErrorHandler } from '../../error-handler/index';
|
import { ErrorHandler } from '../../error-handler/index';
|
||||||
import { toPromise, isEmptyObject } from '../../utils';
|
import { toPromise, isEmptyObject, clone} from '../../utils';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { ClairDetail } from '../../service/interface';
|
import { ClairDetail } from '../../service/interface';
|
||||||
const ONE_HOUR_SECONDS: number = 3600;
|
const ONE_HOUR_SECONDS: number = 3600;
|
||||||
|
@ -252,7 +252,7 @@ export class VulnerabilityConfigComponent implements OnInit {
|
||||||
getConfigurations(): void {
|
getConfigurations(): void {
|
||||||
toPromise<Configuration>(this.configService.getConfigurations())
|
toPromise<Configuration>(this.configService.getConfigurations())
|
||||||
.then((config: Configuration) => {
|
.then((config: Configuration) => {
|
||||||
this.configCopy = Object.assign({}, config);
|
this.configCopy = clone(config);
|
||||||
this.config = config;
|
this.config = config;
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -346,7 +346,7 @@ export class VulnerabilityConfigComponent implements OnInit {
|
||||||
let getchanges = this.config.scan_all_policy.value;
|
let getchanges = this.config.scan_all_policy.value;
|
||||||
let changes = {"scan_all_policy": getchanges};
|
let changes = {"scan_all_policy": getchanges};
|
||||||
for (let prop of Object.keys(changes)) {
|
for (let prop of Object.keys(changes)) {
|
||||||
this.config[prop] = Object.assign({}, this.configCopy[prop]);
|
this.config[prop] = clone(this.configCopy[prop]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ Resource ../../resources/Util.robot
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Disable Scan Schedule
|
Disable Scan Schedule
|
||||||
|
Click Element //vulnerability-config//button[@id="editSchedule"]
|
||||||
Click Element //vulnerability-config//select[@id="scanAllPolicy"]
|
Click Element //vulnerability-config//select[@id="scanAllPolicy"]
|
||||||
Click Element //vulnerability-config//select[@id="scanAllPolicy"]//option[contains(.,'None')]
|
Click Element //vulnerability-config//select[@id="scanAllPolicy"]//option[contains(.,'None')]
|
||||||
Click Element //button[contains(.,'SAVE')]
|
Click Element //button[contains(.,'SAVE')]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user