From: cyuamber Date: Thu, 8 Aug 2019 06:46:49 +0000 (+0800) Subject: feat: support new deploy format X-Git-Tag: 2.0.0~57 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F93005%2F4;p=dcaegen2%2Fservices.git feat: support new deploy format Change-Id: Ie7fa4e3e43e2b9b1ba294e8589ee07c4af712981 Issue-ID: DCAEGEN2-1671 Signed-off-by: cyuamber --- diff --git a/components/datalake-handler/admin/src/src/app/views/dashboard-setting/template/template-list/template-list.component.ts b/components/datalake-handler/admin/src/src/app/views/dashboard-setting/template/template-list/template-list.component.ts index 156e3ed7..de76a9d6 100644 --- a/components/datalake-handler/admin/src/src/app/views/dashboard-setting/template/template-list/template-list.component.ts +++ b/components/datalake-handler/admin/src/src/app/views/dashboard-setting/template/template-list/template-list.component.ts @@ -221,8 +221,16 @@ export class TemplateListComponent { this.dashboardApiService.deployTemplateKibana(id, body).subscribe( res => { this.spinner.hide(); - if (JSON.stringify(res).length <= 2) { - this.notificationService.success("Deploy_SUCCESSFULLY"); + let processArr = [] + Object.keys(res).map(item => + processArr.push({ name: item, status: res[item] }) + ) + + if (processArr.length !== 0) { + processArr.map(item => + item.status ? + setTimeout(() => { this.notificationService.success("Deploy_SUCCESSFULLY") }, 1000) : + setTimeout(() => { this.notificationService.error("Deploy_FAILED") }, 2000)) } else { this.notificationService.error("Deploy_FAILED"); }