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