svn commit: r453164 - in /incubator/ofbiz/trunk/framework/webtools: webapp/webtools/WEB-INF/actions/log/ webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh webapp/webtools/log/ webapp/webtools/log/LogForms.xml widget/LogScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r453164 - in /incubator/ofbiz/trunk/framework/webtools: webapp/webtools/WEB-INF/actions/log/ webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh webapp/webtools/log/ webapp/webtools/log/LogForms.xml widget/LogScreens.xml

jacopoc
Author: jacopoc
Date: Thu Oct  5 02:39:41 2006
New Revision: 453164

URL: http://svn.apache.org/viewvc?view=rev&rev=453164
Log:
Added some missing resources from OFBIZ-361 (from Peter Goron).

Added:
    incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/
    incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh   (with props)
    incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/
    incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml   (with props)
    incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml   (with props)

Added: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh?view=auto&rev=453164
==============================================================================
--- incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh (added)
+++ incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh Thu Oct  5 02:39:41 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2001-2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.spi.LoggerRepository;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.entity.util.EntityUtil;
+
+
+Logger rootLogger = Logger.getRootLogger();
+LoggerRepository loggerRepository = rootLogger.getLoggerRepository();
+
+List loggerList = UtilMisc.toListArray(new Object[0]);
+for (Enumeration enumeration = loggerRepository.getCurrentLoggers(); enumeration.hasMoreElements() ;) {
+    Logger logger = (Logger) enumeration.nextElement();
+    
+    if (logger.getLevel() != null) {
+        Map loggerMap = UtilMisc.toMap("name", logger.getName(), "level", logger.getLevel(), "additivity", logger.getAdditivity() ? "Y" : "N", "logger", logger);
+        loggerList.add(loggerMap);
+    }
+}
+
+Collections.sort(loggerList, new Comparator() {
+    int compare(Object l1, Object l2) {
+    Map loggerMap1 = (Map) l1;
+    Map loggerMap2 = (Map) l2;
+    String name1 = (String)l1.get("name");
+    String name2 = (String)l2.get("name");
+    return name1.compareTo(name2);
+    }
+});
+
+loggerList.add(0, UtilMisc.toMap("name", rootLogger.getName(), "level", rootLogger.getLevel(), "additivity", rootLogger.getAdditivity() ? "Y" : "N", "logger", rootLogger));
+context.put("loggerList", loggerList);
+
+context.put("defaultLogger", UtilMisc.toMap("name", "org.ofbiz.", "level", "INFO", "additivity", "Y"));
+context.put("activeDebugLevel", UtilMisc.toMap(new String[] {"fatal", Debug.fatalOn() ? "Y" : "N",
+                                                         "error", Debug.errorOn() ? "Y" : "N",
+                                                         "warning", Debug.warningOn() ? "Y" : "N",
+                                                         "important", Debug.importantOn() ? "Y" : "N",
+                                                         "info", Debug.infoOn() ? "Y" : "N",
+                                                         "timing", Debug.timingOn() ? "Y" : "N",
+                                                         "verbose", Debug.verboseOn() ? "Y" : "N"}));

