Skip to content

Commit

Permalink
Merge 962943e into 03e13af
Browse files Browse the repository at this point in the history
  • Loading branch information
pengpengshui committed Nov 23, 2017
2 parents 03e13af + 962943e commit 14c5312
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export class CreateEditEndpointComponent implements AfterViewChecked, OnDestroy

setInsecureValue($event: any) {
this.target.insecure = !$event;
this.endpointHasChanged = true;
}

ngOnDestroy(): void {
Expand Down Expand Up @@ -157,6 +156,8 @@ export class CreateEditEndpointComponent implements AfterViewChecked, OnDestroy
this.target = this.initEndpoint();
this.initVal = this.initEndpoint();
this.formValues = null;

this.inlineAlert.close();
}

//Forcely refresh the view
Expand Down Expand Up @@ -212,6 +213,12 @@ export class CreateEditEndpointComponent implements AfterViewChecked, OnDestroy
payload.username = this.target.username;
payload.password = this.target.password;
payload.insecure = this.target.insecure;
}else if (this.checkboxHasChanged) {
payload.insecure = this.target.insecure;
payload.id = this.target.id;
delete payload.username;
delete payload.password;
delete payload.name;
} else {
payload.id = this.target.id;
}
Expand Down Expand Up @@ -301,6 +308,8 @@ export class CreateEditEndpointComponent implements AfterViewChecked, OnDestroy
payload.password = this.target.password;
}else {
delete payload.endpoint;
delete payload.username;
delete payload.password;
}
if (this.checkboxHasChanged) {
payload.insecure = this.target.insecure;
Expand Down
2 changes: 1 addition & 1 deletion src/ui_ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"clarity-icons": "^0.9.8",
"clarity-ui": "^0.9.8",
"core-js": "^2.4.1",
"harbor-ui": "0.5.10",
"harbor-ui": "0.5.14",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",
Expand Down

0 comments on commit 14c5312

Please sign in to comment.