1 import {Component, Inject} from "@angular/core";
2 import {IUserProperties, Plugin} from "app/models";
3 import {CacheService, PluginsService} from "app/services-ng2";
6 selector: 'plugin-tab-view',
7 templateUrl: './plugin-tab-view.page.component.html',
8 styleUrls: ['./plugin-tab-view.page.component.less']
11 export class PluginTabViewPageComponent {
13 user: IUserProperties;
18 constructor(@Inject("$stateParams") private _stateParams,
19 private cacheService: CacheService,
20 private pluginsService: PluginsService) {
22 this.plugin = this.pluginsService.getPluginByStateUrl(_stateParams.path);
23 this.version = this.cacheService.get('version');
24 this.user = this.cacheService.get('user');
28 this.isLoading = true;
31 userId: this.user.userId,
32 userRole: this.user.role,
34 parentUrl: window.location.origin,
35 eventsClientId: this.plugin.pluginId
40 onLoadingDone(plugin: Plugin) {
41 if (plugin.pluginId == this.plugin.pluginId) {
42 this.isLoading = false;