Propchange: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml?view=auto&rev=453164
==============================================================================
--- incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml (added)
+++ incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml Thu Oct  5 02:39:41 2006
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Copyright 2004-2006 The Apache Software Foundation
+
+Licensed 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.
+-->
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd">
+        
+  <form name="LevelSwitch" type="single" target="AdjustDebugLevels" default-map-name="activeDebugLevel"
+        default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
+    <field name="fatal" title="${uiLabelMap.WebtoolsFatalLogLevel}" tooltip="${uiLabelMap.WebtoolsFatalLogLevelTooltip}"><check/></field>
+    <field name="error" title="${uiLabelMap.WebtoolsErrorLogLevel}" tooltip="${uiLabelMap.WebtoolsErrorLogLevelTooltip}"><check/></field>
+    <field name="warning" title="${uiLabelMap.WebtoolsWarningLogLevel}" tooltip="${uiLabelMap.WebtoolsWarningLogLevelTooltip}"><check/></field>
+    <field name="important" title="${uiLabelMap.WebtoolsImportantLogLevel}" tooltip="${uiLabelMap.WebtoolsImportantLogLevelTooltip}"><check/></field>
+    <field name="info" title="${uiLabelMap.WebtoolsInfoLogLevel}" tooltip="${uiLabelMap.WebtoolsInfoLogLevelTooltip}"><check/></field>
+    <field name="timing" title="${uiLabelMap.WebtoolsTimingLogLevel}" tooltip="${uiLabelMap.WebtoolsTimingLogLevelTooltip}"><check/></field>
+    <field name="verbose" title="${uiLabelMap.WebtoolsVerboseLogLevel}" tooltip="${uiLabelMap.WebtoolsVerboseLogLevelTooltip}"><check/></field>
+    <field name="submit" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
+  </form>
+  
+  <form name="AddLogger" type="single" default-map-name="defaultLogger" target="AddLogger"
+        default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
+    <field name="name" title="${uiLabelMap.WebtoolsLoggerName}"><text size="50"/></field>
+    <field name="level" title="${uiLabelMap.WebtoolsLoggerLevel}">
+        <drop-down>
+          <option key="OFF"/>
+          <option key="FATAL"/>
+          <option key="ERROR"/>
+          <option key="WARN"/>
+          <option key="INFO"/>
+          <option key="TRACE"/>
+          <option key="DEBUG"/>
+          <option key="ALL"/>
+        </drop-down>
+    </field>
+    <field name="additivity" title="${uiLabelMap.WebtoolsLoggerAdditivity}"><check/></field>
+    <field name="submit" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit/></field>
+  </form>
+  
+  <form name="LoggerList" type="multi" target="UpdateLogger" list-name="loggerList" paginate="false" separate-columns="true"
+        default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
+    <field name="name" title="${uiLabelMap.WebtoolsLoggerName}"><display/></field>
+    <field name="level" title="${uiLabelMap.WebtoolsLoggerLevel}" widget-style="selectBox">
+        <drop-down>
+          <option key="OFF"/>
+          <option key="FATAL"/>
+          <option key="ERROR"/>
+          <option key="WARN"/>
+          <option key="INFO"/>
+          <option key="TRACE"/>
+          <option key="DEBUG"/>
+          <option key="ALL"/>
+        </drop-down>
+    </field>
+    <field name="additivity" title="${uiLabelMap.WebtoolsLoggerAdditivity}">
+      <check/>
+    </field>
+    <field name="rowSubmit" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>
+  </form>
+</forms>

Propchange: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml?view=auto&rev=453164
==============================================================================
--- incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml (added)
+++ incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml Thu Oct  5 02:39:41 2006
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+Copyright 2004-2006 The Apache Software Foundation
+
+Licensed 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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
+  <screen name="LogConfiguration">
+    <section>
+      <actions>
+        <set field="titleProperty" value="PageTitleLogConfiguration"/>
+        <script location="component://webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.bsh"/>
+      </actions>
+      <widgets>
+        <decorator-screen name="CommonWebtoolsDecorator" location="${parameters.mainDecoratorLocation}">
+          <decorator-section name="body">
+              <container style="boxoutside">
+                <container style="boxtop">
+                  <label style="boxhead">${uiLabelMap.WebtoolsDebuggingLevelFormDescription}</label>
+                </container>
+                <container style="boxbottom">
+                  <include-form name="LevelSwitch" location="component://webtools/webapp/webtools/log/LogForms.xml"/>
+                </container>
+              </container>
+              <label>&lt;br/&gt;</label>
+              <container style="boxoutside">
+                <container style="boxtop">
+                  <label style="boxhead">${uiLabelMap.WebtoolsAddLoggerFormDescription}</label>
+                </container>
+                <container style="boxbottom">
+                  <include-form name="AddLogger" location="component://webtools/webapp/webtools/log/LogForms.xml"/>
+                </container>
+              </container>
+              <label>&lt;br/&gt;</label>
+              <container style="boxoutside">
+                <container style="boxtop">
+                  <label style="boxhead">${uiLabelMap.WebtoolsLoggerListFormDescription}</label>
+                </container>
+                <container style="boxbottom">
+                  <include-form name="LoggerList" location="component://webtools/webapp/webtools/log/LogForms.xml"/>
+                </container>
+              </container>
+          </decorator-section>
+        </decorator-screen>
+      </widgets>
+    </section>
+  </screen>
+</screens>

Propchange: incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/webtools/widget/LogScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml