diff --git a/src/app/appmarket/bulkDeployment/appdeployment.service.ts b/src/app/appmarket/bulkDeployment/appdeployment.service.ts index de9bdbfea154e0fdb81236cf766050a105247bfa..b858eb65c02ee55a8cf4f49a629e26ba638c274b 100644 --- a/src/app/appmarket/bulkDeployment/appdeployment.service.ts +++ b/src/app/appmarket/bulkDeployment/appdeployment.service.ts @@ -89,5 +89,9 @@ export class AppdeploymentService { return this.http.get(this.getUrl() + `app/csv/${id}`, {responseType: 'blob'}) } + public refreshStatesInBulkDeployment(id: number) : Observable<BulkDeployment> { + return this.http.get<BulkDeployment>(this.getUrl() + `refresh/${id}`) + } + } diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html index 215014b66c57dfd28af43cf45473c215bd4ceca1..4fff4026057245bc910d12bd4e025985107390ac 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html @@ -197,6 +197,8 @@ </div> <div class="flex justify-content-end"> + <button class="btn btn-primary mr-2" (click)="refreshStates()">{{'BULK.APP.REFRESH' | translate}}</button> + <button class="btn btn-primary" (click)="getAppBulkDetails(this.bulkId)">{{'BULK.APP.DOWNLOAD_CSV' | translate}}</button> </div> </div> @@ -233,9 +235,9 @@ <li *ngIf="response.type === 'APPLICATION' && response?.details['appInstanceId'] !== undefined"> <a [routerLink]="['/instances/', response?.details['appInstanceId']]">{{ 'BULK.LIST.MOVE_APP' | translate }}</a> </li> - <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> + <!-- <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> <a>{{ 'BULK.APP.CHECK_STATE' | translate }}</a> - </li> + </li> --> </ul> </span> </td> diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts index a6775b4210ec0156cb5db31a91cf25f1a1172c21..5895c0b6ba5531de6c627b1026c321333073a0df 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts @@ -115,4 +115,11 @@ export class BulkViewComponent implements OnInit, OnDestroy { }) } + + public refreshStates() { + this.deployService.refreshStatesInBulkDeployment(this.bulkId).subscribe( deply => { + this.bulk = deply; + console.log("Updated states of bulks") + }) + } }