You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ma...@apache.org on 2009/10/10 00:09:49 UTC
svn commit: r823716 - in /incubator/ace/trunk: core/
core/conf/dev-server-webui/ server/src/org/apache/ace/webconsole/
server/src/org/apache/ace/webconsole/plugin/ webui/war/
Author: marrs
Date: Fri Oct 9 22:09:48 2009
New Revision: 823716
URL: http://svn.apache.org/viewvc?rev=823716&view=rev
Log:
ACE-34 Committed the patches Toni supplied.
Modified the build because at this point I do not want to move to a hybrid build system of Ant and Maven.
Added:
incubator/ace/trunk/server/src/org/apache/ace/webconsole/
incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/
incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/Activator.java (with props)
incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/WebUIConsoleServlet.java (with props)
incubator/ace/trunk/webui/war/webui-headless.html (with props)
Modified:
incubator/ace/trunk/core/build.xml
incubator/ace/trunk/core/conf/dev-server-webui/platform.setup
Modified: incubator/ace/trunk/core/build.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/core/build.xml?rev=823716&r1=823715&r2=823716&view=diff
==============================================================================
--- incubator/ace/trunk/core/build.xml (original)
+++ incubator/ace/trunk/core/build.xml Fri Oct 9 22:09:48 2009
@@ -431,6 +431,11 @@
exportpackage="org.apache.ace.location"
privatepackage="org.apache.ace.location.upnp, org.apache.ace.location.upnp.actions, org.apache.ace.location.upnp.util"
bundleactivator="org.apache.ace.location.upnp.Activator" />
+ <project-bundle
+ bundlename="Apache ACE Felix WebConsole Plugin"
+ bundlesymbolicname="org.apache.ace.webconsole.plugin"
+ privatepackage="org.apache.ace.webconsole.plugin"
+ bundleactivator="org.apache.ace.webconsole.plugin.Activator" />
</target>
<target name="package-gateway" unless="gateway.uptodate">
@@ -966,17 +971,17 @@
<replacevalue>2.0.0</replacevalue>
</replace>
- <property name="cmdline" value="deploy/target/${item}" />
+ <property name="cmdline" value="deploy/target/${item}" />
<java dir="." classname="org.ops4j.pax.runner.Run" fork="true" taskname="paxrunner" timeout="99999" failonerror="true">
- <arg value="--args=file:${workdir}/platform.setup"/>
- <arg value="--executor=script"/>
- <arg value="--workingDirectory=${workdir}"/>
- <arg value="scan-file:file:${workdir}/platform.properties"/>
+ <arg value="--args=file:${workdir}/platform.setup" />
+ <arg value="--executor=script" />
+ <arg value="--workingDirectory=${workdir}" />
+ <arg value="scan-file:file:${workdir}/platform.properties" />
<classpath>
- <pathelement location="lib/pax-runner-1.2.1.jar"/>
- </classpath>
- </java>
+ <pathelement location="lib/pax-runner-1.2.1.jar" />
+ </classpath>
+ </java>
<delete file="${workdir}/platform.setup" />
<delete file="${workdir}/platform.properties" />
Modified: incubator/ace/trunk/core/conf/dev-server-webui/platform.setup
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/core/conf/dev-server-webui/platform.setup?rev=823716&r1=823715&r2=823716&view=diff
==============================================================================
--- incubator/ace/trunk/core/conf/dev-server-webui/platform.setup (original)
+++ incubator/ace/trunk/core/conf/dev-server-webui/platform.setup Fri Oct 9 22:09:48 2009
@@ -26,6 +26,7 @@
@bundles@/org.apache.ace.obr.storage-1.0.0.jar@update
@bundles@/org.apache.ace.obr.metadata-1.0.0.jar@update
@bundles@/org.apache.ace.webui-1.0.0.jar@update
+@bundles@/org.apache.ace.webconsole.plugin-1.0.0.jar@update
@ext@/org.osgi.compendium.jar
@ext@/osgi.mobile.jar
Added: incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/Activator.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/Activator.java?rev=823716&view=auto
==============================================================================
--- incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/Activator.java (added)
+++ incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/Activator.java Fri Oct 9 22:09:48 2009
@@ -0,0 +1,49 @@
+/*
+ * 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.ace.webconsole.plugin;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import javax.servlet.Servlet;
+
+import org.apache.felix.dependencymanager.DependencyActivatorBase;
+import org.apache.felix.dependencymanager.DependencyManager;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Toni Menzel
+ */
+public class Activator extends DependencyActivatorBase {
+ @Override
+ public void init(BundleContext bundleContext, DependencyManager manager) throws Exception {
+ Dictionary dict = new Hashtable();
+ dict.put( "felix.webconsole.label", WebUIConsoleServlet.LABEL );
+ dict.put( "felix.webconsole.title", WebUIConsoleServlet.TITLE );
+ manager.add(createService()
+ .setInterface(Servlet.class.getName(), dict)
+ .setImplementation(new WebUIConsoleServlet())
+ );
+ }
+
+ @Override
+ public void destroy(BundleContext bundleContext, DependencyManager manager) throws Exception {
+
+ }
+}
Propchange: incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/Activator.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/WebUIConsoleServlet.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/WebUIConsoleServlet.java?rev=823716&view=auto
==============================================================================
--- incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/WebUIConsoleServlet.java (added)
+++ incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/WebUIConsoleServlet.java Fri Oct 9 22:09:48 2009
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webconsole.plugin;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author Toni Menzel
+ */
+public class WebUIConsoleServlet extends HttpServlet {
+ public static final String LABEL = "apacheace";
+ public static final Object TITLE = "Apache ACE";
+
+ @Override
+ protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
+ // ACE WebUI is a full ajax UI, so rending this once should be enough:
+ httpServletResponse.getWriter().println("<iframe scrolling=\"no\" frameborder=\"0\" width=\"100%\" height=\"500pt\" src=\"/webui/webui-headless.html\" />");
+ }
+}
Propchange: incubator/ace/trunk/server/src/org/apache/ace/webconsole/plugin/WebUIConsoleServlet.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/ace/trunk/webui/war/webui-headless.html
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/webui/war/webui-headless.html?rev=823716&view=auto
==============================================================================
--- incubator/ace/trunk/webui/war/webui-headless.html (added)
+++ incubator/ace/trunk/webui/war/webui-headless.html Fri Oct 9 22:09:48 2009
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
+<!-- above set at the top of the file will set -->
+<!-- the browser's rendering engine into -->
+<!-- "Quirks Mode". Replacing this declaration -->
+<!-- with a "Standards Mode" doctype is supported, -->
+<!-- but may lead to some differences in layout. -->
+
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+ <!-- -->
+ <!-- Consider inlining CSS to reduce the number of requested files -->
+ <!-- -->
+ <link type="text/css" rel="stylesheet" href="webui.css">
+ <style type="text/css">
+ .header {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ right: 0px;
+ height: 0px;
+ border-bottom-style: none;
+ border-bottom-width: 0px;
+ }
+
+ .body {
+ position: absolute;
+ left: 0px;
+ right: 0px;
+ top: 0px;
+ bottom: 0px;
+ }
+ </style>
+
+ <!-- -->
+ <!-- Any title is fine -->
+ <!-- -->
+ <title>Apache ACE</title>
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script type="text/javascript" language="javascript" src="webui/webui.nocache.js"></script>
+</head>
+
+<!-- -->
+<!-- The body can have arbitrary html, or -->
+<!-- you can leave the body empty if you want -->
+<!-- to create a completely dynamic UI. -->
+<!-- -->
+<body>
+
+ <!-- OPTIONAL: include this if you want history support -->
+ <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
+ <div id="body" class="body"></div>
+</body>
+</html>
Propchange: incubator/ace/trunk/webui/war/webui-headless.html
------------------------------------------------------------------------------
svn:mime-type = text/plain