Skip to content

Commit

Permalink
Fix Replication Rule Ping target issue about #3770
Browse files Browse the repository at this point in the history
  • Loading branch information
pengpengshui committed Dec 12, 2017
1 parent bcb74dd commit 47436f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,11 @@ export class CreateEditEndpointComponent implements AfterViewChecked, OnDestroy
delete payload[prop];
}
let changes: {[key: string]: any} = this.getChanges();
let changekeys: {[key: string]: any} = Object.keys(this.getChanges());
if (isEmptyObject(changes)) {
return;
}
let changekeys: {[key: string]: any} = Object.keys(changes);

changekeys.forEach((key: string) => {
payload[key] = changes[key];
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const CREATE_EDIT_RULE_TEMPLATE: string = `
</div>
<div class="form-group">
<label for="destination_insecure" class="col-md-4 form-group-label-override">{{'CONFIG.VERIFY_REMOTE_CERT' | translate }}</label>
<clr-checkbox #insecure class="col-md-8" name="insecure" id="destination_insecure" [clrDisabled]="testOngoing" [clrChecked]="!createEditRule.insecure" [clrDisabled]="readonly || !isCreateEndpoint" (clrCheckedChange)="setInsecureValue($event)">
<clr-checkbox #insecure class="col-md-8" name="insecure" id="destination_insecure" [clrChecked]="!createEditRule.insecure" [clrDisabled]="readonly || !isCreateEndpoint || testOngoing" (clrCheckedChange)="setInsecureValue($event)">
<a href="javascript:void(0)" role="tooltip" aria-haspopup="true" class="tooltip tooltip-top-right" style="top:-7px;">
<clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon>
<span class="tooltip-content">{{'CONFIG.TOOLTIP.VERIFY_REMOTE_CERT' | translate}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ export class CreateEditRuleComponent implements AfterViewChecked {
pingTarget.password = this.createEditRule.password;
pingTarget.insecure = this.createEditRule.insecure;
} else {
for (let prop in pingTarget) {
delete pingTarget[prop];
}
pingTarget.id = this.createEditRule.endpointId;
}
toPromise<Endpoint>(this.endpointService
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.16",
"harbor-ui": "0.5.25",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",
Expand Down

0 comments on commit 47436f5

Please sign in to comment.