Frank Kobzik has posted comments on this change.

Change subject: frontend: Console code refactor and cleanup
......................................................................


Patch Set 3:

(6 comments)

(Commiting the change in a minute.)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ConsoleModelsCache.java
Line 26:     }
Line 27: 
Line 28:     /**
Line 29:      * @param vmIds
Line 30:      * todo probably not needed - on each update only existing vms are 
retained @see updateCache
Done
Line 31:      */
Line 32:     public void removeVmConsolesForVmsId(Guid ... vmIds) {
Line 33:         vmConsoles.keySet().removeAll(Arrays.asList(vmIds));
Line 34:     }


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/VmConsolesImpl.java
Line 79:     public ConsoleProtocol getSelectedProcotol() {
Line 80:         return selectedProtocol;
Line 81:     }
Line 82: 
Line 83:     public <T extends ConsoleModel> T getConsoleModel(Class <T> type) {
In the end we decided to keep the Class param. It's more type-safe and doesn't 
require programmer to explicitly cast the return value to particular class when 
calling this method.
Line 84:         return (T) consoleModels.get(modelTypeMapping.get(type));
Line 85:     }
Line 86: 
Line 87:     public boolean canConnectToConsole() {


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/IVmPoolResolutionService.java
Line 2: 
Line 3: import org.ovirt.engine.core.common.businessentities.VmPool;
Line 4: import org.ovirt.engine.core.compat.Guid;
Line 5: 
Line 6: // todo delete
deleted :)
Line 7: public interface IVmPoolResolutionService
Line 8: {
Line 9:     VmPool resolveVmPoolById(Guid id);


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
Line 1724:                         ConfirmationModel localModel = 
(ConfirmationModel) result.getState();
Line 1725:                         localModel.stopProgress();
Line 1726:                         cancel();
Line 1727: 
Line 1728:                         for (int i = 0; i < 
result.getReturnValue().size(); i++) {
Done
Line 1729:                             if 
(result.getReturnValue().get(i).getSucceeded()) {
Line 1730:                                 
consoleModelsCache.removeVmConsolesForVmsId(listIds.get(i));
Line 1731:                             }
Line 1732:                         }


....................................................
File 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
Line 318: 
Line 319:     @DefaultMessage("The following disks cannot be copied: {0}")
Line 320:     String cannotCopyDisks(String disks);
Line 321: 
Line 322:     @DefaultMessage("Error Connecting to {0} using {1} protocol")
Done
Line 323:     String errorConnectingToConsole(String name, String s);
Line 324: 
Line 325:     @DefaultMessage("Cannot connect to the console for {0}.")
Line 326:     String cannotConnectToTheConsole(String vmName);


....................................................
File 
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/utils/ConnectAutomaticallyManager.java
Line 89:         public void eventRaised(Event ev, Object sender, EventArgs 
args) {
Line 90:             //todo revisit this, connectAutomatically flag may not be 
needed
Line 91:             if (connectAutomatically.readConnectAutomatically() && 
model.getCanConnectAutomatically() && !alreadyOpened) {
Line 92:                 try {
Line 93:                     
model.getAutoConnectableConsoles().get(0).connect();
true indeed.
Line 94:                 } catch (VmConsoles.ConsoleConnectException e) {
Line 95:                     
errorPopupManager.show(e.getLocalizedErrorMessage());
Line 96:                 }
Line 97:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6d7cb5e457410e0e76a12f6602b44132cb913c9
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to