blob: ab80c791b50c75e5366d1c61c3a1d19b24253862 [file] [log] [blame]
Matteo Scandoloa62adbc2017-03-02 15:37:34 -08001export interface IXosServiceModel {
2 id: number;
3 backend_status: string;
4 kind: string;
5 name: string;
6 service_specific_attributes: string; // this is json stringified
7}
8
9export interface IXosTenantModel {
10 id: number;
11 backend_status: string;
12 kind: string;
13
14 // source
15 provider_service_id: number;
16
17 // destination
18 subscriber_service_id: number;
19 subscriber_tenant_id: number;
20 subscriber_user_id: number;
21 subscriber_root_id: number;
22 subscriber_network_id: number;
23
24 // extra informations
25 service_specific_id: string;
26 service_specific_attribute: string;
27 connect_method: string;
28
29 // reverse of subscriber tenants
30 subscribed_tenants_ids: number[];
31}
32
Matteo Scandolo968e7f22017-03-03 11:49:18 -080033export interface IXosCoarseGraphData {
34 services: IXosServiceModel[];
35 tenants: IXosTenantModel[];
36}
37
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080038export interface IXosServiceGraphNodeBadge {
39 type: 'info'|'success'|'warning'|'danger';
40 text: string;
41}
42
43export interface IXosServiceGraphNode {
44 id: number;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080045 label: string;
Matteo Scandolo968e7f22017-03-03 11:49:18 -080046 x?: number;
47 y?: number;
48 px?: number;
49 py?: number;
50 badge?: IXosServiceGraphNodeBadge;
51 model: IXosServiceModel;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080052}
53
54export interface IXosServiceGraphLink {
55 id: number;
56 source: number;
57 target: number;
Matteo Scandolo968e7f22017-03-03 11:49:18 -080058 model: IXosTenantModel;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080059}
60
61export interface IXosServiceGraph {
62 nodes: IXosServiceGraphNode[];
63 links: IXosServiceGraphLink[];
64}