Fix Bug 2121: NG-UI uses unmaintained Chokidar version
[osm/NG-UI.git] / src / models / OperationalModel.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: BARATH KUMAR R (barath.r@tataelxsi.co.in)
17  */
18
19 /**
20  * @file  Model for Operational view JUJU information.
21  */
22
23
24 /** Interface for the VCASTATUS */
25 export interface VCASTATUS {
26     vcaStatus: VCADETAILS;
27     name: string;
28     id: string;
29 }
30 /** Interface for the VCASTATUS */
31 export interface VCADETAILS {
32     isLiveloading: boolean;
33     ns_id: string;
34     vcaStatusModels: SETMODELS[];
35     timeOutSeconds?: number;
36     vca_id: string;
37     vca_name: string;
38 }
39 /** Interface for the SETMODELS */
40 export interface SETMODELS {
41     applications: VCAAPPLICATIONS[];
42     branches?: {};
43     controller_timestamp?: string;
44     executedActions?: EXECUTEDACTIONS;
45     machines: MACHINES[];
46     model: VCAMODEL;
47     offers?: {};
48     relations: RELATIONS[];
49     remote_applications?: {};
50     units: VCAUNITS[];
51     unknown_fields?: {};
52 }
53 /** Interface for the VCAAPPLICATIONS */
54 export interface VCAAPPLICATIONS {
55     app_id: string;
56     charm: string;
57     store: string;
58     units: {};
59     status: STATUS;
60     scale: number;
61     public_address: string;
62     agent_status: AGENTSTATUS;
63     configs: object;
64     actions: object;
65 }
66 /** Interface for the VCAUNITS */
67 export interface VCAUNITS {
68     address: string;
69     machine: string;
70     unit_id: string;
71     public_address: string;
72     status: string;
73     agent_status: AGENTSTATUS;
74 }
75 /** Interface for the EXECUTEDACTIONS */
76 export interface EXECUTEDACTIONS {
77     id: string;
78     action: string;
79     status: string;
80     Code: string;
81     outout: string;
82     verified: string;
83 }
84 /** Interface for the VCAMODEL */
85 export interface VCAMODEL {
86     available_version: string;
87     cloud_tag: string;
88     migration: string;
89     name: string;
90     region: string;
91     version: string;
92 }
93 /** Interface for the STATUS */
94 export interface STATUS {
95     status: string;
96 }
97 /** Interface for the AGENTSTATUS */
98 export interface AGENTSTATUS {
99     status: string;
100     info?: string;
101 }
102 /** Interface for the MACHINES */
103 export interface MACHINES {
104     id_: string;
105     agent_status: AGENTSTATUS;
106     dns_name: string;
107     instance_id: string;
108     series: string;
109     instance_status: AGENTSTATUS;
110 }
111 /** Interface for the RELATIONS */
112 export interface RELATIONS {
113     endpoints: ENDPOINTS[];
114     'interface': string;
115     key: string;
116 }
117 /** Interface for the ENDPOINTS */
118 export interface ENDPOINTS {
119     application: string;
120     name: string;
121     role: string;
122     subordinate: string;
123 }
124 /** Interface for the SETTIMER */
125 export interface SETTIMER {
126     label: string;
127     value: number;
128 }
129 export const SET_TIMER: SETTIMER[] = [
130     {
131         label: '5s',
132         value: 5
133     },
134     {
135         label: '10s',
136         value: 10
137     },
138     {
139         label: '30s',
140         value: 30
141     },
142     {
143         label: '1m',
144         value: 60
145     }
146 ];