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