cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r981073 [3/3] - in /cxf/sandbox/logbrowser: distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/ distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/ distribution/src/main/release/samples/logbrowser...
Date Sat, 31 Jul 2010 16:34:48 GMT
Added: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/logbrowser.css
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/logbrowser.css?rev=981073&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/logbrowser.css
(added)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/logbrowser.css
Sat Jul 31 16:34:47 2010
@@ -0,0 +1,42 @@
+/** Error Dialog **/
+.errorDialog {
+  background: none;
+  border: none;
+  padding: 10px;
+  width: 600px;
+  color: #FFFFFF;
+  font-size: 15px;
+  font-family: verdana;
+}
+.errorDialogGlass {
+  opacity: 0.75;
+}
+@if user.agent safari {
+  .errorDialogGlass {
+    opacity: 0.80;
+  }
+}
+@if user.agent ie6 ie8 {
+  /* IE just doesn't do opacity the way we want, make our dialog
+   * stand out in a way that it can't be missed against the page
+   */
+  .errorDialog {
+    color: black;
+    background: darkgray;
+    border: 10px groove lightgrey;
+  }
+}
+.errorDialogTitle {
+  font-size: 30px;
+  font-weight: bold;
+  margin-bottom: 15px;
+}
+.errorDialogErrorType {
+  font-weight: bold;
+  white-space: nowrap;
+  margin-bottom: 15px;
+}
+.errorDialogButtons {
+  width: 100%;
+  margin-top: 15px;
+}
\ 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/BrowseView.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/BrowseView.ui.xml?rev=981073&r1=981072&r2=981073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseView.ui.xml
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseView.ui.xml
Sat Jul 31 16:34:47 2010
@@ -19,7 +19,8 @@
   -->
 
 <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
-	xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+	xmlns:g='urn:import:com.google.gwt.user.client.ui'
+    xmlns:logbrowser='urn:import:org.apache.cxf.management.web.logging.browser.client.view'>
 
 	<ui:image field='gradient' src='hborder.png' repeatStyle='Horizontal' />
 
@@ -119,7 +120,7 @@
             border: 1px solid #999999;
         }
         .body {
-            white-space:pre;
+            white-space:pre-wrap;
             line-height: 150%;
             padding: 20px 40px 20px 10px;
             font-family: monospace, serif;
@@ -166,13 +167,18 @@
 								</g:north>
 
 								<g:center>
-                                    <g:ScrollPanel>
+
+                                    <g:ScrollPanel ui:field='scroller'>
+                                        <g:FocusPanel  ui:field='focusKeyboardWrapper'
width="99%">
                                         <g:HTMLPanel>
                                             <g:Label ui:field="noEntries" styleName='{style.noEntries}'>No
entries</g:Label>
                                             <g:Label ui:field="loading" styleName="{style.loading}">Loading...</g:Label>
-                                            <g:FlexTable ui:field='entriesTable' styleName='{style.table}'
-                                                cellSpacing='0' cellPadding='0' />
+
+                                                <g:FlexTable ui:field='entriesTable' styleName='{style.table}'
+                                                    cellSpacing='0' cellPadding='0' />
+
                                         </g:HTMLPanel>
+                                        </g:FocusPanel>
                                     </g:ScrollPanel>
 								</g:center>
 							</g:DockLayoutPanel>

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=981073&r1=981072&r2=981073&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
Sat Jul 31 16:34:47 2010
@@ -23,7 +23,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Element;
 import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.KeyDownEvent;
 import com.google.gwt.i18n.client.DateTimeFormat;
 import com.google.gwt.resources.client.CssResource;
 import com.google.gwt.uibinder.client.UiBinder;
@@ -32,11 +34,14 @@ import com.google.gwt.uibinder.client.Ui
 import com.google.gwt.uibinder.client.UiTemplate;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.FocusPanel;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HTMLTable.Cell;
 import com.google.gwt.user.client.ui.HasHorizontalAlignment;
 import com.google.gwt.user.client.ui.Hyperlink;
 import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.UIObject;
 import com.google.gwt.user.client.ui.Widget;
 
 import org.apache.cxf.management.web.logging.browser.client.browser.Entry;
@@ -44,10 +49,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");
+        DateTimeFormat.getFormat("HH:mm:ss.SSS dd.MM.yyyy");
 
     @UiTemplate("BrowseView.ui.xml")
     interface BrowseViewUiBinder extends UiBinder<Widget, BrowseViewImpl> {
@@ -77,6 +80,10 @@ public class BrowseViewImpl extends Comp
     Label loading;
     @UiField
     HTML entryDetails;
+    @UiField
+    FocusPanel focusKeyboardWrapper;
+    @UiField
+    ScrollPanel scroller;
 
     private List<Subscription> subscriptions;
     private List<Entry> entries;
@@ -102,7 +109,7 @@ public class BrowseViewImpl extends Comp
         noEntries.setVisible(true);
         loading.setVisible(false);
         navBar.hideAll();
-        unselectEntry();
+        resetEntrySelection();
     }
 
     private void setLoadingLayout() {
@@ -110,7 +117,6 @@ public class BrowseViewImpl extends Comp
         noEntries.setVisible(false);
         loading.setVisible(true);
         navBar.hideAll();
-        unselectEntry();
     }
 
     private void setEntriesLayout() {
@@ -162,6 +168,30 @@ public class BrowseViewImpl extends Comp
         }
     }
 
