Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / launchpad / src / virtual_links / nsVirtualLinksStore.js
1 /*
2 *
3 * Copyright 2016 RIFT.IO Inc
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18 import NSVirtualLinksActions from './nsVirtualLinksActions.js';
19 import Alt from 'widgets/skyquake_container/skyquakeAltInstance';
20
21 class NSVirtualLinksStore {
22 constructor() {
23 this.column = {
24 categories: [{
25 key: 'details',
26 label: 'DETAILS',
27 fields: [{
28 key: 'id',
29 label: 'ID'
30 }, {
31 key: 'name',
32 label: 'NAME'
33 }, {
34 key: 'short-name',
35 label: 'SHORT NAME'
36 }, {
37 key: 'vendor',
38 label: 'VENDOR'
39 }, {
40 key: 'description',
41 label: 'DESCRIPTION'
42 }, {
43 key: 'version',
44 label: 'VERSION'
45 }, {
46 key: 'type',
47 label: 'TYPE'
48 }, {
49 key: 'root-bandwidth',
50 label: 'ROOT BANDWIDTH'
51 }, {
52 key: 'leaf-bandwidth',
53 label: 'LEAF BANDWIDTH'
54 }, {
55 key: 'res-id',
56 label: 'RESOURCE MANAGER ID'
57 }, {
58 key: 'network-id',
59 label: 'NETWORK ID'
60 }]
61 }, {
62 key: 'provider-network',
63 label: 'PROVIDER NETWORK',
64 fields: [{
65 key: 'provider-network.physical-network',
66 label: 'PHYSICAL NETWORK'
67 }, {
68 key: 'provider-network.overlay-type',
69 label: 'OVERLAY TYPE'
70 }, {
71 key: 'provider-network.segmentation_id',
72 label: 'SEGMENTATION ID'
73 }]
74 }, {
75 key: 'status',
76 label: 'STATUS',
77 fields: [{
78 key: 'status',
79 label: 'STATUS'
80 }, {
81 key: 'operational-status',
82 label: 'OPERATIONAL STATUS'
83 }, {
84 key: 'create-time',
85 label: 'CREATE TIME',
86 transform: (value) => {
87 if (!value) {
88 return null;
89 }
90 return new Date(value);
91 }
92 }]
93 }, {
94 key: 'vim',
95 label: 'VIMS',
96 }, {
97 key: 'vnfr-connection-point-ref',
98 label: 'VNF CONNECTION POINTS',
99 type: 'list',
100 fields: [{
101 key: 'vnfr-connection-point-ref',
102 label: 'VNF Connection Point',
103 transform: (value) => {
104 return (value && (value['vnfr-name'] + ': ' + value['connection-point']));
105 }
106 }]
107 }, {
108 key: 'ip-profile-params',
109 label: 'IP PROFILE INFO',
110 fields: [{
111 key: 'ip-profile-params.ip-version',
112 label: 'IP VERSION'
113 }, {
114 key: 'ip-profile-params.subnet-address',
115 label: 'SUBNET ADDRESS'
116 }, {
117 key: 'ip-profile-params.gateway-address',
118 label: 'GATEWAY ADDRESS'
119 }, {
120 key: 'ip-profile-params.security-group',
121 label: 'SECURITY GROUP'
122 }, {
123 key: 'ip-profile-params.subnet-prefix-pool',
124 label: 'SUBNET PREFIX POOL'
125 }, {
126 key: 'ip-profile-params.dns-server',
127 label: 'DNS SERVERS',
128 type: 'list'
129 }, {
130 key: 'ip-profile-params.dhcp-params.enabled',
131 label: 'ENABLED'
132 }, {
133 key: 'ip-profile-params.dhcp-params.start-address',
134 label: 'START ADDRESS'
135 }, {
136 key: 'ip-profile-params.dhcp-params.count',
137 label: 'COUNT'
138 }]
139 }]
140 };
141 }
142 }
143
144 export default Alt.createStore(NSVirtualLinksStore, 'NSVirtualLinksStore');