Added RStudio
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@111436 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fff545a8bb
commit
44cc5740eb
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.chartswidget.client.ChartsWidgetTD;
|
import org.gcube.portlets.user.td.chartswidget.client.ChartsWidgetTD;
|
||||||
import org.gcube.portlets.user.td.client.logs.TDMLogs;
|
import org.gcube.portlets.user.td.client.logs.TDMLogs;
|
||||||
|
import org.gcube.portlets.user.td.client.rstudio.RStudio;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateOpenDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateOpenDialog;
|
||||||
|
@ -878,6 +879,7 @@ public class TabularDataController {
|
||||||
openCreateChart();
|
openCreateChart();
|
||||||
break;
|
break;
|
||||||
case RSTUDIO:
|
case RSTUDIO:
|
||||||
|
openRStudio();
|
||||||
break;
|
break;
|
||||||
case STATISTICAL:
|
case STATISTICAL:
|
||||||
openStatistical();
|
openStatistical();
|
||||||
|
@ -1607,6 +1609,20 @@ public class TabularDataController {
|
||||||
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
|
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
|
||||||
historyDiscard.discard();
|
historyDiscard.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openRStudio() {
|
||||||
|
Log.debug("Request Open RStudio");
|
||||||
|
if (trId != null) {
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
RStudio rStudio=new RStudio(trId, eventBus);
|
||||||
|
} else {
|
||||||
|
Log.error("TRId is null");
|
||||||
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void openStatistical() {
|
private void openStatistical() {
|
||||||
GWT.runAsync(new RunAsyncCallback() {
|
GWT.runAsync(new RunAsyncCallback() {
|
||||||
|
|
|
@ -354,8 +354,7 @@ public class AnalyseToolBar {
|
||||||
rstudioButton.addSelectHandler(new SelectHandler() {
|
rstudioButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
// eventBus.fireEvent(new
|
eventBus.fireEvent(new RibbonEvent(RibbonType.RSTUDIO));
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -459,12 +458,14 @@ public class AnalyseToolBar {
|
||||||
chartCreateButton.disable();
|
chartCreateButton.disable();
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
|
rstudioButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
chartCreateButton.disable();
|
chartCreateButton.disable();
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
|
rstudioButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
|
@ -472,11 +473,13 @@ public class AnalyseToolBar {
|
||||||
chartCreateButton.enable();
|
chartCreateButton.enable();
|
||||||
gisButton.enable();
|
gisButton.enable();
|
||||||
statisticalButton.enable();
|
statisticalButton.enable();
|
||||||
|
rstudioButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
chartCreateButton.disable();
|
chartCreateButton.disable();
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
|
rstudioButton.disable();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package org.gcube.portlets.user.td.client.rstudio;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.user.client.Window;
|
||||||
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* RStudio Widget
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class RStudio {
|
||||||
|
private static final String TAB_RESOURCE_ID_PARAMETER = "TabResourceId";
|
||||||
|
|
||||||
|
|
||||||
|
public RStudio(TRId trId, EventBus eventBus) {
|
||||||
|
callRStudioServlet(trId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void callRStudioServlet(TRId trId) {
|
||||||
|
Log.debug("Request: " + trId);
|
||||||
|
|
||||||
|
String url = GWT.getModuleBaseURL() + "TDRStudioServlet?"
|
||||||
|
+ TAB_RESOURCE_ID_PARAMETER + "="
|
||||||
|
+ trId.getId();
|
||||||
|
Log.debug("Server URL: " + url);
|
||||||
|
Window.open(url, "RStudio", "");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -74,14 +74,14 @@
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||||
|
|
||||||
<!--
|
|
||||||
<set-property name="log_DivLogger" value="ENABLED" />
|
<!-- <set-property name="log_DivLogger" value="ENABLED" />
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
||||||
<set-property name="log_GWTLogger" value="ENABLED" />
|
<set-property name="log_GWTLogger" value="ENABLED" />
|
||||||
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" /> -->
|
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" /> -->
|
||||||
|
|
||||||
|
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
|
|
|
@ -49,6 +49,13 @@
|
||||||
<servlet-name>RetrieveChartFileServlet</servlet-name>
|
<servlet-name>RetrieveChartFileServlet</servlet-name>
|
||||||
<servlet-class>org.gcube.portlets.user.td.gwtservice.server.RetrieveChartFileServlet</servlet-class>
|
<servlet-class>org.gcube.portlets.user.td.gwtservice.server.RetrieveChartFileServlet</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
|
<!-- TD RStudio Servlet -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>TDRStudioServlet</servlet-name>
|
||||||
|
<servlet-class>org.gcube.portlets.user.td.gwtservice.server.TDRStudioServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
|
||||||
<!-- TD Expression -->
|
<!-- TD Expression -->
|
||||||
<servlet>
|
<servlet>
|
||||||
|
@ -199,6 +206,11 @@
|
||||||
<url-pattern>/tabulardataportlet/RetrieveChartFileServlet</url-pattern>
|
<url-pattern>/tabulardataportlet/RetrieveChartFileServlet</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- TD RStudio -->
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>TDRStudioServlet</servlet-name>
|
||||||
|
<url-pattern>/tabulardataportlet/TDRStudioServlet</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- TD Expression -->
|
<!-- TD Expression -->
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
|
|
Loading…
Reference in New Issue