summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/view-models')
-rw-r--r--catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts (renamed from catalog-ui/src/app/view-models/designers/designers-view-model.ts)18
-rw-r--r--catalog-ui/src/app/view-models/plugins/plugins-tab-view.html (renamed from catalog-ui/src/app/view-models/designers/designers-view.html)2
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view.html5
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab.less3
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts (renamed from catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view-model.ts)18
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view.html5
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-tab.less3
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts22
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view.html2
9 files changed, 39 insertions, 39 deletions
diff --git a/catalog-ui/src/app/view-models/designers/designers-view-model.ts b/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
index b2545c8ba2..ce098009f3 100644
--- a/catalog-ui/src/app/view-models/designers/designers-view-model.ts
+++ b/catalog-ui/src/app/view-models/plugins/plugins-tab-view-model.ts
@@ -1,33 +1,33 @@
-import {Designer, IUserProperties} from "app/models";
+import {Plugin, IUserProperties} from "app/models";
import {CacheService} from "app/services";
-import {DesignersService} from "../../ng2/services/designers.service";
+import {PluginsService} from "../../ng2/services/plugins.service";
-interface IDesignerViewModelScope extends ng.IScope {
- designer: Designer
+interface IPluginsTabViewModelScope extends ng.IScope {
+ plugin: Plugin
user: IUserProperties;
version: string;
queryParams: Object;
}
-export class DesignersViewModel {
+export class PluginsTabViewModel {
static '$inject' = [
'$scope',
'$stateParams',
'Sdc.Services.CacheService',
- 'DesignersService'
+ 'PluginsService'
];
- constructor(private $scope:IDesignerViewModelScope,
+ constructor(private $scope:IPluginsTabViewModelScope,
private $stateParams:any,
private cacheService:CacheService,
- private designersService:DesignersService) {
+ private pluginsService:PluginsService) {
this.initScope();
}
private initScope = ():void => {
- this.$scope.designer = this.designersService.getDesignerByStateUrl(this.$stateParams.path);
+ this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path);
this.$scope.version = this.cacheService.get('version');
diff --git a/catalog-ui/src/app/view-models/designers/designers-view.html b/catalog-ui/src/app/view-models/plugins/plugins-tab-view.html
index 9dcad66019..3695434463 100644
--- a/catalog-ui/src/app/view-models/designers/designers-view.html
+++ b/catalog-ui/src/app/view-models/plugins/plugins-tab-view.html
@@ -2,6 +2,6 @@
<top-nav [version]="version" [hide-search]="true"></top-nav>
- <designer-frame [designer]="designer" [query-params]="queryParams"></designer-frame>
+ <plugin-frame [plugin]="plugin" [query-params]="queryParams"></plugin-frame>
</div>
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view.html b/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view.html
deleted file mode 100644
index 9af6ae7e30..0000000000
--- a/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="workspace-designers">
-
- <designer-frame [designer]="designer" [query-params]="queryParams"></designer-frame>
-
-</div>
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab.less b/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab.less
deleted file mode 100644
index c8626dc031..0000000000
--- a/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.workspace-designers {
-
-}
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts
index e145188c00..76010b56f4 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/designers/designers-tab-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view-model.ts
@@ -1,33 +1,33 @@
-import {Designer, IUserProperties} from "app/models";
+import {Plugin, IUserProperties} from "app/models";
import {CacheService} from "app/services";
-import {DesignersService} from "../../../../ng2/services/designers.service";
+import {PluginsService} from "../../../../ng2/services/plugins.service";
import {IWorkspaceViewModelScope} from "../../workspace-view-model";
-interface IDesignerTabViewModelScope extends IWorkspaceViewModelScope {
- designer: Designer;
+interface IPluginsContextViewModelScope extends IWorkspaceViewModelScope {
+ plugin: Plugin;
user:IUserProperties;
queryParams: Object;
}
-export class DesignersTabViewModel {
+export class PluginsContextViewModel {
static '$inject' = [
'$scope',
'$stateParams',
'Sdc.Services.CacheService',
- 'DesignersService'
+ 'PluginsService'
];
- constructor(private $scope:IDesignerTabViewModelScope,
+ constructor(private $scope:IPluginsContextViewModelScope,
private $stateParams:any,
private cacheService:CacheService,
- private designersService:DesignersService) {
+ private pluginsService:PluginsService) {
this.initScope();
}
private initScope = ():void => {
- this.$scope.designer = this.designersService.getDesignerByStateUrl(this.$stateParams.path);
+ this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path);
this.$scope.user = this.cacheService.get('user');
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
new file mode 100644
index 0000000000..e155370ddd
--- /dev/null
+++ b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-context-view.html
@@ -0,0 +1,5 @@
+<div class="workspace-plugins">
+
+ <plugin-frame [plugin]="plugin" [query-params]="queryParams"></plugin-frame>
+
+</div>
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-tab.less b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-tab.less
new file mode 100644
index 0000000000..7798e36af8
--- /dev/null
+++ b/catalog-ui/src/app/view-models/workspace/tabs/plugins/plugins-tab.less
@@ -0,0 +1,3 @@
+.workspace-plugins {
+
+}
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
index 87d8367e5d..59dd2d8f00 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
@@ -22,7 +22,7 @@
* Created by obarda on 3/30/2016.
*/
'use strict';
-import {IUserProperties, IAppMenu, Resource, Component, Designer, DesignersConfiguration, DesignerDisplayOptions} from "app/models";
+import {IUserProperties, IAppMenu, Resource, Component, Plugin, PluginsConfiguration, PluginDisplayOptions} from "app/models";
import {
WorkspaceMode, ComponentFactory, ChangeLifecycleStateHandler, Role, ComponentState, MenuItemGroup, MenuHandler,
MenuItem, ModalsHandler, States, EVENTS, CHANGE_COMPONENT_CSAR_VERSION_FLAG, ResourceType
@@ -58,7 +58,7 @@ export interface IWorkspaceViewModelScope extends ng.IScope {
changeVersion:any;
isComposition:boolean;
isDeployment:boolean;
- isDesigners:boolean;
+ isPlugins:boolean;
$state:ng.ui.IStateService;
user:IUserProperties;
thirdParty:boolean;
@@ -629,8 +629,8 @@ export class WorkspaceViewModel {
let selectedIndex = selectedItem ? this.$scope.leftBarTabs.menuItems.indexOf(selectedItem) : 0;
- if (stateArray[1] === 'designers') {
- selectedIndex += _.findIndex(DesignersConfiguration.designers, (designer: Designer) => designer.designerStateUrl === this.$state.params.path);
+ if (stateArray[1] === 'plugins') {
+ selectedIndex += _.findIndex(PluginsConfiguration.plugins, (plugin: Plugin) => plugin.pluginStateUrl === this.$state.params.path);
}
this.$scope.leftBarTabs.selectedIndex = selectedIndex;
@@ -644,7 +644,7 @@ export class WorkspaceViewModel {
if (newVal) {
this.$scope.isComposition = (newVal.indexOf(States.WORKSPACE_COMPOSITION) > -1);
this.$scope.isDeployment = newVal == States.WORKSPACE_DEPLOYMENT;
- this.$scope.isDesigners = newVal == States.WORKSPACE_DESIGNERS;
+ this.$scope.isPlugins = newVal == States.WORKSPACE_PLUGINS;
}
});
@@ -719,18 +719,18 @@ export class WorkspaceViewModel {
this.$scope.leftBarTabs = new MenuItemGroup();
const menuItemsObjects:Array<any> = this.updateMenuItemByRole(this.sdcMenu.component_workspace_menu_option[this.$scope.component.getComponentSubType()], this.role);
- // Only need to add designers to the menu if the current role is Designer
+ // Only need to add plugins to the menu if the current role is Designer
if (this.role === "DESIGNER") {
- _.each(DesignersConfiguration.designers, (designer: Designer) => {
- if (designer.designerDisplayOptions["context"]) {
- let displayOptions : DesignerDisplayOptions = designer.designerDisplayOptions["context"];
+ _.each(PluginsConfiguration.plugins, (plugin: Plugin) => {
+ if (plugin.pluginDisplayOptions["context"]) {
+ let displayOptions : PluginDisplayOptions = plugin.pluginDisplayOptions["context"];
if (displayOptions.displayContext.indexOf(this.$scope.component.componentType) !== -1) {
menuItemsObjects.push({
text: displayOptions.displayName,
action: 'onMenuItemPressed',
- state: 'workspace.designers',
- params: {path: designer.designerStateUrl}
+ state: 'workspace.plugins',
+ params: {path: plugin.pluginStateUrl}
});
}
}
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view.html b/catalog-ui/src/app/view-models/workspace/workspace-view.html
index f076ba0ced..d724b8d058 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view.html
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view.html
@@ -70,7 +70,7 @@
</div>
</div>
<div class="w-sdc-main-container-body-content-wrapper">
- <div class="tab-title" data-ng-if="!isComposition && !isDeployment && !isDesigners">
+ <div class="tab-title" data-ng-if="!isComposition && !isDeployment && !isPlugins">
{{getTabTitle()}}
</div>
<div class="w-sdc-main-container-body-content" data-ng-class="{'third-party':thirdParty}" data-ui-view></div>