cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r980151 - in /cxf/sandbox/logbrowser/rt/management-web/src/main: java/org/apache/cxf/management/web/logging/browser/client/view/ resources/org/apache/cxf/management/web/logging/browser/public/
Date Wed, 28 Jul 2010 18:42:00 GMT
Author: tomekopo
Date: Wed Jul 28 18:41:59 2010
New Revision: 980151

URL: http://svn.apache.org/viewvc?rev=980151&view=rev
Log:
- Fixed broken layout of 'settings' tab;
- Fixed broken layout of 'authentication' tab;
- Fixed moved 'last' link;
- Fixed title of the page;
- Add cutting long message in log entries list;

Modified:
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/AccessControlView.ui.xml
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml
    cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.html

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/AccessControlView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/AccessControlView.ui.xml?rev=980151&r1=980150&r2=980151&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/AccessControlView.ui.xml
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/AccessControlView.ui.xml
Wed Jul 28 18:41:59 2010
@@ -22,47 +22,65 @@
 	xmlns:g='urn:import:com.google.gwt.user.client.ui'>
 
 	<ui:style>
-        .error { color:red; }
-        .signInOuterTable { margin:50px auto;width:25em;}
-        .signInInnerTable { width:100%;}
+        .error {
+            color:red;
+            margin-left: 8em;
+        }
+        form {
+            margin:50px auto;
+            width:25em;
+        }
+        p > label {
+            width:7em;
+            float:left;
+            text-align:right;
+            margin-right:1em;
+            display:block;
+        }
+        fieldset {
+            border:3px solid #BBCDF3;
+            width: 22.5em;
+        }
+        legend {
+            padding:2px 6px;
+            font-weight:bolder;
+        }
+        .rememberMe {
+            margin-left:8em;
+        }
+        .submit button {
+            margin-left: 8em;
+        }
     </ui:style>
-	<g:DecoratorPanel addStyleNames="{style.signInOuterTable}">
-		<g:HTMLPanel>
-			<table class="{style.signInInnerTable}" cellspacing="6">
-				<tr>
-					<td>
-						<g:Label>Username:</g:Label>
-					</td>
-					<td align="right">
-						<g:TextBox ui:field='usernameTextBox'></g:TextBox>
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<g:Label>Password:</g:Label>
-					</td>
-					<td align="right">
-						<g:PasswordTextBox ui:field='passwordTextBox'></g:PasswordTextBox>
-					</td>
-				</tr>
-				<tr>
-					<td colspan="2">
-						<g:Label ui:field="accessDeniedLabel" visible="false"
-							addStyleNames="{style.error}">
-							The username or password you entered is incorrect.
-                        </g:Label>
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<g:CheckBox ui:field='rememberMeCheckBox'>Remember me</g:CheckBox>
-					</td>
-					<td align="right">
-						<g:Button ui:field='signInButton'>Sign in</g:Button>
-					</td>
-				</tr>
-			</table>
-		</g:HTMLPanel>
-	</g:DecoratorPanel>
+    <g:HTMLPanel>
+        <form action="#">
+            <fieldset>
+                <legend>Authentication</legend>
 
+                <p>
+                    <label for="copies">Username:</label>
+                    <g:TextBox ui:field='usernameTextBox'></g:TextBox>
+                </p>
+
+                <p>
+                    <label for="copies">Password:</label>
+                    <g:PasswordTextBox ui:field='passwordTextBox'></g:PasswordTextBox>
+                </p>
+
+                <p>
+                    <g:Label ui:field="accessDeniedLabel" visible="false" addStyleNames="{style.error}">
+                        The username or password you entered is incorrect.
+                    </g:Label>
+                </p>
+
+                <p>
+                    <g:CheckBox ui:field='rememberMeCheckBox' addStyleNames="{style.rememberMe}">Remember
me</g:CheckBox>
+                </p>
+
+                <p class="{style.submit}">
+                    <g:Button ui:field='signInButton'>Sign in</g:Button>
+                </p>
+            </fieldset>
+        </form>
+    </g:HTMLPanel>
 </ui:UiBinder>
\ No newline at end of file

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java?rev=980151&r1=980150&r2=980151&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java
Wed Jul 28 18:41:59 2010
@@ -44,6 +44,8 @@ import org.apache.cxf.management.web.log
 import org.apache.cxf.management.web.logging.browser.client.settings.Subscription;
 
 public class BrowseViewImpl extends Composite implements BrowseView {
+    private static final int SHORT_MESSAGE_LENGTH = 128;
+
     private static final DateTimeFormat DT_FORMATTER =
         DateTimeFormat.getFormat("HH:mm:ss dd.MM.yyyy");
 
@@ -220,7 +222,7 @@ public class BrowseViewImpl extends Comp
         // Initialize the header.
         entriesHeader.getColumnFormatter().setWidth(0, "160px");
         entriesHeader.getColumnFormatter().setWidth(1, "128px");
-        entriesHeader.getColumnFormatter().setWidth(3, "300px");
+        entriesHeader.getColumnFormatter().setWidth(3, "350px");
 
         entriesHeader.setText(0, 0, "Date");
         entriesHeader.setText(0, 1, "Level");
@@ -253,11 +255,20 @@ public class BrowseViewImpl extends Comp
                 entriesTable.setText(row, 0, DT_FORMATTER.format(entry.getEventTimestamp()));
             }
             entriesTable.setText(row, 1, entry.getLevel());
