From fe65ddd4b7e68a683d4e027f136ac85c8d0b29f4 Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Tue, 8 Jan 2019 16:41:23 +0200 Subject: minor fixes to sdc-pubsub Aligned sdc code to the fixes that were made in the sdc-pubsub library Change-Id: I54e48e55915dadd3fdb53c0290e013708161aa46 Issue-ID: SDC-2032 Signed-off-by: Idan Amit --- .../app/view-models/plugins/plugins-tab-view-model.ts | 17 +++++++---------- .../tabs/plugins/plugins-context-view-model.ts | 19 ++++++++----------- 2 files changed, 15 insertions(+), 21 deletions(-) (limited to 'catalog-ui/src/app/view-models') 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 47b2f78c10..d25cd19bff 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 @@ -28,7 +28,7 @@ */ -import {Plugin, IUserProperties} from "app/models"; +import {IUserProperties, Plugin} from "app/models"; import {CacheService} from "app/services"; import {PluginsService} from "../../ng2/services/plugins.service"; @@ -51,23 +51,20 @@ export class PluginsTabViewModel { 'PluginsService' ]; - constructor(private $scope:IPluginsTabViewModelScope, - private $stateParams:any, - private cacheService:CacheService, - private pluginsService:PluginsService) { + constructor(private $scope: IPluginsTabViewModelScope, + private $stateParams: any, + private cacheService: CacheService, + private pluginsService: PluginsService) { this.initScope(); } - private initScope = ():void => { + private initScope = (): void => { this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path); this.$scope.version = this.cacheService.get('version'); this.$scope.user = this.cacheService.get('user'); - // Don't show the loader if the plugin isn't online - if (this.$scope.plugin.isOnline) { - this.$scope.isLoading = true; - } + this.$scope.isLoading = true; this.$scope.queryParams = { userId: this.$scope.user.userId, 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 db76f73ce6..d3ccbe3325 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 @@ -28,7 +28,7 @@ */ -import {Plugin, IUserProperties} from "app/models"; +import {IUserProperties, Plugin} from "app/models"; import {CacheService} from "app/services"; import {PluginsService} from "../../../../ng2/services/plugins.service"; import {IWorkspaceViewModelScope} from "../../workspace-view-model"; @@ -36,7 +36,7 @@ import {IWorkspaceViewModelScope} from "../../workspace-view-model"; interface IPluginsContextViewModelScope extends IWorkspaceViewModelScope { plugin: Plugin; - user:IUserProperties; + user: IUserProperties; queryParams: Object; isLoading: boolean; show: boolean; @@ -52,23 +52,20 @@ export class PluginsContextViewModel { 'PluginsService' ]; - constructor(private $scope:IPluginsContextViewModelScope, - private $stateParams:any, - private cacheService:CacheService, - private pluginsService:PluginsService) { + constructor(private $scope: IPluginsContextViewModelScope, + private $stateParams: any, + private cacheService: CacheService, + private pluginsService: PluginsService) { this.initScope(); } - private initScope = ():void => { + private initScope = (): void => { this.$scope.show = false; this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path); this.$scope.user = this.cacheService.get('user'); - // Don't show loader if the plugin isn't online - if (this.$scope.plugin.isOnline) { - this.$scope.isLoading = true; - } + this.$scope.isLoading = true; this.$scope.queryParams = { userId: this.$scope.user.userId, -- cgit 1.2.3-korg