blob: ea0848eee68201f2a1db5ec86637f7e5cf5846c2 [file] [log] [blame]
Michael Landodd603392017-07-12 00:54:52 +03001/*-
2 * ============LICENSE_START=======================================================
3 * SDC
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
Idan Amitcb1095e2018-01-22 20:55:42 +020010 *
Michael Landodd603392017-07-12 00:54:52 +030011 * http://www.apache.org/licenses/LICENSE-2.0
Idan Amitcb1095e2018-01-22 20:55:42 +020012 *
Michael Landodd603392017-07-12 00:54:52 +030013 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20
Michael Landoed64b5e2017-06-09 03:19:04 +030021/**
22 * Created by obarda on 2/18/2016.
23 */
24
25export let DEFAULT_ICON = 'defaulticon';
26export let CP_END_POINT = 'CpEndPoint';
27export let CHANGE_COMPONENT_CSAR_VERSION_FLAG = 'changeComponentCsarVersion';
28
29export class ComponentType {
30 static SERVICE = 'SERVICE';
31 static RESOURCE = 'RESOURCE';
Tal Gitelman51d50f02017-12-10 18:55:03 +020032 static SERVICE_PROXY = 'ServiceProxy'
Michael Landoed64b5e2017-06-09 03:19:04 +030033}
34
35export class ServerTypeUrl {
36 static RESOURCES = 'resources/';
37 static SERVICES = 'services/';
Michael Landoed64b5e2017-06-09 03:19:04 +030038}
39
40export class ResourceType {
41 static VF = 'VF';
42 static VL = 'VL';
43 static CP = 'CP';
44 static VFC = 'VFC';
45 static VFCMT = 'VFCMT';
Tal Gitelman153a3582017-07-03 20:16:55 +030046 static PNF = 'PNF';
Michael Lando75aacbb2017-07-17 21:12:03 +030047 static CVFC = 'CVFC';
Tal Gitelman51d50f02017-12-10 18:55:03 +020048 static CONFIGURATION = 'Configuration';
Michael Landoed64b5e2017-06-09 03:19:04 +030049}
50
51export class ComponentState {
52 static CERTIFICATION_IN_PROGRESS = 'CERTIFICATION_IN_PROGRESS';
53 static CERTIFIED = 'CERTIFIED';
54 static NOT_CERTIFIED_CHECKOUT = 'NOT_CERTIFIED_CHECKOUT';
55 static NOT_CERTIFIED_CHECKIN = 'NOT_CERTIFIED_CHECKIN';
56 static READY_FOR_CERTIFICATION = 'READY_FOR_CERTIFICATION';
57}
58
59export class DistributionStatus {
60 DISTRIBUTION_NOT_APPROVED = 'DISTRIBUTION_NOT_APPROVED';
61 DISTRIBUTION_APPROVED = 'DISTRIBUTION_APPROVED';
62 DISTRIBUTED = 'DISTRIBUTED';
63 DISTRIBUTION_REJECTED = 'DISTRIBUTION_REJECTED';
64}
65
66export class ArtifactGroupType {
67 static DEPLOYMENT = "DEPLOYMENT";
68 static INFORMATION = "INFORMATIONAL";
69 static SERVICE_API = "SERVICE_API";
70}
71
72export class ArtifactType {
73 static HEAT = "HEAT";
74 static HEAT_VOL = "HEAT_VOL";
75 static HEAT_NET = "HEAT_NET";
76 static VF_LICENSE = "VF_LICENSE";
77 static VENDOR_LICENSE = "VENDOR_LICENSE";
78 static THIRD_PARTY_RESERVED_TYPES = {
79 WORKFLOW: "WORKFLOW",
80 NETWORK_CALL_FLOW: "NETWORK_CALL_FLOW",
81 AAI_SERVICE_MODEL: "AAI_SERVICE_MODEL",
82 AAI_VF_MODEL: "AAI_VF_MODEL",
83 AAI_VF_MODULE_MODEL: "AAI_VF_MODULE_MODEL",
84 AAI_VF_INSTANCE_MODEL: "AAI_VF_INSTANCE_MODEL"
85 };
86 static TOSCA = {TOSCA_TEMPLATE: "TOSCA_TEMPLATE", TOSCA_CSAR: "TOSCA_CSAR"};
87}
88
89export class SEVERITY {
90 public static DEBUG = 'DEBUG';
91 public static INFO = 'INFO';
92 public static WARNING = 'WARNING';
93 public static ERROR = 'ERROR';
94}
95
96export class PROPERTY_TYPES {
97 public static STRING = 'string';
98 public static INTEGER = 'integer';
99 public static FLOAT = 'float';
100 public static BOOLEAN = 'boolean';
101 public static JSON = 'json';
102 public static MAP = 'map';
103 public static LIST = 'list';
Tal Gitelman153a3582017-07-03 20:16:55 +0300104 public static SCALAR = 'scalar-unit';
105 public static SCALAR_FREQUENCY = 'scalar-unit.frequency';
106 public static SCALAR_SIZE = 'scalar-unit.size';
107 public static SCALAR_TIME = 'scalar-unit.time';
Michael Landoed64b5e2017-06-09 03:19:04 +0300108}
109
110export class SOURCES {
111 public static A_AND_AI = 'A&AI';
112 public static ORDER = 'Order';
113 public static RUNTIME = 'Runtime';
114}
115
116export class PROPERTY_DATA {
Tal Gitelman153a3582017-07-03 20:16:55 +0300117 public static TYPES = [PROPERTY_TYPES.STRING, PROPERTY_TYPES.INTEGER, PROPERTY_TYPES.FLOAT, PROPERTY_TYPES.BOOLEAN, PROPERTY_TYPES.JSON, PROPERTY_TYPES.SCALAR, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME, PROPERTY_TYPES.LIST, PROPERTY_TYPES.MAP];
118 public static SIMPLE_TYPES = [PROPERTY_TYPES.STRING, PROPERTY_TYPES.INTEGER, PROPERTY_TYPES.FLOAT, PROPERTY_TYPES.BOOLEAN, PROPERTY_TYPES.JSON, PROPERTY_TYPES.SCALAR, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME];
Tal Gitelman51d50f02017-12-10 18:55:03 +0200119 public static SCALAR_TYPES = [PROPERTY_TYPES.SCALAR, PROPERTY_TYPES.SCALAR_FREQUENCY, PROPERTY_TYPES.SCALAR_SIZE, PROPERTY_TYPES.SCALAR_TIME];
Michael Landoed64b5e2017-06-09 03:19:04 +0300120 public static ROOT_DATA_TYPE = "tosca.datatypes.Root";
Michael Landob3d48982017-06-11 14:22:02 +0300121 public static OPENECOMP_ROOT = "org.openecomp.datatypes.Root";
122 public static SUPPLEMENTAL_DATA = "supplemental_data";
Michael Landoed64b5e2017-06-09 03:19:04 +0300123 public static SOURCES = [SOURCES.A_AND_AI, SOURCES.ORDER, SOURCES.RUNTIME];
124}
125
126export class PROPERTY_VALUE_CONSTRAINTS {
Michael Landob3d48982017-06-11 14:22:02 +0300127 public static MAX_LENGTH = 2500;
Michael Landoed64b5e2017-06-09 03:19:04 +0300128 public static JSON_MAX_LENGTH = 4096;
129}
130
131export class Role {
132 public static ADMIN = 'ADMIN';
133 public static DESIGNER = 'DESIGNER';
Michael Landoed64b5e2017-06-09 03:19:04 +0300134 public static TESTER = 'TESTER';
135 public static OPS = 'OPS';
136 public static GOVERNOR = 'GOVERNOR';
137}
138
139export enum FormState{
140 CREATE,
141 UPDATE,
142 IMPORT,
143 VIEW
144}
145
146export class WorkspaceMode {
147 public static CREATE = 'create';
148 public static EDIT = 'edit';
149 public static IMPORT = 'import';
150 public static VIEW = 'view';
151}
152
153export class ImagesUrl {
154 public static RESOURCE_ICONS = '/assets/styles/images/resource-icons/';
155 public static SERVICE_ICONS = '/assets/styles/images/service-icons/';
Tal Gitelman51d50f02017-12-10 18:55:03 +0200156 public static SERVICE_PROXY_ICONS = '/assets/styles/images/service-proxy-icons/';
Michael Landoed64b5e2017-06-09 03:19:04 +0300157 public static SELECTED_UCPE_INSTANCE = '/assets/styles/images/resource-icons/selectedUcpeInstance.png';
158 public static SELECTED_CP_INSTANCE = '/assets/styles/images/resource-icons/selectedCPInstance.png';
159 public static SELECTED_VL_INSTANCE = '/assets/styles/images/resource-icons/selectedVLInstance.png';
160 public static CANVAS_PLUS_ICON = '/assets/styles/images/resource-icons/canvasPlusIcon.png';
161 public static MODULE_ICON = '/assets/styles/images/resource-icons/module.png';
162 public static OPEN_MODULE_ICON = '/assets/styles/images/resource-icons/openModule.png';
163 public static OPEN_MODULE_HOVER_ICON = '/assets/styles/images/resource-icons/openModuleHover.png';
164 public static CLOSE_MODULE_ICON = '/assets/styles/images/resource-icons/closeModule.png';
165 public static CLOSE_MODULE_HOVER_ICON = '/assets/styles/images/resource-icons/closeModuleHover.png';
166}
167
168export class ModalType {
169 static STANDARD = 'standard';
170 static ERROR = 'error';
171 static ALERT = 'alert';
172}
173
Avi Zivf5854fd2017-07-31 15:50:46 +0300174export class ServerErrors {
175 static ERROR_TITLE = 'Error';
176 static DEFAULT_ERROR = 'Error getting response from server';
177 static MESSAGE_ERROR = 'Wrong error format from server';
178}
179
Michael Landoed64b5e2017-06-09 03:19:04 +0300180export class GraphColors {
181 public static NOT_CERTIFIED_LINK = 'rgb(218,31,61)';
182 public static VL_LINK = 'rgb(216,216,216)';
183 public static ACTIVE_LINK = '#30bdf2';
184 public static BASE_LINK = 'rgb(55,55,55)';
185 public static NODE_BACKGROUND_COLOR = 'rgba(46, 162, 157, 0.24)';
186 public static NODE_SHADOW_COLOR = 'rgba(198, 230, 228, 0.7)';
187 public static NODE_OVERLAPPING_BACKGROUND_COLOR = 'rgba(179, 10, 60, 0.24)';
188 public static NODE_OVERLAPPING_SHADOW_COLOR = 'rgba(236, 194, 206, 0.7)';
189 public static NODE_UCPE_CP = '#9063cd';
190 public static NODE_UCPE = '#fbfbfb';
191 public static NODE_SELECTED_BORDER_COLOR = '#30bdf2';
192}
193export class GraphTransactionLogText {
194 public static REMOVE_TEMP_LINK = "remove tempLink";
195 public static DELETE_LINK = "delete link";
196 public static ADD_LINK = "delete link";
197 public static ADD_NODE = "adding node";
198}
199
200export class GraphUIObjects {
Idan Amitcb1095e2018-01-22 20:55:42 +0200201 public static HANDLE_SIZE = 18;
202 public static NODE_OVERLAP_MIN_SIZE = 30;
Michael Lando9db40522017-07-22 17:10:02 +0300203 public static DEFAULT_RESOURCE_WIDTH = 65;
204 public static SMALL_RESOURCE_WIDTH = 21;
Michael Landoed64b5e2017-06-09 03:19:04 +0300205 public static LINK_MENU_HEIGHT = 420;
206 public static TOP_HEADER_HEIGHT = 200;
207 public static TOOLTIP_OFFSET_X = 50;
208 public static TOOLTIP_OFFSET_Y = 145;
209 public static TOOLTIP_LINK_OFFSET_X = 35;
210 public static TOOLTIP_LINK_OFFSET_Y = 75;
211 public static MENU_LINK_VL_HEIGHT_OFFSET = 250;
212 public static MENU_LINK_VL_WIDTH_OFFSET = 200;
213 public static MENU_LINK_SIMPLE_HEIGHT_OFFSET = 180;
214 public static MENU_LINK_SIMPLE_WIDTH_OFFSET = 130;
215 public static DIAGRAM_RIGHT_WIDTH_OFFSET = 248;
216 public static DIAGRAM_HEADER_OFFSET = 103;
217 public static DIAGRAM_PALETTE_WIDTH_OFFSET = 247;
218 // public static COMPOSITION_HEADER_OFFSET = 50;
219 // public static COMPOSITION_NODE_MENU_WIDTH = 230;
220 // public static COMPOSITION_NODE_MENU_HEIGHT = 200;
221 // public static COMPOSITION_RIGHT_PANEL_OFFSET = 300;
222}
223
224
225export class States {
226 public static WORKSPACE_GENERAL = 'workspace.general';
Michael Landoed64b5e2017-06-09 03:19:04 +0300227 public static WORKSPACE_ACTIVITY_LOG = 'workspace.activity_log';
228 public static WORKSPACE_DEPLOYMENT_ARTIFACTS = 'workspace.deployment_artifacts';
229 public static WORKSPACE_PROPERTIES = 'workspace.properties';
230 public static WORKSPACE_SERVICE_INPUTS = 'workspace.service_inputs';
231 public static WORKSPACE_RESOURCE_INPUTS = 'workspace.resource_inputs';
232 public static WORKSPACE_ATTRIBUTES = 'workspace.attributes';
Michael Landoed64b5e2017-06-09 03:19:04 +0300233 public static WORKSPACE_INFORMATION_ARTIFACTS = 'workspace.information_artifacts';
234 public static WORKSPACE_TOSCA_ARTIFACTS = 'workspace.tosca_artifacts';
235 public static WORKSPACE_COMPOSITION = 'workspace.composition';
236 public static WORKSPACE_NETWORK_CALL_FLOW = 'workspace.network_call_flow';
237 public static WORKSPACE_MANAGEMENT_WORKFLOW = 'workspace.management_workflow';
238 public static WORKSPACE_DEPLOYMENT = 'workspace.deployment';
239 public static WORKSPACE_DISTRIBUTION = 'workspace.distribution';
240 public static WORKSPACE_PROPERTIES_ASSIGNMENT = 'workspace.properties_assignment';
241 public static WORKSPACE_REQUIREMENTS_AND_CAPABILITIES = 'workspace.reqAndCap';
Idan Amiteedaaf92018-01-31 13:27:33 +0200242 public static WORKSPACE_PLUGINS = 'workspace.plugins';
Michael Landoed64b5e2017-06-09 03:19:04 +0300243 public static WORKSPACE_NG2 = 'workspace.ng2';
244}
245
246export class EVENTS {
247 static RESOURCE_LEFT_PALETTE_UPDATE_EVENT = "resourceLeftPanelUpdateEvent";
Tal Gitelman153a3582017-07-03 20:16:55 +0300248 static RESOURCE_PNF_LEFT_PALETTE_UPDATE_EVENT = "resourcePNFLeftPanelUpdateEvent";
Michael Landoed64b5e2017-06-09 03:19:04 +0300249 static SERVICE_LEFT_PALETTE_UPDATE_EVENT = "serviceLeftPanelUpdateEvent";
Michael Landoed64b5e2017-06-09 03:19:04 +0300250 static VL_LEFT_PALETTE_UPDATE_EVENT = "vlLeftPanelUdateEvent";
251 static ON_CSAR_LOADING = "onCsarLoading";
252 static DOWNLOAD_ARTIFACT_FINISH_EVENT = "downloadArtifactFinishEvent";
253 static ON_WORKSPACE_SAVE_BUTTON_CLICK = "onWorkspaceSaveButtonClick";
254 static ON_WORKSPACE_SAVE_BUTTON_SUCCESS = "onWorkspaceSaveButtonSuccess";
255 static ON_WORKSPACE_SAVE_BUTTON_ERROR = "onWorkspaceSaveButtonError";
Michael Landob3d48982017-06-11 14:22:02 +0300256 static ON_CHECKOUT = "onCheckout";
Tal Gitelman51d50f02017-12-10 18:55:03 +0200257 static ON_REVERT = "onRevert";
Michael Landoed64b5e2017-06-09 03:19:04 +0300258
259 //Loader events
260 static SHOW_LOADER_EVENT = "showLoaderEvent";
261 static HIDE_LOADER_EVENT = "hideLoaderEvent";
262}
263
264
265export class UNIQUE_GROUP_PROPERTIES_NAME {
266 public static MIN_VF_MODULE_INSTANCES = 'min_vf_module_instances';
267 public static MAX_VF_MODULE_INSTANCES = 'max_vf_module_instances';
268 public static INITIAL_COUNT = 'initial_count';
269 public static IS_BASE = 'isBase';
270 public static VF_MODULE_TYPE = 'vf_module_type';
271 public static VF_MODULE_LABEL = 'vf_module_label';
272 public static VF_MODULE_DESCRIPTION = 'vf_module_description';
273 public static VOLUME_GROUP = 'volume_group';
274}
275
276
277export class GRAPH_EVENTS {
278 static ON_COMPOSITION_GRAPH_DATA_LOADED = 'onCompositionGraphDataLoaded';
279 static ON_DEPLOYMENT_GRAPH_DATA_LOADED = 'onDeploymentGraphDataLoaded';
280 static ON_NODE_SELECTED = "onNodeSelected";
281 static ON_GRAPH_BACKGROUND_CLICKED = "onGraphBackgroundClicked";
282 static ON_PALETTE_COMPONENT_HOVER_IN = 'onPaletteComponentHoverIn';
283 static ON_PALETTE_COMPONENT_HOVER_OUT = 'onPaletteComponentHoverOut';
284 static ON_PALETTE_COMPONENT_DRAG_START = 'onPaletteComponentDragStart';
285 static ON_PALETTE_COMPONENT_DRAG_ACTION = 'onPaletteComponentDragAction';
286 static ON_COMPONENT_INSTANCE_NAME_CHANGED = 'onComponentInstanceNameChanged';
287 static ON_DELETE_COMPONENT_INSTANCE = 'onDeleteComponentInstance';
288 static ON_DELETE_MULTIPLE_COMPONENTS = 'onDeleteMultipleComponents';
289 static ON_DELETE_EDGE = 'onDeleteEdge';
290 static ON_INSERT_NODE_TO_UCPE = 'onInsertNodeToUCPE';
291 static ON_REMOVE_NODE_FROM_UCPE = 'onRemoveNodeFromUCPE';
292 static ON_VERSION_CHANGED = 'onVersionChanged';
293 static ON_CREATE_COMPONENT_INSTANCE = 'onCreateComponentInstance';
294}
295
296
297export class COMPONENT_FIELDS {
298 static COMPONENT_INSTANCES_PROPERTIES = "componentInstancesProperties";
299 static COMPONENT_INSTANCES_ATTRIBUTES = "componentInstancesAttributes";
300 static COMPONENT_ATTRIBUTES = "attributes";
301 static COMPONENT_INSTANCES = "componentInstances";
302 static COMPONENT_INSTANCES_RELATION = "componentInstancesRelations";
303 static COMPONENT_INPUTS = "inputs";
304 static COMPONENT_METADATA = "metadata";
305 static COMPONENT_DEPLOYMENT_ARTIFACTS = "deploymentArtifacts";
306 static COMPONENT_INFORMATIONAL_ARTIFACTS = "artifacts";
307 static COMPONENT_PROPERTIES = "properties";
308 static COMPONENT_CAPABILITIES = "capabilities";
309 static COMPONENT_REQUIREMENTS = "requirements";
310 static COMPONENT_TOSCA_ARTIFACTS = "toscaArtifacts";
311 static COMPONENT_GROUPS = "groups";
312
313}
314export class API_QUERY_PARAMS {
315 static INCLUDE = "include";
316}