+    @UiHandler("focusKeyboardWrapper")
+    void onArrowPressed(KeyDownEvent event) {
+        if (isSelectedEntry()) {
+            event.preventDefault();
+
+            if (event.isUpArrow()) {
+                selectEntry(entrySelectedRow - 1);
+            } else if (event.isDownArrow()) {
+                selectEntry(entrySelectedRow + 1);
+            }
+
+            ScrollMarker scrollMarker =
+                new ScrollMarker(entriesTable.getRowFormatter().getElement(entrySelectedRow));
+            scroller.ensureVisible(scrollMarker);
+        }
+    }
+
+    private class ScrollMarker extends UIObject {
+        public ScrollMarker(Element element) {
+            setElement(element);
+
+        }
+    }
+
     @UiHandler("subscriptionsTable")
     void onSubscriptionsTableClicked(ClickEvent event) {
         Cell cell = subscriptionsTable.getCellForEvent(event);
@@ -185,7 +215,7 @@ public class BrowseViewImpl extends Comp
         entryDetails.setHTML("");
     }
 
-    private void unselectEntry() {
+    private void resetEntrySelection() {
         unselectEntry(entrySelectedRow);
     }
 
@@ -193,6 +223,11 @@ public class BrowseViewImpl extends Comp
         if (entries == null) {
             return;
         }
+
+        if (row < 0 || row >= entriesTable.getRowCount()) {
+            return;
+        }
+
         Entry entry = entries.get(row);
         if (entry == null) {
             return;
@@ -207,7 +242,7 @@ public class BrowseViewImpl extends Comp
     }
 
     private void styleRow(int row, FlexTable t, boolean selected) {
-        if (row != -1) {
+        if (row != -1 && row < t.getRowCount()) {
             String style = selectionStyle.selectedRow();
 
             if (selected) {
@@ -238,6 +273,7 @@ public class BrowseViewImpl extends Comp
 
     public void setEntries(List<Entry> newEntries) {
         entriesTable.clear(true);
+        entriesTable.removeAllRows();
         entries = new ArrayList<Entry>();
         
         if (newEntries == null || newEntries.isEmpty()) {
@@ -255,20 +291,24 @@ public class BrowseViewImpl extends Comp
                 entriesTable.setText(row, 0, DT_FORMATTER.format(entry.getEventTimestamp()));
             }
             entriesTable.setText(row, 1, entry.getLevel());
-            entriesTable.setText(row, 2, getShortMessage(entry.getMessage()));
+            entriesTable.setText(row, 2, entry.getTitle());
             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);
+        if (isSelectedEntry()) {
+            if (entrySelectedRow < entriesTable.getRowCount()) {
+                selectEntry(entrySelectedRow);
+                focusKeyboardWrapper.setFocus(true);
+            } else {
+                resetEntrySelection();
+            }
         }
     }
 
+    private boolean isSelectedEntry() {
+        return entrySelectedRow > -1;
+    }
+
     public void setLinks(Links links) {
         navBar.olderButton.setVisible(links.previousAvailable());
         navBar.newerButton.setVisible(links.nextAvailable());
@@ -319,9 +359,6 @@ public class BrowseViewImpl extends Comp
 
         StringBuilder sb = new StringBuilder();
 
-        if (entry.getThreadName() != null) {
-            sb.append("[").append(entry.getThreadName()).append("]");
-        }
         if (entry.getMessage() != null) {
             sb.append(entry.getMessage()).append("\n");
         }

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/EditSubcriptionView.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/EditSubcriptionView.ui.xml?rev=981073&r1=981072&r2=981073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/EditSubcriptionView.ui.xml
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/EditSubcriptionView.ui.xml
Sat Jul 31 16:34:47 2010
@@ -24,6 +24,7 @@
 	<ui:style>
         .add{margin:0.4em;}
         .buttonsDecorator{text-align:right;}
+        .error{color:red;}
     </ui:style>
 
 	<g:HTMLPanel>
@@ -36,6 +37,12 @@
 					<g:TextBox ui:field="nameTextBox"></g:TextBox>
 				</td>
 			</tr>
+            <tr>
+                <td></td>
+                <td>
+                    <g:Label ui:field="nameErrorLabel" addStyleNames="{style.error}">Name
can't be empty</g:Label>
+                </td>
+            </tr>
 			<tr>
 				<td>
 					<g:Label>URL:</g:Label>
@@ -44,7 +51,13 @@
 					<g:TextBox ui:field="urlTextBox"></g:TextBox>
 				</td>
 			</tr>
-			<tr>
+            <tr>
+                <td></td>
+                <td>
+                    <g:Label ui:field="urlErrorLabel" addStyleNames="{style.error}">URL
can't be empty</g:Label>
+                </td>
+            </tr>            
+			<tr style="display:none;">
 				<td colspan="2">
 					<g:DisclosurePanel>
 						<g:header>Security</g:header>

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/EditSubcriptionWidget.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/EditSubcriptionWidget.java?rev=981073&r1=981072&r2=981073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/EditSubcriptionWidget.java
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/EditSubcriptionWidget.java
Sat Jul 31 16:34:47 2010
@@ -30,6 +30,7 @@ import com.google.gwt.uibinder.client.Ui
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.CheckBox;
 import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.TextBox;
 import com.google.gwt.user.client.ui.Widget;
 
@@ -47,13 +48,18 @@ public abstract class EditSubcriptionWid
     @UiField
     TextBox nameTextBox;
     @UiField
+    Label nameErrorLabel;
+    @UiField
     TextBox urlTextBox;
     @UiField
+    Label urlErrorLabel;    
+    @UiField
     CheckBox enabledCheckBox;
     @UiField
     TextBox usernameTextBox;
     @UiField
     TextBox passwordTextBox;
+
     @UiField
     Button cancelButton;
     @UiField
@@ -62,6 +68,10 @@ public abstract class EditSubcriptionWid
     public EditSubcriptionWidget() {
         initWidget(uiBinder.createAndBindUi(this));
 
+        nameErrorLabel.setVisible(false);
+        urlErrorLabel.setVisible(false);
+
+
         setAccessForSecurityControls();
 
         enabledCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsViewImpl.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/SettingsViewImpl.java?rev=981073&r1=981072&r2=981073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsViewImpl.java
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsViewImpl.java
Sat Jul 31 16:34:47 2010
@@ -72,7 +72,7 @@ public class SettingsViewImpl extends Co
                 void onEditButtonClicked(ClickEvent event) {
                     final DialogBox db = getDialogBox("Edit endpoint");
                     final EditSubcriptionWidget widget = new EditSubcriptionWidget() {
-
+                        
                         @Override
                         public void onCancelButtonClicked(ClickEvent event) {
                             db.hide();
@@ -80,10 +80,10 @@ public class SettingsViewImpl extends Co
 
                         @Override
                         public void onSaveButtonClicked(ClickEvent event) {
-                            if (presenter != null) {
+                            if (validate(this)) {
                                 presenter.onEditSubscription(createSubscription(this));
+                                db.hide();
                             }
-                            db.hide();
                         }
 
                     };
@@ -137,10 +137,10 @@ public class SettingsViewImpl extends Co
 
             @Override
             public void onSaveButtonClicked(ClickEvent event) {
-                if (presenter != null) {
+                if (validate(this)) {
                     presenter.onAddSubscription(createSubscription(this));
+                    db.hide();
                 }
-                db.hide();
             }
 
         };
@@ -149,6 +149,23 @@ public class SettingsViewImpl extends Co
         db.show();
     }
 
+    private boolean validate(final EditSubcriptionWidget widget) {
+        final String name = widget.nameTextBox.getValue();
+        final String url = widget.urlTextBox.getValue();
+
+        boolean isCorrect = true;
+        if (name == null || "".equals(name)) {
+            widget.nameErrorLabel.setVisible(true);
+            isCorrect = false;
+        }
+        if (url == null || "".equals(url)) {
+            widget.urlErrorLabel.setVisible(true);
+            isCorrect = false;
+        }
+        
+        return isCorrect;
+    }
+
     private Subscription createSubscription(final EditSubcriptionWidget widget) {
         Subscription s = new Subscription();
         s.setName(widget.nameTextBox.getValue());

Added: cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/Generate.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/Generate.java?rev=981073&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/Generate.java
(added)
+++ cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/Generate.java
Sat Jul 31 16:34:47 2010
@@ -0,0 +1,100 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.logging;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+public class Generate extends HttpServlet {
+    private static final Logger LOGGER = LogUtils.getL7dLogger(Generate.class);
+
+    private static final String LEVEL = "level";
+    private static final String MESSAGE = "message";
+    private static final String COPIES = "copies";
+    private static final String EXCEPTION_MESSAGE = "exceptionMessage";
+    private static final String FORM_URL = "./generate.html";
+
+    private enum Levels {
+        DEBUG,
+        INFO,
+        WARNING,
+        ERROR;
+    }
+
+    public void doGet(final HttpServletRequest request, final HttpServletResponse response)
+        throws ServletException, IOException {
+
+        final String level = request.getParameter(LEVEL) != null
+            ? request.getParameter(LEVEL).toLowerCase() : null;
+        final String message = request.getParameter(MESSAGE);
+        final String exceptionMessage = request.getParameter(EXCEPTION_MESSAGE);
+
+        int copies;
+        try {
+            copies = Integer.valueOf(request.getParameter(COPIES));
+            if (copies < 0) {
+                copies = 1;
+            }
+        } catch (NumberFormatException e) {
+            copies = 1;
+        }
+
+        assert copies >= 1;
+        assert level != null && !"".equals(level);
+
+        if (name(Levels.DEBUG).equals(level)) {
+            log(Level.FINE, message, exceptionMessage, copies);
+        } else if (name(Levels.INFO).equals(level)) {
+            log(Level.INFO, message, exceptionMessage, copies);
+        } else if (name(Levels.WARNING).equals(level)) {
+            log(Level.WARNING, message, exceptionMessage, copies);
+        } else if (name(Levels.ERROR).equals(level)) {
+            log(Level.SEVERE, message, exceptionMessage, copies);
+        }
+
+        response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
+        response.setHeader("Location", FORM_URL);
+        response.setContentType("text/html");
+    }
+
+    private static void log(final Level level, final String message,
+                            final String exceptionMessage, final int copies) {
+        if (message != null && !"".equals(message)) {
+            for (int i = 0; i < copies; i++) {
+                if (exceptionMessage != null && !"".equals(exceptionMessage)) {
+                    LOGGER.log(level, message, new Exception(exceptionMessage));
+                } else {
+                    LOGGER.log(level, message);
+                }
+            }
+        }
+    }
+
+    private static String name(final Levels level) {
+        return level.name().toLowerCase();
+    }
+}

Modified: cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/MockApp.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/MockApp.java?rev=981073&r1=981072&r2=981073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/MockApp.java
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/MockApp.java
Sat Jul 31 16:34:47 2010
@@ -28,7 +28,6 @@ import javax.ws.rs.ext.Provider;
 import org.apache.cxf.jaxrs.provider.AtomEntryProvider;
 import org.apache.cxf.jaxrs.provider.AtomFeedProvider;
 import org.apache.cxf.management.web.logging.atom.AtomPullServer;
-import org.apache.cxf.management.web.logging.atom.MockReadableLogStorage;
 import org.apache.cxf.management.web.logging.bootstrapping.BootstrapStorage;
 import org.apache.cxf.management.web.logging.bootstrapping.SimpleAuthenticationFilter;
 import org.apache.cxf.management.web.logging.bootstrapping.SimpleXMLSettingsStorage;
@@ -39,8 +38,7 @@ public class MockApp extends Application
 
     static {
         LOGS = new AtomPullServer();
-        LOGS.setPageSize(30);
-        LOGS.setStorage(new MockReadableLogStorage());
+        LOGS.setLogger("org.apache.cxf.management.web.logging.Generate");
         LOGS.init();
     }
 

Modified: cxf/sandbox/logbrowser/rt/management-web/src/test/resources/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/test/resources/WEB-INF/web.xml?rev=981073&r1=981072&r2=981073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/test/resources/WEB-INF/web.xml (original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/test/resources/WEB-INF/web.xml Sat Jul 31
16:34:47 2010
@@ -9,6 +9,15 @@
         <welcome-file>logbrowser/LogBrowser.html</welcome-file>
     </welcome-file-list>
 
+	<servlet>
+		<servlet-name>Generate</servlet-name>
+		<display-name>Generate log entry</display-name>
+		<servlet-class>
+			org.apache.cxf.management.web.logging.Generate
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
     <servlet>
         <servlet-name>MockApp</servlet-name>
         <display-name>MockApp</display-name>
@@ -33,9 +42,14 @@
                 org.apache.cxf.interceptor.LoggingOutInterceptor
             </param-value>
         </init-param>
-        <load-on-startup>1</load-on-startup>
+        <load-on-startup>2</load-on-startup>
     </servlet>
 
+	<servlet-mapping>
+		<servlet-name>Generate</servlet-name>
+		<url-pattern>/generate.do</url-pattern>
+	</servlet-mapping>
+
     <servlet-mapping>
         <servlet-name>MockApp</servlet-name>
         <url-pattern>/log/*</url-pattern>

Added: cxf/sandbox/logbrowser/rt/management-web/src/test/resources/generate.html
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/test/resources/generate.html?rev=981073&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/test/resources/generate.html (added)
+++ cxf/sandbox/logbrowser/rt/management-web/src/test/resources/generate.html Sat Jul 31 16:34:47
2010
@@ -0,0 +1,67 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <title>Generate log entry</title>
+    <style type="text/css">
+        label {
+        width: 5em;
+        float: left;
+        text-align: right;
+        margin-right: 0.5em;
+        display: block
+        }
+        .submit input {
+        margin-left: 8em;
+        }
+    </style>
+</head>
+<body>
+<form action="generate.do" method="get">
+    <p>
+        <label for="level">Level:</label>
+        <select id="level" name="level">
+            <option value="debug">DEBUG</option>
+            <option value="info">INFO</option>
+            <option value="warning">WARNING</option>
+            <option value="error">ERROR</option>
+        </select>
+    </p>
+
+    <p>
+        <label for="copies">Copies:</label>
+        <input id="copies" name="copies" type="text" size="2" value="1"/>
+    </p>
+
+    <p>
+        <label for="message">Message:</label>
+        <textarea id="message" name="message" rows="10" cols="80"></textarea>
+    </p>
+
+    <p>
+        <label for="exceptionMessage">Exception message:</label>
+        <textarea id="exceptionMessage" name="exceptionMessage" rows="10" cols="80"></textarea>
+    </p>
+
+    <p class="submit"><input type="submit" value="Generate"/></p>
+</form>
+</body>
+</html>
\ No newline at end of file

Added: cxf/sandbox/logbrowser/rt/management-web/src/test/resources/logging.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/test/resources/logging.properties?rev=981073&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/test/resources/logging.properties (added)
+++ cxf/sandbox/logbrowser/rt/management-web/src/test/resources/logging.properties Sat Jul
31 16:34:47 2010
@@ -0,0 +1,27 @@
+#    Licensed to the Apache Software Foundation (ASF) under one
+#    or more contributor license agreements. See the NOTICE file
+#    distributed with this work for additional information
+#    regarding copyright ownership. The ASF licenses this file
+#    to you under the Apache License, Version 2.0 (the
+#    "License"); you may not use this file except in compliance
+#    with the License. You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing,
+#    software distributed under the License is distributed on an
+#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#    KIND, either express or implied. See the License for the
+#    specific language governing permissions and limitations
+#    under the License.
+
+handlers = java.util.logging.ConsoleHandler
+
+.level = FINE
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.cxf.management.web.logging.Generate.level = FINE
+org.apache.cxf.interceptor.LoggingInInterceptor.level = INFO
+org.apache.cxf.interceptor.LoggingOutInterceptor.level = INFO
\ No newline at end of file



Mime
View raw message