Ravi Nori has uploaded a new change for review.

Change subject: webadmin: Events tab message column too narrow
......................................................................

webadmin: Events tab message column too narrow

The message column in events tab is too narrow in
basic view. There is lots of space unused and the
message column should use available space in
basic view.

Change-Id: I10cfae5d4fec96a091981b3768648b3a908aa41a
Bug-Url: https://bugzilla.redhat.com/1149491
Signed-off-by: Ravi Nori <rn...@redhat.com>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabEventView.java
2 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/04/34404/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
index 35e8e0b..9a8fdf0 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
@@ -532,7 +532,7 @@
         getDataProvider().goForward();
     }
 
-    void setColumnWidth(Column<T, ?> column, String width) {
+    public void setColumnWidth(Column<T, ?> column, String width) {
         table.setColumnWidth(column, width);
         tableHeader.setColumnWidth(column, width);
     }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabEventView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabEventView.java
index eb6f401..424fee3 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabEventView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabEventView.java
@@ -45,6 +45,10 @@
 
     private final ApplicationConstants constants;
 
+    private static final String BASIC_VIEW_MSG_COLUMN_WIDTH = "600px"; 
//$NON-NLS-1$
+    private static final String ADV_VIEW_MSG_COLUMN_WIDTH = "150px"; 
//$NON-NLS-1$
+    private TextColumnWithTooltip<AuditLog> messageColumn;
+
     @Inject
     public MainTabEventView(MainModelProvider<AuditLog, EventListModel> 
modelProvider,
             ApplicationConstants constants) {
@@ -104,6 +108,9 @@
         
getTable().ensureColumnPresent(AdvancedViewColumns.customEventIdColumn, 
constants.eventCustomEventId(),
                 advancedViewEnabled,
                 "100px"); //$NON-NLS-1$
+
+        getTable().setColumnWidth(messageColumn,
+                advancedViewEnabled ? ADV_VIEW_MSG_COLUMN_WIDTH : 
BASIC_VIEW_MSG_COLUMN_WIDTH);
     }
 
     void initTable() {
@@ -120,14 +127,14 @@
         logTimeColumn.makeSortable(AuditLogConditionFieldAutoCompleter.TIME);
         getTable().addColumn(logTimeColumn, constants.timeEvent(), "150px"); 
//$NON-NLS-1$
 
-        TextColumnWithTooltip<AuditLog> messageColumn = new 
TextColumnWithTooltip<AuditLog>() {
+        messageColumn = new TextColumnWithTooltip<AuditLog>() {
             @Override
             public String getValue(AuditLog object) {
                 return object.getmessage();
             }
         };
         
messageColumn.makeSortable(AuditLogConditionFieldAutoCompleter.MESSAGE);
-        getTable().addColumn(messageColumn, constants.messageEvent(), 
"150px"); //$NON-NLS-1$
+        getTable().addColumn(messageColumn, constants.messageEvent(), 
BASIC_VIEW_MSG_COLUMN_WIDTH);
 
         getTable().addActionButton(new 
WebAdminButtonDefinition<AuditLog>(constants.details(),
                 CommandLocation.OnlyFromContext) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10cfae5d4fec96a091981b3768648b3a908aa41a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to