Compare commits

..

No commits in common. "master" and "Feature/N18291" have entirely different histories.

142 changed files with 143 additions and 809 deletions

6
.classpath Executable file → Normal file
View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/accounting-dashboard-1.2.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry including="**/*.java" kind="src" output="target/accounting-dashboard-1.2.0/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/accounting-dashboard-1.2.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/accounting-dashboard-1.2.0/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -50,5 +50,5 @@
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="output" path="target/accounting-dashboard-1.2.1-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/accounting-dashboard-1.2.0/WEB-INF/classes"/>
</classpath>

0
.gitignore vendored Executable file → Normal file
View File

0
.project Executable file → Normal file
View File

0
.settings/com.google.appengine.eclipse.core.prefs Executable file → Normal file
View File

0
.settings/com.google.gdt.eclipse.core.prefs Executable file → Normal file
View File

0
.settings/com.google.gwt.eclipse.core.prefs Executable file → Normal file
View File

0
.settings/org.eclipse.core.resources.prefs Executable file → Normal file
View File

0
.settings/org.eclipse.jdt.core.prefs Executable file → Normal file
View File

0
.settings/org.eclipse.m2e.core.prefs Executable file → Normal file
View File

2
.settings/org.eclipse.wst.common.component Executable file → Normal file
View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="accounting-dashboard-1.2.1-SNAPSHOT">
<wb-module deploy-name="accounting-dashboard-1.2.0">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>

View File

View File

0
.settings/org.eclipse.wst.validation.prefs Executable file → Normal file
View File

View File

