summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
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/workspace-view-model.ts
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/workspace-view-model.ts')
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts22
1 files changed, 11 insertions, 11 deletions
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}
});
}
}