You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2010/03/10 18:37:44 UTC
svn commit: r921467 - in /felix/trunk/webconsole: NOTICE
src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
src/main/resources/res/ui/jquery.uuid.js src/main/resources/res/ui/obr.js
src/main/resources/templates/obr.html
Author: gnodet
Date: Wed Mar 10 17:37:43 2010
New Revision: 921467
URL: http://svn.apache.org/viewvc?rev=921467&view=rev
Log:
[webconsole] minor fixes to the OBR plugin, fix legal stuff
Removed:
felix/trunk/webconsole/src/main/resources/res/ui/jquery.uuid.js
Modified:
felix/trunk/webconsole/NOTICE
felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
felix/trunk/webconsole/src/main/resources/res/ui/obr.js
felix/trunk/webconsole/src/main/resources/templates/obr.html
Modified: felix/trunk/webconsole/NOTICE
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/NOTICE?rev=921467&r1=921466&r2=921467&view=diff
==============================================================================
--- felix/trunk/webconsole/NOTICE (original)
+++ felix/trunk/webconsole/NOTICE Wed Mar 10 17:37:43 2010
@@ -50,6 +50,9 @@ This product includes software from http
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Licensed under the BSD License
+This product includes software from the Mozilla Foundation
+Licensed under the MIT License
+
II. Used Software
Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java?rev=921467&r1=921466&r2=921467&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java Wed Mar 10 17:37:43 2010
@@ -393,10 +393,7 @@ public class BundleRepositoryRender exte
}
final RepositoryAdmin admin = getRepositoryAdmin();
- final List repos = new ArrayList();
- repos.add(admin.getSystemRepository());
- repos.addAll(Arrays.asList(admin.listRepositories()));
- Resolver resolver = admin.resolver((Repository[]) repos.toArray(new Repository[repos.size()]));
+ Resolver resolver = admin.resolver();
resolver.add(resource);
resolver.resolve(Resolver.NO_OPTIONAL_RESOURCES);
Resource[] required = resolver.getRequiredResources();
Modified: felix/trunk/webconsole/src/main/resources/res/ui/obr.js
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/obr.js?rev=921467&r1=921466&r2=921467&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/obr.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/obr.js Wed Mar 10 17:37:43 2010
@@ -45,6 +45,12 @@ if (!Array.prototype.map)
};
}
+var uid = 0;
+function guid() {
+ uid = uid + 1;
+ return (0x10000 + uid).toString(16).substring(1) + (((1+Math.random())*0x10000)|0).toString(16).substring(1);
+}
+
/* displays a date in the user's local timezone */
function localTm(time) {
return (time ? new Date(time) : new Date()).toLocaleString();
@@ -164,7 +170,7 @@ function getRequirementsByName(res, name
function createDetailedTable(enclosing, name, headers, rows, callback) {
if (rows && rows.length > 0) {
- var uuid = jQuery.uuid();
+ var uuid = guid();
var title = createElement('span', null, null, [
createElement('span', 'ui-icon ui-icon-triangle-1-e', { id: "img"+uuid, style: {display: "inline-block"} }),
text(" "),
@@ -301,11 +307,11 @@ function renderDetailedResource(res) {
createElement('form', 'button-group', { method: "post"}, [
createElement('input', null, { type: "hidden", name: "bundle", value: res.id}),
createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploy", value: "Deploy" }, [ text("dummy")]),
- createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploystart", value: "Start" }, [ text("dummy")]),
+ createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploystart", value: "Deploy and Start" }, [ text("dummy")]),
text(" "),
createElement('input', 'ui-state-default ui-corner-all', { id: "optional", type: "checkbox", name: "optional" }),
text(" "),
- createElement('label', 'ui-widget', { 'for': "optional" }, [ text("optional") ])
+ createElement('label', 'ui-widget', { 'for': "optional" }, [ text("deploy optional dependencies") ])
])
])
]));
@@ -368,7 +374,7 @@ function renderDetailedResource(res) {
return [ text(p.filter), text(""), text(p.optional) ];
});
// Imported services
- createDetailedTable(tbody, "Imported bundles", ["Service", "Optional"], getRequirementsByName(res, "service"), function(p) {
+ createDetailedTable(tbody, "Imported services", ["Service", "Optional"], getRequirementsByName(res, "service"), function(p) {
return [ text(p.filter), text(p.optional) ];
});
// Required dependencies
Modified: felix/trunk/webconsole/src/main/resources/templates/obr.html
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/templates/obr.html?rev=921467&r1=921466&r2=921467&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/templates/obr.html [UTF-8] (original)
+++ felix/trunk/webconsole/src/main/resources/templates/obr.html [UTF-8] Wed Mar 10 17:37:43 2010
@@ -1,4 +1,3 @@
-<script type="text/javascript" src="res/ui/jquery.uuid.js"></script>
<script type="text/javascript" src="res/ui/obr.js"></script>
<script type="text/javascript">
var i18n = {
@@ -48,33 +47,33 @@ var obrData = ${__data__};
<div class="ui-widget-header ui-corner-top buttonGroup">
<span style="float: left; margin-left: 1em">${obr.res.title}</span>
<span>
- <a href="obr?list=a">A</a>
- <a href="obr?list=b">B</a>
- <a href="obr?list=c">C</a>
- <a href="obr?list=d">D</a>
- <a href="obr?list=e">E</a>
- <a href="obr?list=f">F</a>
- <a href="obr?list=g">G</a>
- <a href="obr?list=h">H</a>
- <a href="obr?list=i">I</a>
- <a href="obr?list=j">J</a>
- <a href="obr?list=k">K</a>
- <a href="obr?list=l">L</a>
- <a href="obr?list=m">M</a>
- <a href="obr?list=n">N</a>
- <a href="obr?list=o">O</a>
- <a href="obr?list=p">P</a>
- <a href="obr?list=q">Q</a>
- <a href="obr?list=r">R</a>
- <a href="obr?list=s">S</a>
- <a href="obr?list=t">T</a>
- <a href="obr?list=u">U</a>
- <a href="obr?list=v">V</a>
- <a href="obr?list=w">W</a>
- <a href="obr?list=x">X</a>
- <a href="obr?list=y">Y</a>
- <a href="obr?list=z">Z</a>
- <a href="obr?list=-">?</a>
+ <a href="${pluginRoot}?list=a">A</a>
+ <a href="${pluginRoot}?list=b">B</a>
+ <a href="${pluginRoot}?list=c">C</a>
+ <a href="${pluginRoot}?list=d">D</a>
+ <a href="${pluginRoot}?list=e">E</a>
+ <a href="${pluginRoot}?list=f">F</a>
+ <a href="${pluginRoot}?list=g">G</a>
+ <a href="${pluginRoot}?list=h">H</a>
+ <a href="${pluginRoot}?list=i">I</a>
+ <a href="${pluginRoot}?list=j">J</a>
+ <a href="${pluginRoot}?list=k">K</a>
+ <a href="${pluginRoot}?list=l">L</a>
+ <a href="${pluginRoot}?list=m">M</a>
+ <a href="${pluginRoot}?list=n">N</a>
+ <a href="${pluginRoot}?list=o">O</a>
+ <a href="${pluginRoot}?list=p">P</a>
+ <a href="${pluginRoot}?list=q">Q</a>
+ <a href="${pluginRoot}?list=r">R</a>
+ <a href="${pluginRoot}?list=s">S</a>
+ <a href="${pluginRoot}?list=t">T</a>
+ <a href="${pluginRoot}?list=u">U</a>
+ <a href="${pluginRoot}?list=v">V</a>
+ <a href="${pluginRoot}?list=w">W</a>
+ <a href="${pluginRoot}?list=x">X</a>
+ <a href="${pluginRoot}?list=y">Y</a>
+ <a href="${pluginRoot}?list=z">Z</a>
+ <a href="${pluginRoot}?list=-">?</a>
</span>
<input type="text" id="searchField"/>
<button id="searchBtn">${obr.action.search}</button>