Create wt-odlux directory
[ccsdk/features.git] / sdnr / wt-odlux / odlux / apps / faultApp / src / models / fault.ts
1 /**
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt odlux
4  * =================================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18 export type Fault = {
19   id: string;
20   nodeId: string;
21   counter: number;
22   timestamp: string;
23   objectId: string;
24   problem: string;
25   severity: null | 'Warning' | 'Minor' | 'Major' | 'Critical' | 'NonAlarmed';
26   type: string;
27   sourceType?: string;
28 };
29
30 export type FaultAlarmNotification = {
31   id: string;
32   timeStamp: string;
33   nodeName: string;
34   counter: number;
35   objectId: string;
36   problem: string;
37   severity: string;
38 };
39
40 export type FaultAlarmNotificationWS = {
41   'node-id': string;
42   'data': {
43     'counter': number;
44     'time-stamp': string;
45     'object-id-ref': string;
46     'problem': string;
47     'severity': null | 'Warning' | 'Minor' | 'Major' | 'Critical' | 'NonAlarmed';
48   };
49   'type': {
50     'namespace': string;
51     'revision': string;
52     'type': string;
53   };
54   'event-time': string;
55 };
56
57 /**
58  * Fault status return type
59  */
60 export type FaultsReturnType = {
61   criticals: number;
62   majors: number;
63   minors: number;
64   warnings: number;
65   Connected: number;
66   Connecting: number;
67   Disconnected: number;
68   Mounted: number;
69   UnableToConnect: number;
70   Undefined: number;
71   Unmounted: number;
72   total: number;
73 };
74
75 export type FaultType = {
76   Critical: number;
77   Major: number;
78   Minor: number;
79   Warning: number;
80   Connected: number;
81   Connecting: number;
82   Disconnected: number;
83   Mounted: number;
84   UnableToConnect: number;
85   Undefined: number;
86   Unmounted: number;
87   total: number;
88 };
89
90 export type Faults = {
91   faults: FaultsReturnType;
92   'network-element-connections': FaultsReturnType;
93 };
94
95 export type DeletedStuckAlarms = {
96   nodenames: string[];
97 };