2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Fixed StartComputationEvent git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128249 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b0bfb85688
commit
bd115101c0
|
@ -6,11 +6,8 @@ import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassificat
|
||||||
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.dataspace.DataSpacePanel;
|
import org.gcube.portlets.user.dataminermanager.client.dataspace.DataSpacePanel;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.MaskEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.MaskEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationEvent;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.experimentArea.ExperimentPanel;
|
import org.gcube.portlets.user.dataminermanager.client.experimentArea.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.rpc.DataMinerPortletService;
|
|
||||||
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.Constants;
|
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||||
import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
|
import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
|
||||||
|
@ -47,8 +44,8 @@ import com.sencha.gxt.widget.core.client.container.Viewport;
|
||||||
public class DataMinerManager implements EntryPoint {
|
public class DataMinerManager implements EntryPoint {
|
||||||
|
|
||||||
public static final Resources resources = GWT.create(Resources.class);
|
public static final Resources resources = GWT.create(Resources.class);
|
||||||
private static final DataMinerPortletServiceAsync dataMinerService = GWT
|
/*private static final DataMinerPortletServiceAsync dataMinerService = GWT
|
||||||
.create(DataMinerPortletService.class);
|
.create(DataMinerPortletService.class);*/
|
||||||
private static final String SM_DIV = "contentDiv";
|
private static final String SM_DIV = "contentDiv";
|
||||||
|
|
||||||
private static List<OperatorsClassification> operatorsClassifications = null;
|
private static List<OperatorsClassification> operatorsClassifications = null;
|
||||||
|
@ -280,16 +277,7 @@ public class DataMinerManager implements EntryPoint {
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EventBusProvider.INSTANCE.addHandler(
|
|
||||||
ResubmitComputationEvent.getType(),
|
|
||||||
new ResubmitComputationEvent.ResubmitComputationHandler() {
|
|
||||||
@Override
|
|
||||||
public void onResubmitComputation(
|
|
||||||
ResubmitComputationEvent event) {
|
|
||||||
switchTo(experimentPanel);
|
|
||||||
header.setMenuSelected(MenuItem.EXPERIMENT);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -422,9 +410,9 @@ public class DataMinerManager implements EntryPoint {
|
||||||
return (find == null ? getDefaultOperatorsClassification() : find);
|
return (find == null ? getDefaultOperatorsClassification() : find);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DataMinerPortletServiceAsync getService() {
|
/*public static DataMinerPortletServiceAsync getService() {
|
||||||
return dataMinerService;
|
return dataMinerService;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client;
|
package org.gcube.portlets.user.dataminermanager.client;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
||||||
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.CancelComputationRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
||||||
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.type.DataMinerWorkAreaEventType;
|
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEventType;
|
||||||
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.data.ComputationId;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
|
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||||
|
@ -104,12 +111,174 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChange(SessionExpiredEvent event) {
|
public void onChange(SessionExpiredEvent event) {
|
||||||
Log.debug("Catch Event SessionExpiredEvent");
|
Log.debug("Catch SessionExpiredEvent");
|
||||||
sessionExpiredShow();
|
sessionExpiredShow();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
StartComputationExecutionRequestEvent.TYPE,
|
||||||
|
new StartComputationExecutionRequestEvent.StartComputationExecutionRequestEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart(
|
||||||
|
StartComputationExecutionRequestEvent event) {
|
||||||
|
Log.debug("Catch StartComputationExecutionRequestEvent");
|
||||||
|
startComputationRequest(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
CancelComputationRequestEvent.TYPE,
|
||||||
|
new CancelComputationRequestEvent.CancelComputationRequestEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCancel(
|
||||||
|
CancelComputationRequestEvent event) {
|
||||||
|
Log.debug("Catch CancelComputationRequestEvent");
|
||||||
|
cancelComputationRequest(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.addHandler(
|
||||||
|
ResubmitComputationExecutionRequestEvent.TYPE,
|
||||||
|
new ResubmitComputationExecutionRequestEvent.ResubmitComputationExecutionRequestEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResubmit(
|
||||||
|
ResubmitComputationExecutionRequestEvent event) {
|
||||||
|
Log.debug("Catch ResubmitComputationExecutionRequestEvent");
|
||||||
|
resubmitComputationRequest(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EventBusProvider.INSTANCE.addHandler(
|
||||||
|
* ResubmitComputationEvent.getType(), new
|
||||||
|
* ResubmitComputationEvent.ResubmitComputationHandler() {
|
||||||
|
*
|
||||||
|
* @Override public void onResubmitComputation( ResubmitComputationEvent
|
||||||
|
* event) { switchTo(experimentPanel);
|
||||||
|
* header.setMenuSelected(MenuItem.EXPERIMENT); } });
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startComputationRequest(
|
||||||
|
final StartComputationExecutionRequestEvent event) {
|
||||||
|
|
||||||
|
DataMinerPortletServiceAsync.INSTANCE.startComputation(event.getOp(),
|
||||||
|
event.getComputationTitle(), event.getComputationDescription(),
|
||||||
|
new AsyncCallback<ComputationId>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ComputationId computationId) {
|
||||||
|
if (computationId == null)
|
||||||
|
UtilsGXT3.alert("Error",
|
||||||
|
"Failed to start computation "
|
||||||
|
+ event.getOp().getName()
|
||||||
|
+ ", the computation id is null");
|
||||||
|
else {
|
||||||
|
startComputation(computationId,
|
||||||
|
event.getComputationStatusPanelIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
UtilsGXT3.alert("Error",
|
||||||
|
"Failed to start computation "
|
||||||
|
+ event.getOp().getName()
|
||||||
|
+ "<br/>Cause:" + caught.getCause()
|
||||||
|
+ "<br/>Message:" + caught.getMessage());
|
||||||
|
caught.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startComputation(ComputationId computationId,
|
||||||
|
int computationStatusPanelIndex) {
|
||||||
|
StartComputationExecutionEvent event = new StartComputationExecutionEvent(
|
||||||
|
computationId, computationStatusPanelIndex);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cancelComputationRequest(CancelComputationRequestEvent event) {
|
||||||
|
final ComputationId computationId = event.getComputationId();
|
||||||
|
|
||||||
|
DataMinerPortletServiceAsync.INSTANCE.cancelComputation(computationId,
|
||||||
|
new AsyncCallback<String>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
|
EventBusProvider.INSTANCE
|
||||||
|
.fireEvent(new SessionExpiredEvent());
|
||||||
|
} else {
|
||||||
|
UtilsGXT3.alert(
|
||||||
|
"Error",
|
||||||
|
"Error in cancel computation: ComputationId="
|
||||||
|
+ computationId.getId()
|
||||||
|
+ ", Error="
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String result) {
|
||||||
|
Log.debug("Computation Deleted!");
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resubmitComputationRequest(
|
||||||
|
final ResubmitComputationExecutionRequestEvent event) {
|
||||||
|
DataMinerPortletServiceAsync.INSTANCE.resubmit(event.getComputationId(), new AsyncCallback<ComputationId>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
UtilsGXT3.alert("Error",
|
||||||
|
"Failed to resubmit computation "
|
||||||
|
+ event.getComputationId()
|
||||||
|
+ "<br/>Cause:" + caught.getCause()
|
||||||
|
+ "<br/>Message:" + caught.getMessage());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ComputationId result) {
|
||||||
|
if (result == null)
|
||||||
|
UtilsGXT3
|
||||||
|
.alert("Error",
|
||||||
|
"Failed to resubmit computation, the computation id is null!");
|
||||||
|
else {
|
||||||
|
resubmitComputation(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resubmitComputation(ComputationId computationId) {
|
||||||
|
ComputationItem computationItem=new ComputationItem(computationId, null);
|
||||||
|
ResubmitComputationExecutionEvent event = new ResubmitComputationExecutionEvent(
|
||||||
|
computationItem);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void retrieveDataMinerWorkArea() {
|
private void retrieveDataMinerWorkArea() {
|
||||||
DataMinerPortletServiceAsync.INSTANCE
|
DataMinerPortletServiceAsync.INSTANCE
|
||||||
|
@ -139,7 +308,6 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void fireDataMinerWorkAreaEventRetrieved(DataMinerWorkArea result) {
|
private void fireDataMinerWorkAreaEventRetrieved(DataMinerWorkArea result) {
|
||||||
dataMinerWorkArea = result;
|
dataMinerWorkArea = result;
|
||||||
DataMinerWorkAreaEvent dataMinerWorkAreaEvent = new DataMinerWorkAreaEvent(
|
DataMinerWorkAreaEvent dataMinerWorkAreaEvent = new DataMinerWorkAreaEvent(
|
||||||
|
@ -147,5 +315,4 @@ public class DataMinerManagerController {
|
||||||
eventBus.fireEvent(dataMinerWorkAreaEvent);
|
eventBus.fireEvent(dataMinerWorkAreaEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,18 +10,17 @@ import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class ComputationItem implements Serializable {
|
public class ComputationItem implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 7948340340190844208L;
|
private static final long serialVersionUID = 7948340340190844208L;
|
||||||
|
|
||||||
// force to implement these objects in javascript
|
|
||||||
private ComputationId computationId;
|
private ComputationId computationId;
|
||||||
|
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private String name;
|
private String name;
|
||||||
private String description;
|
private String description;
|
||||||
|
@ -34,8 +33,6 @@ public class ComputationItem implements Serializable{
|
||||||
private Resource resource;
|
private Resource resource;
|
||||||
private Operator operator;
|
private Operator operator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -43,9 +40,15 @@ public class ComputationItem implements Serializable{
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComputationItem(ComputationId computationId, String name, String description,
|
public ComputationItem(ComputationId computationId, String operatorId) {
|
||||||
String categoryId, String operatorId, String infrastructure,
|
this.computationId=computationId;
|
||||||
Date creationDate, Date endDate,
|
this.operatorId=operatorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
public ComputationItem(ComputationId computationId, String name,
|
||||||
|
String description, String categoryId, String operatorId,
|
||||||
|
String infrastructure, Date creationDate, Date endDate,
|
||||||
ComputationStatus status, Resource resource) {
|
ComputationStatus status, Resource resource) {
|
||||||
super();
|
super();
|
||||||
this.computationId = computationId;
|
this.computationId = computationId;
|
||||||
|
@ -59,10 +62,11 @@ public class ComputationItem implements Serializable{
|
||||||
this.endDate = endDate;
|
this.endDate = endDate;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
public OperatorCategory getOperatorCategory() {
|
public OperatorCategory getOperatorCategory() {
|
||||||
OperatorsClassification classification = DataMinerManager.getDefaultOperatorsClassification();
|
OperatorsClassification classification = DataMinerManager
|
||||||
|
.getDefaultOperatorsClassification();
|
||||||
if (classification == null)
|
if (classification == null)
|
||||||
return null;
|
return null;
|
||||||
else
|
else
|
||||||
|
@ -71,14 +75,14 @@ public class ComputationItem implements Serializable{
|
||||||
|
|
||||||
public Operator getOperator() {
|
public Operator getOperator() {
|
||||||
if (operator == null) {
|
if (operator == null) {
|
||||||
OperatorsClassification classification = DataMinerManager.getDefaultOperatorsClassification();
|
OperatorsClassification classification = DataMinerManager
|
||||||
|
.getDefaultOperatorsClassification();
|
||||||
if (classification != null)
|
if (classification != null)
|
||||||
operator = classification.getOperatorById(operatorId);
|
operator = classification.getOperatorById(operatorId);
|
||||||
}
|
}
|
||||||
return operator;
|
return operator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ComputationId getComputationId() {
|
public ComputationId getComputationId() {
|
||||||
return computationId;
|
return computationId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancel Computation Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CancelComputationRequestEvent
|
||||||
|
extends
|
||||||
|
GwtEvent<CancelComputationRequestEvent.CancelComputationRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<CancelComputationRequestEventHandler> TYPE = new Type<CancelComputationRequestEventHandler>();
|
||||||
|
private ComputationId computationId;
|
||||||
|
|
||||||
|
public interface CancelComputationRequestEventHandler extends EventHandler {
|
||||||
|
void onCancel(CancelComputationRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasCancelComputationRequestEventHandler extends
|
||||||
|
HasHandlers {
|
||||||
|
public HandlerRegistration addCancelComputationRequestEventHandler(
|
||||||
|
CancelComputationRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CancelComputationRequestEvent(ComputationId computationId) {
|
||||||
|
this.computationId = computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(CancelComputationRequestEventHandler handler) {
|
||||||
|
handler.onCancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<CancelComputationRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<CancelComputationRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
CancelComputationRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComputationId getComputationId() {
|
||||||
|
return computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CancelComputationRequestEvent [computationId=" + computationId
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computation Ready Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ComputationReadyEvent extends
|
||||||
|
GwtEvent<ComputationReadyEvent.ComputationReadyEventHandler> {
|
||||||
|
|
||||||
|
public static Type<ComputationReadyEventHandler> TYPE = new Type<ComputationReadyEventHandler>();
|
||||||
|
private Operator operator;
|
||||||
|
private String computationTitle;
|
||||||
|
private String computationDescription;
|
||||||
|
|
||||||
|
public interface ComputationReadyEventHandler extends EventHandler {
|
||||||
|
void onReady(ComputationReadyEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasComputationReadyEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addComputationReadyEventHandler(
|
||||||
|
ComputationReadyEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComputationReadyEvent(Operator operator, String computationTitle,
|
||||||
|
String computationDescription) {
|
||||||
|
super();
|
||||||
|
this.operator = operator;
|
||||||
|
this.computationTitle = computationTitle;
|
||||||
|
this.computationDescription = computationDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ComputationReadyEventHandler handler) {
|
||||||
|
handler.onReady(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<ComputationReadyEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<ComputationReadyEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, ComputationReadyEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<ComputationReadyEventHandler> getTYPE() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Operator getOperator() {
|
||||||
|
return operator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComputationTitle() {
|
||||||
|
return computationTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComputationDescription() {
|
||||||
|
return computationDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ComputationReadyEvent [operator=" + operator
|
||||||
|
+ ", computationTitle=" + computationTitle
|
||||||
|
+ ", computationDescription=" + computationDescription + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,43 +0,0 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
import java.lang.String;
|
|
||||||
import com.google.gwt.event.shared.HasHandlers;
|
|
||||||
|
|
||||||
public class ImportCreatedEvent extends
|
|
||||||
GwtEvent<ImportCreatedEvent.ImportCreatedHandler> {
|
|
||||||
|
|
||||||
public static Type<ImportCreatedHandler> TYPE = new Type<ImportCreatedHandler>();
|
|
||||||
private String importId;
|
|
||||||
|
|
||||||
public interface ImportCreatedHandler extends EventHandler {
|
|
||||||
void onImportCreated(ImportCreatedEvent event);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImportCreatedEvent(String importId) {
|
|
||||||
this.importId = importId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getImportId() {
|
|
||||||
return importId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(ImportCreatedHandler handler) {
|
|
||||||
handler.onImportCreated(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<ImportCreatedHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Type<ImportCreatedHandler> getType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void fire(HasHandlers source, String importId) {
|
|
||||||
source.fireEvent(new ImportCreatedEvent(importId));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ImportStatus;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
|
||||||
import com.google.gwt.event.shared.HasHandlers;
|
|
||||||
|
|
||||||
public class ImportTerminatedEvent extends
|
|
||||||
GwtEvent<ImportTerminatedEvent.ImportTerminatedHandler> {
|
|
||||||
|
|
||||||
public static Type<ImportTerminatedHandler> TYPE = new Type<ImportTerminatedHandler>();
|
|
||||||
private ImportStatus importStatus;
|
|
||||||
|
|
||||||
public interface ImportTerminatedHandler extends EventHandler {
|
|
||||||
void onImportTerminated(ImportTerminatedEvent event);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImportTerminatedEvent(ImportStatus importStatus) {
|
|
||||||
this.importStatus = importStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImportStatus getImportStatus() {
|
|
||||||
return importStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(ImportTerminatedHandler handler) {
|
|
||||||
handler.onImportTerminated(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<ImportTerminatedHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Type<ImportTerminatedHandler> getType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void fire(HasHandlers source, ImportStatus importStatus) {
|
|
||||||
source.fireEvent(new ImportTerminatedEvent(importStatus));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
import com.google.gwt.event.shared.HasHandlers;
|
|
||||||
|
|
||||||
public class JobsGridGotDirtyEvent extends GwtEvent<JobsGridGotDirtyEvent.JobsGridGotDirtyHandler> {
|
|
||||||
|
|
||||||
public static Type<JobsGridGotDirtyHandler> TYPE = new Type<JobsGridGotDirtyHandler>();
|
|
||||||
|
|
||||||
public interface JobsGridGotDirtyHandler extends EventHandler {
|
|
||||||
void onJobsGridGotDirty(JobsGridGotDirtyEvent event);
|
|
||||||
}
|
|
||||||
|
|
||||||
public JobsGridGotDirtyEvent() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(JobsGridGotDirtyHandler handler) {
|
|
||||||
handler.onJobsGridGotDirty(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<JobsGridGotDirtyHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Type<JobsGridGotDirtyHandler> getType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void fire(HasHandlers source) {
|
|
||||||
source.fireEvent(new JobsGridGotDirtyEvent());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author ceras
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface JobsGridHandler {
|
|
||||||
|
|
||||||
public void jobSelected(ComputationItem jobItem);
|
|
||||||
|
|
||||||
public void removeComputation(ComputationItem jobItem);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.HasHandlers;
|
|
||||||
|
|
||||||
public class ResubmitComputationEvent extends
|
|
||||||
GwtEvent<ResubmitComputationEvent.ResubmitComputationHandler> {
|
|
||||||
|
|
||||||
public static Type<ResubmitComputationHandler> TYPE = new Type<ResubmitComputationHandler>();
|
|
||||||
private ComputationItem jobItem;
|
|
||||||
|
|
||||||
public interface ResubmitComputationHandler extends EventHandler {
|
|
||||||
void onResubmitComputation(ResubmitComputationEvent event);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResubmitComputationEvent(ComputationItem jobItem) {
|
|
||||||
this.jobItem = jobItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ComputationItem getJobItem() {
|
|
||||||
return jobItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(ResubmitComputationHandler handler) {
|
|
||||||
handler.onResubmitComputation(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<ResubmitComputationHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Type<ResubmitComputationHandler> getType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void fire(HasHandlers source, ComputationItem jobItem) {
|
|
||||||
source.fireEvent(new ResubmitComputationEvent(jobItem));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resubmit Computation Execution Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ResubmitComputationExecutionEvent
|
||||||
|
extends
|
||||||
|
GwtEvent<ResubmitComputationExecutionEvent.ResubmitComputationExecutionEventHandler> {
|
||||||
|
|
||||||
|
public static Type<ResubmitComputationExecutionEventHandler> TYPE = new Type<ResubmitComputationExecutionEventHandler>();
|
||||||
|
private ComputationItem computationItem;
|
||||||
|
|
||||||
|
public interface ResubmitComputationExecutionEventHandler extends
|
||||||
|
EventHandler {
|
||||||
|
void onResubmit(ResubmitComputationExecutionEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasResubmitComputationExecutionEventHandler extends
|
||||||
|
HasHandlers {
|
||||||
|
public HandlerRegistration addResubmitComputationExecutionEventHandler(
|
||||||
|
ResubmitComputationExecutionEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResubmitComputationExecutionEvent(ComputationItem computationItem) {
|
||||||
|
this.computationItem = computationItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ResubmitComputationExecutionEventHandler handler) {
|
||||||
|
handler.onResubmit(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<ResubmitComputationExecutionEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<ResubmitComputationExecutionEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
ResubmitComputationExecutionEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComputationItem getComputationItem() {
|
||||||
|
return computationItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ResubmitComputationExecutionEvent [computationItem="
|
||||||
|
+ computationItem + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resubmit Computation Execution Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ResubmitComputationExecutionRequestEvent
|
||||||
|
extends
|
||||||
|
GwtEvent<ResubmitComputationExecutionRequestEvent.ResubmitComputationExecutionRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<ResubmitComputationExecutionRequestEventHandler> TYPE = new Type<ResubmitComputationExecutionRequestEventHandler>();
|
||||||
|
private ComputationId computationId;
|
||||||
|
|
||||||
|
public interface ResubmitComputationExecutionRequestEventHandler extends
|
||||||
|
EventHandler {
|
||||||
|
void onResubmit(ResubmitComputationExecutionRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasResubmitComputationExecutionRequestEventHandler extends
|
||||||
|
HasHandlers {
|
||||||
|
public HandlerRegistration addResubmitComputationExecutionRequestEventHandler(
|
||||||
|
ResubmitComputationExecutionRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResubmitComputationExecutionRequestEvent(ComputationId computationId) {
|
||||||
|
this.computationId = computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ResubmitComputationExecutionRequestEventHandler handler) {
|
||||||
|
handler.onResubmit(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<ResubmitComputationExecutionRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<ResubmitComputationExecutionRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
ResubmitComputationExecutionRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComputationId getComputationId() {
|
||||||
|
return computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ResubmitComputationExecutionRequestEvent [computationId="
|
||||||
|
+ computationId + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,83 +0,0 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
|
||||||
import com.google.gwt.event.shared.HandlerRegistration;
|
|
||||||
import com.google.gwt.event.shared.HasHandlers;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Start Computation Event
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi" <a
|
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class StartComputationEvent extends
|
|
||||||
GwtEvent<StartComputationEvent.StartComputationEventHandler> {
|
|
||||||
|
|
||||||
public static Type<StartComputationEventHandler> TYPE = new Type<StartComputationEventHandler>();
|
|
||||||
private Operator op;
|
|
||||||
private String computationTitle;
|
|
||||||
private String computationDescription;
|
|
||||||
|
|
||||||
public interface StartComputationEventHandler extends EventHandler {
|
|
||||||
void onStart(StartComputationEvent event);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface HasStartComputationEventHandler extends HasHandlers {
|
|
||||||
public HandlerRegistration addStartComputationEventHandler(
|
|
||||||
StartComputationEventHandler handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
public StartComputationEvent(Operator op, String computationTitle, String computationDescription) {
|
|
||||||
this.op=op;
|
|
||||||
this.computationTitle=computationTitle;
|
|
||||||
this.computationDescription=computationDescription;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(StartComputationEventHandler handler) {
|
|
||||||
handler.onStart(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<StartComputationEventHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Type<StartComputationEventHandler> getType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void fire(HasHandlers source,
|
|
||||||
StartComputationEvent startComputationEvent) {
|
|
||||||
source.fireEvent(startComputationEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Operator getOp() {
|
|
||||||
return op;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getComputationTitle() {
|
|
||||||
return computationTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getComputationDescription() {
|
|
||||||
return computationDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "StartComputationEvent [op=" + op + ", computationTitle="
|
|
||||||
+ computationTitle + ", computationDescription="
|
|
||||||
+ computationDescription + "]";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start Computation Execution Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class StartComputationExecutionEvent
|
||||||
|
extends
|
||||||
|
GwtEvent<StartComputationExecutionEvent.StartComputationExecutionEventHandler> {
|
||||||
|
|
||||||
|
public static Type<StartComputationExecutionEventHandler> TYPE = new Type<StartComputationExecutionEventHandler>();
|
||||||
|
private ComputationId computationId;
|
||||||
|
private int computationStatusPanelIndex;
|
||||||
|
|
||||||
|
public interface StartComputationExecutionEventHandler extends EventHandler {
|
||||||
|
void onStart(StartComputationExecutionEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasStartComputationExecutionEventHandler extends
|
||||||
|
HasHandlers {
|
||||||
|
public HandlerRegistration addStartComputationExecutionEventHandler(
|
||||||
|
StartComputationExecutionEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StartComputationExecutionEvent(ComputationId computationId,
|
||||||
|
int computationStatusPanelIndex) {
|
||||||
|
this.computationId = computationId;
|
||||||
|
this.computationStatusPanelIndex = computationStatusPanelIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(StartComputationExecutionEventHandler handler) {
|
||||||
|
handler.onStart(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<StartComputationExecutionEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<StartComputationExecutionEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
StartComputationExecutionEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComputationId getComputationId() {
|
||||||
|
return computationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getComputationStatusPanelIndex() {
|
||||||
|
return computationStatusPanelIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "StartComputationExecutionEvent [computationId=" + computationId
|
||||||
|
+ ", computationStatusPanelIndex="
|
||||||
|
+ computationStatusPanelIndex + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start Computation Execution Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class StartComputationExecutionRequestEvent
|
||||||
|
extends
|
||||||
|
GwtEvent<StartComputationExecutionRequestEvent.StartComputationExecutionRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<StartComputationExecutionRequestEventHandler> TYPE = new Type<StartComputationExecutionRequestEventHandler>();
|
||||||
|
private Operator op;
|
||||||
|
private String computationTitle;
|
||||||
|
private String computationDescription;
|
||||||
|
private int computationStatusPanelIndex;
|
||||||
|
|
||||||
|
public interface StartComputationExecutionRequestEventHandler extends EventHandler {
|
||||||
|
void onStart(StartComputationExecutionRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasStartComputationExecutionRequestEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addStartComputationExecutionRequestEventHandler(
|
||||||
|
StartComputationExecutionRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StartComputationExecutionRequestEvent(Operator op, String computationTitle,
|
||||||
|
String computationDescription, int computationStatusPanelIndex) {
|
||||||
|
this.op = op;
|
||||||
|
this.computationTitle = computationTitle;
|
||||||
|
this.computationDescription = computationDescription;
|
||||||
|
this.computationStatusPanelIndex = computationStatusPanelIndex;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(StartComputationExecutionRequestEventHandler handler) {
|
||||||
|
handler.onStart(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<StartComputationExecutionRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<StartComputationExecutionRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
StartComputationExecutionRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Operator getOp() {
|
||||||
|
return op;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComputationTitle() {
|
||||||
|
return computationTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComputationDescription() {
|
||||||
|
return computationDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getComputationStatusPanelIndex() {
|
||||||
|
return computationStatusPanelIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "StartComputationExecutionRequestEvent [op=" + op
|
||||||
|
+ ", computationTitle=" + computationTitle
|
||||||
|
+ ", computationDescription=" + computationDescription
|
||||||
|
+ ", computationStatusPanelIndex="
|
||||||
|
+ computationStatusPanelIndex + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -4,16 +4,13 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
|
||||||
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.common.EventBusProvider;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.JobsGridGotDirtyEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
||||||
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||||
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;
|
||||||
|
@ -50,13 +47,13 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
*/
|
*/
|
||||||
public ComputationExecutionPanel() {
|
public ComputationExecutionPanel() {
|
||||||
super();
|
super();
|
||||||
|
Log.debug("Computation Execution Panel");
|
||||||
init();
|
init();
|
||||||
create();
|
create();
|
||||||
bind();
|
bind();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
// this.setHeading(".: Computation Execution");
|
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
addStyleName("computationExcecutionPanel");
|
addStyleName("computationExcecutionPanel");
|
||||||
setBodyStyle("backgroundColor:white;");
|
setBodyStyle("backgroundColor:white;");
|
||||||
|
@ -74,99 +71,86 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
add(topV);
|
add(topV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void bind() {
|
||||||
|
EventBusProvider.INSTANCE.addHandler(
|
||||||
|
ResubmitComputationExecutionEvent.getType(),
|
||||||
|
new ResubmitComputationExecutionEvent.ResubmitComputationExecutionEventHandler() {
|
||||||
|
@Override
|
||||||
|
public void onResubmit(ResubmitComputationExecutionEvent event) {
|
||||||
|
resubmitComputation(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE.addHandler(StartComputationExecutionEvent.getType(),
|
||||||
|
new StartComputationExecutionEvent.StartComputationExecutionEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart(StartComputationExecutionEvent event) {
|
||||||
|
startComputation(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void startNewComputation(final Operator operator,
|
public void startNewComputation(final Operator operator,
|
||||||
String computationTitle, String computationDescription) {
|
String computationTitle, String computationDescription) {
|
||||||
Log.debug("Computation Panel: start new computation ");
|
Log.debug("Computation Panel: start new computation ");
|
||||||
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
||||||
operator);
|
operator);
|
||||||
computationStatusPanels.add(statusPanel);
|
computationStatusPanels.add(statusPanel);
|
||||||
|
int index = computationStatusPanels.indexOf(statusPanel);
|
||||||
|
statusPanel.setItemId("ComputationStatusPanel" + String.valueOf(index));
|
||||||
|
|
||||||
Log.debug("Added status bar");
|
Log.debug("Added status bar");
|
||||||
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1, new Margins(20)));
|
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
removeAllButton.setEnabled(true);
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
DataMinerManager.getService().startComputation(operator,
|
|
||||||
computationTitle, computationDescription,
|
|
||||||
new AsyncCallback<ComputationId>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(ComputationId computationId) {
|
|
||||||
if (computationId == null)
|
|
||||||
UtilsGXT3
|
|
||||||
.alert("ERROR",
|
|
||||||
"Failed to start computation "
|
|
||||||
+ operator.getName()
|
|
||||||
+ ", the computation id is null (1)");
|
|
||||||
else {
|
|
||||||
statusPanel.computationStarted(computationId);
|
|
||||||
EventBusProvider.INSTANCE
|
|
||||||
.fireEvent(new JobsGridGotDirtyEvent());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
|
||||||
UtilsGXT3.alert(
|
|
||||||
"ERROR",
|
|
||||||
"Failed to start computation "
|
|
||||||
+ operator.getName()
|
|
||||||
+ " (2)<br/>Cause:" + caught.getCause()
|
|
||||||
+ "<br/>Message:" + caught.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
|
||||||
|
StartComputationExecutionRequestEvent event = new StartComputationExecutionRequestEvent(
|
||||||
|
operator, computationTitle, computationDescription, index);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bind() {
|
private void startComputation(StartComputationExecutionEvent event) {
|
||||||
EventBusProvider.INSTANCE.addHandler(
|
try {
|
||||||
ResubmitComputationEvent.getType(),
|
ComputationStatusPanel statusPanel = null;
|
||||||
new ResubmitComputationEvent.ResubmitComputationHandler() {
|
try {
|
||||||
@Override
|
statusPanel = computationStatusPanels.get(event
|
||||||
public void onResubmitComputation(
|
.getComputationStatusPanelIndex());
|
||||||
ResubmitComputationEvent event) {
|
} catch (IndexOutOfBoundsException e) {
|
||||||
resubmitComputation(event.getJobItem());
|
Log.debug("No ComputationStatusPanel retrieved!");
|
||||||
}
|
Log.debug(e.getLocalizedMessage());
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resubmitComputation(final ComputationItem computationItem) {
|
if (statusPanel == null) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
statusPanel.computationStarted(event.getComputationId());
|
||||||
|
forceLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.error(e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resubmitComputation(ResubmitComputationExecutionEvent event) {
|
||||||
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
||||||
computationItem.getOperator());
|
event.getComputationItem().getOperator());
|
||||||
computationStatusPanels.add(statusPanel);
|
computationStatusPanels.add(statusPanel);
|
||||||
if (v.getWidgetCount() == 0) {
|
if (v.getWidgetCount() == 0) {
|
||||||
v.add(statusPanel, new VerticalLayoutData(1, -1, new Margins(20)));
|
v.add(statusPanel, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
} else {
|
} else {
|
||||||
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1, new Margins(20)));
|
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1, new Margins(
|
||||||
|
20)));
|
||||||
}
|
}
|
||||||
removeAllButton.setEnabled(true);
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
DataMinerManager.getService().resubmit(
|
statusPanel.computationStarted(event.getComputationItem()
|
||||||
computationItem.getComputationId(),
|
.getComputationId());
|
||||||
new AsyncCallback<ComputationId>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(ComputationId computationId) {
|
|
||||||
if (computationId == null)
|
|
||||||
UtilsGXT3
|
|
||||||
.alert("ERROR",
|
|
||||||
"Failed to resubmit computation "
|
|
||||||
+ computationItem.getName()
|
|
||||||
+ ", the computation id is null (1)");
|
|
||||||
else {
|
|
||||||
statusPanel.computationStarted(computationId);
|
|
||||||
EventBusProvider.INSTANCE
|
|
||||||
.fireEvent(new JobsGridGotDirtyEvent());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
|
||||||
UtilsGXT3.alert("ERROR",
|
|
||||||
"Failed to start computation "
|
|
||||||
+ computationItem.getName()
|
|
||||||
+ " (2)<br/>Cause:" + caught.getCause()
|
|
||||||
+ "<br/>Message:" + caught.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.gcube.portlets.user.dataminermanager.client.bean.output.ObjectResourc
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource.ResourceType;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource.ResourceType;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.output.TableResource;
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.TableResource;
|
||||||
|
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.client.widgets.ImagesViewer;
|
import org.gcube.portlets.user.dataminermanager.client.widgets.ImagesViewer;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.widgets.ResourceViewer;
|
import org.gcube.portlets.user.dataminermanager.client.widgets.ResourceViewer;
|
||||||
|
@ -56,7 +57,7 @@ public class ComputationOutputPanel extends SimpleContainer {
|
||||||
add(v);
|
add(v);
|
||||||
|
|
||||||
// request for a jobItem linked with the computationId (or jobId)
|
// request for a jobItem linked with the computationId (or jobId)
|
||||||
DataMinerManager.getService().getResourceByComputationId(computationId,
|
DataMinerPortletServiceAsync.INSTANCE.getResourceByComputationId(computationId,
|
||||||
new AsyncCallback<Resource>() {
|
new AsyncCallback<Resource>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Resource result) {
|
public void onSuccess(Resource result) {
|
||||||
|
|
|
@ -2,9 +2,9 @@ package org.gcube.portlets.user.dataminermanager.client.experimentArea;
|
||||||
|
|
||||||
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.events.StartComputationEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationEvent.HasStartComputationEventHandler;
|
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent.ComputationReadyEventHandler;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationEvent.StartComputationEventHandler;
|
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent.HasComputationReadyEventHandler;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.experimentArea.ComputationParametersPanel.ComputationParametersPanelHandler;
|
import org.gcube.portlets.user.dataminermanager.client.experimentArea.ComputationParametersPanel.ComputationParametersPanelHandler;
|
||||||
|
|
||||||
import com.google.gwt.event.shared.HandlerRegistration;
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ComputationPanel extends FramedPanel implements
|
public class ComputationPanel extends FramedPanel implements HasComputationReadyEventHandler
|
||||||
HasStartComputationEventHandler {
|
{
|
||||||
private static final String DELETE_ALL_BUTTON_TOOLTIP = "Remove All Operators";
|
private static final String DELETE_ALL_BUTTON_TOOLTIP = "Remove All Operators";
|
||||||
private TextButton removeAllButton;
|
private TextButton removeAllButton;
|
||||||
private ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
@ -55,6 +55,7 @@ public class ComputationPanel extends FramedPanel implements
|
||||||
private void create() {
|
private void create() {
|
||||||
computationParametersPanel=null;
|
computationParametersPanel=null;
|
||||||
topV = new VerticalLayoutContainer();
|
topV = new VerticalLayoutContainer();
|
||||||
|
topV.setScrollMode(ScrollMode.NONE);
|
||||||
setToolBar();
|
setToolBar();
|
||||||
topV.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
topV.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
SimpleContainer operator = new SimpleContainer();
|
SimpleContainer operator = new SimpleContainer();
|
||||||
|
@ -107,21 +108,20 @@ public class ComputationPanel extends FramedPanel implements
|
||||||
new BoxLayoutData(new Margins(0)));
|
new BoxLayoutData(new Margins(0)));
|
||||||
v.add(hBox, new VerticalLayoutData(1, -1, new Margins(10,0,0,0)));
|
v.add(hBox, new VerticalLayoutData(1, -1, new Margins(10,0,0,0)));
|
||||||
v.add(computationParametersPanel, new VerticalLayoutData(1, -1,
|
v.add(computationParametersPanel, new VerticalLayoutData(1, -1,
|
||||||
new Margins(0,5,5,5)));
|
new Margins(0)));
|
||||||
removeAllButton.setEnabled(true);
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerRegistration addStartComputationEventHandler(
|
public HandlerRegistration addComputationReadyEventHandler(
|
||||||
StartComputationEventHandler handler) {
|
ComputationReadyEventHandler handler) {
|
||||||
return addHandler(handler, StartComputationEvent.getType());
|
return addHandler(handler, ComputationReadyEvent.getType());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addOperator(Operator op) {
|
public void addOperator(Operator operator) {
|
||||||
computationParametersPanel = new ComputationParametersPanel(op);
|
computationParametersPanel = new ComputationParametersPanel(operator);
|
||||||
computationParametersPanel.setHandler(new ComputationParametersPanelHandler() {
|
computationParametersPanel.setHandler(new ComputationParametersPanelHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void startComputation(String computationTitle,
|
public void startComputation(String computationTitle,
|
||||||
|
@ -130,8 +130,8 @@ public class ComputationPanel extends FramedPanel implements
|
||||||
forceLayout();
|
forceLayout();
|
||||||
computationParametersPanel.updateOperatorParametersValues();
|
computationParametersPanel.updateOperatorParametersValues();
|
||||||
Operator op = computationParametersPanel.getOperator();
|
Operator op = computationParametersPanel.getOperator();
|
||||||
StartComputationEvent startComputationEvent = new StartComputationEvent(op, computationTitle, computationDescription);
|
ComputationReadyEvent event = new ComputationReadyEvent(op, computationTitle, computationDescription);
|
||||||
fireEvent(startComputationEvent);
|
fireEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ 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;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.parametersfield.OperatorFieldWidget;
|
import org.gcube.portlets.user.dataminermanager.client.parametersfield.OperatorFieldWidget;
|
||||||
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.util.UtilsGXT3;
|
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
@ -98,22 +99,21 @@ 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");
|
img.setStylePrimaryName("workflow-icon");//-15
|
||||||
v.add(img, new VerticalLayoutData(-1, -1, new Margins(-10, 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>"
|
||||||
+ operator.getName() + "</span>");
|
+ operator.getName() + "</span>");
|
||||||
title.addStyleName("workflow-title");
|
title.addStyleName("workflow-title");
|
||||||
v.add(title, new VerticalLayoutData(-1, -1, new Margins(15, 0, 0, -25)));
|
v.add(title, new VerticalLayoutData(-1, -1, new Margins(20, 0, 0, -25)));
|
||||||
|
|
||||||
String descr = operator.getDescription();
|
String descr = operator.getDescription();
|
||||||
descr = (descr == null || descr.contentEquals("")) ? "no-description"
|
descr = (descr == null || descr.contentEquals("")) ? "no-description"
|
||||||
: operator.getDescription();
|
: operator.getDescription();//display:block;clear:both;'
|
||||||
HtmlLayoutContainer description = new HtmlLayoutContainer("<span style='padding-right:10px;'>"
|
HtmlLayoutContainer description = new HtmlLayoutContainer("<span style='padding-left:10px;padding-right:10px'>"
|
||||||
+ descr + "</span>");
|
+ descr + "</span>");
|
||||||
description.addStyleName("workflow-description");
|
description.addStyleName("workflow-description");
|
||||||
v.add(description, new VerticalLayoutData(-1, -1, new Margins(0, 5, 0,
|
v.add(description, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
10)));
|
|
||||||
|
|
||||||
addTitleField();
|
addTitleField();
|
||||||
|
|
||||||
|
@ -194,15 +194,16 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
titleField.setWidth(250);
|
titleField.setWidth(250);
|
||||||
titleField.setValue(defaultComputationTitle);
|
titleField.setValue(defaultComputationTitle);
|
||||||
FieldLabel titleLabel = new FieldLabel(titleField, "Computation Title");
|
FieldLabel titleLabel = new FieldLabel(titleField, "Computation Title");
|
||||||
|
titleLabel.addStyleName("workflow-computation-title");
|
||||||
v.add(titleLabel, new VerticalLayoutData(-1, -1,
|
v.add(titleLabel, new VerticalLayoutData(-1, -1,
|
||||||
new Margins(5, 0, 0, 5)));
|
new Margins(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parametersPanel
|
* @param parametersPanel
|
||||||
*/
|
*/
|
||||||
private void loadOperatorParameters() {
|
private void loadOperatorParameters() {
|
||||||
DataMinerManager.getService().getParameters(operator,
|
DataMinerPortletServiceAsync.INSTANCE.getParameters(operator,
|
||||||
new AsyncCallback<List<Parameter>>() {
|
new AsyncCallback<List<Parameter>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<Parameter> result) {
|
public void onSuccess(List<Parameter> result) {
|
||||||
|
|
|
@ -5,16 +5,15 @@ package org.gcube.portlets.user.dataminermanager.client.experimentArea;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
|
||||||
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.common.EventBusProvider;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationRequestEvent;
|
||||||
|
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.Constants;
|
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.dom.client.Style.Unit;
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
|
@ -137,29 +136,11 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
|
|
||||||
|
|
||||||
private void cancelComputation(){
|
private void cancelComputation(){
|
||||||
DataMinerManager.getService().cancelComputation(computationId, new AsyncCallback<String>() {
|
CancelComputationRequestEvent event=new CancelComputationRequestEvent(computationId);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
|
||||||
EventBusProvider.INSTANCE.fireEvent(new SessionExpiredEvent());
|
|
||||||
} else {
|
|
||||||
UtilsGXT3.alert(
|
|
||||||
"Error",
|
|
||||||
"Error in cancel computation: ComputationId="+computationId.getId()+", Error="
|
|
||||||
+ caught.getLocalizedMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String result) {
|
|
||||||
Log.debug(result);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param computationId
|
* @param computationId
|
||||||
|
@ -234,7 +215,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.debug("Timer run .....");
|
Log.debug("Timer run .....");
|
||||||
DataMinerManager.getService().getComputationStatus(computationId, new AsyncCallback<ComputationStatus>() {
|
DataMinerPortletServiceAsync.INSTANCE.getComputationStatus(computationId, new AsyncCallback<ComputationStatus>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
|
|
@ -12,6 +12,7 @@ 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.bean.OperatorCategory;
|
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorCategory;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
|
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
|
||||||
|
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.Constants;
|
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||||
|
|
||||||
|
@ -95,7 +96,7 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
// if the operators classification is not loaded, let's load by an rpc
|
// if the operators classification is not loaded, let's load by an rpc
|
||||||
if (DataMinerManager.getOperatorsClassifications() == null) {
|
if (DataMinerManager.getOperatorsClassifications() == null) {
|
||||||
waitMessage(true);
|
waitMessage(true);
|
||||||
DataMinerManager.getService().getOperatorsClassifications(
|
DataMinerPortletServiceAsync.INSTANCE.getOperatorsClassifications(
|
||||||
new AsyncCallback<List<OperatorsClassification>>() {
|
new AsyncCallback<List<OperatorsClassification>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,8 +6,8 @@ package org.gcube.portlets.user.dataminermanager.client.experimentArea;
|
||||||
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.common.EventBusProvider;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationEvent;
|
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.sencha.gxt.widget.core.client.TabItemConfig;
|
import com.sencha.gxt.widget.core.client.TabItemConfig;
|
||||||
|
@ -50,12 +50,12 @@ public class WorkflowPanel extends TabPanel {
|
||||||
.folderExplore());
|
.folderExplore());
|
||||||
computationPanel = new ComputationPanel();
|
computationPanel = new ComputationPanel();
|
||||||
computationPanel
|
computationPanel
|
||||||
.addStartComputationEventHandler(new StartComputationEvent.StartComputationEventHandler() {
|
.addComputationReadyEventHandler(new ComputationReadyEvent.ComputationReadyEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(StartComputationEvent event) {
|
public void onReady(ComputationReadyEvent event) {
|
||||||
Log.debug("StartComputationEvent Received:"+event);
|
Log.debug("StartComputationEvent Received:"+event);
|
||||||
startComputation(event.getOp(), event.getComputationTitle(),
|
startComputation(event.getOperator(), event.getComputationTitle(),
|
||||||
event.getComputationDescription());
|
event.getComputationDescription());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -77,16 +77,23 @@ public class WorkflowPanel extends TabPanel {
|
||||||
*/
|
*/
|
||||||
private void bind() {
|
private void bind() {
|
||||||
EventBusProvider.INSTANCE.addHandler(
|
EventBusProvider.INSTANCE.addHandler(
|
||||||
ResubmitComputationEvent.getType(),
|
ResubmitComputationExecutionEvent.getType(),
|
||||||
new ResubmitComputationEvent.ResubmitComputationHandler() {
|
new ResubmitComputationExecutionEvent.ResubmitComputationExecutionEventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onResubmitComputation(
|
public void onResubmit(
|
||||||
ResubmitComputationEvent event) {
|
ResubmitComputationExecutionEvent event) {
|
||||||
setActiveWidget(computationExecutionPanel);
|
resubmitComputation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private void resubmitComputation(){
|
||||||
|
setActiveWidget(computationExecutionPanel);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param computationTitle
|
* @param computationTitle
|
||||||
* @param operator
|
* @param operator
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.client.rpc;
|
package org.gcube.portlets.user.dataminermanager.client.rpc;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.CsvMetadata;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.FileMetadata;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ImportStatus;
|
|
||||||
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.bean.OperatorsClassification;
|
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ResourceItem;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ResourceItem;
|
||||||
|
|
|
@ -58,7 +58,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
// private static final long CACHE_REFRESH_TIME = 30 * 60 * 1000; // 30
|
// private static final long CACHE_REFRESH_TIME = 30 * 60 * 1000; // 30
|
||||||
// minutes
|
// minutes
|
||||||
|
|
||||||
|
|
||||||
// private final static String SEPARATOR = AlgorithmConfiguration
|
// private final static String SEPARATOR = AlgorithmConfiguration
|
||||||
// .getListSeparator();
|
// .getListSeparator();
|
||||||
private static Logger logger = LoggerFactory
|
private static Logger logger = LoggerFactory
|
||||||
|
@ -142,38 +141,40 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ComputationId startComputation(Operator operator, String computationTitle,
|
public ComputationId startComputation(Operator operator,
|
||||||
String computationDescription) throws Exception {
|
String computationTitle, String computationDescription)
|
||||||
|
throws Exception {
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||||
|
logger.debug("StartComputation(): [computationTitle="
|
||||||
|
+ computationTitle + ", computationDescription="
|
||||||
|
+ computationDescription + ", operator=" + operator + "]");
|
||||||
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
||||||
return smClient.startComputation(operator, computationTitle,
|
return smClient.startComputation(operator, computationTitle,
|
||||||
computationDescription);
|
computationDescription);
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in computation: " + e.getLocalizedMessage());
|
logger.error("Error in start computation: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new Exception(e.getLocalizedMessage());
|
throw new Exception(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ComputationId resubmit(ComputationId computationId) throws ServiceException {
|
public ComputationId resubmit(ComputationId computationId)
|
||||||
|
throws ServiceException {
|
||||||
try {
|
try {
|
||||||
logger.info("RESUBMIT COMPUTATION: " + computationId);
|
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||||
|
logger.debug("Resubmit(): " + computationId);
|
||||||
|
|
||||||
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
||||||
|
return smClient.resubmitComputation(computationId);
|
||||||
// String computationId =
|
|
||||||
// factory.resubmitComputation(jobItem.getId());
|
|
||||||
// return computationId;
|
|
||||||
return computationId;
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in resubmit: " + e.getLocalizedMessage());
|
logger.error("Error in resubmit computation: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new ServiceException(e.getLocalizedMessage());
|
throw new ServiceException(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
|
@ -232,8 +233,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Resource getResourceByComputationId(ComputationId computationId) {
|
public Resource getResourceByComputationId(ComputationId computationId) {
|
||||||
try {
|
try {
|
||||||
|
@ -242,7 +241,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||||
|
|
||||||
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
SClient smClient = SessionUtil.getSClient(session, aslSession);
|
||||||
Resource resource= smClient.getResourceByComputationId(computationId);
|
Resource resource = smClient
|
||||||
|
.getResourceByComputationId(computationId);
|
||||||
Log.debug("Resoure: " + resource);
|
Log.debug("Resoure: " + resource);
|
||||||
return resource;
|
return resource;
|
||||||
|
|
||||||
|
@ -256,8 +256,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getParametersMapByComputationId(ComputationId jobId)
|
public Map<String, String> getParametersMapByComputationId(
|
||||||
throws ServiceException {
|
ComputationId jobId) throws ServiceException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
@ -301,13 +301,9 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String saveImage(ComputationId computationId, ImagesResource imagesResource)
|
public String saveImage(ComputationId computationId,
|
||||||
throws Exception {
|
ImagesResource imagesResource) throws Exception {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
@ -336,7 +332,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
"This folder contains images obtained from Data Miner Manager");
|
"This folder contains images obtained from Data Miner Manager");
|
||||||
|
|
||||||
} catch (ItemAlreadyExistException e) {
|
} catch (ItemAlreadyExistException e) {
|
||||||
folder = (WorkspaceFolder) rootFolder.find(computationId.getId());
|
folder = (WorkspaceFolder) rootFolder.find(computationId
|
||||||
|
.getId());
|
||||||
}
|
}
|
||||||
InputStream inputStream = new URL(imagesResource.getLink())
|
InputStream inputStream = new URL(imagesResource.getLink())
|
||||||
.openStream();
|
.openStream();
|
||||||
|
@ -437,7 +434,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||||
logger.debug("getDataMinerWorkArea()");
|
logger.debug("getDataMinerWorkArea()");
|
||||||
DataMinerWorkAreaManager dataMinerWorkAreaManager=new DataMinerWorkAreaManager(aslSession);
|
DataMinerWorkAreaManager dataMinerWorkAreaManager = new DataMinerWorkAreaManager(
|
||||||
|
aslSession);
|
||||||
return dataMinerWorkAreaManager.getDataMinerWorkArea();
|
return dataMinerWorkAreaManager.getDataMinerWorkArea();
|
||||||
|
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
|
@ -449,7 +447,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPublicLink(ItemDescription itemDescription)
|
public String getPublicLink(ItemDescription itemDescription)
|
||||||
throws ServiceException {
|
throws ServiceException {
|
||||||
|
@ -490,7 +487,4 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.user.dataminermanager.server.smservice;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
||||||
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.bean.OperatorsClassification;
|
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
|
||||||
|
@ -33,18 +34,20 @@ public abstract class SClient {
|
||||||
String computationTitle, String computationDescription)
|
String computationTitle, String computationDescription)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
public abstract ComputationStatus getComputationStatus(ComputationId computationId)
|
public abstract ComputationStatus getComputationStatus(
|
||||||
throws Exception;
|
ComputationId computationId) throws Exception;
|
||||||
|
|
||||||
public abstract Resource getResourceByComputationId(ComputationId computationId)
|
public abstract Resource getResourceByComputationId(
|
||||||
throws Exception;
|
ComputationId computationId) throws Exception;
|
||||||
|
|
||||||
public abstract String cancelComputation(ComputationId computationId)
|
public abstract String cancelComputation(ComputationId computationId)
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
|
public abstract ComputationId resubmitComputation(
|
||||||
|
ComputationId computationId) throws Exception;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "SClient []";
|
return "SClient []";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -26,6 +26,7 @@ import net.opengis.wps.x100.SupportedComplexDataInputType;
|
||||||
import net.opengis.wps.x100.impl.ExecuteResponseDocumentImpl;
|
import net.opengis.wps.x100.impl.ExecuteResponseDocumentImpl;
|
||||||
|
|
||||||
import org.apache.xmlbeans.XmlString;
|
import org.apache.xmlbeans.XmlString;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
|
||||||
|
@ -1117,4 +1118,11 @@ public class SClient4WPS extends SClient {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ComputationId resubmitComputation(ComputationId computationId)
|
||||||
|
throws Exception {
|
||||||
|
//TODO
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,6 +256,12 @@
|
||||||
color: #505050;
|
color: #505050;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.workflow-computation-title {
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.workflow-fieldDescription {
|
.workflow-fieldDescription {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #505050;
|
color: #505050;
|
||||||
|
|
614315
test.log.1
614315
test.log.1
File diff suppressed because one or more lines are too long
383697
test.log.2
383697
test.log.2
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue