aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationConstants.js
blob: f461cbd40aa9545519dc4e32569096a11d58f666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*!
 * Copyright © 2016-2018 European Support Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
import keyMirror from 'nfvo-utils/KeyMirror.js';
import i18n from 'nfvo-utils/i18n/i18n.js';

export const actionTypes = keyMirror(
    {
        TOGGLE_EXPANDED: null,
        SELECTED_NODE: null,
        UNSELECTED_NODE: null
    },
    'heatValidation'
);

export const errorTypes = keyMirror({
    MISSING_FILE_IN_ZIP: i18n('missing file in zip'),
    MISSING_FILE_IN_MANIFEST: i18n('missing file in manifest'),
    MISSING_OR_ILLEGAL_FILE_TYPE_IN_MANIFEST: i18n(
        'missing or illegal file type in manifest'
    ),
    FILE_IS_YML_WITHOUT_YML_EXTENSION: i18n(
        "file is defined as a heat file but it doesn't have .yml or .yaml extension"
    ),
    FILE_IS_ENV_WITHOUT_ENV_EXTENSION: i18n(
        "file is defined as an env file but it doesn't have .env extension"
    ),
    ILLEGAL_YAML_FILE_CONTENT: i18n('illegal yaml file content'),
    ILLEGAL_HEAT_YAML_FILE_CONTENT: i18n('illegal HEAT yaml file content'),
    MISSING_FILE_NAME_IN_MANIFEST: i18n(
        'a file is written in manifest without file name'
    ),
    MISSING_ENV_FILE_IN_ZIP: i18n('missing env file in zip'),
    ARTIFACT_NOT_IN_USE: i18n('artifact not in use')
});

export const errorLevels = keyMirror({
    WARNING: 'WARNING',
    ERROR: 'ERROR'
});
export const nodeFilters = keyMirror({
    ALL: 'All'
});
export const nodeTypes = keyMirror({
    heat: i18n('Heat'),
    volume: i18n('Volume'),
    network: i18n('Network'),
    artifact: i18n('Artifact'),
    env: i18n('Environment'),
    other: i18n('')
});

export const mouseActions = keyMirror({
    MOUSE_BUTTON_CLICK: 0
});