NG-UI Added support for the quotos
[osm/NG-UI.git] / src / models / ProjectModel.ts
1 /*
2  Copyright 2020 TATA ELXSI
3
4  Licensed under the Apache License, Version 2.0 (the 'License');
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15
16  Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
17  */
18 /**
19  * @file  Model for project related information.
20  */
21
22 /** Interface for ProjectDetails */
23 export interface ProjectDetails {
24     _admin?: Admin;
25     _id?: string;
26     name?: string;
27     id?: string;
28     domain_name?: string;
29     quotas?: {};
30 }
31
32 /** Interface for Admin */
33 interface Admin {
34     created: number;
35     modified: number;
36     projects_read?: string[];
37 }
38 /** Interface for ProjectDetails in smarttable */
39 export interface ProjectData {
40     projectName: string;
41     modificationDate: string;
42     creationDate: string;
43     page?: string;
44     id?: string;
45     project?: string;
46     quotas?: {};
47 }
48 /** Interface for quota items */
49 export const QUOTA_ITEMS: QUOTAITEM[] = [
50     {
51         title: 'VNFPACKAGES',
52         value: 'vnfds',
53         minValue: 0,
54         maxValue: 9999
55     },
56     {
57         title: 'NSPACKAGES',
58         value: 'nsds',
59         minValue: 0,
60         maxValue: 9999
61     },
62     {
63         title: 'PAGE.DASHBOARD.NETSLICETEMPLATE',
64         value: 'slice_templates',
65         minValue: 0,
66         maxValue: 9999
67     },
68     {
69         title: 'PDUINSTANCES',
70         value: 'pduds',
71         minValue: 0,
72         maxValue: 9999
73     },
74     {
75         title: 'NSINSTANCES',
76         value: 'ns_instances',
77         minValue: 0,
78         maxValue: 9999
79     },
80     {
81         title: 'PAGE.DASHBOARD.NETSLICEINSTANCE',
82         value: 'slice_instances',
83         minValue: 0,
84         maxValue: 9999
85     },
86     {
87         title: 'VIMACCOUNTS',
88         value: 'vim_accounts',
89         minValue: 0,
90         maxValue: 9999
91     },
92     {
93         title: 'WIMACCOUNTS',
94         value: 'wim_accounts',
95         minValue: 0,
96         maxValue: 9999
97     },
98     {
99         title: 'SDNCONTROLLER',
100         value: 'sdn_controllers',
101         minValue: 0,
102         maxValue: 9999
103     },
104     {
105         title: 'PAGE.K8S.MENUK8SCLUSTER',
106         value: 'k8sclusters',
107         minValue: 0,
108         maxValue: 9999
109     },
110     {
111         title: 'PAGE.K8S.MENUK8SREPO',
112         value: 'k8srepos',
113         minValue: 0,
114         maxValue: 9999
115     },
116     {
117         title: 'PAGE.OSMREPO.MENUOSMREPO',
118         value: 'osmrepos',
119         minValue: 0,
120         maxValue: 9999
121     }
122 ];
123
124 /** Interface for quota individual item */
125 export interface QUOTAITEM {
126     title: string;
127     value: string;
128     minValue: number;
129     maxValue: number;
130 }