Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 1 | export interface IXosServiceModel { |
| 2 | id: number; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 3 | d3Id?: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 4 | backend_status: string; |
| 5 | kind: string; |
| 6 | name: string; |
| 7 | service_specific_attributes: string; // this is json stringified |
| 8 | } |
| 9 | |
| 10 | export interface IXosTenantModel { |
| 11 | id: number; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 12 | d3Id?: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 13 | backend_status: string; |
| 14 | kind: string; |
| 15 | |
| 16 | // source |
| 17 | provider_service_id: number; |
| 18 | |
| 19 | // destination |
| 20 | subscriber_service_id: number; |
| 21 | subscriber_tenant_id: number; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 22 | subscriber_root_id: number; |
| 23 | subscriber_network_id: number; |
| 24 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 25 | subscriber_user_id: number; |
| 26 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 27 | // extra informations |
| 28 | service_specific_id: string; |
| 29 | service_specific_attribute: string; |
| 30 | connect_method: string; |
| 31 | |
| 32 | // reverse of subscriber tenants |
| 33 | subscribed_tenants_ids: number[]; |
| 34 | } |
| 35 | |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 36 | export interface IXosCoarseGraphData { |
| 37 | services: IXosServiceModel[]; |
| 38 | tenants: IXosTenantModel[]; |
| 39 | } |
| 40 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 41 | export interface IXosFineGrainedGraphData extends IXosCoarseGraphData { |
| 42 | subscribers: IXosServiceModel[]; |
| 43 | networks: IXosTenantModel[]; |
| 44 | } |
| 45 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 46 | export interface IXosServiceGraphNodeBadge { |
| 47 | type: 'info'|'success'|'warning'|'danger'; |
| 48 | text: string; |
| 49 | } |
| 50 | |
| 51 | export interface IXosServiceGraphNode { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 52 | id: number | string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 53 | label: string; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 54 | x?: number; |
| 55 | y?: number; |
| 56 | px?: number; |
| 57 | py?: number; |
| 58 | badge?: IXosServiceGraphNodeBadge; |
| 59 | model: IXosServiceModel; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 60 | type: 'service' | 'tenant' | 'network' | 'subscriber'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | export interface IXosServiceGraphLink { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 64 | id: number | string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 65 | source: number; |
| 66 | target: number; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 67 | model: IXosTenantModel; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | export interface IXosServiceGraph { |
| 71 | nodes: IXosServiceGraphNode[]; |
| 72 | links: IXosServiceGraphLink[]; |
| 73 | } |