2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Updated Data Miner to GXT3 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@126844 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0c668ecc1a
commit
b810bcbd83
|
@ -27,12 +27,17 @@ import com.google.gwt.user.client.ui.HTML;
|
|||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.core.client.util.Padding;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer.HorizontalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.Viewport;
|
||||
|
@ -51,7 +56,6 @@ public class DataMinerManager implements EntryPoint {
|
|||
|
||||
private DataMinerManagerController dataMinerManagerController;
|
||||
|
||||
|
||||
private DataSpacePanel dataSpacePanel = new DataSpacePanel();
|
||||
// private InputSpacePanel inputSpacePanel = new InputSpacePanel();
|
||||
private ExperimentPanel experimentPanel = new ExperimentPanel();
|
||||
|
@ -104,8 +108,6 @@ public class DataMinerManager implements EntryPoint {
|
|||
|
||||
dataMinerManagerController = new DataMinerManagerController();
|
||||
|
||||
|
||||
|
||||
// Layout
|
||||
mainPanelLayout = new BorderLayoutContainer();
|
||||
mainPanelLayout.setId("mainPanelLayout");
|
||||
|
@ -270,10 +272,13 @@ public class DataMinerManager implements EntryPoint {
|
|||
*/
|
||||
private SimpleContainer createMenuPanel() {
|
||||
SimpleContainer topLc = new SimpleContainer();
|
||||
VerticalLayoutContainer lc = new VerticalLayoutContainer();
|
||||
// lc.setSize(640, 400);
|
||||
lc.addStyleName("smLayoutContainer");
|
||||
lc.addStyleName("smMenu");
|
||||
BoxLayoutData layoutData = new BoxLayoutData(new Margins(0, 0, 5, 0));
|
||||
|
||||
VBoxLayoutContainer lc = new VBoxLayoutContainer();
|
||||
lc.setPadding(new Padding(5));
|
||||
lc.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
|
||||
lc.setPack(BoxLayoutPack.CENTER);
|
||||
|
||||
|
||||
/*
|
||||
* LayoutContainer itemDataSpace = createMenuItem(
|
||||
|
@ -287,7 +292,7 @@ public class DataMinerManager implements EntryPoint {
|
|||
* lc.add(itemDataSpace);
|
||||
*/
|
||||
|
||||
HorizontalLayoutContainer itemExperiment = createMenuItem(
|
||||
SimpleContainer itemExperiment = createMenuItem(
|
||||
"Execute an Experiment",
|
||||
"This section allows to execute or prepare a Niche Modeling experiment. The section is endowed with a list of algorithms for training and executing statistical models for biological applications. Evaluation of the performances is possible by means of several kinds of measurement systems and processes.",
|
||||
resources.computationIcon(), new MouseDownHandler() {
|
||||
|
@ -299,7 +304,9 @@ public class DataMinerManager implements EntryPoint {
|
|||
|
||||
}
|
||||
});
|
||||
lc.add(itemExperiment,new VerticalLayoutData(300, 300, new Margins(0)));
|
||||
|
||||
lc.add(itemExperiment, layoutData);
|
||||
|
||||
/*
|
||||
* LayoutContainer itemJobs = createMenuItem( "Check the Computations",
|
||||
* "This section allows to check the status of the computation. A list of processes launched by the user is shown along with meta-information. By clicking on the completed jobs it is possible to visualize the data set contents."
|
||||
|
@ -310,6 +317,7 @@ public class DataMinerManager implements EntryPoint {
|
|||
* }); lc.add(itemJobs);
|
||||
*/
|
||||
topLc.add(lc);
|
||||
topLc.forceLayout();
|
||||
return topLc;
|
||||
}
|
||||
|
||||
|
@ -330,22 +338,33 @@ public class DataMinerManager implements EntryPoint {
|
|||
*/
|
||||
}
|
||||
|
||||
private HorizontalLayoutContainer createMenuItem(String title,
|
||||
String description, ImageResource imgResource,
|
||||
MouseDownHandler handle) {
|
||||
private SimpleContainer createMenuItem(String title, String description,
|
||||
ImageResource imgResource, MouseDownHandler handle) {
|
||||
HorizontalLayoutContainer horiz = new HorizontalLayoutContainer();
|
||||
|
||||
horiz.addDomHandler(handle, MouseDownEvent.getType());
|
||||
HorizontalLayoutData layoutData = new HorizontalLayoutData(100, 100,
|
||||
new Margins(5));
|
||||
|
||||
Image img = new Image(imgResource);
|
||||
|
||||
HTML text = new HTML("<b>" + title + "</b><br>" + description);
|
||||
text.addStyleName("smMenuItemText");
|
||||
|
||||
horiz.add(text, layoutData);
|
||||
horiz.add(img, layoutData);
|
||||
return horiz;
|
||||
HorizontalLayoutData textLayoutData = new HorizontalLayoutData(500,
|
||||
170, new Margins(10,5,10,10));
|
||||
HorizontalLayoutData imgLayoutData = new HorizontalLayoutData(100, 100,
|
||||
new Margins(10,10,10,5));
|
||||
|
||||
horiz.add(text, textLayoutData);
|
||||
horiz.add(img, imgLayoutData);
|
||||
|
||||
SimpleContainer container = new SimpleContainer();
|
||||
container.setWidth(600);
|
||||
container.setHeight(190);
|
||||
container.addStyleName("smLayoutContainer");
|
||||
container.addStyleName("smMenu");
|
||||
|
||||
container.add(horiz);
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
|
||||
<!-- Debug CSS style -->
|
||||
<set-configuration-property name="CssResource.style" value="pretty"
|
||||
/>
|
||||
|
||||
<!--
|
||||
<inherits name="org.gcube.portlets.user.tdw.TabularDataWidget" />
|
||||
|
|
|
@ -74,25 +74,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
@Override
|
||||
public void init() throws ServletException {
|
||||
super.init();
|
||||
|
||||
try {
|
||||
Class.forName("org.postgresql.Driver");
|
||||
} catch (ClassNotFoundException e) {
|
||||
// e.printStackTrace();
|
||||
throw new ServletException("Error initializing the db", e);
|
||||
}
|
||||
|
||||
//CSVTargetRegistry.getInstance().add(new DataMinerCSVTarget());
|
||||
//TargetRegistry.getInstance().add(new DataMinerFileTarget());
|
||||
//DataSourceFactoryRegistry.getInstance().add(
|
||||
// new DataMinerDataSourceFactory());
|
||||
|
||||
/*
|
||||
* try { // T();
|
||||
*
|
||||
* // feeds.schedule(); } catch (Exception e) { e.printStackTrace(); }
|
||||
*/
|
||||
|
||||
logger.info("DataMinerManager started!");
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared;
|
||||
|
||||
public class Constants {
|
||||
public static final boolean DEBUG_MODE = false;
|
||||
public static final boolean DEBUG_MODE = true;
|
||||
public static final boolean TEST_ENABLE = false;
|
||||
|
||||
public static final String APPLICATION_ID = "org.gcube.portlets.user.dataminermanager.portlet.DataMinerManager";
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
|
||||
<!-- Debug CSS style -->
|
||||
<set-configuration-property name="CssResource.style" value="pretty"
|
||||
/>
|
||||
|
||||
<!--
|
||||
<inherits name="org.gcube.portlets.user.tdw.TabularDataWidget" />
|
||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
}
|
||||
|
||||
.smMenu {
|
||||
width: 900px;
|
||||
height: 220px;
|
||||
padding-top: 50px;
|
||||
/*width: 900px;*/
|
||||
/*height: 220px;*/
|
||||
/*padding-top: 50px;*/
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
/*margin-left: 30px;*/
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css">
|
||||
<link type="text/css" rel="stylesheet" href="dataminermanager/reset.css">
|
||||
<link type="text/css" rel="stylesheet" href="DataMinerManager.css">
|
||||
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css">
|
||||
|
||||
<title>Data Miner Manager</title>
|
||||
<script type="text/javascript" language="javascript"
|
||||
|
|
|
@ -26,6 +26,12 @@ import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TestDataMinerService extends TestCase {
|
||||
|
||||
private static Logger logger = LoggerFactory
|
||||
|
|
Loading…
Reference in New Issue