Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 1 | interface Id3Element { |
| 2 | d3Class?: string; |
| 3 | d3Id?: string; |
| 4 | } |
| 5 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 6 | export interface IXosServiceModel { |
| 7 | id: number; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 8 | d3Id?: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 9 | backend_status: string; |
| 10 | kind: string; |
| 11 | name: string; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 12 | class_names: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 13 | service_specific_attributes: string; // this is json stringified |
| 14 | } |
| 15 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 16 | export interface IXosTenantModel extends Id3Element { |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 17 | id: number; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 18 | d3Id?: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 19 | 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 Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 28 | subscriber_root_id: number; |
| 29 | subscriber_network_id: number; |
| 30 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 31 | subscriber_user_id: number; |
| 32 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 33 | // 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 Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 42 | export interface IXosCoarseGraphData { |
| 43 | services: IXosServiceModel[]; |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 44 | servicedependencys: any[]; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 45 | } |
| 46 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 47 | export interface IXosFineGrainedGraphData extends IXosCoarseGraphData { |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 48 | tenants: IXosTenantModel[]; |
| 49 | subscribers: any[]; |
| 50 | networks: any[]; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 51 | } |
| 52 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 53 | export interface IXosServiceGraphNodeBadge { |
| 54 | type: 'info'|'success'|'warning'|'danger'; |
| 55 | text: string; |
| 56 | } |
| 57 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 58 | export interface IXosServiceGraphNode extends Id3Element { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 59 | id: number | string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 60 | label: string; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 61 | x?: number; |
| 62 | y?: number; |
| 63 | px?: number; |
| 64 | py?: number; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 65 | fixed?: boolean; |
| 66 | badge?: IXosServiceGraphNodeBadge; // TODO implement badges |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 67 | model: IXosServiceModel; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 68 | type: 'service' | 'tenant' | 'network' | 'subscriber'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 69 | } |
| 70 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 71 | export interface IXosServiceGraphLink extends Id3Element { |
Matteo Scandolo | 0e8a842 | 2017-03-25 14:55:40 -0700 | [diff] [blame] | 72 | id: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 73 | source: number; |
| 74 | target: number; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 75 | model: IXosTenantModel; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | export interface IXosServiceGraph { |
| 79 | nodes: IXosServiceGraphNode[]; |
| 80 | links: IXosServiceGraphLink[]; |
| 81 | } |