Commit 60750c70 authored by Takumaru Sekine's avatar Takumaru Sekine Committed by Yas Naoi
Browse files

Issue #3257366 by sekinet, yas, Ryo Yamashita: Add a detailed view to SPA...

Issue #3257366 by sekinet, yas, Ryo Yamashita: Add a detailed view to SPA (Nodes) (EXCEPT Costs, Conditions, and Pods)
parent fe4ef727
Loading
Loading
Loading
Loading

cloud_dashboard/build.sh

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ import AWS_CLOUD_NETWORK_INTERFACE_TEMPLATE from 'constant/entity_info_template/
import AWS_CLOUD_VPC_TEMPLATE from 'constant/entity_info_template/aws_cloud/vpc';
import AWS_CLOUD_SUBNET_TEMPLATE from 'constant/entity_info_template/aws_cloud/subnet';
import AWS_CLOUD_INTERNET_GATEWAY_TEMPLATE from 'constant/entity_info_template/aws_cloud/internet_gateway';
import K8S_NODE_TEMPLATE from 'constant/entity_info_template/k8s/node';
import K8S_POD_TEMPLATE from 'constant/entity_info_template/k8s/pod';

const ENTITY_INFO_LIST = [
@@ -23,6 +24,7 @@ const ENTITY_INFO_LIST = [
  AWS_CLOUD_VPC_TEMPLATE,
  AWS_CLOUD_SUBNET_TEMPLATE,
  AWS_CLOUD_INTERNET_GATEWAY_TEMPLATE,
  K8S_NODE_TEMPLATE,
  K8S_POD_TEMPLATE,
];

+101 −0
Original line number Diff line number Diff line
import EntityInfoTemplate from 'model/EntityInfoTemplate';

// Template for displaying detailed information about entities in K8s.
const K8S_NODE_TEMPLATE: EntityInfoTemplate = {
  cloudServiceProvider: 'k8s',
  entityName: 'node',
  entityRecords: [
    {
      panelName: 'Metrics',
      tableRecordList: [],
      keyValueRecords: [
        {
          labelName: '', name: '', type: 'metrics', column: [
            { title: 'CPU Usage', yLabel: 'CPU (Cores)', name: 'cpu', type: 'default' },
            { title: 'Memory Usage', yLabel: 'Memory (Bytes)', name: 'memory', type: 'memory' }
          ]
        },
      ]
    },
    {
      panelName: 'Node',
      tableRecordList: ['labels', 'annotations', 'addresses'],
      keyValueRecords: [
        { labelName: 'Name', name: 'name', type: 'default' },
        { labelName: 'Labels', name: 'labels', type: 'default' },
        { labelName: 'Annotations', name: 'annotations', type: 'default' },
        { labelName: 'Status', name: 'status', type: 'default' },
        { labelName: 'Addresses', name: 'addresses', type: 'default' },
        { labelName: 'Pod CIDR', name: 'pod_cidr', type: 'default' },
        { labelName: 'Provider ID', name: 'provider_id', type: 'default' },
        { labelName: 'Unschedulable', name: 'unschedulable', type: 'boolean', value: [
          'On', 'Off'
        ] },
        { labelName: 'Created', name: 'created', type: 'datetime' },
      ]
    },
    {
      panelName: 'System Info',
      tableRecordList: [],
      keyValueRecords: [
        { labelName: 'Cloud service provider ID', name: 'machine_id', type: 'default' },
        { labelName: 'System UUID', name: 'system_uuid', type: 'default' },
        { labelName: 'Boot ID', name: 'boot_id', type: 'default' },
        { labelName: 'Kernel Version', name: 'kernel_version', type: 'default' },
        { labelName: 'OS Image', name: 'os_image', type: 'default' },
        { labelName: 'Container Runtime Version', name: 'container_runtime_version', type: 'default' },
        { labelName: 'Kubelet Version', name: 'kubelet_version', type: 'default' },
        { labelName: 'KubeProxy Version', name: 'kube_proxy_version', type: 'default' },
        { labelName: 'Operating System', name: 'operating_system', type: 'default' },
        { labelName: 'Architecture', name: 'architecture', type: 'default' },
      ]
    },
    {
      panelName: 'Metrics',
      tableRecordList: [],
      keyValueRecords: [
        { labelName: 'CPU (Capacity)', name: 'cpu_capacity', type: 'cpu' },
        { labelName: 'CPU (Request)', name: 'cpu_request', type: 'cpu' },
        { labelName: 'CPU (Limit)', name: 'cpu_limit', type: 'cpu' },
        { labelName: 'CPU (Usage)', name: 'cpu_usage', type: 'cpu' },
        { labelName: 'Memory (Capacity)', name: 'memory_capacity', type: 'memory' },
        { labelName: 'Memory (Request)', name: 'memory_request', type: 'memory' },
        { labelName: 'Memory (Limit)', name: 'memory_limit', type: 'memory' },
        { labelName: 'Memory (Usage)', name: 'memory_usage', type: 'memory' },
        { labelName: 'Pods (Capacity)', name: 'pods_capacity', type: 'number' },
        { labelName: 'Pods (Allocation)', name: 'pods_allocation', type: 'number' },
      ]
    },
    {
      panelName: 'Costs',
      tableRecordList: [],
      keyValueRecords: [],
    },
    {
      panelName: 'Conditions',
      tableRecordList: [],
      keyValueRecords: [],
    },
    {
      panelName: 'Pods',
      tableRecordList: [],
      keyValueRecords: [],
    },
    {
      panelName: 'Detail',
      tableRecordList: [],
      keyValueRecords: [
        { labelName: 'Detail', name: 'detail', type: 'default' },
      ]
    },
    {
      panelName: 'Other',
      tableRecordList: [],
      keyValueRecords: [
        { labelName: 'Cloud Service Provider ID', name: 'cloud_context', type: 'default' },
      ]
    },
  ]
};

export default K8S_NODE_TEMPLATE;