Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/aws_cloud/key_pair.ts +12 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,18 @@ const AWS_CLOUD_KEY_PAIR_TEMPLATE: EntityFormTemplate[] = [ } ] }, { cloudServiceProvider: 'aws_cloud', entityName: 'key_pair', actionType: 'delete', entityRecords: [ { type: 'label', text: 'Are you sure you want to delete the {{entityName}} {{key_pair_name}}?' }, ], submitButtonLabel: 'Delete' }, ] export default AWS_CLOUD_KEY_PAIR_TEMPLATE; modules/cloud_service_providers/aws_cloud/aws_cloud.routing.yml +10 −0 Original line number Diff line number Diff line Loading @@ -1076,6 +1076,16 @@ entity.aws_cloud_instance.stop: requirements: _entity_access: 'aws_cloud_instance.stop' entity.aws_cloud_key_pair.delete: path: '/cloud_dashboard/aws_cloud/{cloud_context}/aws_cloud_key_pair/{entity_id}/delete' defaults: _controller: '\Drupal\aws_cloud\Controller\Ec2\ApiController::operateEntity' entity_type_id: aws_cloud_key_pair command: delete methods: [POST] requirements: _permission: 'delete any aws cloud key pair' entity.aws_cloud_security_group.create: path: '/cloud_dashboard/aws_cloud/{cloud_context}/aws_cloud_security_group/{entity_id}/create' defaults: Loading modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php +4 −0 Original line number Diff line number Diff line Loading @@ -838,6 +838,10 @@ class ApiController extends ControllerBase implements ApiControllerInterface { $method_name = 'deleteInstance'; break; case 'delete_aws_cloud_key_pair': $method_name = 'deleteKeyPair'; break; case 'edit_aws_cloud_image': /** @var \Drupal\aws_cloud\Entity\Ec2\ImageInterface $entity */ $entity->setName($request->get('name', '')); Loading modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/KeyPairInterface.php +5 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,11 @@ interface KeyPairInterface extends ContentEntityInterface, EntityOwnerInterface, */ public function getCloudContext(): ?string; /** * {@inheritdoc} */ public function getName(): ?string; /** * {@inheritdoc} */ Loading modules/cloud_service_providers/aws_cloud/src/Form/Ec2/ImageDeleteForm.php +0 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,6 @@ class ImageDeleteForm extends AwsDeleteUpdateEntityForm { * * @param \Drupal\aws_cloud\Service\AwsCloud\AwsCloudOperationsServiceInterface $aws_cloud_operations_service * The AWS Cloud Operations service. * @param \Drupal\openstack\Service\OpenStackServiceFactoryInterface $openstack_service_factory * Object for interfacing with OpenStack Service. * @param \Drupal\aws_cloud\Service\Ec2\Ec2ServiceInterface $ec2_service * The AWS Cloud EC2 service. * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository Loading Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/aws_cloud/key_pair.ts +12 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,18 @@ const AWS_CLOUD_KEY_PAIR_TEMPLATE: EntityFormTemplate[] = [ } ] }, { cloudServiceProvider: 'aws_cloud', entityName: 'key_pair', actionType: 'delete', entityRecords: [ { type: 'label', text: 'Are you sure you want to delete the {{entityName}} {{key_pair_name}}?' }, ], submitButtonLabel: 'Delete' }, ] export default AWS_CLOUD_KEY_PAIR_TEMPLATE;
modules/cloud_service_providers/aws_cloud/aws_cloud.routing.yml +10 −0 Original line number Diff line number Diff line Loading @@ -1076,6 +1076,16 @@ entity.aws_cloud_instance.stop: requirements: _entity_access: 'aws_cloud_instance.stop' entity.aws_cloud_key_pair.delete: path: '/cloud_dashboard/aws_cloud/{cloud_context}/aws_cloud_key_pair/{entity_id}/delete' defaults: _controller: '\Drupal\aws_cloud\Controller\Ec2\ApiController::operateEntity' entity_type_id: aws_cloud_key_pair command: delete methods: [POST] requirements: _permission: 'delete any aws cloud key pair' entity.aws_cloud_security_group.create: path: '/cloud_dashboard/aws_cloud/{cloud_context}/aws_cloud_security_group/{entity_id}/create' defaults: Loading
modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php +4 −0 Original line number Diff line number Diff line Loading @@ -838,6 +838,10 @@ class ApiController extends ControllerBase implements ApiControllerInterface { $method_name = 'deleteInstance'; break; case 'delete_aws_cloud_key_pair': $method_name = 'deleteKeyPair'; break; case 'edit_aws_cloud_image': /** @var \Drupal\aws_cloud\Entity\Ec2\ImageInterface $entity */ $entity->setName($request->get('name', '')); Loading
modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/KeyPairInterface.php +5 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,11 @@ interface KeyPairInterface extends ContentEntityInterface, EntityOwnerInterface, */ public function getCloudContext(): ?string; /** * {@inheritdoc} */ public function getName(): ?string; /** * {@inheritdoc} */ Loading
modules/cloud_service_providers/aws_cloud/src/Form/Ec2/ImageDeleteForm.php +0 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,6 @@ class ImageDeleteForm extends AwsDeleteUpdateEntityForm { * * @param \Drupal\aws_cloud\Service\AwsCloud\AwsCloudOperationsServiceInterface $aws_cloud_operations_service * The AWS Cloud Operations service. * @param \Drupal\openstack\Service\OpenStackServiceFactoryInterface $openstack_service_factory * Object for interfacing with OpenStack Service. * @param \Drupal\aws_cloud\Service\Ec2\Ec2ServiceInterface $ec2_service * The AWS Cloud EC2 service. * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository Loading