Daniel Erez has posted comments on this change.
Change subject: frontend: Use console popup dialog in webadmin
......................................................................
Patch Set 1: (6 inline comments)
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/ConsoleUtils.java
Line 19:
Line 20: private Boolean spiceAvailable;
Line 21: private Boolean rdpAvailable;
Line 22:
Line 23: private final String VNC_NOT_SUPPORTED_MESSAGE;
You can just save and instance of CommonApplicationConsta
nts instead of these constants
Line 24: private final String BROWSER_NOT_SUPPORTED_MESSAGE;
Line 25:
Line 26: private final ClientAgentType clientAgentType;
Line 27:
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ConsoleAwareModel.java
Line 2:
Line 3: import org.ovirt.engine.core.common.businessentities.VM;
Line 4: import org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel;
Line 5:
Line 6: public interface ConsoleAwareModel {
Not sure about the interface name. Maybe something like: HasConsoleModel.
Line 7:
Line 8: public boolean isPool();
Line 9:
Line 10: public ConsoleProtocol getSelectedProtocol();
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalItemModel.java
Line 23: import org.ovirt.engine.ui.uicompat.Event;
Line 24: import org.ovirt.engine.ui.uicompat.EventArgs;
Line 25: import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
Line 26:
Line 27: public class UserPortalItemModel extends EntityModel implements
ConsoleAwareModel
Quite confusing that VmListModel and UserPortalItemModel are both implements
ConsoleAwareModel. Maybe worth moving the relevant code to UserPortalListModel
or VmItemBehavior.
Line 28: {
Line 29:
Line 30: @Override
Line 31: public ConsoleProtocol getSelectedProtocol() {
....................................................
File
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/basic/MainTabBasicListItemPresenterWidget.java
Line 90
Line 91
Line 92
Line 93
Line 94
isn't it needed anymore?
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabVirtualMachineView.java
Line 229: resources.consoleImage(),
resources.consoleDisabledImage()) {
Line 230: @Override
Line 231: protected UICommand resolveCommand() {
Line 232:
Line 233: UICommand command = new UICommand("ConsoleConnect",
new BaseCommandTarget() { // $NON-NLS-1$
the command should be created in the model
Line 234: @Override
Line 235: public void ExecuteCommand(UICommand uiCommand) {
Line 236: String errorMessage =
consoleManager.connectToConsole(getMainModel());
Line 237: if (errorMessage != null) {
Line 239: }
Line 240: }
Line 241: });
Line 242:
Line 243: command.setIsExecutionAllowed(
same - this logic should reside in the model (in UpdateActionAvailability)
Line 244: getMainModel().getSelectedItems() != null &&
getMainModel().getSelectedItems().size() == 1);
Line 245:
Line 246: return command;
Line 247: }
--
To view, visit http://gerrit.ovirt.org/12877
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I00158bbd8bd488dc527821b5f088fe598c9c2713
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches