diff --git a/ui/src/components/view/ActionButton.vue b/ui/src/components/view/ActionButton.vue index 7c750981b5a..df36a16ceb7 100644 --- a/ui/src/components/view/ActionButton.vue +++ b/ui/src/components/view/ActionButton.vue @@ -36,7 +36,6 @@ (dataView && action.dataView && ('show' in action ? action.show(resource, $store.getters) : true)) )" > {{ $t(action.label) }} + + 0 && ('groupShow' in action ? action.show(resource, $store.getters) : true)))) || (dataView && action.dataView && ('show' in action ? action.show(resource, $store.getters) : true)) )" - :icon="action.icon" :type="action.icon === 'delete' ? 'danger' : (action.icon === 'plus' ? 'primary' : 'default')" :shape="!dataView && ['plus', 'user-add'].includes(action.icon) ? 'round' : 'circle'" style="margin-left: 5px" @@ -62,6 +62,8 @@ {{ $t(action.label) }} + + diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index cfacfd09b16..89501406503 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -164,6 +164,15 @@ export default { } } }, + { + api: 'createSnapshot', + icon: ['fas', 'camera-retro'], + label: 'label.action.vmstoragesnapshot.create', + docHelp: 'adminguide/virtual_machines.html#virtual-machine-snapshots', + dataView: true, + popup: true, + component: () => import('@/views/compute/CreateSnapshotWizard.vue') + }, { api: 'assignVirtualMachineToBackupOffering', icon: 'folder-add', diff --git a/ui/src/core/ext.js b/ui/src/core/ext.js index 323c33b2cf9..ec418a2dd48 100644 --- a/ui/src/core/ext.js +++ b/ui/src/core/ext.js @@ -25,9 +25,9 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' // import { far } from '@fortawesome/free-regular-svg-icons' import { faCentos, faUbuntu, faSuse, faRedhat, faFedora, faLinux, faFreebsd, faApple, faWindows, faJava } from '@fortawesome/free-brands-svg-icons' -import { faLanguage, faCompactDisc } from '@fortawesome/free-solid-svg-icons' +import { faLanguage, faCompactDisc, faCameraRetro } from '@fortawesome/free-solid-svg-icons' library.add(faCentos, faUbuntu, faSuse, faRedhat, faFedora, faLinux, faFreebsd, faApple, faWindows, faJava) -library.add(faLanguage, faCompactDisc) +library.add(faLanguage, faCompactDisc, faCameraRetro) Vue.component('font-awesome-icon', FontAwesomeIcon) diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index cedc4310232..5b1cc6a9517 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -621,6 +621,7 @@ "label.create.project.role": "Create Project Role", "label.create.site.vpn.connection": "Create Site-to-Site VPN Connection", "label.create.site.vpn.gateway": "Create Site-to-Site VPN Gateway", +"label.create.snapshot.for.volume": "Created snapshot for volume", "label.create.ssh.key.pair": "Create a SSH Key Pair", "label.create.template": "Create template", "label.create.user": "Create user", @@ -2259,6 +2260,7 @@ "label.vnmc.devices": "VNMC Devices", "label.volgroup": "Volume Group", "label.volume": "Volume", +"label.volumeid": "Volume", "label.volume.details": "Volume details", "label.volume.empty": "No data volumes attached to this VM", "label.volume.ids": "Volume ID's", @@ -2327,6 +2329,7 @@ "label.welcome.cloud.console": "Welcome to Management Console", "label.what.is.cloudstack": "What is CloudStack™?", "label.windows": "Windows", +"label.with.snapshotid": "with snapshot ID", "label.write": "Write", "label.writeback": "Write-back disk caching", "label.writecachetype": "Write-cache Type", diff --git a/ui/src/views/compute/CreateSnapshotWizard.vue b/ui/src/views/compute/CreateSnapshotWizard.vue new file mode 100644 index 00000000000..bf9d9ddd25b --- /dev/null +++ b/ui/src/views/compute/CreateSnapshotWizard.vue @@ -0,0 +1,201 @@ +// 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. + + + + + +