diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 5210fbb1842..c2d0df2239b 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -398,17 +398,12 @@ export default { label: 'label.action.destroy.instance', message: 'message.action.destroy.instance', docHelp: 'adminguide/virtual_machines.html#deleting-vms', - args: ['expunge', 'volumeids'], - mapping: { - volumeids: { - api: 'listVolumes', - params: (record) => { return { virtualmachineid: record.id, type: 'DATADISK' } } - } - }, dataView: true, groupAction: true, + popup: true, groupMap: (selection) => { return selection.map(x => { return { id: x, expunge: true } }) }, - show: (record) => { return ['Running', 'Stopped', 'Error'].includes(record.state) } + show: (record) => { return ['Running', 'Stopped', 'Error'].includes(record.state) }, + component: () => import('@/views/compute/DestoryVM.vue') } ] }, diff --git a/ui/src/views/compute/DestoryVM.vue b/ui/src/views/compute/DestoryVM.vue new file mode 100644 index 00000000000..b67668db869 --- /dev/null +++ b/ui/src/views/compute/DestoryVM.vue @@ -0,0 +1,171 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + +