summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-03-06 13:52:58 +0200
committerMichael Lando <ml636r@att.com>2018-03-07 06:56:36 +0000
commitf97bae33631c3f5ef06574e9d21620c8dfff8f62 (patch)
tree5d7e2682fd7db6646b5608a417ae7af40a5ebf56 /catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
parent2064106f298ac9683821e83acbfd87dac8b5b32f (diff)
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 <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts')
-rw-r--r--catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts b/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
index 5e2a59925c..438cf4a60c 100644
--- a/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
+++ b/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
@@ -8,6 +8,9 @@ interface IPluginsTabViewModelScope extends ng.IScope {
user: IUserProperties;
version: string;
queryParams: Object;
+ isLoading: boolean;
+
+ onLoadingDone(plugin: Plugin): void;
}
export class PluginsTabViewModel {
@@ -27,17 +30,23 @@ export class PluginsTabViewModel {
}
private initScope = ():void => {
+ this.$scope.isLoading = true;
this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path);
-
this.$scope.version = this.cacheService.get('version');
-
this.$scope.user = this.cacheService.get('user');
this.$scope.queryParams = {
userId: this.$scope.user.userId,
userRole: this.$scope.user.role,
displayType: "tab",
- 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;
+ }
};
}
}