Commit f217093b authored by Ryo Yamashita's avatar Ryo Yamashita Committed by Yas Naoi
Browse files

Issue #3275389 by Ryo Yamashita, yas, Xiaohua Guan: Add the function to create...

Issue #3275389 by Ryo Yamashita, yas, Xiaohua Guan: Add the function to create OpenStack Image in the SPA
parent 5d720a6d
Loading
Loading
Loading
Loading
+2 −0
Changes for modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/entity_form_template.ts: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ 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 OPENSTACK_IMAGE_TEMPLATE from 'constant/form_template/openstack/image';
import VMWARE_VM_TEMPLATE from 'constant/form_template/vmware/vm';

const ENTITY_FORM_LIST = [
@@ -12,6 +13,7 @@ const ENTITY_FORM_LIST = [
  ...K8S_SCHEDULE_TEMPLATE,
  // K8S_OTHER_TEMPLATE must be registered after the other K8S_XXX_TEMPLATE.
  ...K8S_OTHER_TEMPLATE,
  ...OPENSTACK_IMAGE_TEMPLATE,
  ...VMWARE_VM_TEMPLATE,
];

+2 −1
Changes for modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/deployment.ts: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ const K8S_DEPLOYMENT_TEMPLATE: EntityFormTemplate[] = [
            value: [
              { labelName: 'Use Cloud Orchestrator', name: 'cloud_orchestrator_scheduler' },
              { labelName: 'Use CronJob', name: 'cronjob_scheduler' }
            ], defaultValue: 'cloud_orchestrator_scheduler'
            ], defaultValue: 'cloud_orchestrator_scheduler',
            orientation: 'vertical'
          },
          {
            type: 'time', labelName: 'Start-up Time', hourName: 'startHour', minuteName: 'startMinute',
+2 −1
Changes for modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/k8s/pod.ts: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ const K8S_POD_TEMPLATE: EntityFormTemplate[] = [
            value: [
              { labelName: 'Use Cloud Orchestrator', name: 'cloud_orchestrator_scheduler' },
              { labelName: 'Use CronJob', name: 'cronjob_scheduler' }
            ], defaultValue: 'cloud_orchestrator_scheduler'
            ], defaultValue: 'cloud_orchestrator_scheduler',
            orientation: 'vertical'
          },
          {
            type: 'time', labelName: 'Start-up Time',
+29 −0
Changes for modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/openstack/image.ts: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
import EntityFormTemplate from 'model/EntityFormTemplate';

const OPENSTACK_IMAGE_TEMPLATE: EntityFormTemplate[] = [
  {
    cloudServiceProvider: 'openstack',
    entityName: 'image',
    actionType: 'create',
    entityRecords: [
      {
        type: 'panel',
        panelName: 'Image',
        keyValueRecords: [
          {
            type: 'default', labelName: 'Name', name: 'name', defaultValue: ''
          },
          {
            type: 'radio', labelName: 'Visibility', name: 'visibility', defaultValue: '0',
            value: [
              { labelName: 'Private', name: '0' },
              { labelName: 'Public', name: '1' },
            ], orientation: 'horizontal'
          }
        ]
      }
    ]
  }
]

export default OPENSTACK_IMAGE_TEMPLATE;
+1 −0
Changes for modules/cloud_dashboard/cloud_dashboard/src/model/EntityFormColumn.ts: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ type EntityFormColumnInfo = {
  type: 'radio',
  value: { labelName: string, name: string }[],
  defaultValue: string,
  orientation: 'horizontal' | 'vertical'
};

type EntityFormColumn = (EntityFormColumnBase & EntityFormColumnInfo) | {
Loading