Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 1 | /*- |
| 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 Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 21 | /** |
| 22 | * Created by obarda on 2/18/2016. |
| 23 | */ |
| 24 | |
| 25 | export let DEFAULT_ICON = 'defaulticon'; |
| 26 | export let CP_END_POINT = 'CpEndPoint'; |
| 27 | export let CHANGE_COMPONENT_CSAR_VERSION_FLAG = 'changeComponentCsarVersion'; |
| 28 | |
| 29 | export class ComponentType { |
| 30 | static SERVICE = 'SERVICE'; |
| 31 | static RESOURCE = 'RESOURCE'; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | export class ServerTypeUrl { |
| 35 | static RESOURCES = 'resources/'; |
| 36 | static SERVICES = 'services/'; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | export class ResourceType { |
| 40 | static VF = 'VF'; |
| 41 | static VL = 'VL'; |
| 42 | static CP = 'CP'; |
| 43 | static VFC = 'VFC'; |
| 44 | static VFCMT = 'VFCMT'; |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 45 | static PNF = 'PNF'; |
Michael Lando | 75aacbb | 2017-07-17 21:12:03 +0300 | [diff] [blame] | 46 | static CVFC = 'CVFC'; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | export 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 | |
| 57 | export class DistributionStatus { |
| 58 | DISTRIBUTION_NOT_APPROVED = 'DISTRIBUTION_NOT_APPROVED'; |
| 59 | DISTRIBUTION_APPROVED = 'DISTRIBUTION_APPROVED'; |
| 60 | DISTRIBUTED = 'DISTRIBUTED'; |
| 61 | DISTRIBUTION_REJECTED = 'DISTRIBUTION_REJECTED'; |
| 62 | } |
| 63 | |
| 64 | export class ArtifactGroupType { |
| 65 | static DEPLOYMENT = "DEPLOYMENT"; |
| 66 | static INFORMATION = "INFORMATIONAL"; |
| 67 | static SERVICE_API = "SERVICE_API"; |
| 68 | } |
| 69 | |
| 70 | export 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 | |
| 87 | export class SEVERITY { |
| 88 | public static DEBUG = 'DEBUG'; |
| 89 | public static INFO = 'INFO'; |
| 90 | public static WARNING = 'WARNING'; |
| 91 | public static ERROR = 'ERROR'; |
| 92 | } |
| 93 | |
| 94 | export 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 Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 102 | 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 Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | export class SOURCES { |
| 109 | public static A_AND_AI = 'A&AI'; |
| 110 | public static ORDER = 'Order'; |
| 111 | public static RUNTIME = 'Runtime'; |
| 112 | } |
| 113 | |
| 114 | export class PROPERTY_DATA { |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 115 | 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 Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 117 | public static ROOT_DATA_TYPE = "tosca.datatypes.Root"; |
Michael Lando | b3d4898 | 2017-06-11 14:22:02 +0300 | [diff] [blame] | 118 | public static OPENECOMP_ROOT = "org.openecomp.datatypes.Root"; |
| 119 | public static SUPPLEMENTAL_DATA = "supplemental_data"; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 120 | public static SOURCES = [SOURCES.A_AND_AI, SOURCES.ORDER, SOURCES.RUNTIME]; |
| 121 | } |
| 122 | |
| 123 | export class PROPERTY_VALUE_CONSTRAINTS { |
Michael Lando | b3d4898 | 2017-06-11 14:22:02 +0300 | [diff] [blame] | 124 | public static MAX_LENGTH = 2500; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 125 | public static JSON_MAX_LENGTH = 4096; |
| 126 | } |
| 127 | |
| 128 | export class Role { |
| 129 | public static ADMIN = 'ADMIN'; |
| 130 | public static DESIGNER = 'DESIGNER'; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 131 | public static TESTER = 'TESTER'; |
| 132 | public static OPS = 'OPS'; |
| 133 | public static GOVERNOR = 'GOVERNOR'; |
| 134 | } |
| 135 | |
| 136 | export enum FormState{ |
| 137 | CREATE, |
| 138 | UPDATE, |
| 139 | IMPORT, |
| 140 | VIEW |
| 141 | } |
| 142 | |
| 143 | export class WorkspaceMode { |
| 144 | public static CREATE = 'create'; |
| 145 | public static EDIT = 'edit'; |
| 146 | public static IMPORT = 'import'; |
| 147 | public static VIEW = 'view'; |
| 148 | } |
| 149 | |
| 150 | export 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 | |
| 164 | export class ModalType { |
| 165 | static STANDARD = 'standard'; |
| 166 | static ERROR = 'error'; |
| 167 | static ALERT = 'alert'; |
| 168 | } |
| 169 | |
| 170 | export class GraphColors { |
| 171 | public static NOT_CERTIFIED_LINK = 'rgb(218,31,61)'; |
| 172 | public static VL_LINK = 'rgb(216,216,216)'; |
| 173 | public static ACTIVE_LINK = '#30bdf2'; |
| 174 | public static BASE_LINK = 'rgb(55,55,55)'; |
| 175 | public static NODE_BACKGROUND_COLOR = 'rgba(46, 162, 157, 0.24)'; |
| 176 | public static NODE_SHADOW_COLOR = 'rgba(198, 230, 228, 0.7)'; |
| 177 | public static NODE_OVERLAPPING_BACKGROUND_COLOR = 'rgba(179, 10, 60, 0.24)'; |
| 178 | public static NODE_OVERLAPPING_SHADOW_COLOR = 'rgba(236, 194, 206, 0.7)'; |
| 179 | public static NODE_UCPE_CP = '#9063cd'; |
| 180 | public static NODE_UCPE = '#fbfbfb'; |
| 181 | public static NODE_SELECTED_BORDER_COLOR = '#30bdf2'; |
| 182 | } |
| 183 | export class GraphTransactionLogText { |
| 184 | public static REMOVE_TEMP_LINK = "remove tempLink"; |
| 185 | public static DELETE_LINK = "delete link"; |
| 186 | public static ADD_LINK = "delete link"; |
| 187 | public static ADD_NODE = "adding node"; |
| 188 | } |
| 189 | |
| 190 | export class GraphUIObjects { |
| 191 | public static LINK_MENU_HEIGHT = 420; |
| 192 | public static TOP_HEADER_HEIGHT = 200; |
| 193 | public static TOOLTIP_OFFSET_X = 50; |
| 194 | public static TOOLTIP_OFFSET_Y = 145; |
| 195 | public static TOOLTIP_LINK_OFFSET_X = 35; |
| 196 | public static TOOLTIP_LINK_OFFSET_Y = 75; |
| 197 | public static MENU_LINK_VL_HEIGHT_OFFSET = 250; |
| 198 | public static MENU_LINK_VL_WIDTH_OFFSET = 200; |
| 199 | public static MENU_LINK_SIMPLE_HEIGHT_OFFSET = 180; |
| 200 | public static MENU_LINK_SIMPLE_WIDTH_OFFSET = 130; |
| 201 | public static DIAGRAM_RIGHT_WIDTH_OFFSET = 248; |
| 202 | public static DIAGRAM_HEADER_OFFSET = 103; |
| 203 | public static DIAGRAM_PALETTE_WIDTH_OFFSET = 247; |
| 204 | // public static COMPOSITION_HEADER_OFFSET = 50; |
| 205 | // public static COMPOSITION_NODE_MENU_WIDTH = 230; |
| 206 | // public static COMPOSITION_NODE_MENU_HEIGHT = 200; |
| 207 | // public static COMPOSITION_RIGHT_PANEL_OFFSET = 300; |
| 208 | } |
| 209 | |
| 210 | |
| 211 | export class States { |
| 212 | public static WORKSPACE_GENERAL = 'workspace.general'; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 213 | public static WORKSPACE_ACTIVITY_LOG = 'workspace.activity_log'; |
| 214 | public static WORKSPACE_DEPLOYMENT_ARTIFACTS = 'workspace.deployment_artifacts'; |
| 215 | public static WORKSPACE_PROPERTIES = 'workspace.properties'; |
| 216 | public static WORKSPACE_SERVICE_INPUTS = 'workspace.service_inputs'; |
| 217 | public static WORKSPACE_RESOURCE_INPUTS = 'workspace.resource_inputs'; |
| 218 | public static WORKSPACE_ATTRIBUTES = 'workspace.attributes'; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 219 | public static WORKSPACE_INFORMATION_ARTIFACTS = 'workspace.information_artifacts'; |
| 220 | public static WORKSPACE_TOSCA_ARTIFACTS = 'workspace.tosca_artifacts'; |
| 221 | public static WORKSPACE_COMPOSITION = 'workspace.composition'; |
| 222 | public static WORKSPACE_NETWORK_CALL_FLOW = 'workspace.network_call_flow'; |
| 223 | public static WORKSPACE_MANAGEMENT_WORKFLOW = 'workspace.management_workflow'; |
| 224 | public static WORKSPACE_DEPLOYMENT = 'workspace.deployment'; |
| 225 | public static WORKSPACE_DISTRIBUTION = 'workspace.distribution'; |
| 226 | public static WORKSPACE_PROPERTIES_ASSIGNMENT = 'workspace.properties_assignment'; |
| 227 | public static WORKSPACE_REQUIREMENTS_AND_CAPABILITIES = 'workspace.reqAndCap'; |
| 228 | public static WORKSPACE_NG2 = 'workspace.ng2'; |
| 229 | } |
| 230 | |
| 231 | export class EVENTS { |
| 232 | static RESOURCE_LEFT_PALETTE_UPDATE_EVENT = "resourceLeftPanelUpdateEvent"; |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 233 | static RESOURCE_PNF_LEFT_PALETTE_UPDATE_EVENT = "resourcePNFLeftPanelUpdateEvent"; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 234 | static SERVICE_LEFT_PALETTE_UPDATE_EVENT = "serviceLeftPanelUpdateEvent"; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 235 | static VL_LEFT_PALETTE_UPDATE_EVENT = "vlLeftPanelUdateEvent"; |
| 236 | static ON_CSAR_LOADING = "onCsarLoading"; |
| 237 | static DOWNLOAD_ARTIFACT_FINISH_EVENT = "downloadArtifactFinishEvent"; |
| 238 | static ON_WORKSPACE_SAVE_BUTTON_CLICK = "onWorkspaceSaveButtonClick"; |
| 239 | static ON_WORKSPACE_SAVE_BUTTON_SUCCESS = "onWorkspaceSaveButtonSuccess"; |
| 240 | static ON_WORKSPACE_SAVE_BUTTON_ERROR = "onWorkspaceSaveButtonError"; |
Michael Lando | b3d4898 | 2017-06-11 14:22:02 +0300 | [diff] [blame] | 241 | static ON_CHECKOUT = "onCheckout"; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 242 | |
| 243 | //Loader events |
| 244 | static SHOW_LOADER_EVENT = "showLoaderEvent"; |
| 245 | static HIDE_LOADER_EVENT = "hideLoaderEvent"; |
| 246 | } |
| 247 | |
| 248 | |
| 249 | export class UNIQUE_GROUP_PROPERTIES_NAME { |
| 250 | public static MIN_VF_MODULE_INSTANCES = 'min_vf_module_instances'; |
| 251 | public static MAX_VF_MODULE_INSTANCES = 'max_vf_module_instances'; |
| 252 | public static INITIAL_COUNT = 'initial_count'; |
| 253 | public static IS_BASE = 'isBase'; |
| 254 | public static VF_MODULE_TYPE = 'vf_module_type'; |
| 255 | public static VF_MODULE_LABEL = 'vf_module_label'; |
| 256 | public static VF_MODULE_DESCRIPTION = 'vf_module_description'; |
| 257 | public static VOLUME_GROUP = 'volume_group'; |
| 258 | } |
| 259 | |
| 260 | |
| 261 | export class GRAPH_EVENTS { |
| 262 | static ON_COMPOSITION_GRAPH_DATA_LOADED = 'onCompositionGraphDataLoaded'; |
| 263 | static ON_DEPLOYMENT_GRAPH_DATA_LOADED = 'onDeploymentGraphDataLoaded'; |
| 264 | static ON_NODE_SELECTED = "onNodeSelected"; |
| 265 | static ON_GRAPH_BACKGROUND_CLICKED = "onGraphBackgroundClicked"; |
| 266 | static ON_PALETTE_COMPONENT_HOVER_IN = 'onPaletteComponentHoverIn'; |
| 267 | static ON_PALETTE_COMPONENT_HOVER_OUT = 'onPaletteComponentHoverOut'; |
| 268 | static ON_PALETTE_COMPONENT_DRAG_START = 'onPaletteComponentDragStart'; |
| 269 | static ON_PALETTE_COMPONENT_DRAG_ACTION = 'onPaletteComponentDragAction'; |
| 270 | static ON_COMPONENT_INSTANCE_NAME_CHANGED = 'onComponentInstanceNameChanged'; |
| 271 | static ON_DELETE_COMPONENT_INSTANCE = 'onDeleteComponentInstance'; |
| 272 | static ON_DELETE_MULTIPLE_COMPONENTS = 'onDeleteMultipleComponents'; |
| 273 | static ON_DELETE_EDGE = 'onDeleteEdge'; |
| 274 | static ON_INSERT_NODE_TO_UCPE = 'onInsertNodeToUCPE'; |
| 275 | static ON_REMOVE_NODE_FROM_UCPE = 'onRemoveNodeFromUCPE'; |
| 276 | static ON_VERSION_CHANGED = 'onVersionChanged'; |
| 277 | static ON_CREATE_COMPONENT_INSTANCE = 'onCreateComponentInstance'; |
| 278 | } |
| 279 | |
| 280 | |
| 281 | export class COMPONENT_FIELDS { |
| 282 | static COMPONENT_INSTANCES_PROPERTIES = "componentInstancesProperties"; |
| 283 | static COMPONENT_INSTANCES_ATTRIBUTES = "componentInstancesAttributes"; |
| 284 | static COMPONENT_ATTRIBUTES = "attributes"; |
| 285 | static COMPONENT_INSTANCES = "componentInstances"; |
| 286 | static COMPONENT_INSTANCES_RELATION = "componentInstancesRelations"; |
| 287 | static COMPONENT_INPUTS = "inputs"; |
| 288 | static COMPONENT_METADATA = "metadata"; |
| 289 | static COMPONENT_DEPLOYMENT_ARTIFACTS = "deploymentArtifacts"; |
| 290 | static COMPONENT_INFORMATIONAL_ARTIFACTS = "artifacts"; |
| 291 | static COMPONENT_PROPERTIES = "properties"; |
| 292 | static COMPONENT_CAPABILITIES = "capabilities"; |
| 293 | static COMPONENT_REQUIREMENTS = "requirements"; |
| 294 | static COMPONENT_TOSCA_ARTIFACTS = "toscaArtifacts"; |
| 295 | static COMPONENT_GROUPS = "groups"; |
| 296 | |
| 297 | } |
| 298 | export class API_QUERY_PARAMS { |
| 299 | static INCLUDE = "include"; |
| 300 | } |