From f97bae33631c3f5ef06574e9d21620c8dfff8f62 Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Tue, 6 Mar 2018 13:52:58 +0200 Subject: Add events hub notify calls Added events hub notify calls. Fixed issues raised by development across the publish subscribe mechanism development Change-Id: I0768bdcb2d89f99634cdb6bc7cb75e20263f5c00 Issue-ID: SDC-1029 Signed-off-by: Idan Amit --- .../workspace/tabs/plugins/plugins-context-view-model.ts | 14 ++++++++++++-- .../workspace/tabs/plugins/plugins-context-view.html | 5 ++--- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'catalog-ui/src/app/view-models/workspace/tabs/plugins') diff --git a/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts index 959aead3ae..550fb84c10 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts @@ -8,6 +8,9 @@ interface IPluginsContextViewModelScope extends IWorkspaceViewModelScope { plugin: Plugin; user:IUserProperties; queryParams: Object; + isLoading: boolean; + + onLoadingDone(plugin: Plugin): void; } export class PluginsContextViewModel { @@ -27,8 +30,8 @@ export class PluginsContextViewModel { } private initScope = ():void => { + this.$scope.isLoading = true; this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path); - this.$scope.user = this.cacheService.get('user'); this.$scope.queryParams = { @@ -40,7 +43,14 @@ export class PluginsContextViewModel { lifecycleState: this.$scope.component.lifecycleState, isOwner: this.$scope.component.lastUpdaterUserId === this.$scope.user.userId, version: this.$scope.component.version , - parentUrl: window.location.origin + parentUrl: window.location.origin, + eventsClientId: this.$scope.plugin.pluginId + }; + + this.$scope.onLoadingDone = (plugin: Plugin) => { + if (plugin.pluginId == this.$scope.plugin.pluginId) { + this.$scope.isLoading = false; + } }; } diff --git a/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view.html b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view.html index e155370ddd..d70717a3ed 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view.html @@ -1,5 +1,4 @@ +
- - - +
-- cgit 1.2.3-korg