blob: a7e41f1e576a6a8a5419e9f10147499cb631bf64 [file] [log] [blame]
Matteo Scandolo7629cc42017-03-13 14:12:15 -07001interface Id3Element {
2 d3Class?: string;
3 d3Id?: string;
4}
5
Matteo Scandoloa62adbc2017-03-02 15:37:34 -08006export interface IXosServiceModel {
7 id: number;
Matteo Scandolo75171782017-03-08 14:17:01 -08008 d3Id?: string;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -08009 backend_status: string;
10 kind: string;
11 name: string;
Matteo Scandolo7629cc42017-03-13 14:12:15 -070012 class_names: string;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080013 service_specific_attributes: string; // this is json stringified
14}
15
Matteo Scandolo7629cc42017-03-13 14:12:15 -070016export interface IXosTenantModel extends Id3Element {
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080017 id: number;
Matteo Scandolo75171782017-03-08 14:17:01 -080018 d3Id?: string;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080019 backend_status: string;
20 kind: string;
21
22 // source
23 provider_service_id: number;
24
25 // destination
26 subscriber_service_id: number;
27 subscriber_tenant_id: number;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080028 subscriber_root_id: number;
29 subscriber_network_id: number;
30
Matteo Scandolo75171782017-03-08 14:17:01 -080031 subscriber_user_id: number;
32
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080033 // extra informations
34 service_specific_id: string;
35 service_specific_attribute: string;
36 connect_method: string;
37
38 // reverse of subscriber tenants
39 subscribed_tenants_ids: number[];
40}
41
Matteo Scandolo968e7f22017-03-03 11:49:18 -080042export interface IXosCoarseGraphData {
43 services: IXosServiceModel[];
Matteo Scandolo72181592017-07-25 14:49:40 -070044 servicedependencies: any[];
Matteo Scandolo968e7f22017-03-03 11:49:18 -080045}
46
Matteo Scandolo72181592017-07-25 14:49:40 -070047// TODO outdated, remove
Matteo Scandolo75171782017-03-08 14:17:01 -080048export interface IXosFineGrainedGraphData extends IXosCoarseGraphData {
Matteo Scandolod4878532017-03-20 17:39:55 -070049 tenants: IXosTenantModel[];
50 subscribers: any[];
51 networks: any[];
Matteo Scandolo75171782017-03-08 14:17:01 -080052}
53
Matteo Scandolo72181592017-07-25 14:49:40 -070054export interface IXosServiceInstanceGraphData {
55 serviceGraph: IXosServiceGraph;
56 serviceInstances: any[];
57 serviceInstanceLinks: any[];
58 networks: any[];
59}
60
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080061export interface IXosServiceGraphNodeBadge {
62 type: 'info'|'success'|'warning'|'danger';
63 text: string;
64}
65
Matteo Scandolo7629cc42017-03-13 14:12:15 -070066export interface IXosServiceGraphNode extends Id3Element {
Matteo Scandolo75171782017-03-08 14:17:01 -080067 id: number | string;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080068 label: string;
Matteo Scandolo968e7f22017-03-03 11:49:18 -080069 x?: number;
70 y?: number;
71 px?: number;
72 py?: number;
Max Chu2bfddde2017-06-29 13:41:52 -070073 width?: number;
74 height?: number;
Matteo Scandolo7629cc42017-03-13 14:12:15 -070075 fixed?: boolean;
76 badge?: IXosServiceGraphNodeBadge; // TODO implement badges
Matteo Scandolo968e7f22017-03-03 11:49:18 -080077 model: IXosServiceModel;
Matteo Scandolo75171782017-03-08 14:17:01 -080078 type: 'service' | 'tenant' | 'network' | 'subscriber';
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080079}
80
Matteo Scandolo7629cc42017-03-13 14:12:15 -070081export interface IXosServiceGraphLink extends Id3Element {
Matteo Scandolo0e8a8422017-03-25 14:55:40 -070082 id: string;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080083 source: number;
84 target: number;
Matteo Scandolo968e7f22017-03-03 11:49:18 -080085 model: IXosTenantModel;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080086}
87
88export interface IXosServiceGraph {
89 nodes: IXosServiceGraphNode[];
90 links: IXosServiceGraphLink[];
91}