Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 1 | export 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 | |
| 9 | export 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 Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 33 | export interface IXosCoarseGraphData { |
| 34 | services: IXosServiceModel[]; |
| 35 | tenants: IXosTenantModel[]; |
| 36 | } |
| 37 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 38 | export interface IXosServiceGraphNodeBadge { |
| 39 | type: 'info'|'success'|'warning'|'danger'; |
| 40 | text: string; |
| 41 | } |
| 42 | |
| 43 | export interface IXosServiceGraphNode { |
| 44 | id: number; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 45 | label: string; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 46 | x?: number; |
| 47 | y?: number; |
| 48 | px?: number; |
| 49 | py?: number; |
| 50 | badge?: IXosServiceGraphNodeBadge; |
| 51 | model: IXosServiceModel; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | export interface IXosServiceGraphLink { |
| 55 | id: number; |
| 56 | source: number; |
| 57 | target: number; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 58 | model: IXosTenantModel; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | export interface IXosServiceGraph { |
| 62 | nodes: IXosServiceGraphNode[]; |
| 63 | links: IXosServiceGraphLink[]; |
| 64 | } |