diff options
Diffstat (limited to 'catalog-ui/src/app/view-models/plugins')
-rw-r--r-- | catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts | 15 | ||||
-rw-r--r-- | catalog-ui/src/app/view-models/plugins/plugins-tab-view.html | 6 |
2 files changed, 14 insertions, 7 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; + } }; } } diff --git a/catalog-ui/src/app/view-models/plugins/plugins-tab-view.html b/catalog-ui/src/app/view-models/plugins/plugins-tab-view.html index 3695434463..bc404b46d1 100644 --- a/catalog-ui/src/app/view-models/plugins/plugins-tab-view.html +++ b/catalog-ui/src/app/view-models/plugins/plugins-tab-view.html @@ -1,7 +1,5 @@ <div class="sdc-catalog-container"> - + <loader display="isLoading"></loader> <top-nav [version]="version" [hide-search]="true"></top-nav> - - <plugin-frame [plugin]="plugin" [query-params]="queryParams"></plugin-frame> - + <plugin-frame (on-loading-done)="onLoadingDone(plugin)" [plugin]="plugin" [query-params]="queryParams"></plugin-frame> </div> |