@ -1,40 +0,0 @@
# Changelog
## [v1.2.2] - 2022-06-15
- Updated the scope of xml-apis [#23510]
## [v1.2.1] - 2020-06-18
- Updated to support new detachedres-library [#19440]
- Disabled Zoom for charts [#19161]
## [v1.2.0] - 2020-04-08
- Updated export csv support with Firefox and Safari [#18034]
- Added Core Services support [#18291]
- Added Detached REs support [#18815]
- Added the alphabetical sorting of tabs [#18754]
- Added TOC menu in reports [#18753]
## [v1.1.0] - 2019-10-01
- Updated to support accounting data visualization at the infrastructure level [#17847]
## [v1.0.0] - 2018-08-01
- First Release
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

View File

@ -1,26 +0,0 @@
# Acknowledgments
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
- the Seventh Framework Programme for research, technological development and demonstration
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
- the H2020 research and innovation programme
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);

12
LICENSE.md Executable file → Normal file
View File

@ -1,10 +1,9 @@
#European Union Public Licence V.1.1
EUPL © the European Community 2007
##*EUPL © the European Community 2007*
This European Union Public Licence (the “EUPL”) applies to the Work or Software
This **European Union Public Licence** (the **“EUPL”**) applies to the Work or Software
(as defined below) which is provided under the terms of this Licence. Any use of
the Work, other than as authorised under this Licence is prohibited (to the
extent such use is covered by a right of the copyright holder of the Work).
@ -13,7 +12,7 @@ The Original Work is provided under the terms of this Licence when the Licensor
(as defined below) has placed the following notice immediately following the
copyright notice for the Original Work:
Licensed under the EUPL V.1.1
**Licensed under the EUPL V.1.1**
or has expressed by any other mean his willingness to license under the EUPL.
@ -292,12 +291,13 @@ This licence shall be governed by the Belgian law if:
- or registered office inside a European Union country.
---
##Appendix
“Compatible Licences” according to article 5 EUPL are:
**“Compatible Licences”** according to article 5 EUPL are:
- GNU General Public License (GNU GPL) v. 2

10
README.md Executable file → Normal file
View File

@ -35,4 +35,12 @@ open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- DILIGENT (grant no. 004260);
- the Seventh Framework Programme for research, technological development and demonstration
- D4Science (grant no. 212488), D4Science-II (grant no.239019), ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine(grant no. 283644);
- the H2020 research and innovation programme
- BlueBRIDGE (grant no. 675680), EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant no. 654119), SoBigData (grant no. 654024),DESIRA (grant no. 818194), ARIADNEplus (grant no. 823914), RISIS2 (grant no. 824091), PerformFish (grant no. 727610), AGINFRAplus (grant no. 731001);

19
changelog.xml Executable file → Normal file
View File

@ -1,25 +1,12 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-2-2"
date="2022-06-15">
<Change>Updated the scope of xml-apis [#23530]</Change>
</Changeset>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-2-1"
date="2020-06-18">
<Change>Updated to support new detachedres-library [#19440]</Change>
<Change>Disabled Zoom for charts [#19161]</Change>
</Changeset>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-2-0"
date="2020-04-08">
<Change>Updated export csv support with Firefox and Safari [#18034]</Change>
<Change>Added Core Services support [#18291]</Change>
<Change>Added Detached REs support [#18815]</Change>
<Change>Added the alphabetical sorting of tabs [#18754]</Change>
<Change>Added TOC menu in reports [#18753]</Change>
date="2019-11-12">
<Change>Updated export csv support with Firefox and Safari [ticket #18034]</Change>
</Changeset>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-1-0"
date="2019-10-01">
<Change>Updated to support accounting data visualization at the
infrastructure level [#17847]</Change>
infrastructure level [ticket #17847]</Change>
</Changeset>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-0-0"
date="2018-08-01">

3
descriptor.xml Executable file → Normal file
View File

@ -14,9 +14,8 @@
<includes>
<include>README.md</include>
<include>LICENSE.md</include>
<include>CHANGELOG.md</include>
<include>FUNDING.md</include>
<include>profile.xml</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>

12
pom.xml Executable file → Normal file
View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>accounting-dashboard</artifactId>
<version>1.2.2</version>
<version>1.2.0</version>
<packaging>war</packaging>
<name>accounting-dashboard</name>
@ -256,14 +256,6 @@
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- detachedres-library -->
<dependency>
<groupId>org.gcube.infrastructure.detachedres</groupId>
<artifactId>detachedres-library</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- Portal Service -->
<dependency>
<groupId>com.liferay.portal</groupId>
@ -409,7 +401,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId>
<version>3.6.4</version>
<version>3.6.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>

0
profile.xml Executable file → Normal file
View File

View File

@ -1,11 +1,8 @@
package org.gcube.portlets.user.accountingdashboard.client.application;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.gcube.portlets.user.accountingdashboard.client.application.controller.Controller;
import org.gcube.portlets.user.accountingdashboard.client.application.menu.MenuPresenter;
import org.gcube.portlets.user.accountingdashboard.client.place.NameTokens;
import com.google.gwt.user.client.Window;
import com.google.inject.Inject;
@ -18,7 +15,6 @@ import com.gwtplatform.mvp.client.presenter.slots.PermanentSlot;
import com.gwtplatform.mvp.client.proxy.NavigationEvent;
import com.gwtplatform.mvp.client.proxy.NavigationHandler;
import com.gwtplatform.mvp.client.proxy.Proxy;
import com.gwtplatform.mvp.shared.proxy.PlaceRequest;
/**
*
@ -28,9 +24,6 @@ import com.gwtplatform.mvp.shared.proxy.PlaceRequest;
public class ApplicationPresenter
extends Presenter<ApplicationPresenter.PresenterView, ApplicationPresenter.ApplicationPresenterProxy>
implements NavigationHandler {
private static Logger logger = java.util.logging.Logger.getLogger("");
interface PresenterView extends View {
}
@ -44,9 +37,10 @@ public class ApplicationPresenter
private MenuPresenter menuPresenter;
private Controller controller;
@Inject
ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy,
MenuPresenter menuPresenter, Controller controller) {
ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy, MenuPresenter menuPresenter,
Controller controller) {
super(eventBus, view, proxy, RevealType.Root);
this.menuPresenter = menuPresenter;
this.controller = controller;
@ -69,21 +63,16 @@ public class ApplicationPresenter
@Override
public void onNavigation(NavigationEvent navigationEvent) {
if (navigationEvent != null) {
PlaceRequest placeRequest = navigationEvent.getRequest();
logger.log(Level.FINE, "Navigation: " + placeRequest);
// If the navigation is related to mainarea scrollbar is not reset
if (placeRequest.getNameToken().compareTo(NameTokens.getMainArea()) != 0) {
Window.scrollTo(0, 0);
}
// PlaceRequest placeRequest=navigationEvent.getRequest();
// placeManager.revealPlace(placeRequest);
} else {
Window.scrollTo(0, 0);
}
}
private void callHello(){
controller.callHello();
}
}

View File

@ -6,7 +6,6 @@ import java.util.logging.Logger;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.error.ErrorPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.info.InfoPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.monitor.MonitorPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.event.EnvironmentEvent;
import org.gcube.portlets.user.accountingdashboard.client.application.event.HelloEvent;
import org.gcube.portlets.user.accountingdashboard.client.application.event.ReportEvent;
import org.gcube.portlets.user.accountingdashboard.client.application.event.ScopeDataEvent;
@ -14,8 +13,6 @@ import org.gcube.portlets.user.accountingdashboard.client.rpc.AccountingDashboar
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.event.shared.EventBus;
@ -40,7 +37,6 @@ public class Controller {
private MonitorPresenter monitorPresenter;
private ErrorPresenter errorPresenter;
private InfoPresenter infoPresenter;
private TreeOptions treeOptions=null;
@Inject
Controller(@Named("ControllerEventBus") EventBus eventBus, AccountingDashboardServiceAsync service,
@ -51,7 +47,6 @@ public class Controller {
this.errorPresenter = errorPresenter;
this.infoPresenter = infoPresenter;
//this.cache = new ApplicationCache();
this.setTreeOptions(new TreeOptions(false));
}
@ -77,14 +72,6 @@ public class Controller {
infoPresenter.infoMessage(info);
}
public TreeOptions getTreeOptions() {
return treeOptions;
}
public void setTreeOptions(TreeOptions treeOptions) {
this.treeOptions = treeOptions;
}
public void hello() {
eventBus.fireEvent(new HelloEvent());
@ -114,29 +101,8 @@ public class Controller {
}
public void getEnvironment() {
service.getEnvironment(new AsyncCallback<EnvironmentData>() {
@Override
public void onFailure(Throwable caught) {
logger.log(Level.FINE, "Error in getEnvironment(): ", caught);
errorPresenter.errorMessage(caught.getLocalizedMessage());
}
@Override
public void onSuccess(EnvironmentData environmentData) {
logger.log(Level.FINE, "ScopeData: " + environmentData);
EnvironmentEvent event = new EnvironmentEvent(environmentData);
eventBus.fireEvent(event);
}
});
}
public void getTree() {
service.getScopeData(treeOptions,new AsyncCallback<ScopeData>() {
service.getScopeData(new AsyncCallback<ScopeData>() {
@Override
public void onFailure(Throwable caught) {
@ -157,7 +123,7 @@ public class Controller {
public void getReport(RequestReportData requestReportData) {
monitorPresenter.enable(true);
service.getReport(requestReportData,treeOptions, new AsyncCallback<ReportData>() {
service.getReport(requestReportData, new AsyncCallback<ReportData>() {
@Override
public void onFailure(Throwable caught) {
@ -178,5 +144,4 @@ public class Controller {
}
}

View File

@ -1,51 +0,0 @@
package org.gcube.portlets.user.accountingdashboard.client.application.event;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HasHandlers;
/**
*
* @author Giancarlo Panichi
*
*/
public class EnvironmentEvent extends GwtEvent<EnvironmentEvent.EnvironmentEventHandler> {
private EnvironmentData environmentData;
public interface EnvironmentEventHandler extends EventHandler {
void onInit(EnvironmentEvent event);
}
public static final Type<EnvironmentEventHandler> TYPE = new Type<>();
public EnvironmentEvent(EnvironmentData environmentData) {
this.environmentData = environmentData;
}
public static void fire(HasHandlers source, EnvironmentEvent event) {
source.fireEvent(event);
}
@Override
public Type<EnvironmentEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(EnvironmentEventHandler handler) {
handler.onInit(this);
}
public EnvironmentData getEnvironmentData() {
return environmentData;
}
@Override
public String toString() {
return "EnvironmentEvent [environmentData=" + environmentData + "]";
}
}

View File

@ -5,12 +5,9 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.gcube.portlets.user.accountingdashboard.client.application.controller.Controller;
import org.gcube.portlets.user.accountingdashboard.client.application.event.EnvironmentEvent;
import org.gcube.portlets.user.accountingdashboard.client.application.event.ScopeDataEvent;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.inject.Inject;
@ -33,8 +30,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
void displayScopeData(ScopeData scopeData);
void setEnvironment(EnvironmentData environmentData);
}
@SuppressWarnings("unused")
@ -53,6 +48,7 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
private void addProviders() {
}
private void bindToEvent() {
@ -67,29 +63,11 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
}
});
controller.getEventBus().addHandler(EnvironmentEvent.TYPE, new EnvironmentEvent.EnvironmentEventHandler() {
@Override
public void onInit(EnvironmentEvent event) {
logger.log(Level.FINE, "EnvironmentEvent received");
getView().setEnvironment(event.getEnvironmentData());
}
});
}
@Override
protected void onBind() {
super.onBind();
controller.getEnvironment();
controller.getTree();
}
@Override
public void updateTreeOptions(TreeOptions treeOptions) {
logger.fine("UpdateTreeOption: " + treeOptions);
controller.setTreeOptions(treeOptions);
controller.getTree();
}
@ -114,6 +92,7 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
return false;
}
Date dateEndD = null;
try {
logger.fine("DateTemp2: " + dateEnd);

View File

@ -1,7 +1,6 @@
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.filter;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import com.gwtplatform.mvp.client.UiHandlers;
@ -13,6 +12,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
public interface FilterAreaUiHandlers extends UiHandlers {
public void getReport(RequestReportData requestReportData);
public void updateTreeOptions(TreeOptions treeOptions);
}

View File

@ -14,17 +14,11 @@ import org.gcube.portlets.user.accountingdashboard.client.resources.AppResources
import org.gcube.portlets.user.accountingdashboard.client.resources.ScopeTreeResources;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import com.github.gwtbootstrap.client.ui.ControlGroup;
import com.github.gwtbootstrap.client.ui.ListBox;
import com.github.gwtbootstrap.client.ui.RadioButton;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
import com.google.gwt.i18n.client.LocaleInfo;
@ -68,15 +62,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
@UiField(provided = true)
ListBox monthEnd;
@UiField(provided = false)
ControlGroup cgDetachedREs;
@UiField(provided = true)
RadioButton btnShowDetachedREs;
@UiField(provided = true)
RadioButton btnHideDetachedREs;
@UiField(provided = true)
CellTree scopeTree;
@ -176,33 +161,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
}
});
logger.log(Level.FINE, "Configuring buttons DetachedREs");
//cgDetachedREs=new ControlGroup();
btnShowDetachedREs=new RadioButton("radioDetachedREs");
btnShowDetachedREs.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
TreeOptions treeOptions=new TreeOptions(true);
getUiHandlers().updateTreeOptions(treeOptions);
}
});
btnHideDetachedREs=new RadioButton("radioDetachedREs");
btnHideDetachedREs.setValue(true);
btnHideDetachedREs.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
TreeOptions treeOptions=new TreeOptions(false);
getUiHandlers().updateTreeOptions(treeOptions);
}
});
logger.log(Level.FINE, "Configuring DataProvider");
dataProvider = new ListDataProvider<ScopeData>();
RequestReportEventHandler handler = new RequestReportEventHandler() {
@ -219,38 +177,10 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
ScopeTreeResources scopeTreeResources = GWT.create(ScopeTreeResources.class);
scopeTree = new CellTree(scopeTreeModel, null, scopeTreeResources);
scopeTree.setDefaultNodeSize(500);
logger.log(Level.FINE, "FilterAreaView init end");
}
@Override
public void setEnvironment(EnvironmentData environmentData) {
logger.log(Level.FINE, "displayScopeData()");
if(environmentData!=null&&environmentData.getAccountingServiceType()!=null){
switch(environmentData.getAccountingServiceType()){
case CurrentScope:
cgDetachedREs.setVisible(false);
break;
case Infrastructure:
cgDetachedREs.setVisible(true);
break;
case PortalContex:
cgDetachedREs.setVisible(false);
break;
default:
cgDetachedREs.setVisible(false);
break;
}
} else {
cgDetachedREs.setVisible(false);
}
}
@Override
public void displayScopeData(ScopeData scopeData) {
logger.log(Level.FINE, "displayScopeData()");
ArrayList<ScopeData> scopeDataList = new ArrayList<>();
scopeDataList.add(scopeData);
this.scopeData = scopeData;
@ -264,7 +194,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
}
private void requestReport() {
logger.log(Level.FINE, "requestReport()");
String[] months = LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().monthsFull();
logger.log(Level.FINE, "Months: " + months.length);
@ -309,6 +238,4 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
}
}

View File

@ -16,8 +16,8 @@
styleName="{res.uiDataCss.uiDataFiltersPeriodPanel}">
<b:Form type="HORIZONTAL" styleName="{res.uiDataCss.uiDataFiltersFormPanel}">
<b:Fieldset>
<b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
<b:ControlLabel width="70px" for="fromPeriod">From:</b:ControlLabel>
<b:ControlGroup>
<b:ControlLabel width="50px" for="fromPeriod">From:</b:ControlLabel>
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
<b:ListBox ui:field="yearStart" width="104px" b:id="yearStart">
</b:ListBox>
@ -26,8 +26,8 @@
<b:HelpBlock>Select the start date</b:HelpBlock>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
<b:ControlLabel width="70px" for="endPeriod">To:</b:ControlLabel>
<b:ControlGroup>
<b:ControlLabel width="50px" for="endPeriod">To:</b:ControlLabel>
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
<b:ListBox ui:field="yearEnd" width="104px" b:id="yearEnd">
</b:ListBox>
@ -36,15 +36,6 @@
<b:HelpBlock>Select the end date</b:HelpBlock>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup ui:field="cgDetachedREs" styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
<b:ControlLabel width="70px" for="detachedREs">Detached:</b:ControlLabel>
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
<b:RadioButton ui:field="btnShowDetachedREs" text="Show" />
<b:RadioButton ui:field="btnHideDetachedREs" text="Hide" />
<b:HelpBlock>Detached REs</b:HelpBlock>
</b:Controls>
</b:ControlGroup>
</b:Fieldset>
</b:Form>
</g:HTMLPanel>

View File

@ -1,7 +1,6 @@
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.report;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.logging.Logger;
@ -12,13 +11,9 @@ import org.gcube.portlets.user.accountingdashboard.client.resources.AppResources
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportElementData;
import com.github.gwtbootstrap.client.ui.NavHeader;
import com.github.gwtbootstrap.client.ui.NavLink;
import com.github.gwtbootstrap.client.ui.Tab;
import com.github.gwtbootstrap.client.ui.TabPanel;
import com.github.gwtbootstrap.client.ui.WellNavList;
import com.github.gwtbootstrap.client.ui.base.IconAnchor;
import com.github.gwtbootstrap.client.ui.constants.IconType;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
@ -92,39 +87,10 @@ public class ReportAreaView extends ViewWithUiHandlers<ReportAreaPresenter>
TabPanel tabPanel = new TabPanel();
tabPanel.addStyleName(resources.uiDataCss().uiDataReportTabPanel());
boolean first = true;
ArrayList<String> sortedKeys =
new ArrayList<String>(categories.keySet());
Collections.sort(sortedKeys);
for (String category : sortedKeys) {
for (String category : categories.keySet()) {
Tab tab = new Tab();
tab.setHeading(category);
HTMLPanel tabContent = new HTMLPanel("");
if(categories.get(category).size()>0){
WellNavList toc=new WellNavList();
toc.addStyleName(resources.uiDataCss().uiDataReportToc());
NavHeader navHeader=new NavHeader();
if(categories.get(category).size()>1){
navHeader.setText("Available Graphs");
}else {
navHeader.setText("Available Graph");
}
toc.add(navHeader);
for (Chart chart : categories.get(category)) {
ReportElementData reData=chart.getReportElementData();
StringBuilder navLinkText=new StringBuilder();
navLinkText.append(reData.getLabel());
//navLinkText.append("[");
//navLinkText.append(reData.getCategory());
//navLinkText.append("]");
NavLink navLink=new NavLink(navLinkText.toString(),"#"+chart.getWrapperName());
navLink.setIcon(IconType.BAR_CHART);
navLink.addStyleName(resources.uiDataCss().uiDataReportTocNavLink());
toc.add(navLink);
}
tabContent.add(toc);
}
for (Chart chart : categories.get(category)) {
tabContent.add(chart);
}

View File

@ -14,7 +14,6 @@ import com.google.gwt.user.client.ui.HTMLPanel;
public class Chart extends HTMLPanel {
private String name;
private String wrapperName;
private ReportElementData reportElementData;
@ -31,9 +30,7 @@ public class Chart extends HTMLPanel {
+ "</ul>" + "</div>" + "<canvas id=" + name + " class='" + resources.uiDataCss().uiDataChartCanvas()
+ "'></canvas>");
this.name = name;
this.wrapperName="wrapper_"+name;
this.reportElementData = reportElementData;
this.getElement().setId(wrapperName);
this.addStyleName(resources.uiDataCss().uiDataChartWrapper());
addAttachHandler(new AttachEvent.Handler() {
@ -49,18 +46,6 @@ public class Chart extends HTMLPanel {
}
public String getName() {
return name;
}
public String getWrapperName() {
return wrapperName;
}
public ReportElementData getReportElementData() {
return reportElementData;
}
public void forceLayout() {
redrawChart();
}
@ -335,10 +320,8 @@ public class Chart extends HTMLPanel {
datasets : datasetsArray
};
//var label = [ reportElementData.getLabel(), ' [',
// reportElementData.getCategory(), ']' ].filter(Boolean).join("");
var label = reportElementData.getLabel();
var label = [ reportElementData.getLabel(), ' [',
reportElementData.getCategory(), ']' ].filter(Boolean).join("");
var scalesType = @org.gcube.portlets.user.accountingdashboard.client.application.mainarea.report.chartjs.Chart::getScales(Lorg/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/chartjs/Chart;)(this);
@ -372,7 +355,7 @@ public class Chart extends HTMLPanel {
},
zoom : {
enabled : false,
enabled : true,
mode : 'xy',
limits : {
max : 20,

View File

@ -29,8 +29,6 @@ public interface AppResources extends ClientBundle {
String uiDataFiltersFormPanel();
String uiDataFiltersControlGroup();
String uiDataFiltersControls();
String uiDataExploreTree();
@ -39,10 +37,6 @@ public interface AppResources extends ClientBundle {
String uiDataReportTabPanel();
String uiDataReportToc();
String uiDataReportTocNavLink();
String uiDataChartWrapper();
String uiDataChartCanvas();

View File

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 180 B

View File

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 430 B

View File

@ -40,12 +40,8 @@
margin: 0px !important;
}
.uiDataFiltersControlGroup {
margin-bottom: 10px;
}
.uiDataFiltersControls {
margin-left: 80px;
margin-left: 60px;
}
.uiDataExploreTree {
@ -67,27 +63,10 @@
max-width: 800px;
}
/* TOC WellNavList */
.uiDataReportToc {
padding: 8px 0px;
max-width: 650px;
}
/* TOC NavLink */
.uiDataReportTocNavLink {
color: rgb(59, 89, 152);
}
/* TOC NavLink href */
.uiDataReportTocNavLink a {
color: rgb(59, 89, 152);
}
/* Chart */
.uiDataChartWrapper {
width: 800px;
padding-top: 50px;
/*border: solid 1px;*/
}

View File

@ -3,9 +3,7 @@ package org.gcube.portlets.user.accountingdashboard.client.rpc;
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import org.gcube.portlets.user.accountingdashboard.shared.exception.ServiceException;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.user.client.rpc.RemoteService;
@ -28,10 +26,8 @@ public interface AccountingDashboardService extends RemoteService {
*/
public UserInfo hello() throws ServiceException;
public ScopeData getScopeData(TreeOptions treeOptions) throws ServiceException;
public ScopeData getScopeData() throws ServiceException;
public ReportData getReport(RequestReportData requestReportdata, TreeOptions treeOptions) throws ServiceException;
public EnvironmentData getEnvironment() throws ServiceException;
public ReportData getReport(RequestReportData requestReportdata) throws ServiceException;
}

View File

@ -6,8 +6,6 @@ package org.gcube.portlets.user.accountingdashboard.client.rpc;
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.core.client.GWT;
@ -26,11 +24,8 @@ public interface AccountingDashboardServiceAsync {
void hello(AsyncCallback<UserInfo> callback);
void getEnvironment(AsyncCallback<EnvironmentData> callback);
void getScopeData(AsyncCallback<ScopeData> callback);
void getScopeData(TreeOptions treeOptions, AsyncCallback<ScopeData> callback);
void getReport(RequestReportData requestReportdata, TreeOptions treeOptions,
AsyncCallback<ReportData> asyncCallback);
void getReport(RequestReportData requestReportdata, AsyncCallback<ReportData> asyncCallback);
}

View File

@ -6,14 +6,12 @@ import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type;
import org.gcube.portlets.user.accountingdashboard.client.rpc.AccountingDashboardService;
import org.gcube.portlets.user.accountingdashboard.server.accounting.AccountingService;
import org.gcube.portlets.user.accountingdashboard.server.accounting.AccountingServiceType;
import org.gcube.portlets.user.accountingdashboard.server.util.ServiceCredentials;
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
import org.gcube.portlets.user.accountingdashboard.shared.env.AccountingServiceType;
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
import org.gcube.portlets.user.accountingdashboard.shared.exception.ServiceException;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -67,28 +65,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
}
@Override
public EnvironmentData getEnvironment() throws ServiceException {
try {
logger.debug("AccountingDashboardServiceImpl getEnvironment()");
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest());
AccountingServiceType accountingServiceType=getAccountingContext(serviceCredentials.getScope());
EnvironmentData environmentData=new EnvironmentData(accountingServiceType);
return environmentData;
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage(), e);
throw e;
} catch (Throwable e) {
logger.error("GetEnvironment(): " + e.getLocalizedMessage(), e);
throw new ServiceException("Error retrieving environment info: " + e.getLocalizedMessage(), e);
}
}
@Override
public ScopeData getScopeData(TreeOptions treeOptions) throws ServiceException {
public ScopeData getScopeData() throws ServiceException {
try {
logger.debug("AccountingDashboardServiceImpl getScopeData()");
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest());
AccountingService as = new AccountingService(getAccountingContext(serviceCredentials.getScope()),treeOptions);
AccountingService as = new AccountingService(getAccountingContext(serviceCredentials.getScope()));
ScopeData scopeData = as.getTree(this.getThreadLocalRequest());
return scopeData;
} catch (ServiceException e) {
@ -102,11 +83,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
}
@Override
public ReportData getReport(RequestReportData requestReportData,TreeOptions treeOptions) throws ServiceException {
public ReportData getReport(RequestReportData requestReportData) throws ServiceException {
try {
logger.debug("AccountingDashboardServiceImpl getReport(): " + requestReportData);
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest());
AccountingService as = new AccountingService(getAccountingContext(serviceCredentials.getScope()), treeOptions);
AccountingService as = new AccountingService(getAccountingContext(serviceCredentials.getScope()));
ReportData reportData = as.getReport(this.getThreadLocalRequest(), requestReportData);
return reportData;
} catch (ServiceException e) {
@ -136,6 +117,4 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
}
}
}

Some files were not shown because too many files have changed in this diff Show More