summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-01-31 13:27:33 +0200
committerMichael Lando <ml636r@att.com>2018-01-31 14:35:13 +0000
commiteedaaf983d731d0179916b3f3a8e4d3a0d80981b (patch)
tree066eb388f47ac15ef35c98aa74618b751da47ae6 /catalog-ui/src/app/view-models/workspace
parent3b09e29e1e1cab9baf3b1380718a3c45126930bd (diff)
Change designer to plugin in code
Changed all the use of the designer configuration in the code to be plugin Change-Id: Id9792cbd4fb9385446780c28fb7fb5418772acf6 Issue-ID: SDC-974 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace')
-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
7 files changed, 29 insertions, 29 deletions
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>