FELIX-1988 Apply 12.bundles_plugin.patch by Valentin Valchev (thanks)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@911439 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/templates/bundles.html b/webconsole/src/main/resources/templates/bundles.html
new file mode 100644
index 0000000..4221f30
--- /dev/null
+++ b/webconsole/src/main/resources/templates/bundles.html
@@ -0,0 +1,86 @@
+<script type="text/javascript" src="${appRoot}/res/ui/bundles.js"></script>
+<script type="text/javascript">
+// <![CDATA[
+var startLevel = ${startLevel};
+var drawDetails = ${drawDetails};
+var currentBundle = ${currentBundle};
+var __bundles__ = ${__bundles__};
+var i18n = {
+ 'Symbolic Name' : '${bundles.name.symb}',
+ 'Version' : '${version}',
+ 'Bundle Location' : '${bundles.location}',
+ 'Last Modification' : '${bundles.lastMod}',
+ 'Bundle Documentation': '${bundles.doc}',
+ 'Vendor' : '${bundles.vendor}',
+ 'Copyright' : '${bundles.copyright}',
+ 'Description' : '${bundles.description}',
+ 'Start Level' : '${bundles.startlevel}',
+ 'Bundle Classpath' : '${bundles.classpath}',
+ 'Exported Packages' : '${bundles.pkg.exported}',
+ 'Imported Packages' : '${bundles.pkg.imported}',
+ 'Importing Bundles' : '${bundles.pkg.importingBundles}',
+ 'Manifest Headers' : '${bundles.manifest.headers}',
+ 'Host Bundles' : '${bundles.hosts}',
+ 'Fragments Attached' : '${bundles.framents}',
+ 'Vendor' : '${bundles.vendor}',
+ // actions
+ 'Start' : '${start}',
+ 'Stop' : '${stop}',
+ 'Update' : '${bundles.update}',
+ 'Uninstall' : '${bundles.uninstall}',
+ 'Refresh Package Imports' : '${bundles.refreshImports}',
+ //
+ statline : '${bundles.statline}'
+}
+// ]]>
+</script>
+
+<!-- status line -->
+<p class="statline"> </p>
+
+<!-- top header -->
+<form method="post" enctype="multipart/form-data" action="">
+ <div class="ui-widget-header ui-corner-top buttonGroup">
+ <input name="action" value="install" type="hidden" />
+ <input name="bundlestart" value="start" type="hidden" />
+ <input name="bundlestartlevel" value="5" type="hidden" />
+ <input name="bundlefile" style="margin-left: 10px;" type="file" />
+ <input value="${bundles.install_or_update}" style="margin-left: 10px;" type="submit" />
+ <button class="reloadButton" type="button" name="reload" style="margin-left: 60px;">${reload}</button>
+ <button class="installButton" type="button" name="install">${bundles.install_update}</button>
+ <button class="refreshPackages" type="button" name="refresh">${bundles.refreshPkg}</button>
+ </div>
+</form>
+
+<table id="plugin_table" class="tablesorter nicetable noauto">
+ <thead>
+ <tr>
+ <th class="col_Id">${id}</th>
+ <th class="col_Name">${bundles.name}</th>
+ <th class="col_Version">${version}</th>
+ <th class="col_Symbolic_Name">${bundles.name.symb}</th>
+ <th class="col_Status">${bundles.status}</th>
+ <th class="col_Actions">${bundles.actions}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr><td colspan="6"> </td></tr>
+ </tbody>
+</table>
+
+<!-- bottom header -->
+<form method="post" enctype="multipart/form-data" action="">
+ <div class="ui-widget-header ui-corner-bottom buttonGroup">
+ <input name="action" value="install" type="hidden" />
+ <input name="bundlestart" value="start" type="hidden" />
+ <input name="bundlestartlevel" value="5" type="hidden" />
+ <input name="bundlefile" style="margin-left: 10px;" type="file" />
+ <input value="${bundles.install_or_update}" style="margin-left: 10px;" type="submit" />
+ <button class="reloadButton" type="button" name="reload" style="margin-left: 60px;">${reload}</button>
+ <button class="installButton" type="button" name="install">${bundles.install_update}</button>
+ <button class="refreshPackages" type="button" name="refresh">${bundles.refreshPkg}</button>
+ </div>
+</form>
+
+<!-- status line -->
+<p class="statline"> </p>
diff --git a/webconsole/src/main/resources/templates/bundles_upload.html b/webconsole/src/main/resources/templates/bundles_upload.html
new file mode 100644
index 0000000..18f9b52
--- /dev/null
+++ b/webconsole/src/main/resources/templates/bundles_upload.html
@@ -0,0 +1,33 @@
+<!--<script type="text/javascript" src="res/ui/bundles.js"></script>-->
+<script type="text/javascript" src="res/lib/jquery.multifile-1.4.6.js"></script>
+
+<form method="post" enctype="multipart/form-data" action="../" style="width:50%">
+
+ <!-- top heading -->
+ <div class="ui-widget-header ui-corner-top buttonGroup">
+ <input type="hidden" name="action" value="install"/>
+ ${bundles.upload.caption}
+ </div>
+
+ <table class="nicetable">
+ <tr>
+ <td style="text-align:right">${bundles.upload.start}</td>
+ <td><input type="checkbox" name="bundlestart" value="start"/></td>
+ </tr>
+ <tr>
+ <td style="text-align:right">${bundles.upload.level}</td>
+ <td><input class="input" type="text" name="bundlestartlevel" id="bundlestartlevel" value="${startLevel}" size="4"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <input class="multi" accept="jar" type="file" name="bundlefile"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" style="text-align:center">
+ <input type="submit" value="${bundles.install_or_update}"/>
+ </td>
+ </tr>
+ </table>
+</form>