blob: 6ec6a7762be9b7de8e77884b9a74c3bb2600733b [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
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * 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';
Michael Landoed64b5e2017-06-09 03:19:04 +030032}
33
34export class ServerTypeUrl {
35 static RESOURCES = 'resources/';
36 static SERVICES = 'services/';
Michael Landoed64b5e2017-06-09 03:19:04 +030037}
38
39export class ResourceType {
40 static VF = 'VF';
41 static VL = 'VL';
42 static CP = 'CP';
43 static VFC = 'VFC';
44 static VFCMT = 'VFCMT';
Tal Gitelman153a3582017-07-03 20:16:55 +030045 static PNF = 'PNF';
Michael Lando75aacbb2017-07-17 21:12:03 +030046 static CVFC = 'CVFC';
Michael Landoed64b5e2017-06-09 03:19:04 +030047}
48
49export class ComponentState {
50 static CERTIFICATION_IN_PROGRESS = 'CERTIFICATION_IN_PROGRESS';
51 static CERTIFIED = 'CERTIFIED';
52 static NOT_CERTIFIED_CHECKOUT = 'NOT_CERTIFIED_CHECKOUT';
53 static NOT_CERTIFIED_CHECKIN = 'NOT_CERTIFIED_CHECKIN';
54 static READY_FOR_CERTIFICATION = 'READY_FOR_CERTIFICATION';
55}
56
57export class DistributionStatus {
58 DISTRIBUTION_NOT_APPROVED = 'DISTRIBUTION_NOT_APPROVED';
59 DISTRIBUTION_APPROVED = 'DISTRIBUTION_APPROVED';
60 DISTRIBUTED = 'DISTRIBUTED';
61 DISTRIBUTION_REJECTED = 'DISTRIBUTION_REJECTED';
62}
63
64export class ArtifactGroupType {
65 static DEPLOYMENT = "DEPLOYMENT";
66 static INFORMATION = "INFORMATIONAL";
67 static SERVICE_API = "SERVICE_API";
68}
69
70export class ArtifactType {
71 static HEAT = "HEAT";
72 static HEAT_VOL = "HEAT_VOL";
73 static HEAT_NET = "HEAT_NET";
74 static VF_LICENSE = "VF_LICENSE";
75 static VENDOR_LICENSE = "VENDOR_LICENSE";
76 static THIRD_PARTY_RESERVED_TYPES = {
77 WORKFLOW: "WORKFLOW",
78 NETWORK_CALL_FLOW: "NETWORK_CALL_FLOW",
79 AAI_SERVICE_MODEL: "AAI_SERVICE_MODEL",
80 AAI_VF_MODEL: "AAI_VF_MODEL",
81 AAI_VF_MODULE_MODEL: "AAI_VF_MODULE_MODEL",
82 AAI_VF_INSTANCE_MODEL: "AAI_VF_INSTANCE_MODEL"
83 };
84 static TOSCA = {TOSCA_TEMPLATE: "TOSCA_TEMPLATE", TOSCA_CSAR: "TOSCA_CSAR"};
85}
86
87export class SEVERITY {
88 public static DEBUG = 'DEBUG';
89 public static INFO = 'INFO';
90 public static WARNING = 'WARNING';
91 public static ERROR = 'ERROR';
92}
93
94export class PROPERTY_TYPES {
95 public static STRING = 'string';
96 public static INTEGER = 'integer';
97 public static FLOAT = 'float';
98 public static BOOLEAN = 'boolean';
99 public static JSON = 'json';
100 public static MAP = 'map';
101 public static LIST = 'list';
Tal Gitelman153a3582017-07-03 20:16:55 +0300102 public static SCALAR = 'scalar-unit';
103 public static SCALAR_FREQUENCY = 'scalar-unit.frequency';
104 public static SCALAR_SIZE = 'scalar-unit.size';
105 public static SCALAR_TIME = 'scalar-unit.time';
Michael Landoed64b5e2017-06-09 03:19:04 +0300106}
107
108export class SOURCES {
109 public static A_AND_AI = 'A&AI';
110 public static ORDER = 'Order';
111 public static RUNTIME = 'Runtime';
112}
113
114export class PROPERTY_DATA {
Tal Gitelman153a3582017-07-03 20:16:55 +0300115 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];
116 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];
Michael Landoed64b5e2017-06-09 03:19:04 +0300117 public static ROOT_DATA_TYPE = "tosca.datatypes.Root";
Michael Landob3d48982017-06-11 14:22:02 +0300118 public static OPENECOMP_ROOT = "org.openecomp.datatypes.Root";
119 public static SUPPLEMENTAL_DATA = "supplemental_data";
Michael Landoed64b5e2017-06-09 03:19:04 +0300120 public static SOURCES = [SOURCES.A_AND_AI, SOURCES.ORDER, SOURCES.RUNTIME];
121}
122
123export class PROPERTY_VALUE_CONSTRAINTS {
Michael Landob3d48982017-06-11 14:22:02 +0300124 public static MAX_LENGTH = 2500;
Michael Landoed64b5e2017-06-09 03:19:04 +0300125 public static JSON_MAX_LENGTH = 4096;
126}
127
128export class Role {
129 public static ADMIN = 'ADMIN';
130 public static DESIGNER = 'DESIGNER';
Michael Landoed64b5e2017-06-09 03:19:04 +0300131 public static TESTER = 'TESTER';
132 public static OPS = 'OPS';
133 public static GOVERNOR = 'GOVERNOR';
134}
135
136export enum FormState{
137 CREATE,
138 UPDATE,
139 IMPORT,
140 VIEW
141}
142
143export class WorkspaceMode {
144 public static CREATE = 'create';
145 public static EDIT = 'edit';
146 public static IMPORT = 'import';
147 public static VIEW = 'view';
148}
149
150export class ImagesUrl {
151 public static RESOURCE_ICONS = '/assets/styles/images/resource-icons/';
152 public static SERVICE_ICONS = '/assets/styles/images/service-icons/';
153 public static SELECTED_UCPE_INSTANCE = '/assets/styles/images/resource-icons/selectedUcpeInstance.png';
154 public static SELECTED_CP_INSTANCE = '/assets/styles/images/resource-icons/selectedCPInstance.png';
155 public static SELECTED_VL_INSTANCE = '/assets/styles/images/resource-icons/selectedVLInstance.png';
156 public static CANVAS_PLUS_ICON = '/assets/styles/images/resource-icons/canvasPlusIcon.png';
157 public static MODULE_ICON = '/assets/styles/images/resource-icons/module.png';
158 public static OPEN_MODULE_ICON = '/assets/styles/images/resource-icons/openModule.png';
159 public static OPEN_MODULE_HOVER_ICON = '/assets/styles/images/resource-icons/openModuleHover.png';
160 public static CLOSE_MODULE_ICON = '/assets/styles/images/resource-icons/closeModule.png';
161 public static CLOSE_MODULE_HOVER_ICON = '/assets/styles/images/resource-icons/closeModuleHover.png';
162}
163
164export class ModalType {
165 static STANDARD = 'standard';
166 static ERROR = 'error';
167 static ALERT = 'alert';
168}
169
Avi Zivf5854fd2017-07-31 15:50:46 +0300170export class ServerErrors {
171 static ERROR_TITLE = 'Error';
172 static DEFAULT_ERROR = 'Error getting response from server';
173 static MESSAGE_ERROR = 'Wrong error format from server';
174}
175
Michael Landoed64b5e2017-06-09 03:19:04 +0300176export class GraphColors {
177 public static NOT_CERTIFIED_LINK = 'rgb(218,31,61)';
178 public static VL_LINK = 'rgb(216,216,216)';
179 public static ACTIVE_LINK = '#30bdf2';
180 public static BASE_LINK = 'rgb(55,55,55)';
181 public static NODE_BACKGROUND_COLOR = 'rgba(46, 162, 157, 0.24)';
182 public static NODE_SHADOW_COLOR = 'rgba(198, 230, 228, 0.7)';
183 public static NODE_OVERLAPPING_BACKGROUND_COLOR = 'rgba(179, 10, 60, 0.24)';
184 public static NODE_OVERLAPPING_SHADOW_COLOR = 'rgba(236, 194, 206, 0.7)';
185 public static NODE_UCPE_CP = '#9063cd';
186 public static NODE_UCPE = '#fbfbfb';
187 public static NODE_SELECTED_BORDER_COLOR = '#30bdf2';
188}
189export class GraphTransactionLogText {
190 public static REMOVE_TEMP_LINK = "remove tempLink";
191 public static DELETE_LINK = "delete link";
192 public static ADD_LINK = "delete link";
193 public static ADD_NODE = "adding node";
194}
195
196export class GraphUIObjects {
Michael Lando9db40522017-07-22 17:10:02 +0300197 public static HANDLE_SIZE = 18;
198 public static NODE_OVERLAP_MIN_SIZE = 30;
199 public static DEFAULT_RESOURCE_WIDTH = 65;
200 public static SMALL_RESOURCE_WIDTH = 21;
Michael Landoed64b5e2017-06-09 03:19:04 +0300201 public static LINK_MENU_HEIGHT = 420;
202 public static TOP_HEADER_HEIGHT = 200;
203 public static TOOLTIP_OFFSET_X = 50;
204 public static TOOLTIP_OFFSET_Y = 145;
205 public static TOOLTIP_LINK_OFFSET_X = 35;
206 public static TOOLTIP_LINK_OFFSET_Y = 75;
207 public static MENU_LINK_VL_HEIGHT_OFFSET = 250;
208 public static MENU_LINK_VL_WIDTH_OFFSET = 200;
209 public static MENU_LINK_SIMPLE_HEIGHT_OFFSET = 180;
210 public static MENU_LINK_SIMPLE_WIDTH_OFFSET = 130;
211 public static DIAGRAM_RIGHT_WIDTH_OFFSET = 248;
212 public static DIAGRAM_HEADER_OFFSET = 103;
213 public static DIAGRAM_PALETTE_WIDTH_OFFSET = 247;
214 // public static COMPOSITION_HEADER_OFFSET = 50;
215 // public static COMPOSITION_NODE_MENU_WIDTH = 230;
216 // public static COMPOSITION_NODE_MENU_HEIGHT = 200;
217 // public static COMPOSITION_RIGHT_PANEL_OFFSET = 300;
218}
219
220
221export class States {
222 public static WORKSPACE_GENERAL = 'workspace.general';
Michael Landoed64b5e2017-06-09 03:19:04 +0300223 public static WORKSPACE_ACTIVITY_LOG = 'workspace.activity_log';
224 public static WORKSPACE_DEPLOYMENT_ARTIFACTS = 'workspace.deployment_artifacts';
225 public static WORKSPACE_PROPERTIES = 'workspace.properties';
226 public static WORKSPACE_SERVICE_INPUTS = 'workspace.service_inputs';
227 public static WORKSPACE_RESOURCE_INPUTS = 'workspace.resource_inputs';
228 public static WORKSPACE_ATTRIBUTES = 'workspace.attributes';
Michael Landoed64b5e2017-06-09 03:19:04 +0300229 public static WORKSPACE_INFORMATION_ARTIFACTS = 'workspace.information_artifacts';
230 public static WORKSPACE_TOSCA_ARTIFACTS = 'workspace.tosca_artifacts';
231 public static WORKSPACE_COMPOSITION = 'workspace.composition';
232 public static WORKSPACE_NETWORK_CALL_FLOW = 'workspace.network_call_flow';
233 public static WORKSPACE_MANAGEMENT_WORKFLOW = 'workspace.management_workflow';
234 public static WORKSPACE_DEPLOYMENT = 'workspace.deployment';
235 public static WORKSPACE_DISTRIBUTION = 'workspace.distribution';
236 public static WORKSPACE_PROPERTIES_ASSIGNMENT = 'workspace.properties_assignment';
237 public static WORKSPACE_REQUIREMENTS_AND_CAPABILITIES = 'workspace.reqAndCap';
238 public static WORKSPACE_NG2 = 'workspace.ng2';
239}
240
241export class EVENTS {
242 static RESOURCE_LEFT_PALETTE_UPDATE_EVENT = "resourceLeftPanelUpdateEvent";
Tal Gitelman153a3582017-07-03 20:16:55 +0300243 static RESOURCE_PNF_LEFT_PALETTE_UPDATE_EVENT = "resourcePNFLeftPanelUpdateEvent";
Michael Landoed64b5e2017-06-09 03:19:04 +0300244 static SERVICE_LEFT_PALETTE_UPDATE_EVENT = "serviceLeftPanelUpdateEvent";
Michael Landoed64b5e2017-06-09 03:19:04 +0300245 static VL_LEFT_PALETTE_UPDATE_EVENT = "vlLeftPanelUdateEvent";
246 static ON_CSAR_LOADING = "onCsarLoading";
247 static DOWNLOAD_ARTIFACT_FINISH_EVENT = "downloadArtifactFinishEvent";
248 static ON_WORKSPACE_SAVE_BUTTON_CLICK = "onWorkspaceSaveButtonClick";
249 static ON_WORKSPACE_SAVE_BUTTON_SUCCESS = "onWorkspaceSaveButtonSuccess";
250 static ON_WORKSPACE_SAVE_BUTTON_ERROR = "onWorkspaceSaveButtonError";
Michael Landob3d48982017-06-11 14:22:02 +0300251 static ON_CHECKOUT = "onCheckout";
Michael Landoed64b5e2017-06-09 03:19:04 +0300252
253 //Loader events
254 static SHOW_LOADER_EVENT = "showLoaderEvent";
255 static HIDE_LOADER_EVENT = "hideLoaderEvent";
256}
257
258
259export class UNIQUE_GROUP_PROPERTIES_NAME {
260 public static MIN_VF_MODULE_INSTANCES = 'min_vf_module_instances';
261 public static MAX_VF_MODULE_INSTANCES = 'max_vf_module_instances';
262 public static INITIAL_COUNT = 'initial_count';
263 public static IS_BASE = 'isBase';
264 public static VF_MODULE_TYPE = 'vf_module_type';
265 public static VF_MODULE_LABEL = 'vf_module_label';
266 public static VF_MODULE_DESCRIPTION = 'vf_module_description';
267 public static VOLUME_GROUP = 'volume_group';
268}
269
270
271export class GRAPH_EVENTS {
272 static ON_COMPOSITION_GRAPH_DATA_LOADED = 'onCompositionGraphDataLoaded';
273 static ON_DEPLOYMENT_GRAPH_DATA_LOADED = 'onDeploymentGraphDataLoaded';
274 static ON_NODE_SELECTED = "onNodeSelected";
275 static ON_GRAPH_BACKGROUND_CLICKED = "onGraphBackgroundClicked";
276 static ON_PALETTE_COMPONENT_HOVER_IN = 'onPaletteComponentHoverIn';
277 static ON_PALETTE_COMPONENT_HOVER_OUT = 'onPaletteComponentHoverOut';
278 static ON_PALETTE_COMPONENT_DRAG_START = 'onPaletteComponentDragStart';
279 static ON_PALETTE_COMPONENT_DRAG_ACTION = 'onPaletteComponentDragAction';
280 static ON_COMPONENT_INSTANCE_NAME_CHANGED = 'onComponentInstanceNameChanged';
281 static ON_DELETE_COMPONENT_INSTANCE = 'onDeleteComponentInstance';
282 static ON_DELETE_MULTIPLE_COMPONENTS = 'onDeleteMultipleComponents';
283 static ON_DELETE_EDGE = 'onDeleteEdge';
284 static ON_INSERT_NODE_TO_UCPE = 'onInsertNodeToUCPE';
285 static ON_REMOVE_NODE_FROM_UCPE = 'onRemoveNodeFromUCPE';
286 static ON_VERSION_CHANGED = 'onVersionChanged';
287 static ON_CREATE_COMPONENT_INSTANCE = 'onCreateComponentInstance';
288}
289
290
291export class COMPONENT_FIELDS {
292 static COMPONENT_INSTANCES_PROPERTIES = "componentInstancesProperties";
293 static COMPONENT_INSTANCES_ATTRIBUTES = "componentInstancesAttributes";
294 static COMPONENT_ATTRIBUTES = "attributes";
295 static COMPONENT_INSTANCES = "componentInstances";
296 static COMPONENT_INSTANCES_RELATION = "componentInstancesRelations";
297 static COMPONENT_INPUTS = "inputs";
298 static COMPONENT_METADATA = "metadata";
299 static COMPONENT_DEPLOYMENT_ARTIFACTS = "deploymentArtifacts";
300 static COMPONENT_INFORMATIONAL_ARTIFACTS = "artifacts";
301 static COMPONENT_PROPERTIES = "properties";
302 static COMPONENT_CAPABILITIES = "capabilities";
303 static COMPONENT_REQUIREMENTS = "requirements";
304 static COMPONENT_TOSCA_ARTIFACTS = "toscaArtifacts";
305 static COMPONENT_GROUPS = "groups";
306
307}
308export class API_QUERY_PARAMS {
309 static INCLUDE = "include";
310}