fix get adapter bug

Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
This commit is contained in:
FangyuanCheng 2019-03-29 18:00:46 +08:00
parent 1491cf1846
commit 163909579e
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@
<div class="form-select"> <div class="form-select">
<div class="select providerSelect pull-left"> <div class="select providerSelect pull-left">
<select name="adapter" id="adapter" [(ngModel)]="target.type" [disabled]="testOngoing || controlEnabled"> <select name="adapter" id="adapter" [(ngModel)]="target.type" [disabled]="testOngoing || controlEnabled">
<option *ngFor="let adapter of adapterList" [ngValue]="adapter" value="{{adapter.type}}">{{adapter.type}}</option> <option *ngFor="let adapter of adapterList" [ngValue]="adapter" value="{{adapter}}">{{adapter}}</option>
</select> </select>
</div> </div>
</div> </div>

View File

@ -146,6 +146,7 @@ export class ListReplicationRuleComponent implements OnInit, OnChanges {
// job list hidden // job list hidden
this.hideJobs.emit(); this.hideJobs.emit();
this.changedRules = this.rules; this.changedRules = this.rules;
this.loading = false;
// get registry name // get registry name
let targetLists: ReplicationRule[] = rules; let targetLists: ReplicationRule[] = rules;
if (targetLists && targetLists.length) { if (targetLists && targetLists.length) {
@ -163,7 +164,6 @@ export class ListReplicationRuleComponent implements OnInit, OnChanges {
forkJoin(...registryList).subscribe((item) => { forkJoin(...registryList).subscribe((item) => {
this.selectedRow = null; this.selectedRow = null;
this.registryName = item.map(target => target.name); this.registryName = item.map(target => target.name);
this.loading = false;
}); });
} }
}, error => { }, error => {

View File

@ -338,7 +338,7 @@ export class ReplicationDefaultService extends ReplicationService {
return observableThrowError("Bad argument"); return observableThrowError("Bad argument");
} }
let url: string = `${this._replicateUrl}`; let url: string = `${this._replicateUrl}/executions`;
return this.http return this.http
.post(url, { policy_id: ruleId }, HTTP_JSON_OPTIONS) .post(url, { policy_id: ruleId }, HTTP_JSON_OPTIONS)
.pipe(map(response => response) .pipe(map(response => response)