Commit 8303ed0e authored by Takumaru Sekine's avatar Takumaru Sekine Committed by Yas Naoi
Browse files

Issue #3255918 by sekinet, yas, Ryo Yamashita: Add a detailed view to SPA (AWS Cloud Volume)

parent f8d42ebf
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
import EntityInfoTemplate from 'model/EntityInfoTemplate';

const AWS_CLOUD_VOLUME_TEMPLATE: EntityInfoTemplate = {
  cloudServiceProvider: 'aws_cloud',
  entityName: 'volume',
  entityRecords: [
    {
      panelName: 'Volume',
      tableRecordList: [],
      keyValueRecords: [
        { labelName: 'Volume ID', name: 'volume_id', type: 'default' },
        { labelName: 'Instance ID', name: 'attachment_information', type: 'default' },
        { labelName: 'Snapshot ID', name: 'snapshot_id', type: 'default' },
        { labelName: 'Size (GB)', name: 'size', type: 'number' },
        { labelName: 'Volume type', name: 'volume_type', type: 'default' },
        { labelName: 'IOPS', name: 'iops', type: 'number' },
        { labelName: 'Availability Zone', name: 'availability_zone', type: 'default' },
        { labelName: 'Encrypted', name: 'encrypted', type: 'boolean', value: [
          'On', 'Off'
        ] },
        { labelName: 'Status', name: 'state', type: 'default' },
        { labelName: 'Created', name: 'created', type: 'datetime' },
      ]
    },
  ]
};

export default AWS_CLOUD_VOLUME_TEMPLATE;
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ import AWS_CLOUD_IMAGE_TEMPLATE from "constant/entity_info_template/aws_cloud/im
import AWS_CLOUD_SECURITY_GROUP_TEMPLATE from "constant/entity_info_template/aws_cloud/security_group";
import AWS_CLOUD_ELASTIC_IP_TEMPLATE from "constant/entity_info_template/aws_cloud/elastic_ip";
import AWS_CLOUD_KEY_PAIR_TEMPLATE from 'constant/entity_info_template/aws_cloud/key_pair';
import AWS_CLOUD_VOLUME_TEMPLATE from 'constant/entity_info_template/aws_cloud/volume';
import AWS_CLOUD_VPC_TEMPLATE from 'constant/entity_info_template/aws_cloud/vpc';
import K8S_POD_TEMPLATE from 'constant/entity_info_template/k8s/pod';

@@ -12,6 +13,7 @@ const ENTITY_INFO_LIST = [
  AWS_CLOUD_SECURITY_GROUP_TEMPLATE,
  AWS_CLOUD_ELASTIC_IP_TEMPLATE,
  AWS_CLOUD_KEY_PAIR_TEMPLATE,
  AWS_CLOUD_VOLUME_TEMPLATE,
  AWS_CLOUD_VPC_TEMPLATE,
  K8S_POD_TEMPLATE,
];
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
type EntityColumn = {
  labelName: string;
  name: string;
  type: 'default' | 'datetime' | 'cpu' | 'memory' | 'key-value' | 'cost' | 'array' | 'key-value-crlf' | 'cidr';
  type: 'default' | 'datetime' | 'cpu' | 'memory' | 'key-value' | 'cost' | 'array' | 'key-value-crlf' | 'cidr' | 'number';
} | {
  labelName: string;
  name: string;
+2 −0
Original line number Diff line number Diff line
@@ -174,6 +174,8 @@ export const convertDataForUI = (data: any, ec: EntityColumn, dataCache: { [key:
      return data !== ec.value[0] ? data : ec.value[1];
    case 'cidr':
      return data.length > 0 ? data[0]['cidr'] : '';
    case 'number':
        return data.toString();
    default:
      return data;
  }