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[]; |
| 44 | tenants: IXosTenantModel[]; |
| 45 | } |
| 46 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 47 | export interface IXosFineGrainedGraphData extends IXosCoarseGraphData { |
| 48 | subscribers: IXosServiceModel[]; |
| 49 | networks: IXosTenantModel[]; |
| 50 | } |
| 51 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 52 | export interface IXosServiceGraphNodeBadge { |
| 53 | type: 'info'|'success'|'warning'|'danger'; |
| 54 | text: string; |
| 55 | } |
| 56 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 57 | export interface IXosServiceGraphNode extends Id3Element { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 58 | id: number | string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 59 | label: string; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 60 | x?: number; |
| 61 | y?: number; |
| 62 | px?: number; |
| 63 | py?: number; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 64 | fixed?: boolean; |
| 65 | badge?: IXosServiceGraphNodeBadge; // TODO implement badges |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 66 | model: IXosServiceModel; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 67 | type: 'service' | 'tenant' | 'network' | 'subscriber'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 68 | } |
| 69 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 70 | export interface IXosServiceGraphLink extends Id3Element { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 71 | id: number | string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 72 | source: number; |
| 73 | target: number; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 74 | model: IXosTenantModel; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | export interface IXosServiceGraph { |
| 78 | nodes: IXosServiceGraphNode[]; |
| 79 | links: IXosServiceGraphLink[]; |
| 80 | } |