Frank Kobzik has uploaded a new change for review.

Change subject: frontend: Console dialog look tuning
......................................................................

frontend: Console dialog look tuning

This patch tunes look of the console dialog. It adds tooltips to widgets and
slightly changes the layout.

Change-Id: I106de2876e3698d087c7996bfe1cac1f2bc6a19e
Signed-off-by: Frantisek Kobzik <[email protected]>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.ui.xml
3 files changed, 58 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/29/14229/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
index 01dab3c..84934f5 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
@@ -1210,10 +1210,31 @@
     @DefaultStringValue("SPICE Options")
     String spiceOptions();
 
+    @DefaultStringValue("If there is a SPICE plugin installed in your browser, 
it is used for invoking the console lession. Otherwise SPICE configuration file 
is downloaded.")
+    String spiceInvokeAuto();
+
+    @DefaultStringValue("Downloads a SPICE configuration file to be opened by 
a SPICE client installed on your system.")
+    String spiceInvokeNative();
+
+    @DefaultStringValue("Uses SPICE browser plugin for invoking console 
session. For this you must have SPICE console plugin installed in your 
browser.")
+    String spiceInvokePlugin();
+
+    @DefaultStringValue("Console Invocation")
+    String consoleInvocation();
+
     @DefaultStringValue("VNC console access is not supported from the user 
portal.<br/>" +
             "Please ask the administrator to configure this " +
             "virtual machine to use SPICE for console access.")
     String vncNotSupportedMsg();
+
+    @DefaultStringValue("SPICE isn't available for this machine. For enabling 
it, change the VM console protocol.")
+    String spiceNotAvailable();
+
+    @DefaultStringValue("RDP isn't available for this machine.")
+    String rdpNotAvailable();
+
+    @DefaultStringValue("VNC isn't available for this machine. For enabling 
it, change the VM console protocol.")
+    String vncNotAvailable();
 
     @DefaultStringValue("Your browser/platform does not support console 
opening")
     String browserNotSupportedMsg();
@@ -1229,4 +1250,5 @@
 
     @DefaultStringValue("No items to display")
     String noItemsToDisplay();
+
 }
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.java
index 0ed1a50..0ab6bef 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.java
@@ -115,6 +115,8 @@
     @WithElementId
     EntityModelValueCheckBoxEditor<ConsoleModel> wanEnabled;
 
+    private final CommonApplicationConstants constants;
+
     private final CommonApplicationMessages messages;
 
     private ConsolePopupModel model;
@@ -125,6 +127,7 @@
             CommonApplicationConstants constants,
             CommonApplicationMessages messages) {
         super(eventBus, resources);
+        this.constants = constants;
         this.messages = messages;
 
         spiceRadioButton = new EntityModelRadioButtonEditor("1"); //$NON-NLS-1$
@@ -349,17 +352,20 @@
 
     @Override
     public void setSpiceAvailable(boolean visible) {
-        spiceRadioButton.setVisible(visible);
+        spiceRadioButton.setEnabled(visible);
+        spiceRadioButton.setTitle(visible ? "" : 
constants.spiceNotAvailable());
     }
 
     @Override
     public void setRdpAvailable(boolean visible) {
-        remoteDesktopRadioButton.setVisible(visible);
+        remoteDesktopRadioButton.setEnabled(visible);
+        remoteDesktopRadioButton.setTitle(visible ? "" : 
constants.rdpNotAvailable());
     }
 
     @Override
     public void setVncAvailable(boolean visible) {
-        vncRadioButton.setVisible(visible);
+        vncRadioButton.setEnabled(visible);
+        vncRadioButton.setTitle(visible ? "" : constants.vncNotAvailable());
     }
 
     @Override
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.ui.xml
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.ui.xml
index ee810d0..3dc9fb2 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.ui.xml
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.ui.xml
@@ -29,39 +29,54 @@
                .ctrlAltDelContentWidget {
                        width: 300px;
                }
+
+               .threeNextToEachOther {
+                   float:left;
+                   display:inline;
+                   width: 30%;
+           }
+
+           .spicePanel {
+               float: left;
+           }
+
        </ui:style>
 
-       <d:SimpleDialogPanel width="350px" height="380px">
+       <d:SimpleDialogPanel width="500px" height="420px">
                <d:content>
                        <g:FlowPanel addStyleNames="{style.fullWidth}">
-                               <g:FlowPanel addStyleNames="{style.fullWidth}">
+                               <g:FlowPanel>
                                        <g:Label ui:field="consoleTitle" 
addStyleNames="{style.labelStyle}" />
-                                       <e:EntityModelRadioButtonEditor 
ui:field="spiceRadioButton" />
-                                       <e:EntityModelRadioButtonEditor 
ui:field="vncRadioButton" />
-                                       <e:EntityModelRadioButtonEditor 
ui:field="remoteDesktopRadioButton" />
+                                       <g:FlowPanel>
+                                               <e:EntityModelRadioButtonEditor 
ui:field="spiceRadioButton" addStyleNames="{style.threeNextToEachOther}"/>
+                                               <e:EntityModelRadioButtonEditor 
ui:field="vncRadioButton" addStyleNames="{style.threeNextToEachOther}"/>
+                                               <e:EntityModelRadioButtonEditor 
ui:field="remoteDesktopRadioButton" 
addStyleNames="{style.threeNextToEachOther}" />
+                                       </g:FlowPanel>
                                </g:FlowPanel>
 
-                               <g:FlowPanel ui:field="spicePanel" 
addStyleNames="{style.fullWidth}">
+                               <g:FlowPanel ui:field="spicePanel" 
addStyleNames="{style.spicePanel}">
+                                       <g:Label ui:field="consoleInvocation" 
text="{constants.consoleInvocation}" addStyleNames="{style.labelStyle}" />
+                                       <e:EntityModelRadioButtonEditor 
ui:field="spiceAutoImplRadioButton" title="{constants.spiceInvokeAuto}"/>
+                                       <e:EntityModelRadioButtonEditor 
ui:field="spiceNativeImplRadioButton" title="{constants.spiceInvokeNative}"/>
+                                       <e:EntityModelRadioButtonEditor 
ui:field="spicePluginImplRadioButton" title="{constants.spiceInvokePlugin}"/>
+
                                        <g:Label ui:field="spiceTitle" 
text="{constants.spiceOptions}" addStyleNames="{style.labelStyle}" />
-                                       <e:EntityModelRadioButtonEditor 
ui:field="spiceAutoImplRadioButton" />
-                                       <e:EntityModelRadioButtonEditor 
ui:field="spiceNativeImplRadioButton" />
-                                       <e:EntityModelRadioButtonEditor 
ui:field="spicePluginImplRadioButton" />
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="ctrlAltDel" />
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="enableUsbAutoshare" />
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="openInFullScreen" />
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="enableSpiceProxy" />
                                </g:FlowPanel>
 
-                               <g:FlowPanel ui:field="rdpPanel" 
addStyleNames="{style.fullWidth}">
+                               <g:FlowPanel ui:field="rdpPanel" >
                                        <g:Label text="{constants.rdpOptions}" 
addStyleNames="{style.labelStyle}" />
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="useLocalDrives" />
                                </g:FlowPanel>
 
-                               <g:FlowPanel ui:field="wanOptionsPanel" 
addStyleNames="{style.fullWidth}">
+                               <g:FlowPanel ui:field="wanOptionsPanel" >
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="wanEnabled" />
                                </g:FlowPanel>
 
-                               <g:FlowPanel ui:field="disableSmartcardPanel" 
addStyleNames="{style.fullWidth}">
+                               <g:FlowPanel ui:field="disableSmartcardPanel" >
                                        <w:EntityModelValueCheckBoxEditor 
ui:field="disableSmartcard" />
                                </g:FlowPanel>
                        </g:FlowPanel>


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I106de2876e3698d087c7996bfe1cac1f2bc6a19e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to