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 | 7218159 | 2017-07-25 14:49:40 -0700 | [diff] [blame^] | 44 | servicedependencies: any[]; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 45 | } |
| 46 | |
Matteo Scandolo | 7218159 | 2017-07-25 14:49:40 -0700 | [diff] [blame^] | 47 | // TODO outdated, remove |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 48 | export interface IXosFineGrainedGraphData extends IXosCoarseGraphData { |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 49 | tenants: IXosTenantModel[]; |
| 50 | subscribers: any[]; |
| 51 | networks: any[]; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 52 | } |
| 53 | |
Matteo Scandolo | 7218159 | 2017-07-25 14:49:40 -0700 | [diff] [blame^] | 54 | export interface IXosServiceInstanceGraphData { |
| 55 | serviceGraph: IXosServiceGraph; |
| 56 | serviceInstances: any[]; |
| 57 | serviceInstanceLinks: any[]; |
| 58 | networks: any[]; |
| 59 | } |
| 60 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 61 | export interface IXosServiceGraphNodeBadge { |
| 62 | type: 'info'|'success'|'warning'|'danger'; |
| 63 | text: string; |
| 64 | } |
| 65 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 66 | export interface IXosServiceGraphNode extends Id3Element { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 67 | id: number | string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 68 | label: string; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 69 | x?: number; |
| 70 | y?: number; |
| 71 | px?: number; |
| 72 | py?: number; |
Max Chu | 2bfddde | 2017-06-29 13:41:52 -0700 | [diff] [blame] | 73 | width?: number; |
| 74 | height?: number; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 75 | fixed?: boolean; |
| 76 | badge?: IXosServiceGraphNodeBadge; // TODO implement badges |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 77 | model: IXosServiceModel; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 78 | type: 'service' | 'tenant' | 'network' | 'subscriber'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 79 | } |
| 80 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 81 | export interface IXosServiceGraphLink extends Id3Element { |
Matteo Scandolo | 0e8a842 | 2017-03-25 14:55:40 -0700 | [diff] [blame] | 82 | id: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 83 | source: number; |
| 84 | target: number; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 85 | model: IXosTenantModel; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | export interface IXosServiceGraph { |
| 89 | nodes: IXosServiceGraphNode[]; |
| 90 | links: IXosServiceGraphLink[]; |
| 91 | } |