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