refs 2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Fixed the visualization of properties git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128589 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
112931f5a9
commit
c67176d5fb
|
@ -6,9 +6,9 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ComputationDataRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ComputationDataRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.RefreshDataMinerWorkAreaEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
||||
|
@ -80,7 +80,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
setHeaderVisible(true);
|
||||
setResize(true);
|
||||
setAnimCollapse(false);
|
||||
setHeadingText("Computations Executed");
|
||||
setHeadingText("List of Computations");
|
||||
|
||||
}
|
||||
|
||||
|
@ -188,21 +188,16 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<String> showProperties = new ArrayList<String>();
|
||||
showProperties.add(ComputationsProperties.COMPUTATION_ID.getLabel());
|
||||
showProperties.add(ComputationsProperties.OPERATOR_NAME.getLabel());
|
||||
//showProperties.add(ComputationsProperties.OPERATOR_DESCRIPTION.getLabel());
|
||||
showProperties.add(ComputationsProperties.START_DATE.getLabel());
|
||||
showProperties.add(ComputationsProperties.END_DATE.getLabel());
|
||||
showProperties.add(ComputationsProperties.STATUS.getLabel());
|
||||
showProperties.add(ComputationsProperties.VRE.getLabel());
|
||||
//showProperties.add(ComputationsProperties.EXECUTION_TYPE.getLabel());
|
||||
|
||||
for (ComputationsPropertiesType computationsProperties : ComputationsPropertiesType
|
||||
.values()) {
|
||||
showProperties.add(computationsProperties.getLabel());
|
||||
}
|
||||
FilterCriteria filterCriteria = new FilterCriteria();
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
filterCriteria.setRequiredProperties(map);
|
||||
|
||||
|
||||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getComputations().getFolder()
|
||||
.getId(), false, showProperties, filterCriteria);
|
||||
|
@ -296,8 +291,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
btnOpen = new TextButton("Open");
|
||||
// btnOpen.setIcon(StatAlgoImporterResources.INSTANCE.download16());
|
||||
btnOpen.setScale(ButtonScale.SMALL);
|
||||
|
@ -339,7 +333,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
btnResubmit = new TextButton("Resubmit");
|
||||
// btnResubmit.setIcon(StatAlgoImporterResources.INSTANCE.reload16());
|
||||
btnResubmit.setScale(ButtonScale.SMALL);
|
||||
|
@ -353,10 +347,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
btnCancel = new TextButton("Cancel");
|
||||
// btnCancel.setIcon(StatAlgoImporterResources.INSTANCE.reload16());
|
||||
btnCancel.setScale(ButtonScale.SMALL);
|
||||
|
@ -370,7 +361,6 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnShow, new BoxLayoutData(new Margins(0)));
|
||||
|
@ -393,9 +383,6 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void refreshWSResourceExplorerPanel() {
|
||||
if (wsResourcesExplorerPanel != null) {
|
||||
wsResourcesExplorerPanel.refreshRootFolderView();
|
||||
|
@ -428,7 +415,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
EventBusProvider.INSTANCE.fireEvent(deleteItemEvent);
|
||||
Log.debug("Fired: " + deleteItemEvent);
|
||||
}
|
||||
|
||||
|
||||
private void showComputation() {
|
||||
if (selectedItem != null) {
|
||||
|
||||
|
@ -436,15 +423,15 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
|
||||
ComputationDataRequestEvent event=new ComputationDataRequestEvent(itemDescription);
|
||||
|
||||
ComputationDataRequestEvent event = new ComputationDataRequestEvent(
|
||||
itemDescription);
|
||||
EventBusProvider.INSTANCE.fireEvent(event);
|
||||
|
||||
} else {
|
||||
UtilsGXT3.info("Attention", "Select a computation!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void openFile() {
|
||||
|
@ -486,27 +473,26 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void cancelComputation() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void resubmitComputation() {
|
||||
if (selectedItem != null) {
|
||||
ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(), selectedItem
|
||||
.getType().name());
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
ResubmitComputationExecutionRequestEvent resubmitComputationEvent = new ResubmitComputationExecutionRequestEvent(
|
||||
itemDescription);
|
||||
itemDescription);
|
||||
EventBusProvider.INSTANCE.fireEvent(resubmitComputationEvent);
|
||||
Log.debug("Fired: " + resubmitComputationEvent);
|
||||
} else {
|
||||
UtilsGXT3.info("Attention", "Select a computation!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.computations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public enum ComputationsProperties {
|
||||
OPERATOR_DESCRIPTION("operator_description"), OPERATOR_NAME(
|
||||
"operator_name"), END_DATE("end_date"), ERROR("error"), COMPUTATION_ID(
|
||||
"computation_id"), STATUS("status"), VRE("VRE"), EXECUTION_TYPE(
|
||||
"execution_type"), START_DATE("start_date");
|
||||
|
||||
/**
|
||||
* @param text
|
||||
*/
|
||||
private ComputationsProperties(final String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private final String id;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public static ComputationsProperties getFromId(String id) {
|
||||
for (ComputationsProperties prop : values()) {
|
||||
if (prop.id.compareToIgnoreCase(id) == 0) {
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.computations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public enum ComputationsPropertiesType {
|
||||
OPERATOR_NAME("operator_name"), START_DATE("start_date"), END_DATE(
|
||||
"end_date"), STATUS("status"), EXECUTION_TYPE("execution_type"), VRE(
|
||||
"VRE");
|
||||
|
||||
// COMPUTATION_ID("computation_id"),
|
||||
// OPERATOR_DESCRIPTION("operator_description"),
|
||||
// ERROR("error"),
|
||||
// EXECUTION_PLATFORM("execution_platform")
|
||||
/**
|
||||
* @param text
|
||||
*/
|
||||
private ComputationsPropertiesType(final String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private final String id;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public static ComputationsPropertiesType getFromId(String id) {
|
||||
for (ComputationsPropertiesType prop : values()) {
|
||||
if (prop.id.compareToIgnoreCase(id) == 0) {
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -6,14 +6,14 @@ package org.gcube.portlets.user.dataminermanager.client.dataspace;
|
|||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public enum DataSpaceProperties {
|
||||
COMPUTATION_ID("computation_id"), DATA_ID("data_id"), DATA_TYPE("data_type"), OPERATOR_NAME(
|
||||
"operator_name"), VRE("VRE");
|
||||
|
||||
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");
|
||||
/**
|
||||
* @param text
|
||||
*/
|
||||
private DataSpaceProperties(final String id) {
|
||||
private DataSpacePropertiesType(final String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,8 @@ public enum DataSpaceProperties {
|
|||
return id;
|
||||
}
|
||||
|
||||
public static DataSpaceProperties getFromId(String id) {
|
||||
for (DataSpaceProperties prop : values()) {
|
||||
public static DataSpacePropertiesType getFromId(String id) {
|
||||
for (DataSpacePropertiesType prop : values()) {
|
||||
if (prop.id.compareToIgnoreCase(id) == 0) {
|
||||
return prop;
|
||||
}
|
|
@ -185,11 +185,9 @@ public class InputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
List<String> showProperties = new ArrayList<String>();
|
||||
showProperties.add(DataSpaceProperties.COMPUTATION_ID.getLabel());
|
||||
showProperties.add(DataSpaceProperties.DATA_ID.getLabel());
|
||||
showProperties.add(DataSpaceProperties.DATA_TYPE.getLabel());
|
||||
showProperties.add(DataSpaceProperties.OPERATOR_NAME.getLabel());
|
||||
showProperties.add(DataSpaceProperties.VRE.getLabel());
|
||||
for(DataSpacePropertiesType dataSpaceProperties:DataSpacePropertiesType.values()){
|
||||
showProperties.add(dataSpaceProperties.getLabel());
|
||||
}
|
||||
FilterCriteria filterCriteria = new FilterCriteria();
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
filterCriteria.setRequiredProperties(map);
|
||||
|
|
|
@ -184,11 +184,10 @@ public class OutputDataSetsPanel extends ContentPanel {
|
|||
}
|
||||
|
||||
List<String> showProperties = new ArrayList<String>();
|
||||
showProperties.add(DataSpaceProperties.COMPUTATION_ID.getLabel());
|
||||
showProperties.add(DataSpaceProperties.DATA_ID.getLabel());
|
||||
showProperties.add(DataSpaceProperties.DATA_TYPE.getLabel());
|
||||
showProperties.add(DataSpaceProperties.OPERATOR_NAME.getLabel());
|
||||
showProperties.add(DataSpaceProperties.VRE.getLabel());
|
||||
for (DataSpacePropertiesType dataSpaceProperties : DataSpacePropertiesType
|
||||
.values()) {
|
||||
showProperties.add(dataSpaceProperties.getLabel());
|
||||
}
|
||||
FilterCriteria filterCriteria = new FilterCriteria();
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
filterCriteria.setRequiredProperties(map);
|
||||
|
|
Loading…
Reference in New Issue