X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fmodels%2FVimAccountModel.ts;h=159b2c900c99b7cd3ee0df872daf2817704d17f7;hb=3704b8334d999402c8775df7c6f88cdf6dc1b8f8;hp=ea1cb71e41d8690c1792621f043e42d3dc8db627;hpb=3b4814aa2d3dec621dadb52f058ba95a3dc3a86a;p=osm%2FNG-UI.git diff --git a/src/models/VimAccountModel.ts b/src/models/VimAccountModel.ts index ea1cb71..159b2c9 100644 --- a/src/models/VimAccountModel.ts +++ b/src/models/VimAccountModel.ts @@ -18,9 +18,8 @@ /** * @file Model for VimAccount Details related information. */ - +// tslint:disable: completed-docs import { NSInstanceDetails } from 'NSInstanceModel'; - /** Interface for VimAccountDetails */ export interface VimAccountDetails { description: string; @@ -35,12 +34,13 @@ export interface VimAccountDetails { vim_user: string; vim_type: string; name: string; + resources?: RESOURCES; } /** Interface for _ADMIN */ interface ADMIN { projects_write: string[]; - deployed: Deployed; + deployed?: Deployed; operationalState: string; modified: string; projects_read: string[]; @@ -62,7 +62,7 @@ export interface CONFIG { sdn_port_mapping?: string; vim_network_name?: string; security_groups?: string; - availabilityZone?: string; + availability_zone?: string; region_name?: string; insecure?: string; use_existing_flavors?: string; @@ -106,6 +106,7 @@ export interface VIMData { description: string; page?: string; instancesData?: NSInstanceDetails[]; + resources?: RESOURCES; } /** Interface for VIMLOCATION */ export interface VIMLOCATION { @@ -129,8 +130,61 @@ interface PROPERTIES { name: string; state: string; } -/** Interface for the VIMLOCATIONDATA */ -export interface VIMLOCATIONDATA { - label: string; - value: string; +/** Interface for the RESOURCES */ +export interface RESOURCES { + compute: object; + storage: object; + network: object; +} +/** Interface for the RESOURCESDATA */ +export interface RESOURCESDATA { + heading: string; + length: number; + data: RESOURCESCHARTDATA[]; +} +/** Interface for the RESOURCESCHARTDATA */ +export interface RESOURCESCHARTDATA { + title: string; + values: CHARTVALUES; + data: number[]; + colorValues: Color[]; +} +/** Interface common use for the Chart */ +export interface CHARTVALUES { + total: number; + used?: number; + remaining?: number; +} +/** Interface for the CHARTRANGE */ +export interface CHARTRANGE { + percentage: number; + nearlyFull: number; + full: number; +} +/** Interface for the COLOR */ +export interface Color { + backgroundColor?: string[] | string; + borderColor?: string[] | string; +} +/** Constant Values for the resources titles */ +export enum CONFIGRESOURCESTITLE { + ram = 'RAM', + instances = 'Instances', + vcpus = 'VCPUs', + snapshots = 'Volume Snapshots', + storage = 'Volume Storage', + volumes = 'Volumes', + floating_ips = 'Floating IPs', + security_group = 'Security Group', + subnets = 'Subnets', + networks = 'Networks', + ports = 'Ports', + routers = 'Routers' +} + +/** constant values for color */ +export enum RANGECOLOR { + used = '#29c3be', + nearlyfull = '#f0ad4e', + full = '#d9534f' }