Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-07-19 14:13:43 -0400
committerChristopher Frost2012-07-19 14:13:43 -0400
commit4bff78c60d2867204a0a951a5da416484e4f5d4b (patch)
tree12b53af1e86366e879b19fe78b52d5f7f6bf48e3 /org.eclipse.virgo.management.console
parent6e5df132ed44b311654d449b60310fb1151ed523 (diff)
downloadorg.eclipse.virgo.kernel-4bff78c60d2867204a0a951a5da416484e4f5d4b.tar.gz
org.eclipse.virgo.kernel-4bff78c60d2867204a0a951a5da416484e4f5d4b.tar.xz
org.eclipse.virgo.kernel-4bff78c60d2867204a0a951a5da416484e4f5d4b.zip
(352217) Fixes to the QuasiMBean but not including Region information
Diffstat (limited to 'org.eclipse.virgo.management.console')
-rw-r--r--org.eclipse.virgo.management.console/.classpath1
-rw-r--r--org.eclipse.virgo.management.console/ivy.xml6
-rw-r--r--org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/UploadServlet.java18
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js13
4 files changed, 20 insertions, 18 deletions
diff --git a/org.eclipse.virgo.management.console/.classpath b/org.eclipse.virgo.management.console/.classpath
index 48e93a91..1f64a1a0 100644
--- a/org.eclipse.virgo.management.console/.classpath
+++ b/org.eclipse.virgo.management.console/.classpath
@@ -22,7 +22,6 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.jolokia/org.jolokia.osgi/1.0.2/org.jolokia.osgi-1.0.2.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/APPS_IVY_CACHE/javax.servlet/com.springsource.javax.servlet/2.5.0/com.springsource.javax.servlet-sources-2.5.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.1.0.D-20100218173020/org.eclipse.virgo.util.io-sources-2.1.0.D-20100218173020.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.management.console/ivy.xml b/org.eclipse.virgo.management.console/ivy.xml
index a74542c2..efc70a99 100644
--- a/org.eclipse.virgo.management.console/ivy.xml
+++ b/org.eclipse.virgo.management.console/ivy.xml
@@ -18,14 +18,10 @@
<dependency org="org.eclipse.virgo.mirrored" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
<dependency org="org.eclipse.virgo.mirrored" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="provided->runtime"/>
<dependency org="org.eclipse.virgo.mirrored" name="org.slf4j.api" rev="${org.slf4j.api}" conf="provided->runtime"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.io" rev="${org.eclipse.virgo.util}" conf="provided->runtime"/>
-
- <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.fileupload" rev="${org.apache.commons.fileupload}" conf="provided->runtime"/>
<dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.fileupload" rev="${org.apache.commons.fileupload}" conf="provided->runtime"/>
<dependency org="org.jolokia" name="org.jolokia.osgi" rev="${org.jolokia.osgi}" conf="provided->runtime"/>
-
-
<dependency org="org.eclipse.gemini" name="org.eclipse.gemini.management" rev="${org.eclipse.gemini.management}" conf="provided->runtime"/>
<dependency org="org.eclipse.osgi" name="org.eclipse.equinox.http" rev="${org.eclipse.equinox.http}" conf="provided->runtime"/>
<!-- === TEST ====================================================== -->
diff --git a/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/UploadServlet.java b/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/UploadServlet.java
index edf07752..f8923ea8 100644
--- a/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/UploadServlet.java
+++ b/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/UploadServlet.java
@@ -25,7 +25,6 @@ import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.eclipse.virgo.util.io.PathReference;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -69,12 +68,10 @@ public class UploadServlet extends HttpServlet {
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
-
- createStagingDirectory();
-
- FileItemFactory factory = new DiskFileItemFactory();
- ServletFileUpload upload = new ServletFileUpload(factory);
try {
+ createStagingDirectory();
+ FileItemFactory factory = new DiskFileItemFactory();
+ ServletFileUpload upload = new ServletFileUpload(factory);
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
writer.append("<ol id=\"uploadLocations\">");
@@ -95,15 +92,16 @@ public class UploadServlet extends HttpServlet {
writer.close();
} catch (Exception e) {
log.error(e.toString());
- e.printStackTrace();
response.sendError(HTTP_RESPONSE_INTERNAL_SERVER_ERROR);
}
}
- private void createStagingDirectory() {
- PathReference pathReference = new PathReference(new File(String.format("%s%s", this.serverHome, STAGING_DIR)));
+ private void createStagingDirectory() throws IOException {
+ File pathReference = new File(String.format("%s%s", this.serverHome, STAGING_DIR));
if (!pathReference.exists()) {
- pathReference.createDirectory();
+ if (!pathReference.mkdirs()) {
+ throw new IOException("Unable to create directory " + pathReference.getPath());
+ }
}
}
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js b/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
index b0a82775..732f80d0 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
@@ -21,6 +21,7 @@ function pageinit(){
dataType: 'json',
success: function (response) {
$('#dumpLocation').text("Location: " + response.value);
+ dumpViewer.setDumpLocation(response.value);
}
});
}
@@ -31,6 +32,10 @@ var DumpViewer = function(){
self.selectedDump = null;
+ self.setDumpLocation = function(dumpLocation){
+ self.dumpLocation = dumpLocation;
+ };
+
self.displayDumps = function(){
$('#dumps').empty();
$.ajax({
@@ -160,7 +165,7 @@ var DumpViewer = function(){
var height = 562;
$('#bundle-canvas').css({'width' : width, 'height' : height + 18});
- var dataSource = new QuasiDataSource();
+ var dataSource = new QuasiDataSource(self.dumpLocation + '/' + dumpId);
dataSource.updateData(function(){
new LayoutManager(Raphael('bundle-canvas', width, height), dataSource).displayBundle(5);
});
@@ -203,10 +208,14 @@ var DumpViewer = function(){
* UpdateBundle
*
*/
-var QuasiDataSource = function(){
+var QuasiDataSource = function(dumpFolder){
var self = this;
+ self.dumpFolder = dumpFolder;
+
+ alert(self.dumpFolder);
+
self.bundles = {};
self.services = {};

Back to the top