refs 2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Added Equivalent GET Request git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128651 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
06c05f0dd3
commit
75e5ff27ac
|
@ -7,6 +7,7 @@ import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaR
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.MenuSwitchEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.experiments.ExperimentPanel;
|
||||
import org.gcube.portlets.user.dataminermanager.client.resources.Resources;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRegionType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRequestEventType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
|
||||
|
@ -197,11 +198,11 @@ public class DataMinerManager implements EntryPoint {
|
|||
switch(event.getMenuType()){
|
||||
case COMPUTATIONS:
|
||||
switchPanel(computationsPanel);
|
||||
fireDataMinerWorkAreareRequestUpdate();
|
||||
fireDataMinerWorkAreareRequestUpdate(DataMinerWorkAreaRegionType.Computations);
|
||||
break;
|
||||
case DATA_SPACE:
|
||||
switchPanel(dataSpacePanel);
|
||||
fireDataMinerWorkAreareRequestUpdate();
|
||||
fireDataMinerWorkAreareRequestUpdate(DataMinerWorkAreaRegionType.DataSets);
|
||||
break;
|
||||
case EXPERIMENT:
|
||||
switchPanel(experimentPanel);
|
||||
|
@ -216,9 +217,9 @@ public class DataMinerManager implements EntryPoint {
|
|||
|
||||
}
|
||||
|
||||
private void fireDataMinerWorkAreareRequestUpdate() {
|
||||
private void fireDataMinerWorkAreareRequestUpdate(DataMinerWorkAreaRegionType dataMinerWorkAreaRegionType) {
|
||||
DataMinerWorkAreaRequestEvent event = new DataMinerWorkAreaRequestEvent(
|
||||
DataMinerWorkAreaRequestEventType.UPDATE);
|
||||
DataMinerWorkAreaRequestEventType.UPDATE, dataMinerWorkAreaRegionType);
|
||||
EventBusProvider.INSTANCE.fireEvent(event);
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ public class DataMinerManagerController {
|
|||
DataMinerWorkAreaRequestEvent event) {
|
||||
Log.debug("Catch DataMinerWorkAreaRequestEvent: "
|
||||
+ event);
|
||||
retrieveDataMinerWorkArea();
|
||||
retrieveDataMinerWorkArea(event);
|
||||
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ public class DataMinerManagerController {
|
|||
EventBusProvider.INSTANCE.fireEvent(ocEvent);
|
||||
}
|
||||
|
||||
private void retrieveDataMinerWorkArea() {
|
||||
private void retrieveDataMinerWorkArea(final DataMinerWorkAreaRequestEvent event) {
|
||||
final StatusMonitor monitor = new StatusMonitor();
|
||||
DataMinerPortletServiceAsync.INSTANCE
|
||||
.getDataMinerWorkArea(new AsyncCallback<DataMinerWorkArea>() {
|
||||
|
@ -511,7 +511,7 @@ public class DataMinerManagerController {
|
|||
public void onSuccess(DataMinerWorkArea result) {
|
||||
monitor.hide();
|
||||
Log.debug("DataMinerWorkArea: " + result);
|
||||
fireDataMinerWorkAreaEventRetrieved(result);
|
||||
fireDataMinerWorkAreaEventRetrieved(event, result);
|
||||
|
||||
}
|
||||
|
||||
|
@ -519,10 +519,10 @@ public class DataMinerManagerController {
|
|||
|
||||
}
|
||||
|
||||
private void fireDataMinerWorkAreaEventRetrieved(DataMinerWorkArea result) {
|
||||
private void fireDataMinerWorkAreaEventRetrieved(DataMinerWorkAreaRequestEvent event, DataMinerWorkArea result) {
|
||||
dataMinerWorkArea = result;
|
||||
DataMinerWorkAreaEvent dataMinerWorkAreaEvent = new DataMinerWorkAreaEvent(
|
||||
DataMinerWorkAreaEventType.OPEN, result);
|
||||
DataMinerWorkAreaEventType.OPEN, event.getDataMinerWorkAreaRegionType(), result);
|
||||
EventBusProvider.INSTANCE.fireEvent(dataMinerWorkAreaEvent);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
private MultipleDNDUpload dnd;
|
||||
private WorkspaceResourcesExplorerPanel wsResourcesExplorerPanel;
|
||||
private TextButton btnShow;
|
||||
private TextButton btnOpen;
|
||||
private TextButton btnDownload;
|
||||
private TextButton btnDelete;
|
||||
private TextButton btnRefresh;
|
||||
private TextButton btnResubmit;
|
||||
|
@ -79,7 +79,6 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
setBodyStyle("backgroundColor:white;");
|
||||
setHeaderVisible(true);
|
||||
setResize(true);
|
||||
setAnimCollapse(false);
|
||||
setHeadingText("List of Computations");
|
||||
|
||||
}
|
||||
|
@ -124,8 +123,12 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void manageStateEvents(UIStateEvent event) {
|
||||
Log.debug("ComputationsPanel recieved UIStateEvent: "
|
||||
+ event.toString());
|
||||
Log.debug("ComputationsExecutedPanel recieved UIStateEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("UIStateEvent null");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.getUiStateType()) {
|
||||
case START:
|
||||
break;
|
||||
|
@ -140,8 +143,25 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
private void manageDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
|
||||
Log.debug("ComputationsPanel recieved UIStateEvent: "
|
||||
+ event.toString());
|
||||
Log.debug("ComputationsExecutedPanel recieved DataMinerWorkAreaEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("DataMinerWorkAreaEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaRegionType()) {
|
||||
case Computations:
|
||||
manageMyDataMinerWorkAreaEvents(event);
|
||||
break;
|
||||
case DataSets:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void manageMyDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
|
||||
switch (event.getDataMinerWorkAreaEventType()) {
|
||||
case OPEN:
|
||||
case UPDATE:
|
||||
|
@ -155,6 +175,12 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
private void manageRefreshDataMinerWorkAreaEvents(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("ComputationsExecutedPanel recieved RefreshDataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
if (event == null) {
|
||||
Log.error("RefreshDataMinerWorkAreaEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaElementType()) {
|
||||
case Computations:
|
||||
refreshWSResourceExplorerPanel();
|
||||
|
@ -292,12 +318,12 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
});
|
||||
|
||||
btnOpen = new TextButton("Open");
|
||||
btnDownload = new TextButton("Download");
|
||||
// btnOpen.setIcon(StatAlgoImporterResources.INSTANCE.download16());
|
||||
btnOpen.setScale(ButtonScale.SMALL);
|
||||
btnOpen.setIconAlign(IconAlign.LEFT);
|
||||
btnOpen.setToolTip("Open");
|
||||
btnOpen.addSelectHandler(new SelectHandler() {
|
||||
btnDownload.setScale(ButtonScale.SMALL);
|
||||
btnDownload.setIconAlign(IconAlign.LEFT);
|
||||
btnDownload.setToolTip("Download");
|
||||
btnDownload.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
|
@ -364,7 +390,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnShow, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnOpen, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDownload, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDelete, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnRefresh, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnResubmit, new BoxLayoutData(new Margins(0)));
|
||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.portlets.user.dataminermanager.client.computations;
|
|||
|
||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ComputationDataEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.RefreshDataMinerWorkAreaEvent;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
|
@ -23,8 +24,7 @@ import com.sencha.gxt.widget.core.client.container.MarginData;
|
|||
public class ComputationsPanel extends FramedPanel {
|
||||
private ComputationsExecutedPanel computationsExecutedPanel;
|
||||
private ComputationsViewerPanel computationsViewerPanel;
|
||||
|
||||
|
||||
|
||||
public ComputationsPanel() {
|
||||
super();
|
||||
init();
|
||||
|
@ -34,12 +34,14 @@ public class ComputationsPanel extends FramedPanel {
|
|||
|
||||
private void init() {
|
||||
setBodyStyle("backgroundColor:white;");
|
||||
setBodyBorder(true);
|
||||
setBorders(false);
|
||||
setBodyBorder(false);
|
||||
setHeadingText("Computations");
|
||||
setHeaderVisible(true);
|
||||
|
||||
}
|
||||
|
||||
private void bind(){
|
||||
|
||||
private void bind() {
|
||||
EventBusProvider.INSTANCE.addHandler(ComputationDataEvent.getType(),
|
||||
new ComputationDataEvent.ComputationDataEventHandler() {
|
||||
|
||||
|
@ -51,25 +53,61 @@ public class ComputationsPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
});
|
||||
EventBusProvider.INSTANCE
|
||||
.addHandler(
|
||||
RefreshDataMinerWorkAreaEvent.TYPE,
|
||||
new RefreshDataMinerWorkAreaEvent.RefreshDataMinerWorkAreaEventHandler() {
|
||||
|
||||
EventBusProvider.INSTANCE.addHandler(DataMinerWorkAreaEvent.TYPE,
|
||||
new DataMinerWorkAreaEvent.DataMinerWorkAreaEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onRefresh(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("Catch RefreshDataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
manageRefreshDataMinerWorkAreaEvents(event);
|
||||
public void onChange(DataMinerWorkAreaEvent event) {
|
||||
manageDataMinerWorkAreaEvents(event);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
EventBusProvider.INSTANCE
|
||||
.addHandler(
|
||||
RefreshDataMinerWorkAreaEvent.TYPE,
|
||||
new RefreshDataMinerWorkAreaEvent.RefreshDataMinerWorkAreaEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onRefresh(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("Catch RefreshDataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
manageRefreshDataMinerWorkAreaEvents(event);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void manageDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
Log.debug("ComputationsPanel recieved DataMinerWorkAreaEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("DataMinerWorkAreaEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaRegionType()) {
|
||||
case Computations:
|
||||
collapseComputationsViewer();
|
||||
break;
|
||||
case DataSets:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void manageRefreshDataMinerWorkAreaEvents(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("ComputationsPanel recieved RefreshDataMinerWorkAreaEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("RefreshDataMinerWorkAreaEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaElementType()) {
|
||||
case Computations:
|
||||
collapseComputationsViewer();
|
||||
|
@ -83,17 +121,16 @@ public class ComputationsPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void collapseComputationsViewer() {
|
||||
if(computationsViewerPanel.isExpanded()){
|
||||
if (computationsViewerPanel.isExpanded()) {
|
||||
computationsViewerPanel.collapse();
|
||||
}
|
||||
forceLayout();
|
||||
}
|
||||
|
||||
|
||||
private void expandsComputationsViewer() {
|
||||
if(computationsViewerPanel.isCollapsed()){
|
||||
if (computationsViewerPanel.isCollapsed()) {
|
||||
computationsViewerPanel.expand();
|
||||
}
|
||||
forceLayout();
|
||||
|
@ -102,23 +139,29 @@ public class ComputationsPanel extends FramedPanel {
|
|||
private void create() {
|
||||
computationsExecutedPanel = new ComputationsExecutedPanel();
|
||||
computationsViewerPanel = new ComputationsViewerPanel();
|
||||
|
||||
|
||||
MarginData centerData = new MarginData(0);
|
||||
|
||||
BorderLayoutData southData = new BorderLayoutData(0.5);
|
||||
southData.setMargins(new Margins(0));
|
||||
southData.setCollapsible(true);
|
||||
southData.setSplit(true);
|
||||
southData.setFloatable(false);
|
||||
southData.setCollapseMini(false);
|
||||
southData.setMargins(new Margins(5, 0, 0, 0));
|
||||
southData.setCollapseHidden(false);
|
||||
southData.setCollapsed(true);
|
||||
|
||||
BorderLayoutContainer borderLayoutContainer = new BorderLayoutContainer();
|
||||
borderLayoutContainer.setCenterWidget(computationsExecutedPanel, centerData);
|
||||
borderLayoutContainer.setSouthWidget(computationsViewerPanel, southData);
|
||||
borderLayoutContainer.setCenterWidget(computationsExecutedPanel,
|
||||
centerData);
|
||||
borderLayoutContainer
|
||||
.setSouthWidget(computationsViewerPanel, southData);
|
||||
|
||||
add(borderLayoutContainer, new MarginData(new Margins(0)));
|
||||
|
||||
|
||||
forceLayout();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.gcube.portlets.user.dataminermanager.client.computations;
|
|||
*/
|
||||
public enum ComputationsPropertiesType {
|
||||
OPERATOR_NAME("operator_name"), START_DATE("start_date"), END_DATE(
|
||||
"end_date"), STATUS("status"), EXECUTION_TYPE("execution_type"), VRE(
|
||||
"end_date"), STATUS("status"), EXECUTION_TYPE("execution_platform"), VRE(
|
||||
"VRE");
|
||||
|
||||
// COMPUTATION_ID("computation_id"),
|
||||
|
|
|
@ -58,9 +58,9 @@ public class ComputationsViewerPanel extends FramedPanel {
|
|||
setBodyStyle("backgroundColor:white;");
|
||||
setHeaderVisible(true);
|
||||
setResize(true);
|
||||
setAnimCollapse(false);
|
||||
setHeadingText("Computations Viewer");
|
||||
|
||||
setCollapsible(true);
|
||||
|
||||
}
|
||||
|
||||
private void create() {
|
||||
|
@ -124,7 +124,12 @@ public class ComputationsViewerPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void manageStateEvents(UIStateEvent event) {
|
||||
|
||||
Log.debug("ComputationsViewerPanel recieved UIStateEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("UIStateEvent null");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.getUiStateType()) {
|
||||
case START:
|
||||
break;
|
||||
|
@ -138,6 +143,11 @@ public class ComputationsViewerPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void manageDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
Log.debug("ComputationsViewerPanel recieved DataMinerWorkAreaEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("DataMinerWorkAreaEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaEventType()) {
|
||||
case OPEN:
|
||||
case UPDATE:
|
||||
|
@ -151,6 +161,11 @@ public class ComputationsViewerPanel extends FramedPanel {
|
|||
|
||||
private void manageRefreshDataMinerWorkAreaEvents(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("ComputationsViewerPanel recieved RefreshDataMinerWorkAreaEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("RefreshDataMinerWorkAreaEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaElementType()) {
|
||||
case Computations:
|
||||
resetPanel();
|
||||
|
|
|
@ -5,8 +5,9 @@ package org.gcube.portlets.user.dataminermanager.client.dataspace;
|
|||
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
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.BorderLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -16,6 +17,10 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
|
|||
*/
|
||||
public class DataSpacePanel extends FramedPanel {
|
||||
|
||||
private OutputDataSetsPanel computedDataPanel;
|
||||
private InputDataSetsPanel importedDataPanel;
|
||||
//private VerticalLayoutContainer v;
|
||||
|
||||
public DataSpacePanel() {
|
||||
super();
|
||||
init();
|
||||
|
@ -24,18 +29,75 @@ public class DataSpacePanel extends FramedPanel {
|
|||
|
||||
private void init() {
|
||||
setBodyStyle("backgroundColor:white;");
|
||||
setBodyBorder(true);
|
||||
setBorders(false);
|
||||
setBodyBorder(false);
|
||||
setHeadingText("Data Space");
|
||||
setHeaderVisible(true);
|
||||
}
|
||||
|
||||
private void create() {
|
||||
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||
InputDataSetsPanel importedDataPanel = new InputDataSetsPanel();
|
||||
OutputDataSetsPanel computedDataPanel = new OutputDataSetsPanel();
|
||||
v.add(importedDataPanel, new VerticalLayoutData(1, 0.5, new Margins(0)));
|
||||
|
||||
|
||||
computedDataPanel = new OutputDataSetsPanel();
|
||||
importedDataPanel = new InputDataSetsPanel();
|
||||
|
||||
MarginData centerData = new MarginData(0);
|
||||
|
||||
BorderLayoutData southData = new BorderLayoutData(0.5);
|
||||
southData.setMargins(new Margins(0));
|
||||
southData.setCollapsible(true);
|
||||
southData.setSplit(true);
|
||||
southData.setFloatable(false);
|
||||
southData.setCollapseMini(false);
|
||||
southData.setMargins(new Margins(5, 0, 0, 0));
|
||||
southData.setCollapseHidden(false);
|
||||
|
||||
BorderLayoutContainer borderLayoutContainer = new BorderLayoutContainer();
|
||||
borderLayoutContainer.setCenterWidget(computedDataPanel, centerData);
|
||||
borderLayoutContainer.setSouthWidget(importedDataPanel, southData);
|
||||
|
||||
add(borderLayoutContainer, new MarginData(new Margins(0)));
|
||||
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* v = new VerticalLayoutContainer();
|
||||
* computedDataPanel = new OutputDataSetsPanel();
|
||||
* importedDataPanel = new InputDataSetsPanel();
|
||||
* SplitBar splitBar = new SplitBar(LayoutRegion.NORTH,
|
||||
* importedDataPanel);
|
||||
*
|
||||
*
|
||||
* importedDataPanel.addCollapseHandler(this);
|
||||
* importedDataPanel.addExpandHandler(this);
|
||||
*
|
||||
* v.add(computedDataPanel, new VerticalLayoutData(1, 1, new
|
||||
* Margins(0))); v.add(importedDataPanel, new VerticalLayoutData(1, -1,
|
||||
* new Margins(0))); add(v);
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void onExpand(ExpandEvent event) {
|
||||
v.clear();
|
||||
v.add(computedDataPanel, new VerticalLayoutData(1, 0.5, new Margins(0)));
|
||||
add(v);
|
||||
v.add(importedDataPanel, new VerticalLayoutData(1, 0.5, new Margins(0)));
|
||||
importedDataPanel.expand();
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCollapse(CollapseEvent event) {
|
||||
v.clear();
|
||||
v.add(computedDataPanel, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
v.add(importedDataPanel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
importedDataPanel.collapse();
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ package org.gcube.portlets.user.dataminermanager.client.dataspace;
|
|||
*
|
||||
*/
|
||||
public enum DataSpacePropertiesType {
|
||||
COMPUTATION_ID("computation_id"), DATA_DESCRIPTION(
|
||||
"data_description"), CREATION_DATE("creation_date"), DATA_ID(
|
||||
"data_id"), DATA_TYPE("data_type"), OPERATOR_NAME("operator"), VRE("VRE");
|
||||
COMPUTATION_ID("computation_id"), DATA_DESCRIPTION("data_description"), CREATION_DATE(
|
||||
"creation_date"), DATA_TYPE("data_type"), OPERATOR_NAME("operator_name"), VRE(
|
||||
"VRE");
|
||||
/**
|
||||
* @param text
|
||||
*/
|
||||
|
|
|
@ -51,11 +51,10 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
private Item selectedItem;
|
||||
private MultipleDNDUpload dnd;
|
||||
private WorkspaceResourcesExplorerPanel wsResourcesExplorerPanel;
|
||||
private TextButton btnOpen;
|
||||
private TextButton btnDownload;
|
||||
private TextButton btnDelete;
|
||||
private TextButton btnRefresh;
|
||||
private VerticalLayoutContainer v;
|
||||
|
||||
|
||||
public InputDataSetsPanel() {
|
||||
super();
|
||||
|
@ -75,8 +74,8 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
setHeaderVisible(true);
|
||||
setResize(true);
|
||||
setAnimCollapse(false);
|
||||
setCollapsible(true);
|
||||
setHeadingText("Input Data Sets");
|
||||
|
||||
}
|
||||
|
||||
private void bindToEvents() {
|
||||
|
@ -119,8 +118,11 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
private void manageStateEvents(UIStateEvent event) {
|
||||
Log.debug("InputDataSetsPanel recieved UIStateEvent: "
|
||||
+ event.toString());
|
||||
Log.debug("InputDataSetsPanel recieved UIStateEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("UIStateEvent null");
|
||||
return;
|
||||
}
|
||||
switch (event.getUiStateType()) {
|
||||
case START:
|
||||
break;
|
||||
|
@ -134,9 +136,25 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
private void manageDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
Log.debug("InputDataSetsPanel recieved DataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
if (event == null) {
|
||||
Log.error("DataMinerWorkAreaEvent");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaRegionType()) {
|
||||
case Computations:
|
||||
break;
|
||||
case DataSets:
|
||||
manageMyDataMinerWorkAreaEvents(event);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Log.debug("InputDataSetsPanel recieved UIStateEvent: "
|
||||
+ event.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private void manageMyDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
switch (event.getDataMinerWorkAreaEventType()) {
|
||||
case OPEN:
|
||||
case UPDATE:
|
||||
|
@ -150,6 +168,13 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
|
||||
private void manageRefreshDataMinerWorkAreaEvents(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("InputDataSetsPanel recieved RefreshDataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
if (event == null) {
|
||||
Log.error("RefreshDataMinerWorkAreaEvent");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.getDataMinerWorkAreaElementType()) {
|
||||
case Computations:
|
||||
break;
|
||||
|
@ -185,13 +210,14 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
List<String> showProperties = new ArrayList<String>();
|
||||
for(DataSpacePropertiesType dataSpaceProperties:DataSpacePropertiesType.values()){
|
||||
for (DataSpacePropertiesType dataSpaceProperties : DataSpacePropertiesType
|
||||
.values()) {
|
||||
showProperties.add(dataSpaceProperties.getLabel());
|
||||
}
|
||||
FilterCriteria filterCriteria = new FilterCriteria();
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
filterCriteria.setRequiredProperties(map);
|
||||
|
||||
|
||||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getInputDataSets().getFolder()
|
||||
.getId(), false, showProperties, filterCriteria);
|
||||
|
@ -272,16 +298,16 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
dnd.addWorkspaceUploadNotificationListener(workspaceUploaderListener);
|
||||
|
||||
// ToolBar
|
||||
btnOpen = new TextButton("Open");
|
||||
btnDownload = new TextButton("Download");
|
||||
// btnOpen.setIcon(StatAlgoImporterResources.INSTANCE.download16());
|
||||
btnOpen.setScale(ButtonScale.SMALL);
|
||||
btnOpen.setIconAlign(IconAlign.LEFT);
|
||||
btnOpen.setToolTip("Open");
|
||||
btnOpen.addSelectHandler(new SelectHandler() {
|
||||
btnDownload.setScale(ButtonScale.SMALL);
|
||||
btnDownload.setIconAlign(IconAlign.LEFT);
|
||||
btnDownload.setToolTip("Download");
|
||||
btnDownload.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
openFile();
|
||||
downloadFile();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -315,7 +341,7 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
});
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnOpen, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDownload, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDelete, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnRefresh, new BoxLayoutData(new Margins(0)));
|
||||
|
||||
|
@ -365,7 +391,7 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
Log.debug("Fired: " + deleteItemEvent);
|
||||
}
|
||||
|
||||
private void openFile() {
|
||||
private void downloadFile() {
|
||||
if (selectedItem != null && !selectedItem.isFolder()) {
|
||||
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
|
|
|
@ -51,7 +51,7 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
private Item selectedItem;
|
||||
private MultipleDNDUpload dnd;
|
||||
private WorkspaceResourcesExplorerPanel wsResourcesExplorerPanel;
|
||||
private TextButton btnOpen;
|
||||
private TextButton btnDownload;
|
||||
private TextButton btnDelete;
|
||||
private TextButton btnRefresh;
|
||||
private VerticalLayoutContainer v;
|
||||
|
@ -118,8 +118,11 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
private void manageStateEvents(UIStateEvent event) {
|
||||
Log.debug("OutputDataSetsPanel recieved UIStateEvent: "
|
||||
+ event.toString());
|
||||
Log.debug("OutputDataSetsPanel recieved UIStateEvent: " + event);
|
||||
if (event == null) {
|
||||
Log.error("UIStateEvent");
|
||||
return;
|
||||
}
|
||||
switch (event.getUiStateType()) {
|
||||
case START:
|
||||
break;
|
||||
|
@ -133,9 +136,25 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
private void manageDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
Log.debug("OutputDataSetsPanel recieved DataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
if (event == null) {
|
||||
Log.error("DataMinerWorkAreaEvent");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaRegionType()) {
|
||||
case Computations:
|
||||
break;
|
||||
case DataSets:
|
||||
manageMyDataMinerWorkAreaEvents(event);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Log.debug("OutputDataSetsPanel recieved UIStateEvent: "
|
||||
+ event.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private void manageMyDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
switch (event.getDataMinerWorkAreaEventType()) {
|
||||
case OPEN:
|
||||
case UPDATE:
|
||||
|
@ -149,6 +168,12 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
|
||||
private void manageRefreshDataMinerWorkAreaEvents(
|
||||
RefreshDataMinerWorkAreaEvent event) {
|
||||
Log.debug("OutputDataSetsPanel recieved RefreshDataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
if (event == null) {
|
||||
Log.error("RefreshDataMinerWorkAreaEvent");
|
||||
return;
|
||||
}
|
||||
switch (event.getDataMinerWorkAreaElementType()) {
|
||||
case Computations:
|
||||
break;
|
||||
|
@ -274,16 +299,16 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
dnd.addWorkspaceUploadNotificationListener(workspaceUploaderListener);
|
||||
|
||||
// ToolBar
|
||||
btnOpen = new TextButton("Open");
|
||||
btnDownload = new TextButton("Download");
|
||||
// btnOpen.setIcon(StatAlgoImporterResources.INSTANCE.download16());
|
||||
btnOpen.setScale(ButtonScale.SMALL);
|
||||
btnOpen.setIconAlign(IconAlign.LEFT);
|
||||
btnOpen.setToolTip("Open");
|
||||
btnOpen.addSelectHandler(new SelectHandler() {
|
||||
btnDownload.setScale(ButtonScale.SMALL);
|
||||
btnDownload.setIconAlign(IconAlign.LEFT);
|
||||
btnDownload.setToolTip("Download");
|
||||
btnDownload.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
openFile();
|
||||
downloadFile();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -317,7 +342,7 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
});
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnOpen, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDownload, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDelete, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnRefresh, new BoxLayoutData(new Margins(0)));
|
||||
|
||||
|
@ -368,7 +393,7 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
Log.debug("Fired: " + deleteItemEvent);
|
||||
}
|
||||
|
||||
private void openFile() {
|
||||
private void downloadFile() {
|
||||
if (selectedItem != null && !selectedItem.isFolder()) {
|
||||
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEventType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRegionType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
@ -21,6 +22,7 @@ public class DataMinerWorkAreaEvent extends
|
|||
|
||||
public static Type<DataMinerWorkAreaEventHandler> TYPE = new Type<DataMinerWorkAreaEventHandler>();
|
||||
private DataMinerWorkAreaEventType dataMinerWorkAreaEventType;
|
||||
private DataMinerWorkAreaRegionType dataMinerWorkAreaRegionType;
|
||||
private DataMinerWorkArea dataMinerWorkArea;
|
||||
|
||||
public interface DataMinerWorkAreaEventHandler extends EventHandler {
|
||||
|
@ -33,9 +35,12 @@ public class DataMinerWorkAreaEvent extends
|
|||
}
|
||||
|
||||
public DataMinerWorkAreaEvent(
|
||||
DataMinerWorkAreaEventType dataMinerWorkAreaEventType, DataMinerWorkArea dataMinerWorkArea) {
|
||||
DataMinerWorkAreaEventType dataMinerWorkAreaEventType,
|
||||
DataMinerWorkAreaRegionType dataMinerWorkAreaRegionType,
|
||||
DataMinerWorkArea dataMinerWorkArea) {
|
||||
this.dataMinerWorkAreaEventType = dataMinerWorkAreaEventType;
|
||||
this.dataMinerWorkArea=dataMinerWorkArea;
|
||||
this.dataMinerWorkAreaRegionType = dataMinerWorkAreaRegionType;
|
||||
this.dataMinerWorkArea = dataMinerWorkArea;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -65,13 +70,16 @@ public class DataMinerWorkAreaEvent extends
|
|||
return dataMinerWorkArea;
|
||||
}
|
||||
|
||||
public DataMinerWorkAreaRegionType getDataMinerWorkAreaRegionType() {
|
||||
return dataMinerWorkAreaRegionType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataMinerWorkAreaEvent [dataMinerWorkAreaEventType="
|
||||
+ dataMinerWorkAreaEventType + ", dataMinerWorkArea="
|
||||
+ dataMinerWorkAreaEventType + ", dataMinerWorkAreaRegionType="
|
||||
+ dataMinerWorkAreaRegionType + ", dataMinerWorkArea="
|
||||
+ dataMinerWorkArea + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRegionType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRequestEventType;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
@ -21,6 +22,7 @@ public class DataMinerWorkAreaRequestEvent
|
|||
|
||||
public static Type<DataMinerWorkAreaRequestEventHandler> TYPE = new Type<DataMinerWorkAreaRequestEventHandler>();
|
||||
private DataMinerWorkAreaRequestEventType dataMinerWorkAreaRequestEventType;
|
||||
private DataMinerWorkAreaRegionType dataMinerWorkAreaRegionType;
|
||||
|
||||
public interface DataMinerWorkAreaRequestEventHandler extends EventHandler {
|
||||
void onRequest(DataMinerWorkAreaRequestEvent event);
|
||||
|
@ -33,8 +35,10 @@ public class DataMinerWorkAreaRequestEvent
|
|||
}
|
||||
|
||||
public DataMinerWorkAreaRequestEvent(
|
||||
DataMinerWorkAreaRequestEventType dataMinerWorkAreaRequestEventType) {
|
||||
DataMinerWorkAreaRequestEventType dataMinerWorkAreaRequestEventType,
|
||||
DataMinerWorkAreaRegionType dataMinerWorkAreaRegionType) {
|
||||
this.dataMinerWorkAreaRequestEventType = dataMinerWorkAreaRequestEventType;
|
||||
this.dataMinerWorkAreaRegionType = dataMinerWorkAreaRegionType;
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,10 +65,16 @@ public class DataMinerWorkAreaRequestEvent
|
|||
return dataMinerWorkAreaRequestEventType;
|
||||
}
|
||||
|
||||
public DataMinerWorkAreaRegionType getDataMinerWorkAreaRegionType() {
|
||||
return dataMinerWorkAreaRegionType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataMinerWorkAreaRequestEvent [dataMinerWorkAreaRequestEventType="
|
||||
+ dataMinerWorkAreaRequestEventType + "]";
|
||||
+ dataMinerWorkAreaRequestEventType
|
||||
+ ", dataMinerWorkAreaRegionType="
|
||||
+ dataMinerWorkAreaRegionType + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,12 +3,15 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.experiments;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.parametersfield.AbstractFld;
|
||||
import org.gcube.portlets.user.dataminermanager.client.parametersfield.ColumnFld;
|
||||
import org.gcube.portlets.user.dataminermanager.client.parametersfield.ColumnListFld;
|
||||
|
@ -16,6 +19,7 @@ import org.gcube.portlets.user.dataminermanager.client.parametersfield.OperatorF
|
|||
import org.gcube.portlets.user.dataminermanager.client.parametersfield.TabularFld;
|
||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnListParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
|
@ -73,6 +77,7 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
init();
|
||||
create();
|
||||
} catch (Throwable e) {
|
||||
Log.error("ComputationParametersPanel" + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +85,7 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
private void init() {
|
||||
setStylePrimaryName("workflow");
|
||||
setResize(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void create() {
|
||||
|
@ -90,7 +95,7 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
Image img = new Image(GWT.getModuleBaseURL() + "../images/operators/"
|
||||
+ (operator.hasImage() ? operator.getId() : "DEFAULT_IMAGE")
|
||||
+ ".png");
|
||||
img.setStylePrimaryName("workflow-icon");//-15
|
||||
img.setStylePrimaryName("workflow-icon");// -15
|
||||
v.add(img, new VerticalLayoutData(-1, -1, new Margins(-15, 0, 0, 5)));
|
||||
|
||||
HtmlLayoutContainer title = new HtmlLayoutContainer("<span>"
|
||||
|
@ -100,15 +105,15 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
|
||||
String descr = operator.getDescription();
|
||||
descr = (descr == null || descr.contentEquals("")) ? "no-description"
|
||||
: operator.getDescription();//display:block;clear:both;'
|
||||
HtmlLayoutContainer description = new HtmlLayoutContainer("<span style='padding-left:10px;padding-right:10px'>"
|
||||
+ descr + "</span>");
|
||||
: operator.getDescription();// display:block;clear:both;'
|
||||
HtmlLayoutContainer description = new HtmlLayoutContainer(
|
||||
"<span style='padding-left:10px;padding-right:10px;'>" + descr
|
||||
+ "</span>");
|
||||
description.addStyleName("workflow-description");
|
||||
v.add(description, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||
|
||||
//addTitleField();
|
||||
|
||||
|
||||
// addTitleField();
|
||||
|
||||
parametersPanel = new FormPanel() {
|
||||
@Override
|
||||
public boolean isValid(boolean preventMark) {
|
||||
|
@ -125,29 +130,29 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
};
|
||||
//parametersPanel = new FramedPanel();
|
||||
// parametersPanel = new FramedPanel();
|
||||
parametersPanel.setBorders(false);
|
||||
parametersPanel.getElement().getStyle().setPaddingBottom(20, Unit.PX);
|
||||
|
||||
|
||||
parametersFieldSet = new FieldSet();
|
||||
parametersFieldSet.setHeadingText("Parameters");
|
||||
|
||||
|
||||
vParameters = new VerticalLayoutContainer();
|
||||
|
||||
|
||||
Image imgLoading = new Image(PRELOAD_IMAGE);
|
||||
vParameters.add(imgLoading, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
vParameters.add(imgLoading, new VerticalLayoutData(1, -1,
|
||||
new Margins(0)));
|
||||
|
||||
parametersFieldSet.add(vParameters, new MarginData(new Margins(0)));
|
||||
parametersFieldSet.setCollapsible(false);
|
||||
parametersPanel.add(parametersFieldSet);
|
||||
|
||||
|
||||
v.add(parametersPanel, new VerticalLayoutData(1, -1, new Margins(5)));
|
||||
|
||||
|
||||
submit = new TextButton("Start Computation");
|
||||
submit.setToolTip(START_BUTTON_TOOLTIP);
|
||||
submit.setIcon(DataMinerManager.resources.startComputation());
|
||||
|
||||
|
||||
|
||||
submit.getElement().getStyle().setMarginLeft(20, Unit.PX);
|
||||
submit.getElement().getStyle().setMarginBottom(20, Unit.PX);
|
||||
|
||||
|
@ -157,33 +162,28 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
public void onSelect(SelectEvent event) {
|
||||
if (handler != null && parametersPanel.isValid()) {
|
||||
handler.startComputation(); // TODO insert
|
||||
// description
|
||||
// description
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
v.add(submit);
|
||||
//, new VerticalLayoutData(-1, -1, new Margins(0, 0, 20, 20)));
|
||||
// , new VerticalLayoutData(-1, -1, new Margins(0, 0, 20, 20)));
|
||||
submit.setVisible(false);
|
||||
|
||||
|
||||
|
||||
|
||||
forceLayout();
|
||||
loadOperatorParameters();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
private void addTitleField() {
|
||||
titleField = new TextField();
|
||||
titleField.setWidth(250);
|
||||
titleField.setValue(defaultComputationTitle);
|
||||
FieldLabel titleLabel = new FieldLabel(titleField, "Computation Title");
|
||||
titleLabel.addStyleName("workflow-computation-title");
|
||||
v.add(titleLabel, new VerticalLayoutData(-1, -1,
|
||||
new Margins(0)));
|
||||
}*/
|
||||
* private void addTitleField() { titleField = new TextField();
|
||||
* titleField.setWidth(250); titleField.setValue(defaultComputationTitle);
|
||||
* FieldLabel titleLabel = new FieldLabel(titleField, "Computation Title");
|
||||
* titleLabel.addStyleName("workflow-computation-title"); v.add(titleLabel,
|
||||
* new VerticalLayoutData(-1, -1, new Margins(0))); }
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param parametersPanel
|
||||
|
@ -201,11 +201,21 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
UtilsGXT3.alert("Error ",
|
||||
"Impossible to retrieve parameters.");
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session!");
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
|
||||
Log.error("Impossible to retrieve parameters. "
|
||||
+ caught.getLocalizedMessage());
|
||||
caught.printStackTrace();
|
||||
UtilsGXT3.alert("Error ",
|
||||
"Impossible to retrieve parameters. "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -264,13 +274,15 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
}
|
||||
}
|
||||
}
|
||||
parametersPanel.getElement().getStyle().setPaddingBottom(0, Unit.PX);
|
||||
parametersPanel.getElement().getStyle()
|
||||
.setPaddingBottom(0, Unit.PX);
|
||||
submit.setVisible(true);
|
||||
parametersPanel.forceLayout();
|
||||
forceLayout();
|
||||
|
||||
|
||||
} catch (Throwable e) {
|
||||
Log.error("Error in show form:" + e.getLocalizedMessage());
|
||||
Log.error("Error: "+Arrays.asList(e.getStackTrace()).toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -294,6 +306,4 @@ public class ComputationParametersPanel extends SimpleContainer {
|
|||
this.handler = handler;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ public class OperatorsPanel extends FramedPanel {
|
|||
private void init() {
|
||||
setHeadingText("Operators");
|
||||
setBodyStyle("backgroundColor:white;");
|
||||
setCollapsible(true);
|
||||
}
|
||||
|
||||
private void bind() {
|
||||
|
|
|
@ -66,16 +66,27 @@ public class TabularFld extends AbstractFld implements
|
|||
public TabularFld(Parameter parameter) {
|
||||
super(parameter);
|
||||
Log.debug("TabularField");
|
||||
tabularParameter = (TabularParameter) parameter;
|
||||
|
||||
SimpleContainer tabContainer = new SimpleContainer();
|
||||
vp = new VerticalLayoutContainer();
|
||||
init();
|
||||
try {
|
||||
tabularParameter = (TabularParameter) parameter;
|
||||
|
||||
SimpleContainer tabContainer = new SimpleContainer();
|
||||
vp = new VerticalLayoutContainer();
|
||||
init();
|
||||
|
||||
createField(tabContainer);
|
||||
showNoSelectionField();
|
||||
} catch (Throwable e) {
|
||||
Log.error("TabularField: " + e.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error", "Error creating Tabular Field: "+e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void createField(SimpleContainer tabContainer) {
|
||||
List<String> templates = tabularParameter.getTemplates();
|
||||
if (templates == null || templates.isEmpty()) {
|
||||
templatesList = new HtmlLayoutContainer(
|
||||
"<p></p>");
|
||||
templatesList = new HtmlLayoutContainer("<p></p>");
|
||||
templatesList.addStyleName("workflow-parameters-description");
|
||||
} else {
|
||||
String list = "";
|
||||
|
@ -113,113 +124,129 @@ public class TabularFld extends AbstractFld implements
|
|||
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||
|
||||
fieldContainer.add(horiz);
|
||||
showNoSelectionField();
|
||||
|
||||
}
|
||||
|
||||
private void init() {
|
||||
private void init() throws Exception {
|
||||
try {
|
||||
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
||||
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
||||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||
|
||||
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
||||
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
||||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||
try {
|
||||
/*
|
||||
* "application/zip", "application/x-zip",
|
||||
* "application/x-zip-compressed", "application/octet-stream",
|
||||
* "application/x-compress", "application/x-compressed",
|
||||
* "multipart/x-zip"
|
||||
*/
|
||||
// List<String> allowedMimeTypes =
|
||||
// Arrays.asList("text/csv","text/plain","text/plain; charset=ISO-8859-1");
|
||||
|
||||
/*
|
||||
* "application/zip", "application/x-zip",
|
||||
* "application/x-zip-compressed", "application/octet-stream",
|
||||
* "application/x-compress", "application/x-compressed",
|
||||
* "multipart/x-zip"
|
||||
*/
|
||||
// List<String> allowedMimeTypes =
|
||||
// Arrays.asList("text/csv","text/plain","text/plain; charset=ISO-8859-1");
|
||||
/**
|
||||
* "zip"
|
||||
*/
|
||||
|
||||
/**
|
||||
* "zip"
|
||||
*/
|
||||
/*
|
||||
* List<String> allowedFileExtensions = Arrays.asList("csv");
|
||||
*
|
||||
* FilterCriteria filterCriteria = new
|
||||
* FilterCriteria(allowedMimeTypes, allowedFileExtensions, new
|
||||
* HashMap<String, String>());
|
||||
*/
|
||||
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV",
|
||||
false);
|
||||
// filterCriteria, selectableTypes);
|
||||
|
||||
/*
|
||||
* List<String> allowedFileExtensions = Arrays.asList("csv");
|
||||
*
|
||||
* FilterCriteria filterCriteria = new FilterCriteria(allowedMimeTypes,
|
||||
* allowedFileExtensions, new HashMap<String, String>());
|
||||
*/
|
||||
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
|
||||
// filterCriteria, selectableTypes);
|
||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||
|
||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
if (item.isFolder() || item.isRoot()) {
|
||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
||||
|
||||
if (item.isFolder() || item.isRoot()) {
|
||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
||||
} else {
|
||||
retrieveTableInformation(item);
|
||||
|
||||
} else {
|
||||
retrieveTableInformation(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable throwable) {
|
||||
Log.error("Error in create project: "
|
||||
+ throwable.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
throwable.getLocalizedMessage());
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAborted() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNotValidSelection() {
|
||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
||||
}
|
||||
};
|
||||
|
||||
wselectDialog
|
||||
.addWorkspaceExplorerSelectNotificationListener(handler);
|
||||
wselectDialog.setZIndex(XDOM.getTopZIndex());
|
||||
|
||||
} catch (Throwable e) {
|
||||
Log.error("TabularField error using WorkspaceExplorerSelectDialog: "
|
||||
+ e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new Exception(
|
||||
"TabularField error using WorkspaceExplorerSelectDialog: "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
selectButton = new TextButton("Select Data Set");
|
||||
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
wselectDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
selectButton.setIcon(DataMinerManager.resources.folderExplore());
|
||||
selectButton.setToolTip("Select Data Set");
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable throwable) {
|
||||
Log.error("Error in create project: "
|
||||
+ throwable.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error", throwable.getLocalizedMessage());
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
selectButton2 = new TextButton("");
|
||||
selectButton2.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onAborted() {
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
wselectDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
selectButton2.setIcon(DataMinerManager.resources.folderExplore());
|
||||
selectButton2.setToolTip("Select Another Data Set");
|
||||
|
||||
@Override
|
||||
public void onNotValidSelection() {
|
||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
||||
}
|
||||
};
|
||||
cancelButton = new TextButton("");
|
||||
cancelButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||
|
||||
wselectDialog.addWorkspaceExplorerSelectNotificationListener(handler);
|
||||
wselectDialog.setZIndex(XDOM.getTopZIndex());
|
||||
|
||||
selectButton = new TextButton("Select Data Set");
|
||||
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
wselectDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
selectButton.setIcon(DataMinerManager.resources.folderExplore());
|
||||
selectButton.setToolTip("Select Data Set");
|
||||
|
||||
selectButton2 = new TextButton("");
|
||||
selectButton2.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
wselectDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
selectButton2.setIcon(DataMinerManager.resources.folderExplore());
|
||||
selectButton2.setToolTip("Select Another Data Set");
|
||||
|
||||
cancelButton = new TextButton("");
|
||||
cancelButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
selectedTableItem = null;
|
||||
showNoSelectionField();
|
||||
updateListeners(null);
|
||||
}
|
||||
});
|
||||
|
||||
cancelButton.setIcon(DataMinerManager.resources.cancel());
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
selectedTableItem = null;
|
||||
showNoSelectionField();
|
||||
updateListeners(null);
|
||||
}
|
||||
});
|
||||
|
||||
cancelButton.setIcon(DataMinerManager.resources.cancel());
|
||||
} catch (Throwable e) {
|
||||
Log.error("TabularField init: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void retrieveTableInformation(Item item) {
|
||||
|
|
|
@ -41,9 +41,16 @@ public class TabularListFld extends AbstractFld {
|
|||
public TabularListFld(Parameter parameter) {
|
||||
super(parameter);
|
||||
Log.debug("TabularListField");
|
||||
try {
|
||||
tabularListParameter = (TabularListParameter) parameter;
|
||||
createField();
|
||||
} catch (Throwable e) {
|
||||
Log.error("TabularListField: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
tabularListParameter = (TabularListParameter) parameter;
|
||||
|
||||
private void createField() {
|
||||
vp = new VerticalLayoutContainer();
|
||||
items = new ArrayList<>();
|
||||
|
||||
|
@ -100,7 +107,8 @@ public class TabularListFld extends AbstractFld {
|
|||
if (upperItem == null) {
|
||||
TabItem item = new TabItem(this, tabPar, true);
|
||||
items.add(item);
|
||||
vp.add(item);//don't use new VerticalLayoutData(1, -1, new Margins(0))
|
||||
vp.add(item);// don't use new VerticalLayoutData(1, -1, new
|
||||
// Margins(0))
|
||||
} else {
|
||||
// search the position of the upper item
|
||||
int pos = items.indexOf(upperItem);
|
||||
|
@ -109,12 +117,15 @@ public class TabularListFld extends AbstractFld {
|
|||
upperItem.forceLayout();
|
||||
TabItem item = new TabItem(this, tabPar, false);
|
||||
items.add(pos + 1, item);
|
||||
vp.insert(item, pos + 1);//don't use new VerticalLayoutData(-1, -1,new Margins(0))
|
||||
vp.insert(item, pos + 1);// don't use new
|
||||
// VerticalLayoutData(-1, -1,new
|
||||
// Margins(0))
|
||||
} else {
|
||||
upperItem.forceLayout();
|
||||
TabItem item = new TabItem(this, tabPar, true);
|
||||
items.add(item);
|
||||
vp.add(item);//don't use new VerticalLayoutData(-1, -1, new Margins(0))
|
||||
vp.add(item);// don't use new VerticalLayoutData(-1, -1, new
|
||||
// Margins(0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,8 +143,7 @@ public class TabularListFld extends AbstractFld {
|
|||
*/
|
||||
protected void removeField(TabItem item) {
|
||||
items.remove(item);
|
||||
|
||||
|
||||
|
||||
if (items.size() == 1) {
|
||||
items.get(0).hideCancelButton();
|
||||
items.get(0).forceLayout();
|
||||
|
@ -158,7 +168,7 @@ public class TabularListFld extends AbstractFld {
|
|||
@Override
|
||||
public String getValue() {
|
||||
String separator = tabularListParameter.getSeparator();
|
||||
//String separator="";
|
||||
// String separator="";
|
||||
String value = "";
|
||||
boolean first = true;
|
||||
for (TabItem item : items) {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.type;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public enum DataMinerWorkAreaRegionType {
|
||||
DataSets, Computations;
|
||||
}
|
|
@ -655,6 +655,8 @@ public class SClient4WPS extends SClient {
|
|||
e.printStackTrace();
|
||||
throw new Exception(e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
logger.debug("ProcessInformation: "+processInformations);
|
||||
|
||||
List<Parameter> parameters = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -335,10 +335,10 @@ public class WPS2SM {
|
|||
.getSupported().getFormatArray());
|
||||
|
||||
}
|
||||
|
||||
logger.debug("Conversion to SM Type->Title:" + title);
|
||||
logger.debug("Conversion to SM Type->Name:" + id);
|
||||
logger.debug("Conversion to SM Type->Number of Inputs to Manage:"
|
||||
|
||||
logger.debug("Conversion to SM Type->Name=" + id);
|
||||
logger.debug("Conversion to SM Type->Title=" + title);
|
||||
logger.debug("Conversion to SM Type->Number of Inputs to Manage="
|
||||
+ rangeOccs);
|
||||
|
||||
return converted;
|
||||
|
|
|
@ -106,8 +106,12 @@ public class TabularParameter extends Parameter implements Serializable {
|
|||
public String toString() {
|
||||
return "TabularParameter [tableName=" + tableName + ", templates="
|
||||
+ templates + ", defaultMimeType=" + defaultMimeType
|
||||
+ ", supportedMimeTypes=" + supportedMimeTypes + "]";
|
||||
+ ", supportedMimeTypes=" + supportedMimeTypes + ", name="
|
||||
+ name + ", description=" + description + ", typology="
|
||||
+ typology + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -41,19 +41,19 @@
|
|||
<entry-point
|
||||
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
||||
|
||||
<!--
|
||||
|
||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||
/> -->
|
||||
/>
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
|
||||
/> -->
|
||||
|
||||
|
||||
<!--
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_DivLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" /> -->
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
|
||||
/> -->
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css">
|
||||
|
||||
<title>Data Miner Manager</title>
|
||||
<script type="text/javascript" language="javascript"
|
||||
src="dataminermanager/js/jquery-1.10.1.min.js"></script>
|
||||
<!-- <script type="text/javascript" language="javascript"
|
||||
src="dataminermanager/js/jquery-1.10.1.min.js"></script> -->
|
||||
<script type="text/javascript" language="javascript"
|
||||
src="dataminermanager/dataminermanager.nocache.js"></script>
|
||||
</head>
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- The module reference below is the link -->
|
||||
<!-- between html and your Web Toolkit module -->
|
||||
<link rel="stylesheet" href="<%= request.getContextPath()%>/dataminermanager/reset.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<%= request.getContextPath()%>/DataMinerManager.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%= request.getContextPath()%>/gxt/css/gxt-all.css" type="text/css">
|
||||
<script src='<%=request.getContextPath()%>/dataminermanager/js/jquery-1.10.1.min.js'></script>
|
||||
<script src='<%=request.getContextPath()%>/dataminermanager/dataminermanager.nocache.js'></script>
|
||||
|
||||
<!-- between html and your Web Toolkit module -->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/dataminermanager/reset.css"
|
||||
type="text/css" />
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/DataMinerManager.css"
|
||||
type="text/css">
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/gxt/css/gxt-all.css"
|
||||
type="text/css">
|
||||
<%-- <script src='<%=request.getContextPath()%>/dataminermanager/js/jquery-1.10.1.min.js'></script> --%>
|
||||
<script
|
||||
src='<%=request.getContextPath()%>/dataminermanager/dataminermanager.nocache.js'></script>
|
||||
|
||||
|
||||
<div class="contentDiv" id="contentDiv"></div>
|
||||
|
|
Loading…
Reference in New Issue