-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtypes.ts
More file actions
65 lines (58 loc) · 1.28 KB
/
types.ts
File metadata and controls
65 lines (58 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { Node } from 'reactflow';
export enum ItemType {
RACK = 'rack',
PLACEHOLDER = 'placeholder',
SERVER = 'server',
NETWORK = 'network',
STORAGE = 'storage',
FIREWALL = 'firewall',
VIRTUAL_MACHINE = 'virtual_machine',
ZONE = 'zone'
}
export interface ZoneData {
label: string;
width: number;
height: number;
description?: string;
color?: string;
}
export interface RackData {
label: string;
totalU: number;
type: ItemType.RACK | ItemType.PLACEHOLDER;
description?: string;
assetId?: string;
isMatchedType?: boolean;
isDropTarget?: boolean;
}
export interface ServerData {
label: string;
uHeight: number;
type: ItemType;
status: 'active' | 'maintenance' | 'offline' | 'malfunction';
model?: string;
ip?: string;
assetId?: string;
contact?: string;
description?: string;
isMatchedType?: boolean;
isSearchMatch?: boolean;
isCurrentSearchMatch?: boolean;
}
export interface PortConnectionData {
sourcePort: string;
targetPort: string;
speed?: string;
color?: string;
}
export type RackNode = Node<RackData>;
export type ServerNode = Node<ServerData>;
export type ZoneNode = Node<ZoneData>;
export interface DragItem {
type: ItemType;
uHeight?: number;
totalU?: number;
label?: string;
width?: number;
height?: number;
}