[webconsole] minor fixes to the OBR plugin, fix legal stuff

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@921467 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/NOTICE b/webconsole/NOTICE
index 36340b5..9f55c85 100644
--- a/webconsole/NOTICE
+++ b/webconsole/NOTICE
@@ -50,6 +50,9 @@
 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
 
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
index 954d7a9..500db13 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
@@ -393,10 +393,7 @@
             }
 
             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();
diff --git a/webconsole/src/main/resources/res/ui/jquery.uuid.js b/webconsole/src/main/resources/res/ui/jquery.uuid.js
deleted file mode 100644
index f22bf2d..0000000
--- a/webconsole/src/main/resources/res/ui/jquery.uuid.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-Usage 1: define the default prefix by using an object with the property prefix as a parameter which contains a string value; {prefix: 'id'}
-Usage 2: call the function jQuery.uuid() with a string parameter p to be used as a prefix to generate a random uuid;
-Usage 3: call the function jQuery.uuid() with no parameters to generate a uuid with the default prefix; defaul prefix: '' (empty string)
-*/
-
-/*
-Generate fragment of random numbers
-*/
-jQuery._uuid_default_prefix = '';
-jQuery._uuidlet = function () {
-	return(((1+Math.random())*0x10000)|0).toString(16).substring(1);
-};
-/*
-Generates random uuid
-*/
-jQuery.uuid = function (p) {
-	if (typeof(p) == 'object' && typeof(p.prefix) == 'string') {
-		jQuery._uuid_default_prefix = p.prefix;
-	} else {
-		p = p || jQuery._uuid_default_prefix || '';
-		return(p+jQuery._uuidlet()+jQuery._uuidlet()+"-"+jQuery._uuidlet()+"-"+jQuery._uuidlet()+"-"+jQuery._uuidlet()+"-"+jQuery._uuidlet()+jQuery._uuidlet()+jQuery._uuidlet());
-	};
-};
\ No newline at end of file
diff --git a/webconsole/src/main/resources/res/ui/obr.js b/webconsole/src/main/resources/res/ui/obr.js
index 3b2c9fc..2d5bc0a 100644
--- a/webconsole/src/main/resources/res/ui/obr.js
+++ b/webconsole/src/main/resources/res/ui/obr.js
@@ -45,6 +45,12 @@
   };
 }
 
+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 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 @@
             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 @@
                             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
diff --git a/webconsole/src/main/resources/templates/obr.html b/webconsole/src/main/resources/templates/obr.html
index 9797d5c..6f1ae5a 100644
--- a/webconsole/src/main/resources/templates/obr.html
+++ b/webconsole/src/main/resources/templates/obr.html
@@ -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 @@
 <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>