-            entriesTable.setText(row, 2, entry.getMessage());
+            entriesTable.setText(row, 2, getShortMessage(entry.getMessage()));
             row++;
         }
     }
 
+    //TODO think about solution which would dynamically change message length depend on screen
size
+    private String getShortMessage(final String message) {
+        if (message.length() < SHORT_MESSAGE_LENGTH) {
+            return message;
+        } else {
+            return message.substring(0, SHORT_MESSAGE_LENGTH);
+        }
+    }
+
     public void setLinks(Links links) {
         navBar.olderButton.setVisible(links.previousAvailable());
         navBar.newerButton.setVisible(links.nextAvailable());

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml?rev=980151&r1=980150&r2=980151&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml
Wed Jul 28 18:41:59 2010
@@ -23,78 +23,82 @@
 
 	<ui:style>
         .header {
+            background: #FFCC66 none repeat scroll 0 0;
+            padding:0.3em;
             margin-top:0.5em;
-            margin-bottom:0em;
-            margin-right:2em;
-            margin-left:2em;
         }
+
         .signOut {
-        margin-bottom:1em;
-        text-align:right;
+            padding-top: 0.3em;
+            padding-right: 0.5em;
+            text-align: right;
         }
+        
         .settings {
-        background: #FFCC66 none repeat scroll 0 0;
-        width:100%;
+            background: #FFCC66 none repeat scroll 0 0;
+            width:100%;
         }
 
         .back {
-        margin-top: 0.5em;
+            margin-top: 0.5em;
+            display:inline;
         }
 
         .title {
-        font-size: 140%;
-        margin: 0.1em 1.5em 0 0.3em;
-        font-weight: bold;
+            font-size: 140%;
+            margin: 0.1em 1.5em 0 0.3em;
+            font-weight: bold;
+            display:inline;
         }
 
         .subscriptions {
-        float: left;
-        width:100%;
-        padding-right:1em;
-        margin-top:1em;
+            width:100%;
+            padding:0.5em;
         }
-    </ui:style>
 
+        .toolBar {
+            padding-left:1em;
+            padding-top:0.5em;
+            padding-bottom:0.5em;
+            background-color:#FFEDA3;
+        }
+        
+        .content {
+            background-color:#FFF7D7;
+        }
+    </ui:style>
 
     <g:DockLayoutPanel unit='EM'>
-        <g:north size='5'>
-            <g:HTMLPanel addStyleNames="{style.header}">
+        <g:north size='7.2'>
+            <g:HTMLPanel>
                 <g:Hyperlink ui:field="singOutHyperlink" addStyleNames="{style.signOut}">
                     Sign out
                 </g:Hyperlink>
-                <g:VerticalPanel addStyleNames="{style.settings}">
-                    <g:HorizontalPanel>
-                        <g:Label addStyleNames="{style.title}">
-                            Settings
-                        </g:Label>
-                        <g:Hyperlink ui:field="backHyperlink" addStyleNames="{style.back}">
-                            &#171; Back to browse
-                        </g:Hyperlink>
-                    </g:HorizontalPanel>
-                </g:VerticalPanel>
+                <div class="{style.header}">
+                    <g:Label addStyleNames="{style.title}">
+                        Settings
+                    </g:Label>
+                    <g:Hyperlink ui:field="backHyperlink" addStyleNames="{style.back}">
+                        &#171; Back to browse
+                    </g:Hyperlink>
+                </div>
+                <div class="{style.toolBar}">
+                    <g:Button ui:field="addSubscriptionButton">
+                        Add endpoint
+                    </g:Button>
+                </div>
             </g:HTMLPanel>
         </g:north>
-        <g:west size="2"><g:HTMLPanel></g:HTMLPanel></g:west>
-        <g:east size="2"><g:HTMLPanel></g:HTMLPanel></g:east>
+
         <g:center>
-            <g:TabLayoutPanel barUnit="EM" barHeight="2" stylePrimaryName="settingsTabPanel">
-                <g:tab>
-                    <g:header>Endpoints</g:header>
-                    <g:DockLayoutPanel unit='EM'>
-                        <g:north size="2">
-                            <g:Button ui:field="addSubscriptionButton">
-                                Add endpoint
-                            </g:Button>
-                        </g:north>
-                        <g:center>
-                            <g:ScrollPanel>
-                                <g:FlexTable ui:field="subscriptionsFlexTable"
-                                             addStyleNames="{style.subscriptions}"/>
-                            </g:ScrollPanel>
-                        </g:center>
-                    </g:DockLayoutPanel>
-                </g:tab>
-            </g:TabLayoutPanel>
+            <g:ScrollPanel>
+                <g:HTMLPanel>
+                    <div class="{style.content}">
+                        <g:FlexTable ui:field="subscriptionsFlexTable"
+                                     addStyleNames="{style.subscriptions}"/>
+                    </div>
+                </g:HTMLPanel>
+            </g:ScrollPanel>
         </g:center>
     </g:DockLayoutPanel>
 

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.html
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.html?rev=980151&r1=980150&r2=980151&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.html
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.html
Wed Jul 28 18:41:59 2010
@@ -36,7 +36,7 @@
     <!--                                           -->
     <!-- Any title is fine                         -->
     <!--                                           -->
-    <title>Web Application Starter Project</title>
+    <title>LogBrowser</title>
     
     <!--                                           -->
     <!-- This script loads your compiled module.   -->



Mime
View raw message