diff --git a/src/sunstone/etc/sunstone-views/kvm/admin.yaml b/src/sunstone/etc/sunstone-views/kvm/admin.yaml index bf4f263ef9..f42759bbdc 100644 --- a/src/sunstone/etc/sunstone-views/kvm/admin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/admin.yaml @@ -393,7 +393,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.resched: true VM.unresched: true diff --git a/src/sunstone/etc/sunstone-views/kvm/cloud.yaml b/src/sunstone/etc/sunstone-views/kvm/cloud.yaml index 645853f649..070d37dfc9 100644 --- a/src/sunstone/etc/sunstone-views/kvm/cloud.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/cloud.yaml @@ -79,7 +79,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.save_as_template: true dashboard: diff --git a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml index 28098d7531..99b0125a62 100644 --- a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml @@ -392,7 +392,6 @@ tabs: VM.snapshot_delete: false VM.disk_snapshot_create: false VM.disk_snapshot_revert: false - VM.disk_snapshot_rename: false VM.disk_snapshot_delete: false VM.resched: false VM.unresched: false diff --git a/src/sunstone/etc/sunstone-views/kvm/user.yaml b/src/sunstone/etc/sunstone-views/kvm/user.yaml index c4318a41da..c93ecfc6ab 100644 --- a/src/sunstone/etc/sunstone-views/kvm/user.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/user.yaml @@ -385,7 +385,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.resched: false VM.unresched: false diff --git a/src/sunstone/etc/sunstone-views/mixed/admin.yaml b/src/sunstone/etc/sunstone-views/mixed/admin.yaml index 8b324dd82a..53cfb0fbfd 100644 --- a/src/sunstone/etc/sunstone-views/mixed/admin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/admin.yaml @@ -393,7 +393,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.resched: true VM.unresched: true diff --git a/src/sunstone/etc/sunstone-views/mixed/cloud.yaml b/src/sunstone/etc/sunstone-views/mixed/cloud.yaml index 645853f649..070d37dfc9 100644 --- a/src/sunstone/etc/sunstone-views/mixed/cloud.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/cloud.yaml @@ -79,7 +79,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.save_as_template: true dashboard: diff --git a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml index 28098d7531..99b0125a62 100644 --- a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml @@ -392,7 +392,6 @@ tabs: VM.snapshot_delete: false VM.disk_snapshot_create: false VM.disk_snapshot_revert: false - VM.disk_snapshot_rename: false VM.disk_snapshot_delete: false VM.resched: false VM.unresched: false diff --git a/src/sunstone/etc/sunstone-views/mixed/user.yaml b/src/sunstone/etc/sunstone-views/mixed/user.yaml index c4318a41da..c93ecfc6ab 100644 --- a/src/sunstone/etc/sunstone-views/mixed/user.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/user.yaml @@ -385,7 +385,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.resched: false VM.unresched: false diff --git a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml index 7ba855b888..ce65beed62 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml @@ -391,7 +391,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: false VM.disk_snapshot_revert: false - VM.disk_snapshot_rename: false VM.disk_snapshot_delete: false VM.resched: true VM.unresched: true diff --git a/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml b/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml index 62ea6b42fc..a87bd8517e 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml @@ -80,7 +80,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.save_as_template: true dashboard: diff --git a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml index 73432ad34d..d516fc4f70 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml @@ -392,7 +392,6 @@ tabs: VM.snapshot_delete: false VM.disk_snapshot_create: false VM.disk_snapshot_revert: false - VM.disk_snapshot_rename: false VM.disk_snapshot_delete: false VM.resched: false VM.unresched: false diff --git a/src/sunstone/etc/sunstone-views/vcenter/user.yaml b/src/sunstone/etc/sunstone-views/vcenter/user.yaml index c4318a41da..c93ecfc6ab 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/user.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/user.yaml @@ -385,7 +385,6 @@ tabs: VM.snapshot_delete: true VM.disk_snapshot_create: true VM.disk_snapshot_revert: true - VM.disk_snapshot_rename: true VM.disk_snapshot_delete: true VM.resched: false VM.unresched: false diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb index 7f54955db5..aeee8750ed 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb @@ -57,7 +57,6 @@ module OpenNebulaJSON when "snapshot_delete" then self.snapshot_delete(action_hash['params']) when "disk_snapshot_create" then self.disk_snapshot_create(action_hash['params']) when "disk_snapshot_revert" then self.disk_snapshot_revert(action_hash['params']) - when "disk_snapshot_rename" then self.disk_snapshot_rename(action_hash['params']) when "disk_snapshot_delete" then self.disk_snapshot_delete(action_hash['params']) when "terminate" then self.terminate(action_hash['params']) when "reboot" then self.reboot(action_hash['params']) @@ -140,10 +139,6 @@ module OpenNebulaJSON super(params['disk_id'].to_i, params['snapshot_id'].to_i) end - def disk_snapshot_rename(params=Hash.new) - super(params['disk_id'].to_i, params['snapshot_id'].to_i, params['new_name']) - end - def disk_snapshot_delete(params=Hash.new) super(params['disk_id'].to_i, params['snapshot_id'].to_i) end diff --git a/src/sunstone/public/app/opennebula/vm.js b/src/sunstone/public/app/opennebula/vm.js index b807148ea2..5b01a885d0 100644 --- a/src/sunstone/public/app/opennebula/vm.js +++ b/src/sunstone/public/app/opennebula/vm.js @@ -471,10 +471,6 @@ define(function(require) { var action_obj = params.data.extra_param; OpenNebulaAction.simple_action(params, RESOURCE, "disk_snapshot_revert", action_obj); }, - "disk_snapshot_rename": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "disk_snapshot_rename", action_obj); - }, "disk_snapshot_delete": function(params) { var action_obj = params.data.extra_param; OpenNebulaAction.simple_action(params, RESOURCE, "disk_snapshot_delete", action_obj); diff --git a/src/sunstone/public/app/tabs/provision-tab.js b/src/sunstone/public/app/tabs/provision-tab.js index 77e589a382..d471d629b8 100644 --- a/src/sunstone/public/app/tabs/provision-tab.js +++ b/src/sunstone/public/app/tabs/provision-tab.js @@ -736,7 +736,6 @@ define(function(require) { require("./vms-tab/dialogs/attach-disk"), require("./vms-tab/dialogs/disk-snapshot"), require("./vms-tab/dialogs/disk-saveas"), - require("./vms-tab/dialogs/disk-snapshot-rename"), require("./vms-tab/dialogs/attach-nic"), require("./vms-tab/dialogs/revert"), require("./vms-tab/dialogs/snapshot"), diff --git a/src/sunstone/public/app/tabs/vms-tab.js b/src/sunstone/public/app/tabs/vms-tab.js index b8c6524fa0..ae247d9c7f 100644 --- a/src/sunstone/public/app/tabs/vms-tab.js +++ b/src/sunstone/public/app/tabs/vms-tab.js @@ -30,7 +30,6 @@ define(function(require) { require('./vms-tab/dialogs/attach-disk'), require('./vms-tab/dialogs/disk-snapshot'), require('./vms-tab/dialogs/disk-saveas'), - require('./vms-tab/dialogs/disk-snapshot-rename'), require('./vms-tab/dialogs/disk-resize'), require('./vms-tab/dialogs/attach-nic'), require('./vms-tab/dialogs/snapshot'), diff --git a/src/sunstone/public/app/tabs/vms-tab/actions.js b/src/sunstone/public/app/tabs/vms-tab/actions.js index 20ff661c35..049554064f 100644 --- a/src/sunstone/public/app/tabs/vms-tab/actions.js +++ b/src/sunstone/public/app/tabs/vms-tab/actions.js @@ -98,7 +98,6 @@ define(function(require) { "VM.snapshot_delete": _commonActions.singleAction('snapshot_delete'), "VM.disk_snapshot_create": _commonActions.singleAction('disk_snapshot_create'), "VM.disk_snapshot_revert": _commonActions.singleAction('disk_snapshot_revert'), - "VM.disk_snapshot_rename": _commonActions.singleAction('disk_snapshot_rename'), "VM.disk_snapshot_delete": _commonActions.singleAction('disk_snapshot_delete'), "VM.disk_saveas" : _commonActions.singleAction('disk_saveas'), diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename.js deleted file mode 100644 index f2526a4fa2..0000000000 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename.js +++ /dev/null @@ -1,108 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed 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. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - /* - DEPENDENCIES - */ - - var BaseDialog = require('utils/dialogs/dialog'); - var TemplateHTML = require('hbs!./disk-snapshot-rename/html'); - var Sunstone = require('sunstone'); - var Tips = require('utils/tips'); - - /* - CONSTANTS - */ - - var DIALOG_ID = require('./disk-snapshot-rename/dialogId'); - var TAB_ID = require('../tabId'); - - /* - CONSTRUCTOR - */ - - function Dialog() { - this.dialogId = DIALOG_ID; - - BaseDialog.call(this); - } - - Dialog.DIALOG_ID = DIALOG_ID; - Dialog.prototype = Object.create(BaseDialog.prototype); - Dialog.prototype.constructor = Dialog; - Dialog.prototype.html = _html; - Dialog.prototype.onShow = _onShow; - Dialog.prototype.setup = _setup; - Dialog.prototype.setParams = _setParams; - - return Dialog; - - /* - FUNCTION DEFINITIONS - */ - - function _html() { - return TemplateHTML({ - 'dialogId': this.dialogId - }); - } - - function _setup(context) { - var that = this; - - $('#' + DIALOG_ID + 'Form', context).submit(function() { - var new_name = $('#snapshot_new_name', this).val(); - var obj = { - "disk_id" : that.diskId, - "new_name": new_name, - "snapshot_id": that.snapshotId, - }; - - Sunstone.runAction('VM.disk_snapshot_rename', that.element.ID, obj); - - Sunstone.getDialog(DIALOG_ID).hide(); - Sunstone.getDialog(DIALOG_ID).reset(); - return false; - }); - - return false; - } - - function _onShow(context) { - this.setNames( {tabId: TAB_ID} ); - $("#disk_id", context).val(this.diskId); - $("#snapshot_id", context).val(this.snapshotId); - $("#disk_rename", context).focus(); - return false; - } - - /** - * @param {object} params - * - params.element : VM element - * - params.diskId : Disk ID to save as - * - params.snapshotId : Disk snapshot ID to save as. Can be undefined - */ - function _setParams(params) { - this.element = params.element; - this.diskId = params.diskId; - this.snapshotId = -1; - - if(params.snapshotId){ - this.snapshotId = params.snapshotId; - } - } - }); diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/dialogId.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/dialogId.js deleted file mode 100644 index 2a7a917f69..0000000000 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/dialogId.js +++ /dev/null @@ -1,19 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed 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. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - return 'diskSnapshotRenameVMDialog'; -}); diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/html.hbs deleted file mode 100644 index 9227fc0358..0000000000 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/html.hbs +++ /dev/null @@ -1,50 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2018, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed 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. }} -{{! -------------------------------------------------------------------------- }} - -