Adding filter bar
[aai/sparky-fe.git] / src / generic-components / filterBar / FilterBarConstants.js
1 /*
2  * ============LICENSE_START===================================================
3  * SPARKY (AAI UI service)
4  * ============================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
8  * ============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=====================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25
26 import keyMirror from 'utils/KeyMirror.js';
27 import {BASE_URL} from 'app/networking/NetworkConstants.js';
28
29 export const filterBarActionTypes = keyMirror({
30   SET_FILTERS: null,
31   SET_FILTER_VALUES: null,
32   CLEAR_FILTERS: null,
33   FILTER_VALUE_CHANGE: null,
34   NEW_SELECTIONS: null,
35   SET_NON_CONVERTED_VALUES: null,
36   SET_CONVERTED_VALUES: null,
37   SET_UNIFIED_VALUES: null
38 });
39
40 export const UNIFIED_FILTERS_URL = BASE_URL + '/rest/search/unifiedFilterRequest';
41
42 export const DISCOVER_FILTERS_ERROR_MSG = 'There was an error retrieving the' +
43   ' list of available filters';
44
45 export const FILTER_BAR_TITLE = 'FILTER BY';
46 export const DATE_TIME_ZONE = 'Z';
47
48 export const FILTER_TYPE_ENUM = {
49   LIST: 'dropDown',
50   DATE: 'date'
51 };
52
53 export const FILTER_ATTRIBUTE_DEFAULT_VALUE = 'defaultValue';
54 export const FILTER_ATTRIBUTE_CONTROLS = 'controls';
55 export const FILTER_ATTRIBUTE_CODE = 'code';
56 export const FILTER_ATTRIBUTE_VALUES = 'values';
57 export const FILTER_ATTRIBUTE_TO = 'to';
58 export const FILTER_ATTRIBUTE_FROM = 'from';