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"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <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> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -50,5 +50,5 @@
</classpathentry> </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.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="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> </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"> <?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="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <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);

48
LICENSE.md Executable file → Normal file
View File

@ -1,10 +1,9 @@
# European Union Public Licence V. 1.1 #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 (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 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). extent such use is covered by a right of the copyright holder of the Work).
@ -13,13 +12,13 @@ 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 (as defined below) has placed the following notice immediately following the
copyright notice for the Original Work: 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. or has expressed by any other mean his willingness to license under the EUPL.
## 1. Definitions ##1. Definitions
In this Licence, the following terms have the following meaning: In this Licence, the following terms have the following meaning:
@ -60,7 +59,7 @@ In this Licence, the following terms have the following meaning:
## 2. Scope of the rights granted by the Licence ##2. Scope of the rights granted by the Licence
The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
sub-licensable licence to do the following, for the duration of copyright vested sub-licensable licence to do the following, for the duration of copyright vested
@ -86,7 +85,7 @@ rights granted on the Work under this Licence.
## 3. Communication of the Source Code ##3. Communication of the Source Code
The Licensor may provide the Work either in its Source Code form, or as The Licensor may provide the Work either in its Source Code form, or as
Executable Code. If the Work is provided as Executable Code, the Licensor Executable Code. If the Work is provided as Executable Code, the Licensor
@ -98,7 +97,7 @@ continues to distribute and/or communicate the Work.
## 4. Limitations on copyright ##4. Limitations on copyright
Nothing in this Licence is intended to deprive the Licensee of the benefits from Nothing in this Licence is intended to deprive the Licensee of the benefits from
any exception or limitation to the exclusive rights of the rights owners in the any exception or limitation to the exclusive rights of the rights owners in the
@ -107,7 +106,7 @@ applicable limitations thereto.
## 5. Obligations of the Licensee ##5. Obligations of the Licensee
The grant of the rights mentioned above is subject to some restrictions and The grant of the rights mentioned above is subject to some restrictions and
obligations imposed on the Licensee. Those obligations are the following: obligations imposed on the Licensee. Those obligations are the following:
@ -148,7 +147,7 @@ reproducing the content of the copyright notice.
## 6. Chain of Authorship ##6. Chain of Authorship
The original Licensor warrants that the copyright in the Original Work granted The original Licensor warrants that the copyright in the Original Work granted
hereunder is owned by him/her or licensed to him/her and that he/she has the hereunder is owned by him/her or licensed to him/her and that he/she has the
@ -164,7 +163,7 @@ terms of this Licence.
## 7. Disclaimer of Warranty ##7. Disclaimer of Warranty
The Work is a work in progress, which is continuously improved by numerous The Work is a work in progress, which is continuously improved by numerous
contributors. It is not a finished work and may therefore contain defects or contributors. It is not a finished work and may therefore contain defects or
@ -181,7 +180,7 @@ for the grant of any rights to the Work.
## 8. Disclaimer of Liability ##8. Disclaimer of Liability
Except in the cases of wilful misconduct or damages directly caused to natural Except in the cases of wilful misconduct or damages directly caused to natural
persons, the Licensor will in no event be liable for any direct or indirect, persons, the Licensor will in no event be liable for any direct or indirect,
@ -194,7 +193,7 @@ laws as far such laws apply to the Work.
## 9. Additional agreements ##9. Additional agreements
While distributing the Original Work or Derivative Works, You may choose to While distributing the Original Work or Derivative Works, You may choose to
conclude an additional agreement to offer, and charge a fee for, acceptance of conclude an additional agreement to offer, and charge a fee for, acceptance of
@ -208,7 +207,7 @@ any such warranty or additional liability.
## 10. Acceptance of the Licence ##10. Acceptance of the Licence
The provisions of this Licence can be accepted by clicking on an icon “I agree” The provisions of this Licence can be accepted by clicking on an icon “I agree”
placed under the bottom of a window displaying the text of this Licence or by placed under the bottom of a window displaying the text of this Licence or by
@ -223,7 +222,7 @@ Distribution and/or Communication by You of the Work or copies thereof.
## 11. Information to the public ##11. Information to the public
In case of any Distribution and/or Communication of the Work by means of In case of any Distribution and/or Communication of the Work by means of
electronic communication by You (for example, by offering to download the Work electronic communication by You (for example, by offering to download the Work
@ -234,7 +233,7 @@ accessible, concluded, stored and reproduced by the Licensee.
## 12. Termination of the Licence ##12. Termination of the Licence
The Licence and the rights granted hereunder will terminate automatically upon The Licence and the rights granted hereunder will terminate automatically upon
any breach by the Licensee of the terms of the Licence. any breach by the Licensee of the terms of the Licence.
@ -245,7 +244,7 @@ remain in full compliance with the Licence.
## 13. Miscellaneous ##13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work licensed hereunder. agreement between the Parties as to the Work licensed hereunder.
@ -266,7 +265,7 @@ their choice.
## 14. Jurisdiction ##14. Jurisdiction
Any litigation resulting from the interpretation of this License, arising Any litigation resulting from the interpretation of this License, arising
between the European Commission, as a Licensor, and any Licensee, will be between the European Commission, as a Licensor, and any Licensee, will be
@ -280,7 +279,7 @@ conducts its primary business.
## 15. Applicable Law ##15. Applicable Law
This Licence shall be governed by the law of the European Union country where This Licence shall be governed by the law of the European Union country where
the Licensor resides or has his registered office. the Licensor resides or has his registered office.
@ -292,12 +291,13 @@ This licence shall be governed by the Belgian law if:
- or registered office inside a European Union country. - or registered office inside a European Union country.
---
## Appendix
##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 - 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 Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies. 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> <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" <Changeset component="org.gcube.portlets.user.accounting-dashboard.1-2-0"
date="2020-04-08"> date="2019-11-12">
<Change>Updated export csv support with Firefox and Safari [#18034]</Change> <Change>Updated export csv support with Firefox and Safari [ticket #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>
</Changeset> </Changeset>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-1-0" <Changeset component="org.gcube.portlets.user.accounting-dashboard.1-1-0"
date="2019-10-01"> date="2019-10-01">
<Change>Updated to support accounting data visualization at the <Change>Updated to support accounting data visualization at the
infrastructure level [#17847]</Change> infrastructure level [ticket #17847]</Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-0-0" <Changeset component="org.gcube.portlets.user.accounting-dashboard.1-0-0"
date="2018-08-01"> date="2018-08-01">

3
descriptor.xml Executable file → Normal file
View File

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

12
pom.xml Executable file → Normal file
View File

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

0
profile.xml Executable file → Normal file
View File

View File

@ -1,11 +1,8 @@
package org.gcube.portlets.user.accountingdashboard.client.application; 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.controller.Controller;
import org.gcube.portlets.user.accountingdashboard.client.application.menu.MenuPresenter; 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.gwt.user.client.Window;
import com.google.inject.Inject; 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.NavigationEvent;
import com.gwtplatform.mvp.client.proxy.NavigationHandler; import com.gwtplatform.mvp.client.proxy.NavigationHandler;
import com.gwtplatform.mvp.client.proxy.Proxy; 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 public class ApplicationPresenter
extends Presenter<ApplicationPresenter.PresenterView, ApplicationPresenter.ApplicationPresenterProxy> extends Presenter<ApplicationPresenter.PresenterView, ApplicationPresenter.ApplicationPresenterProxy>
implements NavigationHandler { implements NavigationHandler {
private static Logger logger = java.util.logging.Logger.getLogger("");
interface PresenterView extends View { interface PresenterView extends View {
} }
@ -44,9 +37,10 @@ public class ApplicationPresenter
private MenuPresenter menuPresenter; private MenuPresenter menuPresenter;
private Controller controller; private Controller controller;
@Inject @Inject
ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy, ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy, MenuPresenter menuPresenter,
MenuPresenter menuPresenter, Controller controller) { Controller controller) {
super(eventBus, view, proxy, RevealType.Root); super(eventBus, view, proxy, RevealType.Root);
this.menuPresenter = menuPresenter; this.menuPresenter = menuPresenter;
this.controller = controller; this.controller = controller;
@ -69,21 +63,16 @@ public class ApplicationPresenter
@Override @Override
public void onNavigation(NavigationEvent navigationEvent) { public void onNavigation(NavigationEvent navigationEvent) {
if (navigationEvent != null) { Window.scrollTo(0, 0);
PlaceRequest placeRequest = navigationEvent.getRequest(); // PlaceRequest placeRequest=navigationEvent.getRequest();
logger.log(Level.FINE, "Navigation: " + placeRequest); // placeManager.revealPlace(placeRequest);
// If the navigation is related to mainarea scrollbar is not reset
if (placeRequest.getNameToken().compareTo(NameTokens.getMainArea()) != 0) {
Window.scrollTo(0, 0);
}
// placeManager.revealPlace(placeRequest);
} else {
Window.scrollTo(0, 0);
}
} }
private void callHello() { private void callHello(){
controller.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.error.ErrorPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.info.InfoPresenter; 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.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.HelloEvent;
import org.gcube.portlets.user.accountingdashboard.client.application.event.ReportEvent; import org.gcube.portlets.user.accountingdashboard.client.application.event.ReportEvent;
import org.gcube.portlets.user.accountingdashboard.client.application.event.ScopeDataEvent; 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.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData; 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.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 org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.event.shared.EventBus; import com.google.gwt.event.shared.EventBus;
@ -40,7 +37,6 @@ public class Controller {
private MonitorPresenter monitorPresenter; private MonitorPresenter monitorPresenter;
private ErrorPresenter errorPresenter; private ErrorPresenter errorPresenter;
private InfoPresenter infoPresenter; private InfoPresenter infoPresenter;
private TreeOptions treeOptions=null;
@Inject @Inject
Controller(@Named("ControllerEventBus") EventBus eventBus, AccountingDashboardServiceAsync service, Controller(@Named("ControllerEventBus") EventBus eventBus, AccountingDashboardServiceAsync service,
@ -51,7 +47,6 @@ public class Controller {
this.errorPresenter = errorPresenter; this.errorPresenter = errorPresenter;
this.infoPresenter = infoPresenter; this.infoPresenter = infoPresenter;
//this.cache = new ApplicationCache(); //this.cache = new ApplicationCache();
this.setTreeOptions(new TreeOptions(false));
} }
@ -77,14 +72,6 @@ public class Controller {
infoPresenter.infoMessage(info); infoPresenter.infoMessage(info);
} }
public TreeOptions getTreeOptions() {
return treeOptions;
}
public void setTreeOptions(TreeOptions treeOptions) {
this.treeOptions = treeOptions;
}
public void hello() { public void hello() {
eventBus.fireEvent(new HelloEvent()); 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() { public void getTree() {
service.getScopeData(treeOptions,new AsyncCallback<ScopeData>() { service.getScopeData(new AsyncCallback<ScopeData>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
@ -157,7 +123,7 @@ public class Controller {
public void getReport(RequestReportData requestReportData) { public void getReport(RequestReportData requestReportData) {
monitorPresenter.enable(true); monitorPresenter.enable(true);
service.getReport(requestReportData,treeOptions, new AsyncCallback<ReportData>() { service.getReport(requestReportData, new AsyncCallback<ReportData>() {
@Override @Override
public void onFailure(Throwable caught) { 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 java.util.logging.Logger;
import org.gcube.portlets.user.accountingdashboard.client.application.controller.Controller; 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.client.application.event.ScopeDataEvent;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData; 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.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.gwt.i18n.client.DateTimeFormat;
import com.google.inject.Inject; import com.google.inject.Inject;
@ -33,8 +30,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
void displayScopeData(ScopeData scopeData); void displayScopeData(ScopeData scopeData);
void setEnvironment(EnvironmentData environmentData);
} }
@SuppressWarnings("unused") @SuppressWarnings("unused")
@ -53,6 +48,7 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
private void addProviders() { private void addProviders() {
} }
private void bindToEvent() { private void bindToEvent() {
@ -67,35 +63,17 @@ 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 @Override
protected void onBind() { protected void onBind() {
super.onBind(); super.onBind();
controller.getEnvironment();
controller.getTree();
}
@Override
public void updateTreeOptions(TreeOptions treeOptions) {
logger.fine("UpdateTreeOption: " + treeOptions);
controller.setTreeOptions(treeOptions);
controller.getTree(); controller.getTree();
} }
@Override @Override
public void getReport(RequestReportData requestReportData) { public void getReport(RequestReportData requestReportData) {
if (checkDate(requestReportData.getDateFrom(), requestReportData.getDateTo())) { if(checkDate(requestReportData.getDateFrom(),requestReportData.getDateTo())){
controller.getReport(requestReportData); controller.getReport(requestReportData);
} }
@ -114,6 +92,7 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
return false; return false;
} }
Date dateEndD = null; Date dateEndD = null;
try { try {
logger.fine("DateTemp2: " + dateEnd); logger.fine("DateTemp2: " + dateEnd);

View File

@ -1,7 +1,6 @@
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.filter; 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.data.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import com.gwtplatform.mvp.client.UiHandlers; import com.gwtplatform.mvp.client.UiHandlers;
@ -13,6 +12,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
public interface FilterAreaUiHandlers extends UiHandlers { public interface FilterAreaUiHandlers extends UiHandlers {
public void getReport(RequestReportData requestReportData); 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.client.resources.ScopeTreeResources;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData; 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.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.ListBox;
import com.github.gwtbootstrap.client.ui.RadioButton;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler; 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;
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
import com.google.gwt.i18n.client.LocaleInfo; import com.google.gwt.i18n.client.LocaleInfo;
@ -68,15 +62,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
@UiField(provided = true) @UiField(provided = true)
ListBox monthEnd; ListBox monthEnd;
@UiField(provided = false)
ControlGroup cgDetachedREs;
@UiField(provided = true)
RadioButton btnShowDetachedREs;
@UiField(provided = true)
RadioButton btnHideDetachedREs;
@UiField(provided = true) @UiField(provided = true)
CellTree scopeTree; 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>(); dataProvider = new ListDataProvider<ScopeData>();
RequestReportEventHandler handler = new RequestReportEventHandler() { RequestReportEventHandler handler = new RequestReportEventHandler() {
@ -219,38 +177,10 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
ScopeTreeResources scopeTreeResources = GWT.create(ScopeTreeResources.class); ScopeTreeResources scopeTreeResources = GWT.create(ScopeTreeResources.class);
scopeTree = new CellTree(scopeTreeModel, null, scopeTreeResources); scopeTree = new CellTree(scopeTreeModel, null, scopeTreeResources);
scopeTree.setDefaultNodeSize(500); 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 @Override
public void displayScopeData(ScopeData scopeData) { public void displayScopeData(ScopeData scopeData) {
logger.log(Level.FINE, "displayScopeData()");
ArrayList<ScopeData> scopeDataList = new ArrayList<>(); ArrayList<ScopeData> scopeDataList = new ArrayList<>();
scopeDataList.add(scopeData); scopeDataList.add(scopeData);
this.scopeData = scopeData; this.scopeData = scopeData;
@ -264,7 +194,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
} }
private void requestReport() { private void requestReport() {
logger.log(Level.FINE, "requestReport()");
String[] months = LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().monthsFull(); String[] months = LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().monthsFull();
logger.log(Level.FINE, "Months: " + months.length); logger.log(Level.FINE, "Months: " + months.length);
@ -309,6 +238,4 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
} }
} }

View File

@ -11,47 +11,38 @@
<g:HTMLPanel styleName="{res.uiDataCss.uiDataFiltersPanel}"> <g:HTMLPanel styleName="{res.uiDataCss.uiDataFiltersPanel}">
<b:Heading size="5" styleName="{res.uiDataCss.uiDataFiltersTitle}">Filters</b:Heading> <b:Heading size="5" styleName="{res.uiDataCss.uiDataFiltersTitle}">Filters</b:Heading>
<g:HTMLPanel ui:field="periodPanel" <g:HTMLPanel ui:field="periodPanel"
styleName="{res.uiDataCss.uiDataFiltersPeriodPanel}"> styleName="{res.uiDataCss.uiDataFiltersPeriodPanel}">
<b:Form type="HORIZONTAL" styleName="{res.uiDataCss.uiDataFiltersFormPanel}"> <b:Form type="HORIZONTAL" styleName="{res.uiDataCss.uiDataFiltersFormPanel}">
<b:Fieldset> <b:Fieldset>
<b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}"> <b:ControlGroup>
<b:ControlLabel width="70px" for="fromPeriod">From:</b:ControlLabel> <b:ControlLabel width="50px" for="fromPeriod">From:</b:ControlLabel>
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}"> <b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
<b:ListBox ui:field="yearStart" width="104px" b:id="yearStart"> <b:ListBox ui:field="yearStart" width="104px" b:id="yearStart">
</b:ListBox> </b:ListBox>
<b:ListBox ui:field="monthStart" width="104px" b:id="monthStart"> <b:ListBox ui:field="monthStart" width="104px" b:id="monthStart">
</b:ListBox> </b:ListBox>
<b:HelpBlock>Select the start date</b:HelpBlock> <b:HelpBlock>Select the start date</b:HelpBlock>
</b:Controls> </b:Controls>
</b:ControlGroup> </b:ControlGroup>
<b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}"> <b:ControlGroup>
<b:ControlLabel width="70px" for="endPeriod">To:</b:ControlLabel> <b:ControlLabel width="50px" for="endPeriod">To:</b:ControlLabel>
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}"> <b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
<b:ListBox ui:field="yearEnd" width="104px" b:id="yearEnd"> <b:ListBox ui:field="yearEnd" width="104px" b:id="yearEnd">
</b:ListBox> </b:ListBox>
<b:ListBox ui:field="monthEnd" width="104px" b:id="monthEnd"> <b:ListBox ui:field="monthEnd" width="104px" b:id="monthEnd">
</b:ListBox> </b:ListBox>
<b:HelpBlock>Select the end date</b:HelpBlock> <b:HelpBlock>Select the end date</b:HelpBlock>
</b:Controls> </b:Controls>
</b:ControlGroup> </b:ControlGroup>
<b:ControlGroup ui:field="cgDetachedREs" styleName="{res.uiDataCss.uiDataFiltersControlGroup}"> </b:Fieldset>
<b:ControlLabel width="70px" for="detachedREs">Detached:</b:ControlLabel> </b:Form>
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}"> </g:HTMLPanel>
<b:RadioButton ui:field="btnShowDetachedREs" text="Show" /> <g:HTMLPanel ui:field="explorePanel"
<b:RadioButton ui:field="btnHideDetachedREs" text="Hide" /> styleName="{res.uiDataCss.uiDataFiltersExplorePanel}">
<b:HelpBlock>Detached REs</b:HelpBlock> <c:CellTree addStyleNames="{res.uiDataCss.uiDataExploreTree}"
</b:Controls> ui:field='scopeTree' />
</b:ControlGroup> </g:HTMLPanel>
</b:Fieldset>
</b:Form>
</g:HTMLPanel>
<g:HTMLPanel ui:field="explorePanel"
styleName="{res.uiDataCss.uiDataFiltersExplorePanel}">
<c:CellTree addStyleNames="{res.uiDataCss.uiDataExploreTree}"
ui:field='scopeTree' />
</g:HTMLPanel>
</g:HTMLPanel> </g:HTMLPanel>
</ui:UiBinder> </ui:UiBinder>

View File

@ -1,7 +1,6 @@
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.report; package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.report;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.logging.Logger; 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.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportElementData; 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.Tab;
import com.github.gwtbootstrap.client.ui.TabPanel; 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.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.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiBinder;
@ -92,39 +87,10 @@ public class ReportAreaView extends ViewWithUiHandlers<ReportAreaPresenter>
TabPanel tabPanel = new TabPanel(); TabPanel tabPanel = new TabPanel();
tabPanel.addStyleName(resources.uiDataCss().uiDataReportTabPanel()); tabPanel.addStyleName(resources.uiDataCss().uiDataReportTabPanel());
boolean first = true; boolean first = true;
ArrayList<String> sortedKeys = for (String category : categories.keySet()) {
new ArrayList<String>(categories.keySet());
Collections.sort(sortedKeys);
for (String category : sortedKeys) {
Tab tab = new Tab(); Tab tab = new Tab();
tab.setHeading(category); tab.setHeading(category);
HTMLPanel tabContent = new HTMLPanel(""); 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)) { for (Chart chart : categories.get(category)) {
tabContent.add(chart); tabContent.add(chart);
} }

View File

@ -14,7 +14,6 @@ import com.google.gwt.user.client.ui.HTMLPanel;
public class Chart extends HTMLPanel { public class Chart extends HTMLPanel {
private String name; private String name;
private String wrapperName;
private ReportElementData reportElementData; private ReportElementData reportElementData;
@ -31,9 +30,7 @@ public class Chart extends HTMLPanel {
+ "</ul>" + "</div>" + "<canvas id=" + name + " class='" + resources.uiDataCss().uiDataChartCanvas() + "</ul>" + "</div>" + "<canvas id=" + name + " class='" + resources.uiDataCss().uiDataChartCanvas()
+ "'></canvas>"); + "'></canvas>");
this.name = name; this.name = name;
this.wrapperName="wrapper_"+name;
this.reportElementData = reportElementData; this.reportElementData = reportElementData;
this.getElement().setId(wrapperName);
this.addStyleName(resources.uiDataCss().uiDataChartWrapper()); this.addStyleName(resources.uiDataCss().uiDataChartWrapper());
addAttachHandler(new AttachEvent.Handler() { 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() { public void forceLayout() {
redrawChart(); redrawChart();
} }
@ -197,8 +182,8 @@ public class Chart extends HTMLPanel {
datasetRow += "," + recordData.getY(); datasetRow += "," + recordData.getY();
} }
var csvData = heading + "\n" + datasetRow + "\n"; var csvData=heading+"\n"+datasetRow + "\n";
var csvDataEncoded = encodeURI(csvData); var csvDataEncoded=encodeURI(csvData);
csvContent += csvDataEncoded; csvContent += csvDataEncoded;
} else { } else {
var datasetRow = seriesData.getLabel(); var datasetRow = seriesData.getLabel();
@ -206,8 +191,8 @@ public class Chart extends HTMLPanel {
var recordData = dataRow[j]; var recordData = dataRow[j];
datasetRow += "," + recordData.getY(); datasetRow += "," + recordData.getY();
} }
var csvData = datasetRow + "\n"; var csvData=datasetRow + "\n";
var csvDataEncoded = encodeURI(csvData); var csvDataEncoded=encodeURI(csvData);
csvContent += csvDataEncoded; csvContent += csvDataEncoded;
} }
} }
@ -335,10 +320,8 @@ public class Chart extends HTMLPanel {
datasets : datasetsArray datasets : datasetsArray
}; };
//var label = [ reportElementData.getLabel(), ' [', var label = [ reportElementData.getLabel(), ' [',
// reportElementData.getCategory(), ']' ].filter(Boolean).join(""); reportElementData.getCategory(), ']' ].filter(Boolean).join("");
var label = reportElementData.getLabel();
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); 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 : { zoom : {
enabled : false, enabled : true,
mode : 'xy', mode : 'xy',
limits : { limits : {
max : 20, max : 20,

View File

@ -29,8 +29,6 @@ public interface AppResources extends ClientBundle {
String uiDataFiltersFormPanel(); String uiDataFiltersFormPanel();
String uiDataFiltersControlGroup();
String uiDataFiltersControls(); String uiDataFiltersControls();
String uiDataExploreTree(); String uiDataExploreTree();
@ -39,10 +37,6 @@ public interface AppResources extends ClientBundle {
String uiDataReportTabPanel(); String uiDataReportTabPanel();
String uiDataReportToc();
String uiDataReportTocNavLink();
String uiDataChartWrapper(); String uiDataChartWrapper();
String uiDataChartCanvas(); 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; margin: 0px !important;
} }
.uiDataFiltersControlGroup {
margin-bottom: 10px;
}
.uiDataFiltersControls { .uiDataFiltersControls {
margin-left: 80px; margin-left: 60px;
} }
.uiDataExploreTree { .uiDataExploreTree {
@ -67,27 +63,10 @@
max-width: 800px; 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 */ /* Chart */
.uiDataChartWrapper { .uiDataChartWrapper {
width: 800px; width: 800px;
padding-top: 50px;
/*border: solid 1px;*/ /*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.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData; 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.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.exception.ServiceException;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo; import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteService;
@ -28,10 +26,8 @@ public interface AccountingDashboardService extends RemoteService {
*/ */
public UserInfo hello() throws ServiceException; 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 ReportData getReport(RequestReportData requestReportdata) throws ServiceException;
public EnvironmentData getEnvironment() 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.ReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData; 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.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 org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
@ -26,11 +24,8 @@ public interface AccountingDashboardServiceAsync {
void hello(AsyncCallback<UserInfo> callback); 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, AsyncCallback<ReportData> asyncCallback);
void getReport(RequestReportData requestReportdata, TreeOptions treeOptions,
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.common.scope.impl.ScopeBean.Type;
import org.gcube.portlets.user.accountingdashboard.client.rpc.AccountingDashboardService; 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.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.server.util.ServiceCredentials;
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData; 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.RequestReportData;
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData; 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.exception.ServiceException;
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo; import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -67,28 +65,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
} }
@Override @Override
public EnvironmentData getEnvironment() throws ServiceException { public ScopeData getScopeData() 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 {
try { try {
logger.debug("AccountingDashboardServiceImpl getScopeData()"); logger.debug("AccountingDashboardServiceImpl getScopeData()");
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest()); 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()); ScopeData scopeData = as.getTree(this.getThreadLocalRequest());
return scopeData; return scopeData;
} catch (ServiceException e) { } catch (ServiceException e) {
@ -102,11 +83,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
} }
@Override @Override
public ReportData getReport(RequestReportData requestReportData,TreeOptions treeOptions) throws ServiceException { public ReportData getReport(RequestReportData requestReportData) throws ServiceException {
try { try {
logger.debug("AccountingDashboardServiceImpl getReport(): " + requestReportData); logger.debug("AccountingDashboardServiceImpl getReport(): " + requestReportData);
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest()); 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); ReportData reportData = as.getReport(this.getThreadLocalRequest(), requestReportData);
return reportData; return reportData;
} catch (ServiceException e) { } 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