diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-08-08 14:46:49 +0800 |
---|---|---|
committer | Yan Yang <yangyanyj@chinamobile.com> | 2019-08-12 01:25:16 +0000 |
commit | 16153f25be74f6def70e2d38a0bae0af9d196646 (patch) | |
tree | c6098739eea67687b359597b8f51bb3da592cc17 /components/datalake-handler/admin/src | |
parent | 8be894f60df4274946576831e83841ef5de483f0 (diff) |
feat: support new deploy format
Change-Id: Ie7fa4e3e43e2b9b1ba294e8589ee07c4af712981
Issue-ID: DCAEGEN2-1671
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'components/datalake-handler/admin/src')
-rw-r--r-- | components/datalake-handler/admin/src/src/app/views/dashboard-setting/template/template-list/template-list.component.ts | 12 |
1 files changed, 10 insertions, 2 deletions
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"); } |