diff --git a/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/entity_form_template.ts b/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/entity_form_template.ts index e93426bbfb255a9b9a8fc67aa12bdb6b6917e544..9126ff656e590423014ec638be2aa0333bd78e47 100644 --- a/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/entity_form_template.ts +++ b/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/entity_form_template.ts @@ -23,16 +23,17 @@ import OPENSTACK_IMAGE_TEMPLATE from 'constant/templates/form/openstack/image'; import OPENSTACK_INSTANCE_TEMPLATE from 'constant/templates/form/openstack/instance'; import OPENSTACK_KEY_PAIR_TEMPLATE from 'constant/templates/form/openstack/key_pair'; import OPENSTACK_CLOUD_LAUNCH_TEMPLATE from 'constant/templates/form/openstack/launch_template'; -import OPENSTACK_NETWORK_INTERFACE_TEMPLATE from 'constant/templates/form/openstack/network_interface'; -import OPENSTACK_SECURITY_GROUP_TEMPLATE from 'constant/templates/form/openstack/security_group'; -import OPENSTACK_SNAPSHOT_TEMPLATE from 'constant/templates/form/openstack/snapshot'; -import OPENSTACK_VOLUME_TEMPLATE from 'constant/templates/form/openstack/volume'; import OPENSTACK_NETWORK_TEMPLATE from 'constant/templates/form/openstack/network'; -import OPENSTACK_SUBNET_TEMPLATE from 'constant/templates/form/openstack/subnet'; +import OPENSTACK_NETWORK_INTERFACE_TEMPLATE from 'constant/templates/form/openstack/network_interface'; import OPENSTACK_PORT_TEMPLATE from 'constant/templates/form/openstack/port'; +import OPENSTACK_QUOTA_TEMPLATE from 'constant/templates/form/openstack/quota'; import OPENSTACK_ROUTER_TEMPLATE from 'constant/templates/form/openstack/router'; +import OPENSTACK_SECURITY_GROUP_TEMPLATE from 'constant/templates/form/openstack/security_group'; import OPENSTACK_SERVER_GROUP_TEMPLATE from 'constant/templates/form/openstack/server_group'; -import OPENSTACK_QUOTA_TEMPLATE from 'constant/templates/form/openstack/quota'; +import OPENSTACK_SNAPSHOT_TEMPLATE from 'constant/templates/form/openstack/snapshot'; +import OPENSTACK_STACK_TEMPLATE from 'constant/templates/form/openstack/stack'; +import OPENSTACK_SUBNET_TEMPLATE from 'constant/templates/form/openstack/subnet'; +import OPENSTACK_VOLUME_TEMPLATE from 'constant/templates/form/openstack/volume'; import VMWARE_VM_TEMPLATE from 'constant/templates/form/vmware/vm'; const ENTITY_FORM_LIST = [ @@ -71,6 +72,7 @@ const ENTITY_FORM_LIST = [ ...OPENSTACK_QUOTA_TEMPLATE, ...OPENSTACK_SERVER_GROUP_TEMPLATE, ...OPENSTACK_CLOUD_LAUNCH_TEMPLATE, + ...OPENSTACK_STACK_TEMPLATE, ...VMWARE_VM_TEMPLATE, ...AWS_CLOUD_LAUNCH_TEMPLATE, ]; diff --git a/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/openstack/stack.ts b/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/openstack/stack.ts new file mode 100644 index 0000000000000000000000000000000000000000..5680d6fedb63a565b979e8e8c3e1b5e28fa11e3f --- /dev/null +++ b/modules/cloud_dashboard/cloud_dashboard/src/constant/templates/form/openstack/stack.ts @@ -0,0 +1,18 @@ +import EntityFormTemplate from 'model/EntityFormTemplate'; + +const OPENSTACK_STACK_TEMPLATE: EntityFormTemplate[] = [ + { + cloudServiceProvider: 'openstack', + entityName: 'stack', + actionType: 'delete', + entityRecords: [ + { + type: 'label', + text: 'Are you sure you want to delete the {{entityName}} {{name}}?' + }, + ], + submitButtonLabel: 'Delete' + } +] + +export default OPENSTACK_STACK_TEMPLATE; diff --git a/modules/cloud_service_providers/openstack/src/Controller/ApiController.php b/modules/cloud_service_providers/openstack/src/Controller/ApiController.php index 0c33cde24ead726d5f04c4cdeb8b6e6555145529..9a4dc38b48a72d800f2790a5cdd0e0a05a0a5420 100644 --- a/modules/cloud_service_providers/openstack/src/Controller/ApiController.php +++ b/modules/cloud_service_providers/openstack/src/Controller/ApiController.php @@ -956,6 +956,10 @@ class ApiController extends ControllerBase implements ApiControllerInterface { $method_name = 'deleteOpenStackServerGroup'; break; + case 'delete_openstack_stack': + $method_name = 'deleteOpenStackStack'; + break; + } /** @var /Drupal\Core\Entity\ContentEntityBase $entity */