Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/entity_form_template.ts +4 −1 Original line number Diff line number Diff line Loading @@ -2,12 +2,15 @@ import K8S_DEPLOYMENT_TEMPLATE from 'constant/form_template/k8s/deployment'; import K8S_NAMESPACE_TEMPLATE from 'constant/form_template/k8s/namespace'; import K8S_OTHER_TEMPLATE from 'constant/form_template/k8s/other'; import K8S_POD_TEMPLATE from 'constant/form_template/k8s/pod'; import K8S_SCHEDULE_TEMPLATE from 'constant/form_template/k8s/schedule'; import VMWARE_VM_TEMPLATE from 'constant/form_template/vmware/vm'; const ENTITY_FORM_LIST = [ ...K8S_DEPLOYMENT_TEMPLATE, ...K8S_NAMESPACE_TEMPLATE, ...K8S_POD_TEMPLATE, ...K8S_DEPLOYMENT_TEMPLATE, ...K8S_SCHEDULE_TEMPLATE, // K8S_OTHER_TEMPLATE must be registered after the other K8S_XXX_TEMPLATE. ...K8S_OTHER_TEMPLATE, ...VMWARE_VM_TEMPLATE, ]; Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/deployment.ts +19 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,25 @@ const K8S_DEPLOYMENT_TEMPLATE: EntityFormTemplate[] = [ ] } ] }, { cloudServiceProvider: 'k8s', entityName: 'deployment', actionType: 'scale', entityRecords: [ { type: 'panel', panelName: 'Deployment', keyValueRecords: [ { type: 'default', labelName: 'Current ready replicas', name: 'ready_replicas', defaultValue: '', readOnly: true }, { type: 'number', labelName: 'Desire number of pods', name: 'replicas', defaultValue: 1, required: true }, ] } ] } ] Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/namespace.ts +42 −2 Original line number Diff line number Diff line Loading @@ -16,15 +16,55 @@ const K8S_NAMESPACE_TEMPLATE: EntityFormTemplate[] = [ }, { type: 'key-value', labelName: 'Labels', name: 'labels', defaultValue: [{ item_key: '', item_value: '' }] defaultValue: [] }, { type: 'key-value', labelName: 'Annotations', name: 'annotations', defaultValue: [{ item_key: '', item_value: '' }] defaultValue: [] } ], }, ] }, { cloudServiceProvider: 'k8s', entityName: 'namespace', actionType: 'edit', entityRecords: [ { type: 'panel', panelName: 'Namespace', keyValueRecords: [ { type: 'default', labelName: 'name', name: 'name', defaultValue: '', readOnly: true }, { type: 'key-value', labelName: 'Labels', name: 'labels', defaultValue: [] }, { type: 'key-value', labelName: 'Annotations', name: 'annotations', defaultValue: [] } ] } ] }, { cloudServiceProvider: 'k8s', entityName: 'namespace', actionType: 'delete', entityRecords: [ { type: 'label', text: 'Are you sure you want to delete the "{{name}}" namespace?' }, { type: 'label', text: 'CAUTION: The role "{{name}}" is also going to be deleted.' } ] } ] Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/other.ts +38 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,44 @@ const K8S_OTHER_TEMPLATE: EntityFormTemplate[] = [ ], }, ] }, { cloudServiceProvider: 'k8s', entityName: '', actionType: 'edit', entityRecords: [ { type: 'panel', panelName: '', keyValueRecords: [ { type: 'default', labelName: 'Name', name: 'name', defaultValue: '', readOnly: true }, { type: 'join', labelName: 'Namespace', name: 'namespace', info: { entityTypeId: 'k8s_namespace', keyColumn: 'name' }, defaultValue: '', readOnly: true }, { type: 'textarea', labelName: 'Detail', name: 'detail', defaultValue: '', required: true } ], }, ] }, { cloudServiceProvider: 'k8s', entityName: '', actionType: 'delete', entityRecords: [ { type: 'label', text: 'Are you sure you want to delete the {{name}} {{entityName}}?' }, ] } ] Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/pod.ts +23 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ const K8S_POD_TEMPLATE: EntityFormTemplate[] = [ entityRecords: [ { type: 'panel', panelName: 'Deployment', panelName: 'Pod', keyValueRecords: [ { type: 'join', labelName: 'Namespace', name: 'namespace', info: { Loading Loading @@ -50,6 +50,28 @@ const K8S_POD_TEMPLATE: EntityFormTemplate[] = [ ] } ] }, { cloudServiceProvider: 'k8s', entityName: 'pod', actionType: 'edit', entityRecords: [ { type: 'panel', panelName: 'Pod', keyValueRecords: [ { type: 'default', labelName: 'Name', name: 'name', defaultValue: '', readOnly: true }, { type: 'default', labelName: 'Namespace', name: 'namespace', defaultValue: '', readOnly: true }, { type: 'textarea', labelName: 'Detail', name: 'detail', defaultValue: '' }, ] } ] } ] Loading Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/entity_form_template.ts +4 −1 Original line number Diff line number Diff line Loading @@ -2,12 +2,15 @@ import K8S_DEPLOYMENT_TEMPLATE from 'constant/form_template/k8s/deployment'; import K8S_NAMESPACE_TEMPLATE from 'constant/form_template/k8s/namespace'; import K8S_OTHER_TEMPLATE from 'constant/form_template/k8s/other'; import K8S_POD_TEMPLATE from 'constant/form_template/k8s/pod'; import K8S_SCHEDULE_TEMPLATE from 'constant/form_template/k8s/schedule'; import VMWARE_VM_TEMPLATE from 'constant/form_template/vmware/vm'; const ENTITY_FORM_LIST = [ ...K8S_DEPLOYMENT_TEMPLATE, ...K8S_NAMESPACE_TEMPLATE, ...K8S_POD_TEMPLATE, ...K8S_DEPLOYMENT_TEMPLATE, ...K8S_SCHEDULE_TEMPLATE, // K8S_OTHER_TEMPLATE must be registered after the other K8S_XXX_TEMPLATE. ...K8S_OTHER_TEMPLATE, ...VMWARE_VM_TEMPLATE, ]; Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/deployment.ts +19 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,25 @@ const K8S_DEPLOYMENT_TEMPLATE: EntityFormTemplate[] = [ ] } ] }, { cloudServiceProvider: 'k8s', entityName: 'deployment', actionType: 'scale', entityRecords: [ { type: 'panel', panelName: 'Deployment', keyValueRecords: [ { type: 'default', labelName: 'Current ready replicas', name: 'ready_replicas', defaultValue: '', readOnly: true }, { type: 'number', labelName: 'Desire number of pods', name: 'replicas', defaultValue: 1, required: true }, ] } ] } ] Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/namespace.ts +42 −2 Original line number Diff line number Diff line Loading @@ -16,15 +16,55 @@ const K8S_NAMESPACE_TEMPLATE: EntityFormTemplate[] = [ }, { type: 'key-value', labelName: 'Labels', name: 'labels', defaultValue: [{ item_key: '', item_value: '' }] defaultValue: [] }, { type: 'key-value', labelName: 'Annotations', name: 'annotations', defaultValue: [{ item_key: '', item_value: '' }] defaultValue: [] } ], }, ] }, { cloudServiceProvider: 'k8s', entityName: 'namespace', actionType: 'edit', entityRecords: [ { type: 'panel', panelName: 'Namespace', keyValueRecords: [ { type: 'default', labelName: 'name', name: 'name', defaultValue: '', readOnly: true }, { type: 'key-value', labelName: 'Labels', name: 'labels', defaultValue: [] }, { type: 'key-value', labelName: 'Annotations', name: 'annotations', defaultValue: [] } ] } ] }, { cloudServiceProvider: 'k8s', entityName: 'namespace', actionType: 'delete', entityRecords: [ { type: 'label', text: 'Are you sure you want to delete the "{{name}}" namespace?' }, { type: 'label', text: 'CAUTION: The role "{{name}}" is also going to be deleted.' } ] } ] Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/other.ts +38 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,44 @@ const K8S_OTHER_TEMPLATE: EntityFormTemplate[] = [ ], }, ] }, { cloudServiceProvider: 'k8s', entityName: '', actionType: 'edit', entityRecords: [ { type: 'panel', panelName: '', keyValueRecords: [ { type: 'default', labelName: 'Name', name: 'name', defaultValue: '', readOnly: true }, { type: 'join', labelName: 'Namespace', name: 'namespace', info: { entityTypeId: 'k8s_namespace', keyColumn: 'name' }, defaultValue: '', readOnly: true }, { type: 'textarea', labelName: 'Detail', name: 'detail', defaultValue: '', required: true } ], }, ] }, { cloudServiceProvider: 'k8s', entityName: '', actionType: 'delete', entityRecords: [ { type: 'label', text: 'Are you sure you want to delete the {{name}} {{entityName}}?' }, ] } ] Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/pod.ts +23 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ const K8S_POD_TEMPLATE: EntityFormTemplate[] = [ entityRecords: [ { type: 'panel', panelName: 'Deployment', panelName: 'Pod', keyValueRecords: [ { type: 'join', labelName: 'Namespace', name: 'namespace', info: { Loading Loading @@ -50,6 +50,28 @@ const K8S_POD_TEMPLATE: EntityFormTemplate[] = [ ] } ] }, { cloudServiceProvider: 'k8s', entityName: 'pod', actionType: 'edit', entityRecords: [ { type: 'panel', panelName: 'Pod', keyValueRecords: [ { type: 'default', labelName: 'Name', name: 'name', defaultValue: '', readOnly: true }, { type: 'default', labelName: 'Namespace', name: 'namespace', defaultValue: '', readOnly: true }, { type: 'textarea', labelName: 'Detail', name: 'detail', defaultValue: '' }, ] } ] } ] Loading