Daniel Erez has uploaded a new change for review.

Change subject: webadmin: Remove deprecated MoveVm logic
......................................................................

webadmin: Remove deprecated MoveVm logic

MoveVm is deprecated since MSD (multiple storage domains),
hence its logic is no longer needed in the UI.

Change-Id: Ia564a1fc35d1d76e3a2331d43a03afa5b53df4a8
Signed-off-by: Daniel Erez <de...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/VirtualMachineModule.java
2 files changed, 0 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/13906/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
index 8270d53..9dc714c 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
@@ -3,7 +3,6 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -270,18 +269,6 @@
         privateCreateSnapshotCommand = value;
     }
 
-    private UICommand privateMoveCommand;
-
-    public UICommand getMoveCommand()
-    {
-        return privateMoveCommand;
-    }
-
-    private void setMoveCommand(UICommand value)
-    {
-        privateMoveCommand = value;
-    }
-
     private UICommand privateRetrieveIsoImagesCommand;
 
     public UICommand getRetrieveIsoImagesCommand()
@@ -478,7 +465,6 @@
         setRunOnceCommand(new UICommand("RunOnce", this)); //$NON-NLS-1$
         setExportCommand(new UICommand("Export", this)); //$NON-NLS-1$
         setCreateSnapshotCommand(new UICommand("CreateSnapshot", this)); 
//$NON-NLS-1$
-        setMoveCommand(new UICommand("Move", this)); //$NON-NLS-1$
         setGuideCommand(new UICommand("Guide", this)); //$NON-NLS-1$
         setRetrieveIsoImagesCommand(new UICommand("RetrieveIsoImages", this)); 
//$NON-NLS-1$
         setChangeCdCommand(new UICommand("ChangeCD", this)); //$NON-NLS-1$
@@ -1002,40 +988,6 @@
 
         model.setCancelCommand(cancelCommand);
         model.setCloseCommand(closeCommand);
-    }
-
-    private void Move()
-    {
-        VM vm = (VM) getSelectedItem();
-        if (vm == null)
-        {
-            return;
-        }
-
-        if (getWindow() != null)
-        {
-            return;
-        }
-
-        MoveDiskModel model = new MoveDiskModel();
-        setWindow(model);
-        
model.setTitle(ConstantsManager.getInstance().getConstants().moveVirtualMachineTitle());
-        model.setHashName("move_virtual_machine"); //$NON-NLS-1$
-        model.setEntity(this);
-        model.StartProgress(null);
-
-        AsyncDataProvider.GetVmDiskList(new AsyncQuery(this, new 
INewAsyncCallback() {
-            @Override
-            public void OnSuccess(Object target, Object returnValue) {
-                VmListModel vmListModel = (VmListModel) target;
-                MoveDiskModel moveDiskModel = (MoveDiskModel) 
vmListModel.getWindow();
-                LinkedList<DiskImage> disks = (LinkedList<DiskImage>) 
returnValue;
-                ArrayList<DiskImage> diskImages = new ArrayList<DiskImage>();
-                diskImages.addAll(disks);
-
-                moveDiskModel.init(diskImages);
-            }
-        }), vm.getId(), true);
     }
 
     @Override
@@ -2743,8 +2695,6 @@
                 && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.ExportVm));
         getCreateSnapshotCommand().setIsExecutionAllowed(items.size() == 1
                 && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.CreateAllSnapshotsFromVm));
-        getMoveCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.MoveVm));
         getRetrieveIsoImagesCommand().setIsExecutionAllowed(items.size() == 1
                 && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.ChangeDisk));
         getChangeCdCommand().setIsExecutionAllowed(items.size() == 1
@@ -2852,10 +2802,6 @@
         else if (command == getCreateSnapshotCommand())
         {
             CreateSnapshot();
-        }
-        else if (command == getMoveCommand())
-        {
-            Move();
         }
         else if (command == getGuideCommand())
         {
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/VirtualMachineModule.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/VirtualMachineModule.java
index e89ed97..b4c8dd8 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/VirtualMachineModule.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/VirtualMachineModule.java
@@ -73,7 +73,6 @@
             final Provider<VmExportPopupPresenterWidget> exportPopupProvider,
             final Provider<VmSnapshotCreatePopupPresenterWidget> 
createSnapshotPopupProvider,
             final Provider<VmMigratePopupPresenterWidget> migratePopupProvider,
-            final Provider<DisksAllocationPopupPresenterWidget> 
movePopupProvider,
             final Provider<VmDesktopNewPopupPresenterWidget> 
newDesktopVmPopupProvider,
             final Provider<VmServerNewPopupPresenterWidget> 
newServerVmPopupProvider,
             final Provider<GuidePopupPresenterWidget> guidePopupProvider,
@@ -100,8 +99,6 @@
                     return createSnapshotPopupProvider.get();
                 } else if (lastExecutedCommand == 
getModel().getMigrateCommand()) {
                     return migratePopupProvider.get();
-                } else if (lastExecutedCommand == getModel().getMoveCommand()) 
{
-                    return movePopupProvider.get();
                 } else if (lastExecutedCommand == 
getModel().getNewDesktopCommand()) {
                     return newDesktopVmPopupProvider.get();
                 } else if (lastExecutedCommand == 
getModel().getNewServerCommand()) {


--
To view, visit http://gerrit.ovirt.org/13906
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia564a1fc35d1d76e3a2331d43a03afa5b53df4a8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to