refs 2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Updated WorkspaceResource to new version git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128837 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e83336757a
commit
4afb387bfc
|
@ -25,16 +25,18 @@ import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload
|
|||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.explore.WorkspaceResourcesExplorerPanel;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.view.grid.ItemsTable.DISPLAY_FIELD;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
|
@ -232,7 +234,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getComputations().getFolder()
|
||||
.getId(), false, showProperties, filterCriteria,
|
||||
true);
|
||||
true, DISPLAY_FIELD.CREATION_DATE);
|
||||
WorskpaceExplorerSelectNotificationListener wsResourceExplorerListener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
|
@ -261,18 +263,20 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
wsResourcesExplorerPanel
|
||||
.addWorkspaceExplorerSelectNotificationListener(wsResourceExplorerListener);
|
||||
wsResourcesExplorerPanel.ensureDebugId("wsResourceExplorerPanel");
|
||||
|
||||
wsResourcesExplorerPanel.setHeightToInternalScroll(300);
|
||||
|
||||
/*
|
||||
VerticalLayoutContainer vResourcesExplorerContainer = new VerticalLayoutContainer();
|
||||
vResourcesExplorerContainer.setScrollMode(ScrollMode.AUTO);
|
||||
vResourcesExplorerContainer.add(wsResourcesExplorerPanel,
|
||||
new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
*/
|
||||
// DND
|
||||
|
||||
dnd = new MultipleDNDUpload();
|
||||
dnd.setParameters(event.getDataMinerWorkArea().getComputations()
|
||||
.getFolder().getId(), UPLOAD_TYPE.File);
|
||||
dnd.addUniqueContainer(vResourcesExplorerContainer);
|
||||
dnd.addUniqueContainer(wsResourcesExplorerPanel);
|
||||
WorskpaceUploadNotificationListener workspaceUploaderListener = new WorskpaceUploadNotificationListener() {
|
||||
|
||||
@Override
|
||||
|
@ -394,7 +398,7 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
});
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
final ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnShow, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDownload, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDelete, new BoxLayoutData(new Margins(0)));
|
||||
|
@ -407,6 +411,18 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
v.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
v.add(dnd, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
add(v);
|
||||
|
||||
v.addResizeHandler(new ResizeHandler() {
|
||||
|
||||
@Override
|
||||
public void onResize(ResizeEvent event) {
|
||||
int scrollBarHeight=event.getHeight()-toolBar.getElement().getHeight(true);
|
||||
Log.debug("ScrollBarHeight: "+scrollBarHeight);
|
||||
wsResourcesExplorerPanel.setHeightToInternalScroll(scrollBarHeight);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
forceLayout();
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -22,16 +22,18 @@ import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload
|
|||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.explore.WorkspaceResourcesExplorerPanel;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.view.grid.ItemsTable.DISPLAY_FIELD;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
|
@ -69,7 +71,7 @@ public class InputDataSetsPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void init() {
|
||||
setId("InputDataSetsPanel");
|
||||
setItemId("InputDataSetsPanel");
|
||||
forceLayoutOnResize = true;
|
||||
setBodyBorder(false);
|
||||
setBorders(false);
|
||||
|
@ -224,7 +226,7 @@ public class InputDataSetsPanel extends FramedPanel {
|
|||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getInputDataSets().getFolder()
|
||||
.getId(), false, showProperties, filterCriteria,
|
||||
true);
|
||||
true, DISPLAY_FIELD.CREATION_DATE);
|
||||
WorskpaceExplorerSelectNotificationListener wsResourceExplorerListener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
|
@ -253,18 +255,15 @@ public class InputDataSetsPanel extends FramedPanel {
|
|||
wsResourcesExplorerPanel
|
||||
.addWorkspaceExplorerSelectNotificationListener(wsResourceExplorerListener);
|
||||
wsResourcesExplorerPanel.ensureDebugId("wsResourceExplorerPanel");
|
||||
|
||||
VerticalLayoutContainer vResourcesExplorerContainer = new VerticalLayoutContainer();
|
||||
vResourcesExplorerContainer.setScrollMode(ScrollMode.AUTOY);
|
||||
vResourcesExplorerContainer.add(wsResourcesExplorerPanel,
|
||||
new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
wsResourcesExplorerPanel.setHeightToInternalScroll(300);
|
||||
|
||||
|
||||
// DND
|
||||
|
||||
dnd = new MultipleDNDUpload();
|
||||
dnd.setParameters(event.getDataMinerWorkArea().getInputDataSets()
|
||||
.getFolder().getId(), UPLOAD_TYPE.File);
|
||||
dnd.addUniqueContainer(vResourcesExplorerContainer);
|
||||
dnd.addUniqueContainer(wsResourcesExplorerPanel);
|
||||
WorskpaceUploadNotificationListener workspaceUploaderListener = new WorskpaceUploadNotificationListener() {
|
||||
|
||||
@Override
|
||||
|
@ -344,16 +343,29 @@ public class InputDataSetsPanel extends FramedPanel {
|
|||
|
||||
});
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
final ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnDownload, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDelete, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnRefresh, new BoxLayoutData(new Margins(0)));
|
||||
|
||||
v = new VerticalLayoutContainer();
|
||||
v.setItemId("InputDataSetsPanelVert");
|
||||
|
||||
v.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
v.add(dnd, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
add(v);
|
||||
|
||||
v.addResizeHandler(new ResizeHandler() {
|
||||
|
||||
@Override
|
||||
public void onResize(ResizeEvent event) {
|
||||
int scrollBarHeight=event.getHeight()-toolBar.getElement().getHeight(true);
|
||||
Log.debug("ScrollBarHeight: "+scrollBarHeight);
|
||||
wsResourcesExplorerPanel.setHeightToInternalScroll(scrollBarHeight);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
forceLayout();
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -22,16 +22,18 @@ import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload
|
|||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.explore.WorkspaceResourcesExplorerPanel;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.view.grid.ItemsTable.DISPLAY_FIELD;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
|
@ -69,7 +71,7 @@ public class OutputDataSetsPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void init() {
|
||||
setId("OutputDataSetsPanel");
|
||||
setItemId("OutputDataSetsPanel");
|
||||
forceLayoutOnResize = true;
|
||||
setBodyBorder(false);
|
||||
setBorders(false);
|
||||
|
@ -222,7 +224,7 @@ public class OutputDataSetsPanel extends FramedPanel {
|
|||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getOutputDataSets()
|
||||
.getFolder().getId(), false, showProperties,
|
||||
filterCriteria, true);
|
||||
filterCriteria, true, DISPLAY_FIELD.CREATION_DATE);
|
||||
|
||||
WorskpaceExplorerSelectNotificationListener wsResourceExplorerListener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
|
@ -252,18 +254,15 @@ public class OutputDataSetsPanel extends FramedPanel {
|
|||
wsResourcesExplorerPanel
|
||||
.addWorkspaceExplorerSelectNotificationListener(wsResourceExplorerListener);
|
||||
wsResourcesExplorerPanel.ensureDebugId("wsResourceExplorerPanel");
|
||||
|
||||
VerticalLayoutContainer vResourcesExplorerContainer = new VerticalLayoutContainer();
|
||||
vResourcesExplorerContainer.setScrollMode(ScrollMode.AUTOY);
|
||||
vResourcesExplorerContainer.add(wsResourcesExplorerPanel,
|
||||
new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
wsResourcesExplorerPanel.setHeightToInternalScroll(300);
|
||||
|
||||
|
||||
// DND
|
||||
|
||||
dnd = new MultipleDNDUpload();
|
||||
dnd.setParameters(event.getDataMinerWorkArea().getOutputDataSets()
|
||||
.getFolder().getId(), UPLOAD_TYPE.File);
|
||||
dnd.addUniqueContainer(vResourcesExplorerContainer);
|
||||
dnd.addUniqueContainer(wsResourcesExplorerPanel);
|
||||
WorskpaceUploadNotificationListener workspaceUploaderListener = new WorskpaceUploadNotificationListener() {
|
||||
|
||||
@Override
|
||||
|
@ -343,7 +342,7 @@ public class OutputDataSetsPanel extends FramedPanel {
|
|||
|
||||
});
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
final ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnDownload, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnDelete, new BoxLayoutData(new Margins(0)));
|
||||
toolBar.add(btnRefresh, new BoxLayoutData(new Margins(0)));
|
||||
|
@ -353,6 +352,18 @@ public class OutputDataSetsPanel extends FramedPanel {
|
|||
v.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
v.add(dnd, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
add(v);
|
||||
|
||||
v.addResizeHandler(new ResizeHandler() {
|
||||
|
||||
@Override
|
||||
public void onResize(ResizeEvent event) {
|
||||
int scrollBarHeight=event.getHeight()-toolBar.getElement().getHeight(true);
|
||||
Log.debug("ScrollBarHeight: "+scrollBarHeight);
|
||||
wsResourcesExplorerPanel.setHeightToInternalScroll(scrollBarHeight);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
forceLayout();
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -41,11 +41,6 @@ public class SessionUtil {
|
|||
if (username == null) {
|
||||
if (Constants.DEBUG_MODE) {
|
||||
logger.info("no user found in session, use test user");
|
||||
/*
|
||||
* throw new ExpiredSessionServiceException("Session Expired!");
|
||||
*/
|
||||
|
||||
// Remove comment for Test
|
||||
username = Constants.DEFAULT_USER;
|
||||
String scope = Constants.DEFAULT_SCOPE;
|
||||
|
||||
|
@ -88,21 +83,7 @@ public class SessionUtil {
|
|||
return token;
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
public static void putSClient(HttpSession session, SClient sClient)
|
||||
throws Exception {
|
||||
SClient sc = (SClient) session.getAttribute(Constants.SClient);
|
||||
if (sc == null) {
|
||||
session.setAttribute(Constants.SClient, sClient);
|
||||
} else {
|
||||
session.removeAttribute(Constants.SClient);
|
||||
session.setAttribute(Constants.SClient, sClient);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static SClient getSClient(ASLSession aslSession)
|
||||
throws Exception {
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.gcube.portlets.user.dataminermanager.shared;
|
|||
*
|
||||
*/
|
||||
public class Constants {
|
||||
public static final boolean DEBUG_MODE = false;
|
||||
public static final boolean DEBUG_MODE = true;
|
||||
public static final boolean TEST_ENABLE = false;
|
||||
|
||||
public static final String APPLICATION_ID = "org.gcube.portlets.user.dataminermanager.portlet.DataMinerManager";
|
||||
|
@ -44,9 +44,14 @@ public class Constants {
|
|||
public static final String WPSServiceURL = "http://dataminer-d-d4s.d4science.org:80/wps/";
|
||||
public static final String WPSWebProcessingService = "WebProcessingService";
|
||||
public static final String WPSCancelComputationServlet = "CancelComputationServlet";
|
||||
public static final String WPSToken = "4ccc2c35-60c9-4c9b-9800-616538d5d48b";// "d7a4076c-e8c1-42fe-81e0-bdecb1e8074a";
|
||||
public static final String WPSUser = "gianpaolo.coro";
|
||||
public static final String SESSION_TOKEN = "SESSION_TOKEN";
|
||||
public static final String WPSToken = "f0666597-4302-49ce-bea2-555b94e569cb";
|
||||
public static final String WPSUser = "giancarlo.panichi";
|
||||
|
||||
|
||||
|
||||
|
||||
/*public static final String WPSToken = "4ccc2c35-60c9-4c9b-9800-616538d5d48b";
|
||||
public static final String WPSUser = "gianpaolo.coro";*/
|
||||
|
||||
//public static final String WPSToken = "45943442-74ef-408b-be64-d26b42cf4c08 ";
|
||||
//public static final String WPSUser = "statistical.manager@gmail.com";
|
||||
|
|
|
@ -41,19 +41,18 @@
|
|||
<entry-point
|
||||
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
||||
|
||||
<!--
|
||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||
/> -->
|
||||
/>
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
|
||||
/> -->
|
||||
|
||||
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<!-- <set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_DivLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" /> -->
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
|
||||
/> -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue