ref 11711: SAI - Add a simple text viewer so that log files created by Data Miner algorithms can be directly viewed in the browser
https://support.d4science.org/issues/11711 Added service info[ticket #12594] Added support to show log information [ticket #11711] Added support to show files html, json, pdf, txt [ticket #17106] Updated information show to the user when a computation is submitted [ticket #17030] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@181930 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6909c05d3f
commit
abe97f6770
|
@ -1,4 +1,16 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-5-0"
|
||||||
|
date="2019-10-01">
|
||||||
|
<Change>Added service info [ticket #12594]</Change>
|
||||||
|
<Change>Added support to show log information [ticket #11711]</Change>
|
||||||
|
<Change>Added support to show files html, json, pdf, txt [ticket
|
||||||
|
#17106]
|
||||||
|
</Change>
|
||||||
|
<Change>Updated information show to the user when a computation is
|
||||||
|
submitted [ticket #17030]
|
||||||
|
</Change>
|
||||||
|
<Change>Added Item Id support [ticket #16503]</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-4-0"
|
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-4-0"
|
||||||
date="2019-04-01">
|
date="2019-04-01">
|
||||||
<Change>Added location and zoom support [ticket #11708]</Change>
|
<Change>Added location and zoom support [ticket #11708]</Change>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>data-miner-manager-widget</artifactId>
|
<artifactId>data-miner-manager-widget</artifactId>
|
||||||
<version>1.4.0-SNAPSHOT</version>
|
<version>1.5.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>data-miner-manager-widget</name>
|
<name>data-miner-manager-widget</name>
|
||||||
<description>data-miner-manager-widget offers a unique access to perform data mining and statistical operations on heterogeneous data</description>
|
<description>data-miner-manager-widget offers a unique access to perform data mining and statistical operations on heterogeneous data</description>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
||||||
|
@ -26,6 +27,8 @@ import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.OutputDat
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.RefreshDataMinerWorkAreaEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.RefreshDataMinerWorkAreaEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ResubmitComputationExecutionEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ResubmitComputationExecutionEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ResubmitComputationExecutionRequestEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ResubmitComputationExecutionRequestEvent;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ServiceInfoEvent;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ServiceInfoRequestEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.SessionExpiredEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.StartComputationExecutionRequestEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.StartComputationExecutionRequestEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.TabularResourceInfoEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.TabularResourceInfoEvent;
|
||||||
|
@ -253,6 +256,17 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE.addHandler(ServiceInfoRequestEvent.TYPE,
|
||||||
|
new ServiceInfoRequestEvent.ServiceInfoRequestEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequest(ServiceInfoRequestEvent event) {
|
||||||
|
Log.debug("Catch EnvironmentRequestEvent: " + event);
|
||||||
|
retrieveEnvironment(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restoreUISession() {
|
private void restoreUISession() {
|
||||||
|
@ -546,6 +560,33 @@ public class DataMinerManagerController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void retrieveEnvironment(final ServiceInfoRequestEvent event) {
|
||||||
|
DataMinerPortletServiceAsync.INSTANCE.getServiceInfo(new AsyncCallback<ServiceInfo>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof SessionExpiredServiceException) {
|
||||||
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(new SessionExpiredEvent());
|
||||||
|
} else {
|
||||||
|
UtilsGXT3.alert("Error",
|
||||||
|
"Error retrieving DataMiner service info: " + caught.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ServiceInfo serviceInfo) {
|
||||||
|
Log.debug("DataMiner Service Info: " + serviceInfo);
|
||||||
|
|
||||||
|
ServiceInfoEvent serviceInfoEvent = new ServiceInfoEvent(serviceInfo);
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(serviceInfoEvent);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void fireDataMinerWorkAreaEventRetrieved(DataMinerWorkAreaRequestEvent event, DataMinerWorkArea result) {
|
private void fireDataMinerWorkAreaEventRetrieved(DataMinerWorkAreaRequestEvent event, DataMinerWorkArea result) {
|
||||||
dataMinerWorkArea = result;
|
dataMinerWorkArea = result;
|
||||||
DataMinerWorkAreaEvent dataMinerWorkAreaEvent = new DataMinerWorkAreaEvent(DataMinerWorkAreaEventType.OPEN,
|
DataMinerWorkAreaEvent dataMinerWorkAreaEvent = new DataMinerWorkAreaEvent(DataMinerWorkAreaEventType.OPEN,
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.widgets.dataminermanagerwidget.client.computations;
|
||||||
|
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFile;
|
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFile;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManagerPanel;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManagerPanel;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.widgets.ShowFileDialog;
|
||||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
||||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||||
|
@ -11,6 +12,9 @@ import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
import com.sencha.gxt.core.client.dom.XDOM;
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
|
||||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
@ -31,8 +35,8 @@ public class ComputationValueFilePanel extends SimpleContainer {
|
||||||
init();
|
init();
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(){
|
private void init() {
|
||||||
setBorders(false);
|
setBorders(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,19 +46,26 @@ public class ComputationValueFilePanel extends SimpleContainer {
|
||||||
final String fileUrl = computationValueFile.getValue();
|
final String fileUrl = computationValueFile.getValue();
|
||||||
HtmlLayoutContainer fileNameHtml;
|
HtmlLayoutContainer fileNameHtml;
|
||||||
if (fileName != null) {
|
if (fileName != null) {
|
||||||
fileNameHtml = new HtmlLayoutContainer(
|
fileNameHtml = new HtmlLayoutContainer("<div class='computation-output-fileName'><p>"
|
||||||
"<div class='computation-output-fileName'><p>"
|
+ new SafeHtmlBuilder().appendEscaped(fileName).toSafeHtml().asString() + "</p></div>");
|
||||||
+ new SafeHtmlBuilder().appendEscaped(fileName)
|
|
||||||
.toSafeHtml().asString() + "</p></div>");
|
|
||||||
} else {
|
} else {
|
||||||
fileNameHtml = new HtmlLayoutContainer(
|
fileNameHtml = new HtmlLayoutContainer("<div class='computation-output-fileName'><p>"
|
||||||
"<div class='computation-output-fileName'><p>"
|
+ new SafeHtmlBuilder().appendEscaped("NoName").toSafeHtml().asString() + "</p></div>");
|
||||||
+ new SafeHtmlBuilder().appendEscaped("NoName")
|
|
||||||
.toSafeHtml().asString() + "</p></div>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lc.add(fileNameHtml, new VerticalLayoutData(-1, -1, new Margins(0)));
|
lc.add(fileNameHtml, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
TextButton downloadBtn = new TextButton("Download File");
|
|
||||||
|
TextButton showFileButton = new TextButton("Show");
|
||||||
|
showFileButton.setIcon(DataMinerManagerPanel.resources.pageWhite());
|
||||||
|
showFileButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
showFileCreate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
TextButton downloadBtn = new TextButton("Download");
|
||||||
downloadBtn.setIcon(DataMinerManagerPanel.resources.download());
|
downloadBtn.setIcon(DataMinerManagerPanel.resources.download());
|
||||||
downloadBtn.addSelectHandler(new SelectEvent.SelectHandler() {
|
downloadBtn.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,7 +74,7 @@ public class ComputationValueFilePanel extends SimpleContainer {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
TextButton netcdfButton = new TextButton("");
|
TextButton netcdfButton = new TextButton("");
|
||||||
netcdfButton.setIcon(DataMinerManagerPanel.resources.netcdf());
|
netcdfButton.setIcon(DataMinerManagerPanel.resources.netcdf());
|
||||||
netcdfButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
netcdfButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
@ -74,21 +85,45 @@ public class ComputationValueFilePanel extends SimpleContainer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
HBoxLayoutContainer buttonsContainer = new HBoxLayoutContainer();
|
||||||
|
buttonsContainer.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||||
|
BoxLayoutData buttonBoxLayoutData = new BoxLayoutData(new Margins(2, 2, 2, 2));
|
||||||
|
|
||||||
lc.add(downloadBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
if (fileName != null && !fileName.isEmpty()) {
|
||||||
if (computationValueFile.isNetcdf()) {
|
String fileNameLowerCase = fileName.toLowerCase();
|
||||||
lc.add(netcdfButton, new VerticalLayoutData(-1, -1, new Margins(0)));
|
if (fileNameLowerCase.endsWith(".html") || fileNameLowerCase.endsWith(".htm")
|
||||||
|
|| fileNameLowerCase.endsWith(".pdf") || fileNameLowerCase.endsWith(".log")
|
||||||
|
|| fileNameLowerCase.endsWith(".json") || fileNameLowerCase.endsWith(".txt")) {
|
||||||
|
buttonsContainer.add(showFileButton, buttonBoxLayoutData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// c.add(previewButton, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
buttonsContainer.add(downloadBtn, buttonBoxLayoutData);
|
||||||
|
if (computationValueFile.isNetcdf()) {
|
||||||
|
buttonsContainer.add(netcdfButton, buttonBoxLayoutData);
|
||||||
|
}
|
||||||
|
|
||||||
|
lc.add(buttonsContainer);
|
||||||
add(lc);
|
add(lc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showFileCreate() {
|
||||||
|
if (computationValueFile != null && computationValueFile.getValue() != null
|
||||||
|
&& !computationValueFile.getValue().isEmpty()) {
|
||||||
|
GWT.log("ShowFileCreate");
|
||||||
|
|
||||||
|
ShowFileDialog showFileDialog = new ShowFileDialog(computationValueFile.getValue());
|
||||||
|
showFileDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
showFileDialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void showNetCDFFile() {
|
private void showNetCDFFile() {
|
||||||
if (computationValueFile != null && computationValueFile.getValue() != null && !computationValueFile.getValue().isEmpty()
|
if (computationValueFile != null && computationValueFile.getValue() != null
|
||||||
&& computationValueFile.isNetcdf()) {
|
&& !computationValueFile.getValue().isEmpty() && computationValueFile.isNetcdf()) {
|
||||||
GWT.log("NetcdfBasicWidgetsManager");
|
GWT.log("NetcdfBasicWidgetsManager");
|
||||||
|
|
||||||
// Example
|
|
||||||
SelectVariableEventHandler handler = new SelectVariableEventHandler() {
|
SelectVariableEventHandler handler = new SelectVariableEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,5 +140,4 @@ public class ComputationValueFilePanel extends SimpleContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.events;
|
||||||
|
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service Info Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ServiceInfoEvent extends GwtEvent<ServiceInfoEvent.ServiceInfoEventHandler> {
|
||||||
|
|
||||||
|
public static Type<ServiceInfoEventHandler> TYPE = new Type<ServiceInfoEventHandler>();
|
||||||
|
private ServiceInfo serviceInfo;
|
||||||
|
|
||||||
|
public interface ServiceInfoEventHandler extends EventHandler {
|
||||||
|
void onRequest(ServiceInfoEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasServiceInfoEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addServiceInfoEventHandler(ServiceInfoEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceInfoEvent(ServiceInfo serviceInfo) {
|
||||||
|
this.serviceInfo = serviceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ServiceInfoEventHandler handler) {
|
||||||
|
handler.onRequest(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<ServiceInfoEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<ServiceInfoEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, ServiceInfoEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceInfo getServiceInfo() {
|
||||||
|
return serviceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ServiceInfoEvent [serviceInfo=" + serviceInfo + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.events;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service Info Request Event
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ServiceInfoRequestEvent extends GwtEvent<ServiceInfoRequestEvent.ServiceInfoRequestEventHandler> {
|
||||||
|
|
||||||
|
public static Type<ServiceInfoRequestEventHandler> TYPE = new Type<ServiceInfoRequestEventHandler>();
|
||||||
|
|
||||||
|
public interface ServiceInfoRequestEventHandler extends EventHandler {
|
||||||
|
void onRequest(ServiceInfoRequestEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasServiceInfoRequestEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addServiceInfoRequestEventHandler(ServiceInfoRequestEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceInfoRequestEvent() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ServiceInfoRequestEventHandler handler) {
|
||||||
|
handler.onRequest(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<ServiceInfoRequestEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type<ServiceInfoRequestEventHandler> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source, ServiceInfoRequestEvent event) {
|
||||||
|
source.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ServiceInfoRequestEvent []";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -3,17 +3,18 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.portlets.widgets.dataminermanagerwidget.client.experiments;
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.experiments;
|
||||||
|
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus.Status;
|
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.custom.progress.GreenProgressBar;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.custom.progress.GreenProgressBar;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.custom.progress.OrangeProgressBar;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.custom.progress.OrangeProgressBar;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.custom.progress.RedProgressBar;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.custom.progress.RedProgressBar;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.CancelComputationExecutionRequestEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.CancelComputationExecutionRequestEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.rpc.DataMinerPortletServiceAsync;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.rpc.DataMinerPortletServiceAsync;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.util.ElementsHighlights;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.util.UtilsGXT3;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.Constants;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.Constants;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus.Status;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -49,7 +50,8 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param operatorName operator name
|
* @param operatorName
|
||||||
|
* operator name
|
||||||
*/
|
*/
|
||||||
public ComputationStatusPanel(String operatorName) {
|
public ComputationStatusPanel(String operatorName) {
|
||||||
super();
|
super();
|
||||||
|
@ -65,8 +67,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
private void create() {
|
private void create() {
|
||||||
vert = new VerticalLayoutContainer();
|
vert = new VerticalLayoutContainer();
|
||||||
HtmlLayoutContainer title = new HtmlLayoutContainer(
|
HtmlLayoutContainer title = new HtmlLayoutContainer(
|
||||||
"<div class='computationStatusTitle'><p>Computation of <b>"
|
"<div class='computationStatusTitle'><p>Computation of <b>" + operatorName + "</b></p></div>");
|
||||||
+ operatorName + "</b></p></div>");
|
|
||||||
vert.add(title, new VerticalLayoutData(-1, -1, new Margins(0)));
|
vert.add(title, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
add(vert);
|
add(vert);
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
@ -85,9 +86,8 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
*/
|
*/
|
||||||
// vert.add(date, new VerticalLayoutData(-1, -1, new Margins(0)));
|
// vert.add(date, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
|
||||||
vert.add(new HtmlLayoutContainer("<p>Created, the id is "
|
vert.add(new HtmlLayoutContainer(
|
||||||
+ computationId.getId() + " [<a href='"
|
"<p><span style='margin-right:165px;'>Id:</span> " + computationId.getId() + "</p>"));
|
||||||
+ computationId.getUrlId() + "' >link</a>]</p>"));
|
|
||||||
|
|
||||||
TextButton equivalentRequestBtn = new TextButton();
|
TextButton equivalentRequestBtn = new TextButton();
|
||||||
equivalentRequestBtn.setText("Show");
|
equivalentRequestBtn.setText("Show");
|
||||||
|
@ -98,14 +98,26 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
showEquivalentRequestDialog();
|
showEquivalentRequestDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldLabel equivalentRequestLabel = new FieldLabel(
|
FieldLabel equivalentRequestLabel = new FieldLabel(equivalentRequestBtn, "WPS Request");
|
||||||
equivalentRequestBtn, "Equivalent Get Request");
|
equivalentRequestLabel.setLabelWidth(180);
|
||||||
equivalentRequestLabel.setLabelWidth(140);
|
vert.add(equivalentRequestLabel, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
vert.add(equivalentRequestLabel, new VerticalLayoutData(-1, -1,
|
|
||||||
new Margins(0)));
|
TextButton monitorComputationBtn = new TextButton();
|
||||||
|
monitorComputationBtn.setText("Show");
|
||||||
|
monitorComputationBtn.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
showLinkToMonitorComputationDialog();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
FieldLabel monitorComputationLabel = new FieldLabel(monitorComputationBtn, "Link to monitor the computation");
|
||||||
|
monitorComputationLabel.setLabelWidth(180);
|
||||||
|
vert.add(monitorComputationLabel, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
|
||||||
progressBar = new ProgressBar();
|
progressBar = new ProgressBar();
|
||||||
progressBar.updateProgress(0, "Starting...");
|
progressBar.updateProgress(0, "Starting...");
|
||||||
|
@ -123,24 +135,26 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cancelComputationBtn.getElement().getStyle()
|
cancelComputationBtn.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
.setMarginBottom(36, Unit.PX);
|
|
||||||
|
|
||||||
vert.add(cancelComputationBtn, new VerticalLayoutData(-1, -1,
|
vert.add(cancelComputationBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
new Margins(0)));
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
timer.scheduleRepeating(Constants.TIME_UPDATE_COMPUTATION_STATUS_PANEL);
|
timer.scheduleRepeating(Constants.TIME_UPDATE_COMPUTATION_STATUS_PANEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showEquivalentRequestDialog() {
|
private void showEquivalentRequestDialog() {
|
||||||
EquivalentRequestDialog equivalentRequestDialog = new EquivalentRequestDialog(
|
EquivalentRequestDialog equivalentRequestDialog = new EquivalentRequestDialog(computationId);
|
||||||
computationId);
|
|
||||||
equivalentRequestDialog.show();
|
equivalentRequestDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelComputation() {
|
private void showLinkToMonitorComputationDialog() {
|
||||||
CancelComputationExecutionRequestEvent event = new CancelComputationExecutionRequestEvent(
|
LinkToMonitorComputationDialog linkToMonitorComputDialogDialog = new LinkToMonitorComputationDialog(
|
||||||
computationId);
|
computationId);
|
||||||
|
linkToMonitorComputDialogDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cancelComputation() {
|
||||||
|
CancelComputationExecutionRequestEvent event = new CancelComputationExecutionRequestEvent(computationId);
|
||||||
EventBusProvider.INSTANCE.fireEvent(event);
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,8 +163,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
* @param operator
|
* @param operator
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void computationTerminated(ComputationId computationId,
|
private void computationTerminated(ComputationId computationId, ComputationStatus computationStatus) {
|
||||||
ComputationStatus computationStatus) {
|
|
||||||
Log.debug("Computation Terminated");
|
Log.debug("Computation Terminated");
|
||||||
Log.debug("Computation Status:" + computationStatus);
|
Log.debug("Computation Status:" + computationStatus);
|
||||||
if (terminated == false) {
|
if (terminated == false) {
|
||||||
|
@ -158,17 +171,14 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
cancelComputationBtn.setVisible(false);
|
cancelComputationBtn.setVisible(false);
|
||||||
if (computationStatus.isComplete()) {
|
if (computationStatus.isComplete()) {
|
||||||
Log.debug("Computation is Complete");
|
Log.debug("Computation is Complete");
|
||||||
Info.display("Terminated",
|
Info.display("Terminated", "The computation " + computationId.getId() + " of "
|
||||||
"The computation " + computationId.getId() + " of "
|
+ computationId.getOperatorName() + " is terminated correctly.");
|
||||||
+ computationId.getOperatorName()
|
|
||||||
+ " is terminated correctly.");
|
|
||||||
int index = vert.getWidgetIndex(progressBar);
|
int index = vert.getWidgetIndex(progressBar);
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
// TODO
|
// TODO
|
||||||
progressBar = new GreenProgressBar();
|
progressBar = new GreenProgressBar();
|
||||||
progressBar.updateProgress(1, "Computation Complete");
|
progressBar.updateProgress(1, "Computation Complete");
|
||||||
vert.insert(progressBar, index, new VerticalLayoutData(1, -1,
|
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
new Margins(20)));
|
|
||||||
showComputationCompletedOutput();
|
showComputationCompletedOutput();
|
||||||
} else if (computationStatus.isFailed()) {
|
} else if (computationStatus.isFailed()) {
|
||||||
Log.debug("Computation is Failed");
|
Log.debug("Computation is Failed");
|
||||||
|
@ -176,46 +186,37 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
if (computationStatus.getError() == null) {
|
if (computationStatus.getError() == null) {
|
||||||
errorMessage = new String("Computation Failed!");
|
errorMessage = new String("Computation Failed!");
|
||||||
} else {
|
} else {
|
||||||
errorMessage = computationStatus.getError()
|
errorMessage = computationStatus.getError().getLocalizedMessage();
|
||||||
.getLocalizedMessage();
|
ElementsHighlights el = new ElementsHighlights();
|
||||||
|
errorMessage = el.createLinkFromText(errorMessage);
|
||||||
|
|
||||||
}
|
}
|
||||||
Info.display("Failed",
|
Info.display("Failed", "The computation " + computationId.getId() + " of "
|
||||||
"The computation " + computationId.getId() + " of "
|
+ computationId.getOperatorName() + " is failed.");
|
||||||
+ computationId.getOperatorName()
|
UtilsGXT3.alert("Failed", "The computation " + computationId.getId() + " of "
|
||||||
+ " is failed.");
|
+ computationId.getOperatorName() + " has failed.</br>" + errorMessage);
|
||||||
UtilsGXT3.alert("Failed",
|
|
||||||
"The computation " + computationId.getId() + " of "
|
|
||||||
+ computationId.getOperatorName()
|
|
||||||
+ " has failed.</br>" + errorMessage);
|
|
||||||
int index = vert.getWidgetIndex(progressBar);
|
int index = vert.getWidgetIndex(progressBar);
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
// TODO
|
// TODO
|
||||||
progressBar = new RedProgressBar();
|
progressBar = new RedProgressBar();
|
||||||
progressBar.updateProgress(1, "Computation Failed");
|
progressBar.updateProgress(1, "Computation Failed");
|
||||||
progressBar.getElement().getStyle()
|
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
.setMarginBottom(36, Unit.PX);
|
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
vert.insert(progressBar, index, new VerticalLayoutData(1, -1,
|
|
||||||
new Margins(20)));
|
|
||||||
} else if (computationStatus.isCancelled()) {
|
} else if (computationStatus.isCancelled()) {
|
||||||
Log.debug("Computation Cancelled");
|
Log.debug("Computation Cancelled");
|
||||||
String errorMessage;
|
String errorMessage;
|
||||||
errorMessage = new String("Computation Cancelled!");
|
errorMessage = new String("Computation Cancelled!");
|
||||||
Info.display("Info", "The computation " + computationId.getId()
|
Info.display("Info", "The computation " + computationId.getId() + " of "
|
||||||
+ " of " + computationId.getOperatorName()
|
+ computationId.getOperatorName() + " has been cancelled.");
|
||||||
+ " has been cancelled.");
|
UtilsGXT3.info("Info", "The computation " + computationId.getId() + " of "
|
||||||
UtilsGXT3.info("Info",
|
+ computationId.getOperatorName() + " has been cancelled.</br>" + errorMessage);
|
||||||
"The computation " + computationId.getId() + " of "
|
|
||||||
+ computationId.getOperatorName()
|
|
||||||
+ " has been cancelled.</br>" + errorMessage);
|
|
||||||
int index = vert.getWidgetIndex(progressBar);
|
int index = vert.getWidgetIndex(progressBar);
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
// TODO
|
// TODO
|
||||||
progressBar = new OrangeProgressBar();
|
progressBar = new OrangeProgressBar();
|
||||||
progressBar.updateProgress(1, "Computation Cancelled");
|
progressBar.updateProgress(1, "Computation Cancelled");
|
||||||
progressBar.getElement().getStyle()
|
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
.setMarginBottom(36, Unit.PX);
|
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
vert.insert(progressBar, index, new VerticalLayoutData(1, -1,
|
|
||||||
new Margins(20)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -228,16 +229,11 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
*/
|
*/
|
||||||
private void showComputationCompletedOutput() {
|
private void showComputationCompletedOutput() {
|
||||||
HtmlLayoutContainer computationEndMessage = new HtmlLayoutContainer(
|
HtmlLayoutContainer computationEndMessage = new HtmlLayoutContainer(
|
||||||
"<p>The computation <b>" + computationId.getOperatorName()
|
"<p>The computation <b>" + computationId.getOperatorName() + "</b> finished.</p>");
|
||||||
+ "</b> finished.</p>");
|
vert.add(computationEndMessage, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
vert.add(computationEndMessage, new VerticalLayoutData(-1, -1,
|
ComputationOutputPanel computationOutputPanel = new ComputationOutputPanel(computationId);
|
||||||
new Margins(0)));
|
computationOutputPanel.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
ComputationOutputPanel computationOutputPanel = new ComputationOutputPanel(
|
vert.add(computationOutputPanel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
computationId);
|
|
||||||
computationOutputPanel.getElement().getStyle()
|
|
||||||
.setMarginBottom(36, Unit.PX);
|
|
||||||
vert.add(computationOutputPanel, new VerticalLayoutData(1, -1,
|
|
||||||
new Margins(0)));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,8 +241,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
* @param computationStatus
|
* @param computationStatus
|
||||||
*/
|
*/
|
||||||
private void updateStatus(ComputationStatus computationStatus) {
|
private void updateStatus(ComputationStatus computationStatus) {
|
||||||
Log.debug("Conputation Status Panel ::Update Status "
|
Log.debug("Conputation Status Panel ::Update Status " + computationStatus);
|
||||||
+ computationStatus);
|
|
||||||
if (computationStatus.getStatus().compareTo(Status.ACCEPTED) == 0)
|
if (computationStatus.getStatus().compareTo(Status.ACCEPTED) == 0)
|
||||||
progressBar.updateText("Accepted...");
|
progressBar.updateText("Accepted...");
|
||||||
else {
|
else {
|
||||||
|
@ -254,8 +249,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
if (percentage == 0) {
|
if (percentage == 0) {
|
||||||
progressBar.updateText("Running, 0% Complete");
|
progressBar.updateText("Running, 0% Complete");
|
||||||
} else {
|
} else {
|
||||||
progressBar.updateProgress(percentage / 100, "Running, "
|
progressBar.updateProgress(percentage / 100, "Running, " + percentage + "% Complete");
|
||||||
+ percentage + "% Complete");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
@ -266,8 +260,8 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.debug("Timer run .....");
|
Log.debug("Timer run .....");
|
||||||
DataMinerPortletServiceAsync.INSTANCE.getComputationStatus(
|
DataMinerPortletServiceAsync.INSTANCE.getComputationStatus(computationId,
|
||||||
computationId, new AsyncCallback<ComputationStatus>() {
|
new AsyncCallback<ComputationStatus>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -275,25 +269,19 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
vert.remove(index);
|
vert.remove(index);
|
||||||
// TODO
|
// TODO
|
||||||
progressBar = new RedProgressBar();
|
progressBar = new RedProgressBar();
|
||||||
progressBar.updateProgress(1,
|
progressBar.updateProgress(1, "Failed to get the status");
|
||||||
"Failed to get the status");
|
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
progressBar.getElement().getStyle()
|
vert.insert(progressBar, index, new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
.setMarginBottom(36, Unit.PX);
|
|
||||||
vert.insert(progressBar, index,
|
|
||||||
new VerticalLayoutData(1, -1, new Margins(
|
|
||||||
20)));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(
|
public void onSuccess(ComputationStatus computationStatus) {
|
||||||
ComputationStatus computationStatus) {
|
Log.debug("ComputationStatus: " + computationStatus);
|
||||||
Log.debug("ComputationStatus: "+computationStatus);
|
|
||||||
if (computationStatus != null) {
|
if (computationStatus != null) {
|
||||||
if (computationStatus.isTerminated()) {
|
if (computationStatus.isTerminated()) {
|
||||||
ComputationTimer.this.cancel();
|
ComputationTimer.this.cancel();
|
||||||
computationTerminated(computationId,
|
computationTerminated(computationId, computationStatus);
|
||||||
computationStatus);
|
|
||||||
} else
|
} else
|
||||||
updateStatus(computationStatus);
|
updateStatus(computationStatus);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.experiments;
|
||||||
|
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.sencha.gxt.widget.core.client.Dialog;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||||
|
import com.sencha.gxt.widget.core.client.form.TextArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class LinkToMonitorComputationDialog extends Dialog {
|
||||||
|
private ComputationId computationId;
|
||||||
|
|
||||||
|
public LinkToMonitorComputationDialog(ComputationId computationId) {
|
||||||
|
super();
|
||||||
|
Log.debug("LinkToMonitorComputationDialog: " + computationId);
|
||||||
|
this.computationId = computationId;
|
||||||
|
init();
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
setModal(true);
|
||||||
|
setClosable(true);
|
||||||
|
setHeadingText("Link To Monitor The Computation");
|
||||||
|
setBodyBorder(true);
|
||||||
|
setHideOnButtonClick(true);
|
||||||
|
setPredefinedButtons(PredefinedButton.CLOSE);
|
||||||
|
getButtonBar().setPack(BoxLayoutPack.CENTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void create() {
|
||||||
|
TextArea infoArea = new TextArea();
|
||||||
|
infoArea.setHeight(200);
|
||||||
|
infoArea.setWidth(640);
|
||||||
|
infoArea.setValue(computationId.getUrlId());
|
||||||
|
infoArea.setReadOnly(true);
|
||||||
|
add(infoArea);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,6 +9,7 @@ import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusP
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ComputationReadyEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ComputationReadyEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ResubmitComputationExecutionEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ResubmitComputationExecutionEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.StartComputationExecutionRequestEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.StartComputationExecutionRequestEvent;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.info.ServiceInfoPanel;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -21,11 +22,13 @@ import com.sencha.gxt.widget.core.client.TabPanel;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class WorkflowPanel extends TabPanel {
|
public class WorkflowPanel extends TabPanel {
|
||||||
|
private static final String OPERATOR = "Operator";
|
||||||
public static final String DEFAULT_OPERATOR = "AQUAMAPS_SUITABLE";
|
private static final String SERVICE_INFO = "Service Profile";
|
||||||
|
|
||||||
//private ComputationExecutionPanel computationExecutionPanel;
|
//private ComputationExecutionPanel computationExecutionPanel;
|
||||||
private ComputationPanel computationPanel;
|
private ComputationPanel computationPanel;
|
||||||
|
private ServiceInfoPanel serviceInfoPanel;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,7 +47,7 @@ public class WorkflowPanel extends TabPanel {
|
||||||
|
|
||||||
private void create() {
|
private void create() {
|
||||||
|
|
||||||
TabItemConfig tabWorkFlowLcItemConf = new TabItemConfig("Operator",
|
TabItemConfig tabWorkFlowLcItemConf = new TabItemConfig(OPERATOR,
|
||||||
false);
|
false);
|
||||||
tabWorkFlowLcItemConf.setIcon(DataMinerManagerPanel.resources
|
tabWorkFlowLcItemConf.setIcon(DataMinerManagerPanel.resources
|
||||||
.folderExplore());
|
.folderExplore());
|
||||||
|
@ -61,14 +64,13 @@ public class WorkflowPanel extends TabPanel {
|
||||||
});
|
});
|
||||||
add(computationPanel, tabWorkFlowLcItemConf);
|
add(computationPanel, tabWorkFlowLcItemConf);
|
||||||
|
|
||||||
/*
|
|
||||||
TabItemConfig tabComputationPanelItemConf = new TabItemConfig(
|
TabItemConfig tabServiceInfoPanelItemConf = new TabItemConfig(
|
||||||
"Computations Execution", false);
|
SERVICE_INFO, false);
|
||||||
tabComputationPanelItemConf.setIcon(DataMinerManagerPanel.resources
|
tabServiceInfoPanelItemConf.setIcon(DataMinerManagerPanel.resources
|
||||||
.folderExplore());
|
.folderExplore());
|
||||||
computationExecutionPanel = new ComputationExecutionPanel();
|
serviceInfoPanel = new ServiceInfoPanel();
|
||||||
add(computationExecutionPanel, tabComputationPanelItemConf);
|
add(serviceInfoPanel, tabServiceInfoPanelItemConf);
|
||||||
*/
|
|
||||||
|
|
||||||
setActiveWidget(computationPanel);
|
setActiveWidget(computationPanel);
|
||||||
}
|
}
|
||||||
|
@ -105,9 +107,6 @@ public class WorkflowPanel extends TabPanel {
|
||||||
StartComputationExecutionRequestEvent event = new StartComputationExecutionRequestEvent(
|
StartComputationExecutionRequestEvent event = new StartComputationExecutionRequestEvent(
|
||||||
op, 1);
|
op, 1);
|
||||||
EventBusProvider.INSTANCE.fireEvent(event);
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
/*
|
|
||||||
setActiveWidget(computationExecutionPanel);
|
|
||||||
computationExecutionPanel.startNewComputation(op);*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.info;
|
||||||
|
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfoData;
|
||||||
|
|
||||||
|
import com.google.gwt.editor.client.Editor.Path;
|
||||||
|
import com.sencha.gxt.core.client.ValueProvider;
|
||||||
|
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||||
|
import com.sencha.gxt.data.shared.PropertyAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface ServiceInfoDataProperties extends PropertyAccess<ServiceInfoData> {
|
||||||
|
@Path("key")
|
||||||
|
ModelKeyProvider<ServiceInfoData> id();
|
||||||
|
|
||||||
|
ValueProvider<ServiceInfoData, String> key();
|
||||||
|
ValueProvider<ServiceInfoData, String> value();
|
||||||
|
ValueProvider<ServiceInfoData, String> category();
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,222 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.info;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfoData;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ServiceInfoEvent;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.ServiceInfoRequestEvent;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
|
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||||
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
|
import com.sencha.gxt.data.shared.ListStore;
|
||||||
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||||
|
import com.sencha.gxt.widget.core.client.form.FieldSet;
|
||||||
|
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
||||||
|
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||||
|
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||||
|
import com.sencha.gxt.widget.core.client.grid.GroupingView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ServiceInfoPanel extends FramedPanel {
|
||||||
|
|
||||||
|
private static final String RUNTIME_FEATURE = "Runtime features";
|
||||||
|
private static final String SERVICE_INFO_TITLE = "Service Profile";
|
||||||
|
private static final ServiceInfoDataProperties props = GWT.create(ServiceInfoDataProperties.class);
|
||||||
|
private VerticalLayoutContainer v;
|
||||||
|
private VerticalLayoutContainer environmentVBox;
|
||||||
|
|
||||||
|
public ServiceInfoPanel() {
|
||||||
|
super();
|
||||||
|
Log.debug("ServiceInfoPanel");
|
||||||
|
init();
|
||||||
|
create();
|
||||||
|
bind();
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(new ServiceInfoRequestEvent());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
setItemId("ServiceInfoPanel");
|
||||||
|
forceLayoutOnResize = true;
|
||||||
|
setBodyBorder(false);
|
||||||
|
setBorders(false);
|
||||||
|
setBodyStyle("backgroundColor:white;");
|
||||||
|
setHeaderVisible(false);
|
||||||
|
setResize(true);
|
||||||
|
setHeadingText(SERVICE_INFO_TITLE);
|
||||||
|
setBodyStyle("backgroundColor:white;");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void create() {
|
||||||
|
try {
|
||||||
|
v = new VerticalLayoutContainer();
|
||||||
|
v.setScrollMode(ScrollMode.AUTO);
|
||||||
|
add(v);
|
||||||
|
createView();
|
||||||
|
forceLayout();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.error("Error creating ServiceInfoPanel: " + e.getLocalizedMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bind() {
|
||||||
|
|
||||||
|
EventBusProvider.INSTANCE.addHandler(ServiceInfoEvent.TYPE, new ServiceInfoEvent.ServiceInfoEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequest(ServiceInfoEvent event) {
|
||||||
|
Log.debug("Catch ServiceInfoEvent");
|
||||||
|
showServiceInfo(event.getServiceInfo());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createView() {
|
||||||
|
|
||||||
|
SimpleContainer sectionTitle = new SimpleContainer();
|
||||||
|
SimpleContainer sectionSubTitle = new SimpleContainer();
|
||||||
|
|
||||||
|
// title
|
||||||
|
HtmlLayoutContainer title = new HtmlLayoutContainer(
|
||||||
|
"<center style='font-size:16px;font-weight:bold;'>" + SERVICE_INFO_TITLE + "</center>");
|
||||||
|
sectionTitle.add(title, new MarginData());
|
||||||
|
sectionTitle.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||||
|
v.add(sectionTitle, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
|
||||||
|
// subtitle
|
||||||
|
HtmlLayoutContainer subtitle = new HtmlLayoutContainer(
|
||||||
|
"<p style='font-size:12px;'>This page reports information on the DataMiner "
|
||||||
|
+ "service instance serving this working environment giving an up to date "
|
||||||
|
+ "picture of its capacities and capabilities.</p>");
|
||||||
|
sectionSubTitle.add(subtitle, new MarginData());
|
||||||
|
sectionSubTitle.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||||
|
v.add(sectionSubTitle, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private FieldSet environmentView() {
|
||||||
|
try {
|
||||||
|
environmentVBox = new VerticalLayoutContainer();
|
||||||
|
|
||||||
|
FieldSet configurationFieldSet = new FieldSet();
|
||||||
|
configurationFieldSet.setHeadingText(RUNTIME_FEATURE);
|
||||||
|
configurationFieldSet.setCollapsible(true);
|
||||||
|
configurationFieldSet.add(environmentVBox);
|
||||||
|
configurationFieldSet.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||||
|
return configurationFieldSet;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.error("Error in ServiceInfoPanel in environment: " + e.getLocalizedMessage(), e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showAddress(String address) {
|
||||||
|
// Service address
|
||||||
|
SimpleContainer sectionServerAddress = new SimpleContainer();
|
||||||
|
|
||||||
|
HtmlLayoutContainer addressHtml = new HtmlLayoutContainer(
|
||||||
|
"<p style='font-size:12px;'>The base url of the service instance is: " + "<a href='" + address + "'>"
|
||||||
|
+ address + "</a></p>");
|
||||||
|
sectionServerAddress.add(addressHtml, new MarginData());
|
||||||
|
sectionServerAddress.getElement().getStyle().setMarginRight(20, Unit.PX);
|
||||||
|
v.add(sectionServerAddress, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showServiceInfo(ServiceInfo serviceInfo) {
|
||||||
|
|
||||||
|
if (serviceInfo != null) {
|
||||||
|
|
||||||
|
String address=serviceInfo.getServiceAddress();
|
||||||
|
if(address!=null&&!address.isEmpty()){
|
||||||
|
showAddress(address);
|
||||||
|
}
|
||||||
|
|
||||||
|
FieldSet environmentFieldSet = environmentView();
|
||||||
|
v.add(environmentFieldSet, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
|
||||||
|
ArrayList<ServiceInfoData> properties=serviceInfo.getServiceProperties();
|
||||||
|
if (properties!=null&&!properties.isEmpty()) {
|
||||||
|
Grid<ServiceInfoData> grid = createInfoGrid(properties);
|
||||||
|
environmentVBox.add(grid, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||||
|
} else {
|
||||||
|
HtmlLayoutContainer emptyInfoContainer = new HtmlLayoutContainer(
|
||||||
|
"<div class='service-property'><p>No Info Available.</p></div>");
|
||||||
|
|
||||||
|
environmentVBox.add(emptyInfoContainer, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
FieldSet environmentFieldSet = environmentView();
|
||||||
|
v.add(environmentFieldSet, new VerticalLayoutData(-1, -1, new Margins(10)));
|
||||||
|
|
||||||
|
HtmlLayoutContainer emptyInfoContainer = new HtmlLayoutContainer(
|
||||||
|
"<div class='service-property'><p>No Info Available.</p></div>");
|
||||||
|
|
||||||
|
environmentVBox.add(emptyInfoContainer, new VerticalLayoutData(1, -1, new Margins(0, 4, 0, 4)));
|
||||||
|
}
|
||||||
|
|
||||||
|
forceLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Grid<ServiceInfoData> createInfoGrid(ArrayList<ServiceInfoData> properties) {
|
||||||
|
|
||||||
|
ColumnConfig<ServiceInfoData, String> keyCol = new ColumnConfig<ServiceInfoData, String>(props.key(), 100,
|
||||||
|
"Key");
|
||||||
|
ColumnConfig<ServiceInfoData, String> valueCol = new ColumnConfig<ServiceInfoData, String>(props.value(), 100,
|
||||||
|
"Value");
|
||||||
|
ColumnConfig<ServiceInfoData, String> categoryCol = new ColumnConfig<ServiceInfoData, String>(props.category(),
|
||||||
|
100,"Category");
|
||||||
|
|
||||||
|
List<ColumnConfig<ServiceInfoData, ?>> columns = new ArrayList<ColumnConfig<ServiceInfoData, ?>>();
|
||||||
|
columns.add(keyCol);
|
||||||
|
columns.add(valueCol);
|
||||||
|
columns.add(categoryCol);
|
||||||
|
|
||||||
|
ColumnModel<ServiceInfoData> cm = new ColumnModel<ServiceInfoData>(columns);
|
||||||
|
|
||||||
|
ListStore<ServiceInfoData> store = new ListStore<ServiceInfoData>(props.id());
|
||||||
|
store.addAll(properties);
|
||||||
|
|
||||||
|
final GroupingView<ServiceInfoData> groupingView = new GroupingView<ServiceInfoData>();
|
||||||
|
groupingView.setShowGroupedColumn(false);
|
||||||
|
groupingView.groupBy(categoryCol);
|
||||||
|
groupingView.setForceFit(true);
|
||||||
|
groupingView.setAutoExpandColumn(valueCol);
|
||||||
|
groupingView.setEmptyText("No info retrieved");
|
||||||
|
|
||||||
|
Grid<ServiceInfoData> grid = new Grid<ServiceInfoData>(store, cm, groupingView);
|
||||||
|
|
||||||
|
grid.setAllowTextSelection(true);
|
||||||
|
grid.setBorders(false);
|
||||||
|
grid.setColumnReordering(false);
|
||||||
|
|
||||||
|
// Stage manager, turn on state management
|
||||||
|
grid.setStateful(true);
|
||||||
|
grid.setStateId("gridServiceInfoData");
|
||||||
|
|
||||||
|
return grid;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,244 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.parametersfield;
|
||||||
|
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ItemIdParameter;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManagerPanel;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.workspace.DownloadWidget;
|
||||||
|
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||||
|
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
|
||||||
|
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
|
import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ItemIdFld extends AbstractFld {
|
||||||
|
|
||||||
|
private VerticalLayoutContainer vp;
|
||||||
|
|
||||||
|
// FileSelector fileSelector;
|
||||||
|
private WorkspaceExplorerSelectDialog wselectDialog;
|
||||||
|
private TextButton selectButton, selectButton2, cancelButton;
|
||||||
|
private ItemDescription selectedItem = null;
|
||||||
|
|
||||||
|
private ItemIdParameter itemIdParameter;
|
||||||
|
|
||||||
|
private SimpleContainer fieldContainer;
|
||||||
|
|
||||||
|
private HBoxLayoutContainer horiz;
|
||||||
|
|
||||||
|
private TextButton downloadButton;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param parameter
|
||||||
|
* parameter
|
||||||
|
*/
|
||||||
|
public ItemIdFld(Parameter parameter) {
|
||||||
|
super(parameter);
|
||||||
|
itemIdParameter = (ItemIdParameter) parameter;
|
||||||
|
|
||||||
|
SimpleContainer tabContainer = new SimpleContainer();
|
||||||
|
vp = new VerticalLayoutContainer();
|
||||||
|
init();
|
||||||
|
tabContainer.add(vp, new MarginData(new Margins(0)));
|
||||||
|
|
||||||
|
fieldContainer = new SimpleContainer();
|
||||||
|
horiz = new HBoxLayoutContainer();
|
||||||
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
if (itemIdParameter.getDescription() == null || itemIdParameter.getDescription().isEmpty()) {
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
} else {
|
||||||
|
descr = new HtmlLayoutContainer(
|
||||||
|
"<p style='margin-left:5px !important;'>" + itemIdParameter.getDescription() + "</p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
horiz.add(tabContainer, new BoxLayoutData(new Margins()));
|
||||||
|
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
|
fieldContainer.add(horiz);
|
||||||
|
showNoSelectionField();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
|
||||||
|
wselectDialog = new WorkspaceExplorerSelectDialog("Select Item", false);
|
||||||
|
|
||||||
|
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelectedItem(Item item) {
|
||||||
|
|
||||||
|
if (item == null) {
|
||||||
|
UtilsGXT3.info("Attention", "Select a valid item!");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
retrieveItemInformation(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(Throwable throwable) {
|
||||||
|
Log.error("Error in create project: " + throwable.getLocalizedMessage());
|
||||||
|
UtilsGXT3.alert("Error", throwable.getLocalizedMessage());
|
||||||
|
throwable.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAborted() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNotValidSelection() {
|
||||||
|
UtilsGXT3.info("Attention", "Select a valid item!");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
wselectDialog.addWorkspaceExplorerSelectNotificationListener(handler);
|
||||||
|
wselectDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
|
||||||
|
selectButton = new TextButton("Select Item");
|
||||||
|
selectButton.setIcon(DataMinerManagerPanel.resources.folderExplore());
|
||||||
|
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
wselectDialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
selectButton.setToolTip("Select Item");
|
||||||
|
|
||||||
|
selectButton2 = new TextButton("");
|
||||||
|
selectButton2.setIcon(DataMinerManagerPanel.resources.folderExplore());
|
||||||
|
selectButton2.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
wselectDialog.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
selectButton2.setToolTip("Select Another Item");
|
||||||
|
|
||||||
|
cancelButton = new TextButton("");
|
||||||
|
cancelButton.setIcon(DataMinerManagerPanel.resources.cancel());
|
||||||
|
cancelButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
selectedItem = null;
|
||||||
|
showNoSelectionField();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
downloadButton = new TextButton("");
|
||||||
|
downloadButton.setIcon(DataMinerManagerPanel.resources.download());
|
||||||
|
downloadButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
downloadFile();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void retrieveItemInformation(final Item item) {
|
||||||
|
Log.debug("Retrieved: " + item);
|
||||||
|
final ItemDescription itemDescription = new ItemDescription(item.getId(), item.getName(), item.getOwner(),
|
||||||
|
item.getPath(), item.getType().name());
|
||||||
|
selectedItem = itemDescription;
|
||||||
|
Log.debug("SelectedItem: " + selectedItem);
|
||||||
|
showFieldWithSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void downloadFile() {
|
||||||
|
if (selectedItem != null) {
|
||||||
|
DownloadWidget downloadWidget = new DownloadWidget();
|
||||||
|
downloadWidget.download(selectedItem.getId());
|
||||||
|
} else {
|
||||||
|
UtilsGXT3.info("Attention", "Select a Item!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showNoSelectionField() {
|
||||||
|
vp.clear();
|
||||||
|
vp.add(selectButton);
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showFieldWithSelection() {
|
||||||
|
String fileName = selectedItem.getName();
|
||||||
|
|
||||||
|
if (fileName == null || fileName.isEmpty()) {
|
||||||
|
fileName = "NoName";
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField tableDescription = new TextField();
|
||||||
|
tableDescription.setValue(fileName);
|
||||||
|
tableDescription.setReadOnly(true);
|
||||||
|
|
||||||
|
HBoxLayoutContainer h = new HBoxLayoutContainer();
|
||||||
|
h.add(tableDescription, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(selectButton2, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(downloadButton, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(cancelButton, new BoxLayoutData(new Margins()));
|
||||||
|
vp.clear();
|
||||||
|
vp.add(h);
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return (selectedItem != null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Widget getWidget() {
|
||||||
|
return fieldContainer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getValue() {
|
||||||
|
return (selectedItem == null) ? null : selectedItem.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ListParamete
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||||
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||||
|
|
||||||
|
@ -46,6 +47,9 @@ public class OperatorFieldWidget {
|
||||||
case FILE:
|
case FILE:
|
||||||
field = new FileFld(parameter);
|
field = new FileFld(parameter);
|
||||||
break;
|
break;
|
||||||
|
case ITEMID:
|
||||||
|
field = new ItemIdFld(parameter);
|
||||||
|
break;
|
||||||
case LIST:
|
case LIST:
|
||||||
field = createListField(parameter);
|
field = createListField(parameter);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -87,6 +87,9 @@ public interface Resources extends ClientBundle {
|
||||||
@Source("monitor.png")
|
@Source("monitor.png")
|
||||||
ImageResource computationPerspective();
|
ImageResource computationPerspective();
|
||||||
|
|
||||||
|
@Source("page-white.png")
|
||||||
|
ImageResource pageWhite();
|
||||||
|
|
||||||
@Source("download.png")
|
@Source("download.png")
|
||||||
ImageResource download();
|
ImageResource download();
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 293 B |
|
@ -10,6 +10,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.exception.ServiceException;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.exception.ServiceException;
|
||||||
|
@ -55,4 +56,6 @@ public interface DataMinerPortletService extends RemoteService {
|
||||||
|
|
||||||
public ItemDescription getItemDescription(String itemId) throws ServiceException;
|
public ItemDescription getItemDescription(String itemId) throws ServiceException;
|
||||||
|
|
||||||
|
public ServiceInfo getServiceInfo() throws ServiceException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.session.UserInfo;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.session.UserInfo;
|
||||||
|
@ -59,5 +60,7 @@ public interface DataMinerPortletServiceAsync {
|
||||||
void cancelComputation(ItemDescription itemDescription, AsyncCallback<String> asyncCallback);
|
void cancelComputation(ItemDescription itemDescription, AsyncCallback<String> asyncCallback);
|
||||||
|
|
||||||
void getItemDescription(String itemId, AsyncCallback<ItemDescription> asyncCallback);
|
void getItemDescription(String itemId, AsyncCallback<ItemDescription> asyncCallback);
|
||||||
|
|
||||||
|
void getServiceInfo(AsyncCallback<ServiceInfo> asyncCallback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,271 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.util;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ElementsHighlights {
|
||||||
|
|
||||||
|
public ElementsHighlights() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String createLinkFromText(String text) {
|
||||||
|
Log.info("Message: " + text);
|
||||||
|
if (text == null || text.isEmpty()) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean end = false;
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
String mes = new String(text);
|
||||||
|
|
||||||
|
while (!end) {
|
||||||
|
if (mes != null && !mes.isEmpty()) {
|
||||||
|
if (mes.contains("http") || mes.contains("https")) {
|
||||||
|
int httpIndex = mes.indexOf("http");
|
||||||
|
int httpsIndex = mes.indexOf("https");
|
||||||
|
if (httpIndex == -1) {
|
||||||
|
if (httpsIndex == -1) {
|
||||||
|
result.append(mes);
|
||||||
|
end = true;
|
||||||
|
} else {
|
||||||
|
String prefix = mes.substring(0, httpsIndex);
|
||||||
|
result.append(prefix);
|
||||||
|
|
||||||
|
String checkTerminator;
|
||||||
|
if (httpsIndex > 0) {
|
||||||
|
checkTerminator = mes.substring(httpsIndex - 1, httpsIndex);
|
||||||
|
if (checkTerminator.compareTo(" ") != 0 && checkTerminator.compareTo("\"") != 0
|
||||||
|
&& checkTerminator.compareTo("'") != 0) {
|
||||||
|
Log.debug("Terminator Found:" + checkTerminator);
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mes = mes.substring(httpsIndex, mes.length());
|
||||||
|
|
||||||
|
int terminator = mes.indexOf(checkTerminator);
|
||||||
|
if (terminator == -1) {
|
||||||
|
if(mes.contains("</")){
|
||||||
|
int j=mes.indexOf("</");
|
||||||
|
String extractedUrl=mes.substring(0, j);
|
||||||
|
result.append("<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
result.append(mes.substring(j));
|
||||||
|
} else {
|
||||||
|
result.append("<a href='" + mes + "' target='_blank'>" + mes + "</a>");
|
||||||
|
}
|
||||||
|
end = true;
|
||||||
|
} else {
|
||||||
|
String extractedUrl;
|
||||||
|
if (checkTerminator == " ") {
|
||||||
|
extractedUrl = mes.substring(0, terminator+1);
|
||||||
|
} else {
|
||||||
|
extractedUrl = mes.substring(0, terminator);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(extractedUrl.contains("</")){
|
||||||
|
int k=extractedUrl.indexOf("</");
|
||||||
|
extractedUrl=extractedUrl.substring(0, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.debug("extractedUrl: "+extractedUrl);
|
||||||
|
result.append(
|
||||||
|
"<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
mes = mes.substring(terminator, mes.length());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (httpsIndex == -1) {
|
||||||
|
String prefix = mes.substring(0, httpIndex);
|
||||||
|
result.append(prefix);
|
||||||
|
|
||||||
|
String checkTerminator;
|
||||||
|
if (httpIndex > 0) {
|
||||||
|
checkTerminator = mes.substring(httpIndex - 1, httpIndex);
|
||||||
|
if (checkTerminator.compareTo(" ") != 0 && checkTerminator.compareTo("\"") != 0
|
||||||
|
&& checkTerminator.compareTo("'") != 0) {
|
||||||
|
Log.debug("Terminator Found:" + checkTerminator);
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
|
||||||
|
mes = mes.substring(httpIndex, mes.length());
|
||||||
|
int terminator = mes.indexOf(checkTerminator);
|
||||||
|
Log.debug("TerminatorCheck found: "+terminator);
|
||||||
|
if (terminator == -1) {
|
||||||
|
if(mes.contains("</")){
|
||||||
|
int j=mes.indexOf("</");
|
||||||
|
String extractedUrl=mes.substring(0, j);
|
||||||
|
result.append("<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
result.append(mes.substring(j));
|
||||||
|
} else {
|
||||||
|
result.append("<a href='" + mes + "' target='_blank'>" + mes + "</a>");
|
||||||
|
}
|
||||||
|
end = true;
|
||||||
|
} else {
|
||||||
|
String extractedUrl;
|
||||||
|
if (checkTerminator == " ") {
|
||||||
|
extractedUrl = mes.substring(0, terminator+1);
|
||||||
|
} else {
|
||||||
|
extractedUrl = mes.substring(0, terminator);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(extractedUrl.contains("</")){
|
||||||
|
int k=extractedUrl.indexOf("</");
|
||||||
|
extractedUrl=extractedUrl.substring(0, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.debug("extractedUrl: "+extractedUrl);
|
||||||
|
result.append(
|
||||||
|
"<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
mes = mes.substring(terminator, mes.length());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (httpsIndex <= httpIndex) {
|
||||||
|
String prefix = mes.substring(0, httpsIndex);
|
||||||
|
result.append(prefix);
|
||||||
|
|
||||||
|
String checkTerminator;
|
||||||
|
if (httpsIndex > 0) {
|
||||||
|
checkTerminator = mes.substring(httpsIndex - 1, httpsIndex);
|
||||||
|
if (checkTerminator.compareTo(" ") != 0 && checkTerminator.compareTo("\"") != 0
|
||||||
|
&& checkTerminator.compareTo("'") != 0) {
|
||||||
|
Log.debug("Terminator Found:" + checkTerminator);
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mes = mes.substring(httpsIndex, mes.length());
|
||||||
|
int terminator = mes.indexOf(checkTerminator);
|
||||||
|
|
||||||
|
if (terminator == -1) {
|
||||||
|
if(mes.contains("</")){
|
||||||
|
int j=mes.indexOf("</");
|
||||||
|
String extractedUrl=mes.substring(0, j);
|
||||||
|
result.append("<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
result.append(mes.substring(j));
|
||||||
|
} else {
|
||||||
|
result.append("<a href='" + mes + "' target='_blank'>" + mes + "</a>");
|
||||||
|
}
|
||||||
|
end = true;
|
||||||
|
} else {
|
||||||
|
String extractedUrl;
|
||||||
|
if (checkTerminator == " ") {
|
||||||
|
extractedUrl = mes.substring(0, terminator);
|
||||||
|
} else {
|
||||||
|
extractedUrl = mes.substring(0, terminator - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(extractedUrl.contains("</")){
|
||||||
|
int k=extractedUrl.indexOf("</");
|
||||||
|
extractedUrl=extractedUrl.substring(0, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.debug("extractedUrl: "+extractedUrl);
|
||||||
|
result.append(
|
||||||
|
"<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
mes = mes.substring(terminator, mes.length());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String prefix = mes.substring(0, httpIndex);
|
||||||
|
result.append(prefix);
|
||||||
|
|
||||||
|
String checkTerminator;
|
||||||
|
if (httpIndex > 0) {
|
||||||
|
checkTerminator = mes.substring(httpIndex - 1, httpIndex);
|
||||||
|
if (checkTerminator.compareTo(" ") != 0 && checkTerminator.compareTo("\"") != 0
|
||||||
|
&& checkTerminator.compareTo("'") != 0) {
|
||||||
|
Log.debug("Terminator Found:" + checkTerminator);
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
checkTerminator = " ";
|
||||||
|
Log.debug("Terminator Set:" + checkTerminator);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mes = mes.substring(httpIndex, mes.length());
|
||||||
|
int terminator = mes.indexOf(checkTerminator);
|
||||||
|
|
||||||
|
if (terminator == -1) {
|
||||||
|
if(mes.contains("</")){
|
||||||
|
int j=mes.indexOf("</");
|
||||||
|
String extractedUrl=mes.substring(0, j);
|
||||||
|
result.append("<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
result.append(mes.substring(j));
|
||||||
|
} else {
|
||||||
|
result.append("<a href='" + mes + "' target='_blank'>" + mes + "</a>");
|
||||||
|
}
|
||||||
|
end = true;
|
||||||
|
} else {
|
||||||
|
String extractedUrl;
|
||||||
|
if (checkTerminator == " ") {
|
||||||
|
extractedUrl = mes.substring(0, terminator);
|
||||||
|
} else {
|
||||||
|
extractedUrl = mes.substring(0, terminator - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(extractedUrl.contains("</")){
|
||||||
|
int k=extractedUrl.indexOf("</");
|
||||||
|
extractedUrl=extractedUrl.substring(0, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.debug("extractedUrl: "+extractedUrl);
|
||||||
|
result.append(
|
||||||
|
"<a href='" + extractedUrl + "' target='_blank'>" + extractedUrl + "</a>");
|
||||||
|
mes = mes.substring(terminator, mes.length());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
result.append(mes);
|
||||||
|
end = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
end = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Log.info("New Message: " + result.toString());
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,11 +7,15 @@ import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariable
|
||||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.shared.GWT;
|
||||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
|
import com.google.gwt.user.client.Window;
|
||||||
import com.sencha.gxt.core.client.dom.XDOM;
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
|
||||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
@ -37,6 +41,7 @@ public class FileViewer extends SimpleContainer {
|
||||||
*/
|
*/
|
||||||
public FileViewer(ComputationId computationId, FileResource fileResource) {
|
public FileViewer(ComputationId computationId, FileResource fileResource) {
|
||||||
super();
|
super();
|
||||||
|
GWT.log("FileViewer: [computationId=" + computationId + ", fileResource=" + fileResource + "]");
|
||||||
this.fileResource = fileResource;
|
this.fileResource = fileResource;
|
||||||
// this.computationId = computationId;
|
// this.computationId = computationId;
|
||||||
init();
|
init();
|
||||||
|
@ -50,16 +55,33 @@ public class FileViewer extends SimpleContainer {
|
||||||
private void create() {
|
private void create() {
|
||||||
VerticalLayoutContainer lc = new VerticalLayoutContainer();
|
VerticalLayoutContainer lc = new VerticalLayoutContainer();
|
||||||
final String fileName = fileResource.getName();
|
final String fileName = fileResource.getName();
|
||||||
|
String fileDescription = fileResource.getDescription();
|
||||||
final String fileUrl = fileResource.getUrl();
|
final String fileUrl = fileResource.getUrl();
|
||||||
|
|
||||||
|
if(fileDescription==null||fileDescription.isEmpty()){
|
||||||
|
fileDescription="Unknow";
|
||||||
|
}
|
||||||
HtmlLayoutContainer fileNameHtml = new HtmlLayoutContainer("<div class='computation-output-fileName'><p>"
|
HtmlLayoutContainer fileNameHtml = new HtmlLayoutContainer("<div class='computation-output-fileName'><p>"
|
||||||
+ new SafeHtmlBuilder().appendEscaped(fileName).toSafeHtml().asString() + "</p></div>");
|
+ new SafeHtmlBuilder().appendEscaped(fileDescription).toSafeHtml().asString() + "</p></div>");
|
||||||
lc.add(fileNameHtml, new VerticalLayoutData(-1, -1, new Margins(0)));
|
lc.add(fileNameHtml, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
TextButton downloadBtn = new TextButton("Download File");
|
|
||||||
downloadBtn.setIcon(DataMinerManagerPanel.resources.download());
|
TextButton showFileButton = new TextButton("Show");
|
||||||
downloadBtn.addSelectHandler(new SelectEvent.SelectHandler() {
|
showFileButton.setIcon(DataMinerManagerPanel.resources.pageWhite());
|
||||||
|
showFileButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
com.google.gwt.user.client.Window.open(fileUrl, fileName, "");
|
showFileCreate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
TextButton downloadButton = new TextButton("Download");
|
||||||
|
downloadButton.setIcon(DataMinerManagerPanel.resources.download());
|
||||||
|
downloadButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
GWT.log("Download File url: " + fileUrl);
|
||||||
|
Window.open(fileUrl, fileName, "");
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -74,13 +96,41 @@ public class FileViewer extends SimpleContainer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
lc.add(downloadBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
HBoxLayoutContainer buttonsContainer = new HBoxLayoutContainer();
|
||||||
if (fileResource.isNetcdf()) {
|
buttonsContainer.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||||
lc.add(netcdfButton, new VerticalLayoutData(-1, -1, new Margins(0)));
|
BoxLayoutData buttonBoxLayoutData = new BoxLayoutData(new Margins(2, 2, 2, 2));
|
||||||
|
// HorizontalLayoutData buttonBoxLayoutData = new
|
||||||
|
// HorizontalLayoutData(-1, -1, new Margins(2));
|
||||||
|
|
||||||
|
if (fileName != null && !fileName.isEmpty()) {
|
||||||
|
String fileNameLowerCase = fileName.toLowerCase();
|
||||||
|
if (fileNameLowerCase.endsWith(".html") || fileNameLowerCase.endsWith(".htm")
|
||||||
|
|| fileNameLowerCase.endsWith(".pdf")|| fileNameLowerCase.endsWith(".log") || fileNameLowerCase.endsWith(".json")
|
||||||
|
|| fileNameLowerCase.endsWith(".txt")) {
|
||||||
|
buttonsContainer.add(showFileButton, buttonBoxLayoutData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
buttonsContainer.add(downloadButton, buttonBoxLayoutData);
|
||||||
|
if (fileResource.isNetcdf()) {
|
||||||
|
buttonsContainer.add(netcdfButton, buttonBoxLayoutData);
|
||||||
|
}
|
||||||
|
|
||||||
|
lc.add(buttonsContainer);
|
||||||
|
|
||||||
add(lc);
|
add(lc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showFileCreate() {
|
||||||
|
if (fileResource != null && fileResource.getUrl() != null && !fileResource.getUrl().isEmpty()) {
|
||||||
|
GWT.log("ShowFileCreate");
|
||||||
|
|
||||||
|
ShowFileDialog showFileDialog = new ShowFileDialog(fileResource.getUrl());
|
||||||
|
showFileDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
showFileDialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void showNetCDFFile() {
|
private void showNetCDFFile() {
|
||||||
if (fileResource != null && fileResource.getUrl() != null && !fileResource.getUrl().isEmpty()
|
if (fileResource != null && fileResource.getUrl() != null && !fileResource.getUrl().isEmpty()
|
||||||
&& fileResource.isNetcdf()) {
|
&& fileResource.isNetcdf()) {
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
package org.gcube.portlets.widgets.dataminermanagerwidget.client.widgets;
|
||||||
|
|
||||||
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
|
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||||
|
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||||
|
import com.google.gwt.user.client.ui.Frame;
|
||||||
|
import com.sencha.gxt.widget.core.client.Dialog;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Simple file show dialog
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ShowFileDialog extends Dialog {
|
||||||
|
|
||||||
|
private String url;
|
||||||
|
private Frame frame;
|
||||||
|
|
||||||
|
public ShowFileDialog(String url) {
|
||||||
|
super();
|
||||||
|
this.url = url;
|
||||||
|
init();
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
setWidth("640px");
|
||||||
|
setHeight("480px");
|
||||||
|
setResizable(true);
|
||||||
|
setHeadingText("View");
|
||||||
|
setModal(true);
|
||||||
|
setMaximizable(true);
|
||||||
|
setPredefinedButtons(PredefinedButton.CLOSE);
|
||||||
|
setButtonAlign(BoxLayoutPack.CENTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void create() {
|
||||||
|
VerticalLayoutContainer vc = new VerticalLayoutContainer();
|
||||||
|
vc.addResizeHandler(new ResizeHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResize(ResizeEvent event) {
|
||||||
|
manageResize(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
frame = new Frame(url+"?content-disposition=inline");
|
||||||
|
|
||||||
|
frame.getElement().setAttribute("style", "margin:auto;");
|
||||||
|
frame.getElement().getStyle().setBorderWidth(0, Unit.PX);
|
||||||
|
frame.getElement().getStyle().setBackgroundColor("white");
|
||||||
|
vc.add(frame, new VerticalLayoutData(-1,-1));
|
||||||
|
add(vc);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void manageResize(ResizeEvent event){
|
||||||
|
frame.setHeight(String.valueOf(event.getHeight())+"px");
|
||||||
|
frame.setWidth(String.valueOf(event.getWidth())+"px");
|
||||||
|
forceLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||||
|
import org.gcube.data.analysis.dataminermanagercl.shared.service.ServiceInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.server.storage.StorageUtil;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.server.storage.StorageUtil;
|
||||||
|
@ -436,4 +437,24 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServiceInfo getServiceInfo() throws ServiceException {
|
||||||
|
try {
|
||||||
|
HttpServletRequest httpRequest = this.getThreadLocalRequest();
|
||||||
|
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest);
|
||||||
|
|
||||||
|
SClient smClient = SessionUtil.getSClient(httpRequest, serviceCredentials);
|
||||||
|
logger.debug("GetServiceInfo()");
|
||||||
|
|
||||||
|
ServiceInfo serviceInfo = smClient.getServiceInfo();
|
||||||
|
return serviceInfo;
|
||||||
|
} catch (ServiceException e) {
|
||||||
|
logger.error(e.getLocalizedMessage(),e);
|
||||||
|
throw e;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error("Error retrieving Service Info: " + e.getLocalizedMessage(), e);
|
||||||
|
throw new ServiceException(e.getLocalizedMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.GZIPInputStream;
|
import java.util.zip.GZIPInputStream;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.gcube.common.authorization.library.provider.UserInfo;
|
import org.gcube.common.authorization.library.provider.UserInfo;
|
||||||
import org.gcube.data.analysis.dataminermanagercl.server.is.InformationSystemUtils;
|
import org.gcube.data.analysis.dataminermanagercl.server.is.InformationSystemUtils;
|
||||||
|
@ -26,6 +24,8 @@ import org.gcube.portlets.widgets.dataminermanagerwidget.shared.Constants;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi
|
||||||
|
@ -34,8 +34,7 @@ import org.slf4j.LoggerFactory;
|
||||||
*/
|
*/
|
||||||
public class TestDataMinerService extends TestCase {
|
public class TestDataMinerService extends TestCase {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory
|
private static Logger logger = LoggerFactory.getLogger(TestDataMinerService.class);
|
||||||
.getLogger(TestDataMinerService.class);
|
|
||||||
|
|
||||||
private String wpsToken;
|
private String wpsToken;
|
||||||
private String wpsUser;
|
private String wpsUser;
|
||||||
|
@ -43,70 +42,64 @@ public class TestDataMinerService extends TestCase {
|
||||||
private String scope;
|
private String scope;
|
||||||
|
|
||||||
private void retrieveServicesInfo() throws Exception {
|
private void retrieveServicesInfo() throws Exception {
|
||||||
|
|
||||||
logger.info("Use test user");
|
|
||||||
|
|
||||||
// Remove comment for Test
|
logger.info("Use test user");
|
||||||
wpsUser = Constants.DEFAULT_USER;
|
|
||||||
scope = Constants.DEFAULT_SCOPE;
|
|
||||||
|
|
||||||
ServiceCredentials serviceCredentials=new ServiceCredentials();
|
|
||||||
serviceCredentials.setUserName(wpsUser);
|
|
||||||
serviceCredentials.setScope(scope);
|
|
||||||
|
|
||||||
List<String> userRoles = new ArrayList<>();
|
|
||||||
userRoles.add(Constants.DEFAULT_ROLE);
|
|
||||||
/*
|
|
||||||
* if (aslSession.getUsername().compareTo("lucio.lelii") == 0)
|
|
||||||
* userRoles.add("VRE-Manager");
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
|
||||||
wpsToken = authorizationService().generateUserToken(
|
|
||||||
new UserInfo(serviceCredentials.getUserName(), userRoles),
|
|
||||||
serviceCredentials.getScope());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("Error generating the token for test: "
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
e.printStackTrace();
|
|
||||||
throw new Exception("Error generating the token for test: "
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
serviceCredentials.setToken(wpsToken);
|
|
||||||
|
|
||||||
List<String> serviceAddress = InformationSystemUtils
|
// Remove comment for Test
|
||||||
.retrieveServiceAddress(
|
wpsUser = Constants.DEFAULT_USER;
|
||||||
Constants.DATAMINER_SERVICE_CATEGORY,
|
scope = Constants.DEFAULT_SCOPE;
|
||||||
Constants.DATA_MINER_SERVICE_NAME, serviceCredentials.getScope());
|
|
||||||
logger.debug("Service Address retrieved:" + serviceAddress);
|
ServiceCredentials serviceCredentials = new ServiceCredentials();
|
||||||
if (serviceAddress == null || serviceAddress.size() < 1) {
|
serviceCredentials.setUserName(wpsUser);
|
||||||
logger.error("No DataMiner service address available!");
|
serviceCredentials.setScope(scope);
|
||||||
throw new Exception("No DataMiner service address available!");
|
|
||||||
} else {
|
List<String> userRoles = new ArrayList<>();
|
||||||
logger.info("DataMiner service address found: "
|
userRoles.add(Constants.DEFAULT_ROLE);
|
||||||
+ serviceAddress.get(0));
|
/*
|
||||||
wpsProcessingServlet = serviceAddress.get(0);
|
* if (aslSession.getUsername().compareTo("lucio.lelii") == 0)
|
||||||
|
* userRoles.add("VRE-Manager");
|
||||||
|
*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
wpsToken = authorizationService().generateUserToken(
|
||||||
|
new UserInfo(serviceCredentials.getUserName(), userRoles), serviceCredentials.getScope());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Error generating the token for test: " + e.getLocalizedMessage(), e);
|
||||||
|
|
||||||
|
throw new Exception("Error generating the token for test: " + e.getLocalizedMessage(), e);
|
||||||
|
}
|
||||||
|
serviceCredentials.setToken(wpsToken);
|
||||||
|
|
||||||
|
String serviceAddress = InformationSystemUtils.retrieveServiceAddress(Constants.DATAMINER_SERVICE_CATEGORY,
|
||||||
|
Constants.DATA_MINER_SERVICE_NAME, serviceCredentials.getScope());
|
||||||
|
logger.debug("Service Address retrieved:" + serviceAddress);
|
||||||
|
if (serviceAddress == null || serviceAddress.isEmpty()) {
|
||||||
|
logger.error("No DataMiner service address available!");
|
||||||
|
throw new Exception("No DataMiner service address available!");
|
||||||
|
} else {
|
||||||
|
logger.info("DataMiner service address found: " + serviceAddress);
|
||||||
|
wpsProcessingServlet = serviceAddress;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testExecuteProcess() {
|
public void testExecuteProcess() {
|
||||||
if(Constants.TEST_ENABLE){
|
if (Constants.TEST_ENABLE) {
|
||||||
executeProcess();
|
executeProcess();
|
||||||
} else {
|
} else {
|
||||||
assertTrue(true);
|
assertTrue(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeProcess(){
|
private void executeProcess() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
retrieveServicesInfo();
|
retrieveServicesInfo();
|
||||||
|
|
||||||
String urlString=wpsProcessingServlet;
|
String urlString = wpsProcessingServlet;
|
||||||
|
|
||||||
logger.debug("RetrieveDataViaPost(): " + urlString);
|
logger.debug("RetrieveDataViaPost(): " + urlString);
|
||||||
String authString = wpsUser + ":" + wpsToken;
|
String authString = wpsUser + ":" + wpsToken;
|
||||||
|
@ -123,9 +116,9 @@ public class TestDataMinerService extends TestCase {
|
||||||
conn.setRequestProperty("Content-Type", "text/xml");
|
conn.setRequestProperty("Content-Type", "text/xml");
|
||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
OutputStream output = conn.getOutputStream();
|
OutputStream output = conn.getOutputStream();
|
||||||
Path currentPath=Paths.get(".");
|
Path currentPath = Paths.get(".");
|
||||||
logger.info("CurrentPath:"+currentPath.toAbsolutePath().toString());
|
logger.info("CurrentPath:" + currentPath.toAbsolutePath().toString());
|
||||||
|
|
||||||
Files.copy(Paths.get("TestDataMinerServiceDBSCAN.xml"), output);
|
Files.copy(Paths.get("TestDataMinerServiceDBSCAN.xml"), output);
|
||||||
|
|
||||||
InputStream input = null;
|
InputStream input = null;
|
||||||
|
@ -136,24 +129,23 @@ public class TestDataMinerService extends TestCase {
|
||||||
input = conn.getInputStream();
|
input = conn.getInputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferedReader r = new BufferedReader(new InputStreamReader(input,
|
BufferedReader r = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8));
|
||||||
StandardCharsets.UTF_8));
|
|
||||||
|
|
||||||
logger.info("Response:");
|
logger.info("Response:");
|
||||||
String str = null;
|
String str = null;
|
||||||
while ((str = r.readLine()) != null) {
|
while ((str = r.readLine()) != null) {
|
||||||
logger.info(str);
|
logger.info(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("End Response!");
|
logger.info("End Response!");
|
||||||
|
|
||||||
assertTrue(true);
|
assertTrue(true);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug(e.getLocalizedMessage());
|
logger.debug(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
fail(e.getLocalizedMessage());
|
fail(e.getLocalizedMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue