2018-05-04 11:37:46 +02:00
|
|
|
|
2018-05-04 11:35:17 +02:00
|
|
|
package org.gcube.portlets.widgets.wstaskexecutor.client;
|
|
|
|
|
2018-05-04 16:16:28 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2018-05-16 17:52:14 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.TaskParameter;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskConfiguration;
|
2018-05-16 17:52:14 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException;
|
2018-05-04 17:41:01 +02:00
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.exception.WorkspaceFolderLocked;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.TaskCompletedNotification.TaskCompletedNotificationListner;
|
2018-05-16 17:52:14 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.dialog.DialogConfirm;
|
2018-05-09 18:00:33 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.dialog.DialogResult;
|
2018-05-15 18:45:37 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.CreatedTaskConfigurationEvent;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.CreatedTaskConfigurationEventHandler;
|
2018-05-09 18:00:33 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.DeleteConfigurationEvent;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.DeleteConfigurationEventHandler;
|
2018-05-04 17:41:01 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.PerformRunTaskEvent;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.PerformRunTaskEventHandler;
|
2018-05-15 18:45:37 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.ShowCreateTaskConfigurationDialogEvent;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.ShowCreateTaskConfigurationDialogEvent.Operation;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.ShowCreateTaskConfigurationDialogEventHandler;
|
2018-05-16 12:11:11 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.ShowListOfTaskConfigurationsEvent;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.event.ShowListOfTaskConfigurationsEventHandler;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.rpc.WsTaskExecutorWidgetServiceAsync;
|
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.view.LoaderIcon;
|
2018-05-04 12:46:29 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.view.WsTaskExecutorWidgetViewManager;
|
2018-05-04 16:16:28 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.client.view.binder.MonitorFolderTaskExecutionStatusView;
|
2018-05-09 16:19:41 +02:00
|
|
|
import org.gcube.portlets.widgets.wstaskexecutor.shared.WSItem;
|
2018-05-04 12:46:29 +02:00
|
|
|
|
2018-05-04 17:41:01 +02:00
|
|
|
import com.github.gwtbootstrap.client.ui.Alert;
|
2018-05-04 16:16:28 +02:00
|
|
|
import com.github.gwtbootstrap.client.ui.Modal;
|
2018-05-04 17:41:01 +02:00
|
|
|
import com.github.gwtbootstrap.client.ui.constants.AlertType;
|
2018-05-04 16:16:28 +02:00
|
|
|
import com.google.gwt.core.client.GWT;
|
2018-05-04 17:41:01 +02:00
|
|
|
import com.google.gwt.event.dom.client.ClickEvent;
|
|
|
|
import com.google.gwt.event.dom.client.ClickHandler;
|
2018-05-04 12:46:29 +02:00
|
|
|
import com.google.gwt.event.shared.HandlerManager;
|
2018-05-04 17:41:01 +02:00
|
|
|
import com.google.gwt.user.client.Window;
|
2018-05-04 16:16:28 +02:00
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
2018-05-04 17:41:01 +02:00
|
|
|
import com.google.gwt.user.client.ui.Button;
|
|
|
|
import com.google.gwt.user.client.ui.VerticalPanel;
|
2018-05-04 12:46:29 +02:00
|
|
|
|
2018-05-04 11:35:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Entry point classes define <code>onModuleLoad()</code>.
|
2018-05-04 16:16:28 +02:00
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* May 4, 2018
|
2018-05-04 11:35:17 +02:00
|
|
|
*/
|
2018-05-04 11:37:46 +02:00
|
|
|
public class WsTaskExecutorWidget {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The message displayed to the user when the server cannot be reached or
|
|
|
|
* returns an error.
|
|
|
|
*/
|
|
|
|
private static final String SERVER_ERROR = "An error occurred while "
|
|
|
|
+ "attempting to contact the server. Please check your network "
|
|
|
|
+ "connection and try again.";
|
|
|
|
/**
|
|
|
|
* Create a remote service proxy to talk to the server-side Greeting
|
|
|
|
* service.
|
|
|
|
*/
|
2018-05-04 17:32:34 +02:00
|
|
|
public static final WsTaskExecutorWidgetServiceAsync wsTaskService = WsTaskExecutorWidgetServiceAsync.Util.getInstance();
|
2018-05-04 11:35:17 +02:00
|
|
|
|
2018-05-04 12:46:29 +02:00
|
|
|
/** The Constant eventBus. */
|
|
|
|
public final static HandlerManager eventBus = new HandlerManager(null);
|
|
|
|
|
|
|
|
private WsTaskExecutorWidgetViewManager viewManager = new WsTaskExecutorWidgetViewManager();
|
|
|
|
|
2018-05-04 16:16:28 +02:00
|
|
|
private final List<TaskCompletedNotificationListner> taskEventsListeners = new ArrayList<TaskCompletedNotificationListner>();
|
|
|
|
|
2018-05-04 11:37:46 +02:00
|
|
|
/**
|
2018-05-04 16:16:28 +02:00
|
|
|
* Instantiates a new ws task executor widget.
|
|
|
|
*/
|
2018-05-04 11:37:46 +02:00
|
|
|
public WsTaskExecutorWidget() {
|
2018-05-04 16:16:28 +02:00
|
|
|
bindEvents();
|
2018-05-04 11:37:46 +02:00
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
}
|
2018-05-04 16:16:28 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Bind events.
|
|
|
|
*/
|
|
|
|
private void bindEvents() {
|
|
|
|
|
2018-05-04 17:41:01 +02:00
|
|
|
eventBus.addHandler(PerformRunTaskEvent.TYPE, new PerformRunTaskEventHandler() {
|
|
|
|
|
|
|
|
@Override
|
2018-05-16 17:52:14 +02:00
|
|
|
public void onPerformRunTask(final PerformRunTaskEvent perforRunTaskEvent) {
|
2018-05-04 17:41:01 +02:00
|
|
|
|
|
|
|
try {
|
2018-05-16 17:52:14 +02:00
|
|
|
if(perforRunTaskEvent.getWsItem()!=null && perforRunTaskEvent.getConfiguration()!=null){
|
|
|
|
String msg = "<div style='font-size:14px; font-weight:bold;'>Executing the task with configuration:</div>";
|
|
|
|
msg+="<br/>";
|
2018-05-17 18:24:09 +02:00
|
|
|
msg+="Operator Id: <br/>"+perforRunTaskEvent.getConfiguration().getTaskId();
|
2018-05-16 17:52:14 +02:00
|
|
|
int cParam = perforRunTaskEvent.getConfiguration().getListParameters().size();
|
|
|
|
msg+="<br/><br/>";
|
|
|
|
if(cParam>0){
|
|
|
|
msg+="With Input ";
|
|
|
|
msg+=cParam>1?"Parameters:":"Parameter:";
|
|
|
|
msg+="<br/>";
|
|
|
|
int i = 0;
|
|
|
|
for (TaskParameter param : perforRunTaskEvent.getConfiguration().getListParameters()) {
|
|
|
|
msg+=++i+". Type: "+param.getType().getType() +" having "+param.getKey()+" = " +param.getValue();
|
|
|
|
msg+="<br/>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg+="<br/>";
|
|
|
|
msg+="<br/>";
|
|
|
|
msg+="<div style='font-size:14px; font-weight:bold;'>Confirm?</div>";
|
|
|
|
final DialogConfirm confirm = new DialogConfirm(null, "Run the task?", msg);
|
|
|
|
|
|
|
|
confirm.getYesButton().addClickHandler(new ClickHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
performRunTask(perforRunTaskEvent.getWsItem(), perforRunTaskEvent.getConfiguration());
|
|
|
|
confirm.hide();
|
|
|
|
}
|
|
|
|
catch (Exception e) {
|
|
|
|
Window.alert(e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
confirm.center();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-05-04 17:41:01 +02:00
|
|
|
}
|
|
|
|
catch (Exception e) {
|
|
|
|
Window.alert(e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
eventBus.addHandler(ShowListOfTaskConfigurationsEvent.TYPE, new ShowListOfTaskConfigurationsEventHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onShowListOfTaskConfigurations(ShowListOfTaskConfigurationsEvent showListOfTaskConfigurationsEvent) {
|
|
|
|
|
|
|
|
if(showListOfTaskConfigurationsEvent.getWsItem()!=null)
|
|
|
|
try {
|
|
|
|
showTaskConfigurations(showListOfTaskConfigurationsEvent.getWsItem());
|
|
|
|
}
|
|
|
|
catch (Exception e) {
|
2018-05-16 17:52:14 +02:00
|
|
|
Window.alert(e.getMessage());
|
2018-05-16 12:11:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-05-09 18:00:33 +02:00
|
|
|
eventBus.addHandler(DeleteConfigurationEvent.TYPE, new DeleteConfigurationEventHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onRemoveConfiguration(final DeleteConfigurationEvent dcEvent) {
|
|
|
|
|
2018-05-15 18:45:37 +02:00
|
|
|
//GWT.log("qui remove");
|
2018-05-09 18:00:33 +02:00
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
if(dcEvent.getTaskConf()!=null && dcEvent.getWsItem()!=null){
|
2018-05-09 18:00:33 +02:00
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
WsTaskExecutorWidget.wsTaskService.removeTaskConfiguration(dcEvent.getTaskConf(), new AsyncCallback<Boolean>() {
|
2018-05-09 18:00:33 +02:00
|
|
|
|
|
|
|
@Override
|
2018-05-16 12:11:11 +02:00
|
|
|
public void onFailure(Throwable caught) {
|
2018-05-09 18:00:33 +02:00
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
new DialogResult(null, "Delete Error!", caught.getMessage()).center();
|
2018-05-09 18:00:33 +02:00
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
}
|
2018-05-09 18:00:33 +02:00
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
@Override
|
|
|
|
public void onSuccess(Boolean result) {
|
2018-05-09 18:00:33 +02:00
|
|
|
|
2018-05-16 12:11:11 +02:00
|
|
|
try {
|
|
|
|
if(result){
|
|
|
|
String msg = "Task configuration for Algorithm Id: "+dcEvent.getTaskConf().getTaskId() +"<br/>removed correctly";
|
|
|
|
new DialogResult(null, "Delete performed!",msg).center();
|
2018-05-09 18:00:33 +02:00
|
|
|
}
|
2018-05-16 12:11:11 +02:00
|
|
|
showTaskConfigurations(dcEvent.getWsItem());
|
|
|
|
}
|
|
|
|
catch (Exception e) {
|
2018-05-16 17:52:14 +02:00
|
|
|
Window.alert(e.getMessage());
|
2018-05-16 12:11:11 +02:00
|
|
|
}
|
2018-05-09 18:00:33 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-05-15 18:45:37 +02:00
|
|
|
eventBus.addHandler(ShowCreateTaskConfigurationDialogEvent.TYPE, new ShowCreateTaskConfigurationDialogEventHandler() {
|
2018-05-09 16:19:41 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onShowCreateConfiguration(
|
2018-05-15 18:45:37 +02:00
|
|
|
ShowCreateTaskConfigurationDialogEvent event) {
|
2018-05-09 16:19:41 +02:00
|
|
|
|
2018-05-15 18:45:37 +02:00
|
|
|
if(event.getWsItem()!=null){
|
|
|
|
|
|
|
|
if(event.getOperation().equals(Operation.CREATE_NEW)){
|
|
|
|
viewManager.showCreateTaskConfigurationForFolder(event.getWsItem(), null);
|
|
|
|
}else {
|
|
|
|
viewManager.showCreateTaskConfigurationForFolder(event.getWsItem(), event.getTaskConfiguration());
|
|
|
|
}
|
|
|
|
}
|
2018-05-09 16:19:41 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-15 18:45:37 +02:00
|
|
|
eventBus.addHandler(CreatedTaskConfigurationEvent.TYPE, new CreatedTaskConfigurationEventHandler() {
|
2018-05-09 12:36:54 +02:00
|
|
|
|
|
|
|
@Override
|
2018-05-15 18:45:37 +02:00
|
|
|
public void onCreatedConfiguration(
|
|
|
|
final CreatedTaskConfigurationEvent createTCE) {
|
2018-05-09 12:36:54 +02:00
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
if(createTCE.getWsItem()!=null && createTCE.getConf()!=null){
|
|
|
|
GWT.log("Creating the configuration: "+createTCE.getConf());
|
|
|
|
|
|
|
|
WsTaskExecutorWidget.wsTaskService.createTaskConfiguration(createTCE.getWsItem().getItemId(), createTCE.getConf(), createTCE.isUpdate(), new AsyncCallback<Boolean>() {
|
2018-05-09 12:36:54 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
|
|
|
Window.alert(caught.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess(Boolean result) {
|
|
|
|
|
|
|
|
try {
|
2018-05-16 12:11:11 +02:00
|
|
|
showTaskConfigurations(createTCE.getWsItem());
|
2018-05-09 12:36:54 +02:00
|
|
|
}
|
|
|
|
catch (Exception e) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-05-04 16:16:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-05-04 17:41:01 +02:00
|
|
|
/**
|
2018-05-08 12:25:54 +02:00
|
|
|
* Perform run task.
|
|
|
|
*
|
2018-05-09 16:19:41 +02:00
|
|
|
* @param wsItem the folder
|
2018-05-08 12:25:54 +02:00
|
|
|
* @param conf the conf
|
|
|
|
* @throws Exception the exception
|
2018-05-04 17:41:01 +02:00
|
|
|
*/
|
2018-05-16 17:52:14 +02:00
|
|
|
public void performRunTask(final WSItem wsItem, final TaskConfiguration conf) throws Exception {
|
2018-05-04 17:41:01 +02:00
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
if(wsItem==null || wsItem.getItemId()==null)
|
|
|
|
throw new Exception("Invalid parameter workpace item or its id is null");
|
2018-05-04 17:41:01 +02:00
|
|
|
|
|
|
|
if(conf==null)
|
|
|
|
throw new Exception("Invalid parameter the configuration is null");
|
|
|
|
|
2018-05-16 17:52:14 +02:00
|
|
|
final Modal box = new Modal(true);
|
|
|
|
box.setTitle("Executing task configuration...");
|
|
|
|
|
2018-05-17 15:30:50 +02:00
|
|
|
String algName = conf.getTaskId().substring(conf.getTaskId().lastIndexOf(".")+1, conf.getTaskId().length());
|
|
|
|
LoaderIcon loader = new LoaderIcon("Inizializing new run for: "+algName);
|
2018-05-16 17:52:14 +02:00
|
|
|
box.add(loader);
|
|
|
|
|
|
|
|
WsTaskExecutorWidget.wsTaskService.executeTheTask(conf, new AsyncCallback<TaskExecutionStatus>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
box.hide();
|
|
|
|
new DialogResult(null, "Error on show Task Status for algorithm id:"+conf.getTaskId(), caught.getMessage()).center();
|
|
|
|
viewManager.cancelMonitor(wsItem);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess(TaskExecutionStatus result) {
|
|
|
|
box.hide();
|
|
|
|
viewManager.showMonitorTaskStatusFor(wsItem, result.getTaskConfiguration(), result.getTaskComputation(), taskEventsListeners);
|
|
|
|
}
|
|
|
|
});
|
2018-05-04 17:41:01 +02:00
|
|
|
|
2018-05-16 17:52:14 +02:00
|
|
|
box.show();
|
2018-05-04 17:41:01 +02:00
|
|
|
}
|
|
|
|
|
2018-05-08 12:25:54 +02:00
|
|
|
|
2018-05-04 16:16:28 +02:00
|
|
|
/**
|
2018-05-16 12:11:11 +02:00
|
|
|
* Show task configurations.
|
2018-05-04 16:16:28 +02:00
|
|
|
*
|
2018-05-16 12:11:11 +02:00
|
|
|
* @param wsItem the ws item
|
2018-05-04 16:16:28 +02:00
|
|
|
* @throws Exception the exception
|
|
|
|
*/
|
2018-05-16 12:11:11 +02:00
|
|
|
public void showTaskConfigurations(final WSItem wsItem) throws Exception {
|
2018-05-04 16:16:28 +02:00
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
if(wsItem==null || wsItem.getItemId()==null)
|
|
|
|
throw new Exception("Invalid parameter workpace item or its id is null");
|
2018-05-04 16:16:28 +02:00
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
MonitorFolderTaskExecutionStatusView monitor = viewManager.getMonitor(wsItem);
|
2018-05-04 16:16:28 +02:00
|
|
|
|
|
|
|
//SHOWING CURRENT ACTIVE MONITOR
|
|
|
|
if(monitor!=null) {
|
2018-05-09 16:19:41 +02:00
|
|
|
GWT.log("Monitor for workpace item: "+wsItem.getItemId() +" exists showing it..");
|
|
|
|
viewManager.showMonitorTaskStatusFor(wsItem, monitor.getTaskConfiguration(), monitor.getTaskComputation(), taskEventsListeners);
|
2018-05-04 16:16:28 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
final Modal box = new Modal(true);
|
|
|
|
box.setTitle("Checking configurations...");
|
2018-05-15 18:45:37 +02:00
|
|
|
|
|
|
|
String suffix = wsItem.getItemName()!=null || !wsItem.getItemName().isEmpty()?wsItem.getItemName():wsItem.getItemId();
|
|
|
|
LoaderIcon loader = new LoaderIcon("Checking task configurations for item: "+suffix);
|
2018-05-04 16:16:28 +02:00
|
|
|
box.add(loader);
|
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
GWT.log("Performing checkItemTaskConfigurations: "+wsItem.getItemId());
|
2018-05-04 16:16:28 +02:00
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
WsTaskExecutorWidget.wsTaskService.checkItemTaskConfigurations(wsItem.getItemId(), new AsyncCallback<List<TaskConfiguration>>() {
|
2018-05-04 16:16:28 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess(List<TaskConfiguration> result) {
|
2018-05-08 18:11:29 +02:00
|
|
|
box.hide();
|
2018-05-04 16:16:28 +02:00
|
|
|
|
2018-05-09 16:19:41 +02:00
|
|
|
viewManager.showTaskConfigurationsFolderInfo(wsItem, result, taskEventsListeners);
|
2018-05-04 16:16:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
2018-05-04 17:41:01 +02:00
|
|
|
|
2018-05-16 17:52:14 +02:00
|
|
|
if(caught instanceof ItemNotConfiguredException){
|
|
|
|
box.hide();
|
2018-05-09 16:19:41 +02:00
|
|
|
viewManager.showCreateTaskConfigurationForFolder(wsItem, null);
|
2018-05-04 17:41:01 +02:00
|
|
|
|
|
|
|
}else if(caught instanceof WorkspaceFolderLocked){
|
|
|
|
VerticalPanel v = new VerticalPanel();
|
|
|
|
Alert alert = new Alert("Current Folder is locked by another proccess. Do you want see Task status?");
|
|
|
|
alert.setClose(true);
|
|
|
|
alert.setType(AlertType.INFO);
|
|
|
|
|
|
|
|
Button butt = new Button("Show Status");
|
|
|
|
butt.addClickHandler(new ClickHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
//WsThreddsWidget.eventBus.fireEvent(new ShowMonitorSyncStatusEvent(folder));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
v.add(alert);
|
|
|
|
v.add(butt);
|
|
|
|
box.add(v);
|
2018-05-04 16:16:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
box.show();
|
|
|
|
|
|
|
|
}
|
2018-05-04 11:35:17 +02:00
|
|
|
}
|