Loading cloud_dashboard/src/constant/entity_info_template/entity_info_template.ts +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import K8S_REPLICA_SET_TEMPLATE from 'constant/entity_info_template/k8s/replica_ import K8S_NETWORK_POLICY_TEMPLATE from 'constant/entity_info_template/k8s/network_policy'; import K8S_RESOURCE_QUOTA_TEMPLATE from 'constant/entity_info_template/k8s/resource_quota'; import K8S_PRIORITY_CLASS_TEMPLATE from 'constant/entity_info_template/k8s/priority_class'; import K8S_CONFIG_MAP_TEMPLATE from 'constant/entity_info_template/k8s/config_map'; const ENTITY_INFO_LIST = [ AWS_CLOUD_INSTANCE_TEMPLATE, Loading @@ -46,6 +47,7 @@ const ENTITY_INFO_LIST = [ K8S_NETWORK_POLICY_TEMPLATE, K8S_RESOURCE_QUOTA_TEMPLATE, K8S_PRIORITY_CLASS_TEMPLATE, K8S_CONFIG_MAP_TEMPLATE, ]; export const UPPERCASE_WORD_SET = new Set([ Loading cloud_dashboard/src/constant/entity_info_template/k8s/config_map.ts 0 → 100644 +44 −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_CONFIG_MAP_TEMPLATE: EntityInfoTemplate = { cloudServiceProvider: 'k8s', entityName: 'config_map', entityRecords: [ { panelName: 'ConfigMap', tableRecordList: ['labels', 'annotations'], keyValueRecords: [ { labelName: 'Name', name: 'name', type: 'default' }, { labelName: 'Namespace', name: 'namespace', type: 'default' }, { labelName: 'Created', name: 'created', type: 'datetime' }, { labelName: 'Labels', name: 'labels', type: 'default' }, { labelName: 'Annotations', name: 'annotations', type: 'default' }, ] }, { panelName: 'Data', tableRecordList: ['data'], keyValueRecords: [ { labelName: 'Data', name: 'data', type: 'default' }, ] }, { panelName: 'Detail', tableRecordList: [], keyValueRecords: [ { labelName: 'Detail', name: 'detail', type: 'default' }, { labelName: 'Creation YAML', name: 'creation_yaml', type: 'default' }, ] }, { panelName: 'Other', tableRecordList: [], keyValueRecords: [ { labelName: 'Cloud Service Provider ID', name: 'cloud_context', type: 'default' }, ] }, ] }; export default K8S_CONFIG_MAP_TEMPLATE; cloud_dashboard/src/pages/EntityInfoPage.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ const EntityInfoPage = ({ entityInfoTemplate }: { for (const record of entityData.attributes[keyValueRecord.name]) { const temp: Record<string, string> = {}; for (const key of Object.keys((record))) { temp[key] = record[key] ? `${record[key].replace(/\n/g,'')}` : ''; temp[key] = record[key] ? `${record[key].replace(/(\r\n)|\n/,'')}` : ''; } keyVal.push(temp); } Loading Loading
cloud_dashboard/src/constant/entity_info_template/entity_info_template.ts +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import K8S_REPLICA_SET_TEMPLATE from 'constant/entity_info_template/k8s/replica_ import K8S_NETWORK_POLICY_TEMPLATE from 'constant/entity_info_template/k8s/network_policy'; import K8S_RESOURCE_QUOTA_TEMPLATE from 'constant/entity_info_template/k8s/resource_quota'; import K8S_PRIORITY_CLASS_TEMPLATE from 'constant/entity_info_template/k8s/priority_class'; import K8S_CONFIG_MAP_TEMPLATE from 'constant/entity_info_template/k8s/config_map'; const ENTITY_INFO_LIST = [ AWS_CLOUD_INSTANCE_TEMPLATE, Loading @@ -46,6 +47,7 @@ const ENTITY_INFO_LIST = [ K8S_NETWORK_POLICY_TEMPLATE, K8S_RESOURCE_QUOTA_TEMPLATE, K8S_PRIORITY_CLASS_TEMPLATE, K8S_CONFIG_MAP_TEMPLATE, ]; export const UPPERCASE_WORD_SET = new Set([ Loading
cloud_dashboard/src/constant/entity_info_template/k8s/config_map.ts 0 → 100644 +44 −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_CONFIG_MAP_TEMPLATE: EntityInfoTemplate = { cloudServiceProvider: 'k8s', entityName: 'config_map', entityRecords: [ { panelName: 'ConfigMap', tableRecordList: ['labels', 'annotations'], keyValueRecords: [ { labelName: 'Name', name: 'name', type: 'default' }, { labelName: 'Namespace', name: 'namespace', type: 'default' }, { labelName: 'Created', name: 'created', type: 'datetime' }, { labelName: 'Labels', name: 'labels', type: 'default' }, { labelName: 'Annotations', name: 'annotations', type: 'default' }, ] }, { panelName: 'Data', tableRecordList: ['data'], keyValueRecords: [ { labelName: 'Data', name: 'data', type: 'default' }, ] }, { panelName: 'Detail', tableRecordList: [], keyValueRecords: [ { labelName: 'Detail', name: 'detail', type: 'default' }, { labelName: 'Creation YAML', name: 'creation_yaml', type: 'default' }, ] }, { panelName: 'Other', tableRecordList: [], keyValueRecords: [ { labelName: 'Cloud Service Provider ID', name: 'cloud_context', type: 'default' }, ] }, ] }; export default K8S_CONFIG_MAP_TEMPLATE;
cloud_dashboard/src/pages/EntityInfoPage.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ const EntityInfoPage = ({ entityInfoTemplate }: { for (const record of entityData.attributes[keyValueRecord.name]) { const temp: Record<string, string> = {}; for (const key of Object.keys((record))) { temp[key] = record[key] ? `${record[key].replace(/\n/g,'')}` : ''; temp[key] = record[key] ? `${record[key].replace(/(\r\n)|\n/,'')}` : ''; } keyVal.push(temp); } Loading