Compare commits

...

35 Commits

Author SHA1 Message Date
Giancarlo Panichi 358add45aa Updated the scope of xml-apis [#23510] 2022-06-15 17:29:03 +02:00
Giancarlo Panichi 3d9e6bc63a Updated the scope of xml-apis [#23510] 2022-06-15 17:23:54 +02:00
Giancarlo Panichi a4edbbd9cb Ready for Release gCube 4.24.0 2020-06-18 16:32:44 +02:00
Giancarlo Panichi 9801dea0d9 ref 19161: Disable Zoom for charts
https://support.d4science.org/issues/18964

Disabled Zoom for charts
2020-06-18 16:23:48 +02:00
Giancarlo Panichi 602458627b ref 19440: Update the library detachedres-library to store properties
needed to resolve detached Item URLs

https://support.d4science.org/issues/19440

Updated to support new detachedres-library
2020-06-18 15:29:38 +02:00
Giancarlo Panichi ff7ab51743 ref 19440: Update the library detachedres-library to store properties
needed to resolve detached Item URLs

https://support.d4science.org/issues/19440

Updated to support new detachedres-library
2020-06-18 15:21:27 +02:00
Roberto Cirillo bae895059b Update 'pom.xml'
removed SNAPSHOT from artifact version
2020-04-14 16:29:01 +02:00
Giancarlo Panichi d31c9b9f09 Create 1.2.0-SNAPSHOT version 2020-04-14 15:16:43 +02:00
Giancarlo Panichi 6fbc30f520 Merge pull request 'Feature/18753' (#2) from Feature/18753 into master 2020-04-14 15:14:07 +02:00
Giancarlo Panichi a027c3aefd ref 18753: Add menu to Accounting Dashboard pages
https://support.d4science.org/issues/18753

Fixed TOC menu behavior in reports
2020-04-14 12:33:03 +02:00
Giancarlo Panichi 464022838a ref 18753: Add menu to Accounting Dashboard pages
https://support.d4science.org/issues/18753

Added TOC menu in reports
2020-04-10 20:56:18 +02:00
Giancarlo Panichi b820edce39 ref 18753: Add menu to Accounting Dashboard pages containing more than
one graph

https://support.d4science.org/issues/18753

Added TOC menu in reports
2020-04-10 20:23:24 +02:00
Giancarlo Panichi 95f5670e9f ref 18753: Add menu to Accounting Dashboard pages
https://support.d4science.org/issues/18753

Added TOC menu in reports
2020-04-10 20:20:29 +02:00
Giancarlo Panichi 95b009ae60 Merge pull request 'Future/18815' (#1) from Future/18815 into master 2020-04-09 17:32:10 +02:00
Giancarlo Panichi c327d0b00c Branches: Future/18815, origin/Future/18815
ref 18754: Dashboard: Alphabetically sort the tabs

https://support.d4science.org/issues/18754

Added the alphabetical sorting of the tabs
2020-04-08 18:51:44 +02:00
Giancarlo Panichi 68dc1588fb ref 18754: Dashboard: Alphabetically sort the tabs
https://support.d4science.org/issues/18754

Added the alphabetically sort of the tabs
2020-04-08 18:48:15 +02:00
Giancarlo Panichi 44cca496c9 ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Updated detached REs support
2020-04-08 16:56:05 +02:00
Giancarlo Panichi 6b7d32fcbf ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Updated detached REs support
2020-04-08 16:52:52 +02:00
Giancarlo Panichi 2081513f2f ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Updated detached REs support
2020-04-08 12:30:28 +02:00
Giancarlo Panichi e368c174dd ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Added detachedres-library
2020-04-07 19:21:07 +02:00
Giancarlo Panichi 3e0c975f91 ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Added detachedres-library
2020-04-07 19:00:10 +02:00
Giancarlo Panichi 4e5c3a9b4b ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Added detachedres-library
2020-04-07 17:56:56 +02:00
Giancarlo Panichi 82361090f7 ref 18815: Accounting Dashboard Reminiscence
https://support.d4science.org/issues/18815

Added detachedres-library
2020-04-07 17:34:45 +02:00
Giancarlo Panichi d5266a0b7c ref 18291: Modify Accounting Dashboard portlet to support Core Services
https://support.d4science.org/issues/18291

Fixed infra nodes scope
2020-02-14 15:04:07 +01:00
Giancarlo Panichi d0e815d7f7 ref 18291: Modify the Accounting Dashboard portlet to support the Core
Services Category per gateway

https://support.d4science.org/issues/18291

Fixed infra nodes scope
2020-01-22 10:49:22 +01:00
Giancarlo Panichi 58ccefa0b7 ref 18291: Modify the Accounting Dashboard portlet to support the Core
Services Category per gateway

https://support.d4science.org/issues/18291

Fixed infra nodes scope
2020-01-21 18:57:27 +01:00
Giancarlo Panichi b8f99d099e ref 18291: Modify the Accounting Dashboard portlet to support the Core
Services Category per gateway

https://support.d4science.org/issues/18291

Fixed infra nodes scope
2020-01-21 12:09:14 +01:00
Giancarlo Panichi e140afebe4 ref 18291: Modify the Accounting Dashboard portlet to support the Core
Services Category per gateway

https://support.d4science.org/issues/18291

Fixed the creation of the tree
2020-01-21 11:28:33 +01:00
Giancarlo Panichi 8726e63ad7 ref 18291: Modify the Accounting Dashboard portlet to support the Core
Services Category per gateway

https://support.d4science.org/issues/18291

Added IS support
2020-01-20 19:21:27 +01:00
Giancarlo Panichi 52cc4ad7c9 Updated to Git and Jenkins 2019-11-29 15:25:21 +01:00
Giancarlo Panichi 5641f23fe1 Updated to Git and Jenkins 2019-11-29 15:20:19 +01:00
Giancarlo Panichi ac010a1dd3 Updated to Git and Jenkins 2019-11-29 15:18:54 +01:00
Giancarlo Panichi c8f081427a Updated to Git and Jenkins 2019-11-29 15:18:23 +01:00
Giancarlo Panichi 975779d8e4 ref 18034: Support export csv with Firefox and Safari
https://support.d4science.org/issues/18034

Updated csv export
2019-11-12 13:55:43 +01:00
Giancarlo Panichi 3cddab592a ref 18034: Accounting Dashboard - Support export csv with Firefox and
Safari
https://support.d4science.org/issues/18034

Updated csv export
2019-11-12 12:03:51 +01:00
142 changed files with 1422 additions and 145 deletions

6
.classpath Normal file → Executable 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.1.0/WEB-INF/classes" path="src/main/java"> <classpathentry including="**/*.java" kind="src" output="target/accounting-dashboard-1.2.1-SNAPSHOT/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.1.0/WEB-INF/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/accounting-dashboard-1.2.1-SNAPSHOT/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.1.0/WEB-INF/classes"/> <classpathentry kind="output" path="target/accounting-dashboard-1.2.1-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

0
.gitignore vendored Normal file → Executable file
View File

0
.project Normal file → Executable file
View File

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

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

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

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

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

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

2
.settings/org.eclipse.wst.common.component Normal file → Executable 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.1.0"> <wb-module deploy-name="accounting-dashboard-1.2.1-SNAPSHOT">
<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 Normal file → Executable file
View File

40
CHANGELOG.md Executable file
View File

@ -0,0 +1,40 @@
# 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).

26
FUNDING.md Executable file
View File

@ -0,0 +1,26 @@
# 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 Normal file → Executable file
View File

@ -1,9 +1,10 @@
#European Union Public Licence V.1.1 # European Union Public Licence V. 1.1
##*EUPL © the European Community 2007*
This **European Union Public Licence** (the **“EUPL”**) applies to the Work or Software EUPL © the European Community 2007
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).
@ -12,13 +13,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:
@ -59,7 +60,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
@ -85,7 +86,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
@ -97,7 +98,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
@ -106,7 +107,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:
@ -147,7 +148,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
@ -163,7 +164,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
@ -180,7 +181,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,
@ -193,7 +194,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
@ -207,7 +208,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
@ -222,7 +223,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
@ -233,7 +234,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.
@ -244,7 +245,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.
@ -265,7 +266,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
@ -279,7 +280,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.
@ -291,13 +292,12 @@ 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 Normal file → Executable file
View File

@ -35,12 +35,4 @@ 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 including: The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
- 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 Normal file → Executable file
View File

@ -1,8 +1,25 @@
<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"
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>
</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 [ticket #17847]</Change> infrastructure level [#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 Normal file → Executable file
View File

@ -14,8 +14,9 @@
<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>

30
pom.xml Normal file → Executable file
View File

@ -13,16 +13,16 @@
<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.1.0</version> <version>1.2.2</version>
<packaging>war</packaging> <packaging>war</packaging>
<name>accounting-dashboard</name> <name>accounting-dashboard</name>
<description>Accounting Dashboard is a tool for monitoring and displaying statistical data concerning the D4Science Infrastructure</description> <description>Accounting Dashboard is a tool for monitoring and displaying statistical data concerning the D4Science Infrastructure</description>
<scm> <scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/accounting-dashboard.git</connection> <connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/accounting-dashboard.git</developerConnection> <developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/accounting-dashboard</url> <url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
</scm> </scm>
@ -205,7 +205,7 @@
<dependency> <dependency>
<groupId>org.gcube.core</groupId> <groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId> <artifactId>common-scope-maps</artifactId>
<scope>compile</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -223,7 +223,7 @@
<dependency> <dependency>
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>client-context-library</artifactId> <artifactId>client-context-library</artifactId>
<version>[1.0.0-SNAPSHOT,)</version> <version>[1.0.0,2.0.0-SNAPSHOT)</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@ -253,9 +253,17 @@
<dependency> <dependency>
<groupId>org.gcube.accounting</groupId> <groupId>org.gcube.accounting</groupId>
<artifactId>accounting-summary-access</artifactId> <artifactId>accounting-summary-access</artifactId>
<version>[0.0.1-SNAPSHOT,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>
@ -312,13 +320,13 @@
</includes> </includes>
</resource> </resource>
</resources> </resources>
<testResources> <testResources>
<testResource> <testResource>
<directory>src/test/resources</directory> <directory>src/test/resources</directory>
</testResource> </testResource>
</testResources> </testResources>
<plugins> <plugins>
<!-- GWT --> <!-- GWT -->
@ -351,7 +359,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions> <executions>
<execution> <execution>
<phase>compile</phase> <phase>compile</phase>
@ -366,7 +373,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>${maven.compiler.source}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
@ -403,7 +409,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>LATEST</version> <version>3.6.4</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

0
profile.xml Normal file → Executable file
View File

View File

@ -1,8 +1,11 @@
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;
@ -15,6 +18,7 @@ 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;
/** /**
* *
@ -24,6 +28,9 @@ import com.gwtplatform.mvp.client.proxy.Proxy;
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 {
} }
@ -36,11 +43,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, MenuPresenter menuPresenter, ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy,
Controller controller) { MenuPresenter menuPresenter, 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;
@ -63,16 +69,21 @@ public class ApplicationPresenter
@Override @Override
public void onNavigation(NavigationEvent navigationEvent) { public void onNavigation(NavigationEvent navigationEvent) {
Window.scrollTo(0, 0); if (navigationEvent != null) {
// PlaceRequest placeRequest=navigationEvent.getRequest(); PlaceRequest placeRequest = navigationEvent.getRequest();
// placeManager.revealPlace(placeRequest); 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);
}
// placeManager.revealPlace(placeRequest);
} else {
Window.scrollTo(0, 0);
}
} }
private void callHello(){ private void callHello() {
controller.callHello(); controller.callHello();
} }
} }

View File

@ -6,6 +6,7 @@ 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;
@ -13,6 +14,8 @@ 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;
@ -37,6 +40,7 @@ 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,
@ -47,6 +51,7 @@ 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));
} }
@ -72,6 +77,14 @@ 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());
@ -100,9 +113,30 @@ 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(new AsyncCallback<ScopeData>() { service.getScopeData(treeOptions,new AsyncCallback<ScopeData>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
@ -123,7 +157,7 @@ public class Controller {
public void getReport(RequestReportData requestReportData) { public void getReport(RequestReportData requestReportData) {
monitorPresenter.enable(true); monitorPresenter.enable(true);
service.getReport(requestReportData, new AsyncCallback<ReportData>() { service.getReport(requestReportData,treeOptions, new AsyncCallback<ReportData>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
@ -144,4 +178,5 @@ public class Controller {
} }
} }

View File

@ -0,0 +1,51 @@
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,9 +5,12 @@ 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;
@ -29,6 +32,8 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
interface FilterAreaView extends View, HasUiHandlers<FilterAreaPresenter> { interface FilterAreaView extends View, HasUiHandlers<FilterAreaPresenter> {
void displayScopeData(ScopeData scopeData); void displayScopeData(ScopeData scopeData);
void setEnvironment(EnvironmentData environmentData);
} }
@ -47,7 +52,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
} }
private void addProviders() { private void addProviders() {
} }
@ -62,26 +66,44 @@ 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);
} }
} }
private boolean checkDate(String dateStart, String dateEnd) { private boolean checkDate(String dateStart, String dateEnd) {
DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat("yyyy-MM-dd"); DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat("yyyy-MM-dd");
Date dateStartD = null; Date dateStartD = null;
try { try {
logger.fine("DateTemp1: " + dateStart); logger.fine("DateTemp1: " + dateStart);
@ -92,7 +114,6 @@ 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,6 +1,7 @@
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;
@ -12,4 +13,6 @@ 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,11 +14,17 @@ 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;
@ -61,7 +67,16 @@ 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;
@ -161,6 +176,33 @@ 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() {
@ -177,10 +219,38 @@ 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;
@ -194,6 +264,7 @@ 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);
@ -238,4 +309,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
} }
} }

View File

@ -11,38 +11,47 @@
<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> <b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
<b:ControlLabel width="50px" for="fromPeriod">From:</b:ControlLabel> <b:ControlLabel width="70px" 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> <b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
<b:ControlLabel width="50px" for="endPeriod">To:</b:ControlLabel> <b:ControlLabel width="70px" 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:Fieldset> <b:ControlGroup ui:field="cgDetachedREs" styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
</b:Form> <b:ControlLabel width="70px" for="detachedREs">Detached:</b:ControlLabel>
</g:HTMLPanel> <b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
<g:HTMLPanel ui:field="explorePanel" <b:RadioButton ui:field="btnShowDetachedREs" text="Show" />
styleName="{res.uiDataCss.uiDataFiltersExplorePanel}"> <b:RadioButton ui:field="btnHideDetachedREs" text="Hide" />
<c:CellTree addStyleNames="{res.uiDataCss.uiDataExploreTree}" <b:HelpBlock>Detached REs</b:HelpBlock>
ui:field='scopeTree' /> </b:Controls>
</g:HTMLPanel> </b:ControlGroup>
</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,6 +1,7 @@
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;
@ -11,9 +12,13 @@ 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;
@ -87,10 +92,39 @@ 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;
for (String category : categories.keySet()) { ArrayList<String> sortedKeys =
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,6 +14,7 @@ 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;
@ -30,9 +31,11 @@ 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() {
@Override @Override
@ -46,6 +49,18 @@ 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();
} }
@ -181,16 +196,19 @@ public class Chart extends HTMLPanel {
heading += "," + recordData.getX(); heading += "," + recordData.getX();
datasetRow += "," + recordData.getY(); datasetRow += "," + recordData.getY();
} }
csvContent += heading + "\r\n";
csvContent += datasetRow + "\r\n";
var csvData = heading + "\n" + datasetRow + "\n";
var csvDataEncoded = encodeURI(csvData);
csvContent += csvDataEncoded;
} else { } else {
var datasetRow = seriesData.getLabel(); var datasetRow = seriesData.getLabel();
for (var j = 0; j < dataRowLen; j++) { for (var j = 0; j < dataRowLen; j++) {
var recordData = dataRow[j]; var recordData = dataRow[j];
datasetRow += "," + recordData.getY(); datasetRow += "," + recordData.getY();
} }
csvContent += datasetRow + "\r\n"; var csvData = datasetRow + "\n";
var csvDataEncoded = encodeURI(csvData);
csvContent += csvDataEncoded;
} }
} }
this.href = csvContent; this.href = csvContent;
@ -317,8 +335,10 @@ 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);
@ -352,7 +372,7 @@ public class Chart extends HTMLPanel {
}, },
zoom : { zoom : {
enabled : true, enabled : false,
mode : 'xy', mode : 'xy',
limits : { limits : {
max : 20, max : 20,
@ -361,7 +381,7 @@ public class Chart extends HTMLPanel {
} }
} }
}); });
chart.update(); chart.update();
console.log('Canvas offset: left=' + canvas.offsetLeft + ', top=' console.log('Canvas offset: left=' + canvas.offsetLeft + ', top='
+ canvas.offsetTop); + canvas.offsetTop);

View File

@ -28,6 +28,8 @@ public interface AppResources extends ClientBundle {
String uiDataFiltersTitle(); String uiDataFiltersTitle();
String uiDataFiltersFormPanel(); String uiDataFiltersFormPanel();
String uiDataFiltersControlGroup();
String uiDataFiltersControls(); String uiDataFiltersControls();
@ -36,7 +38,11 @@ public interface AppResources extends ClientBundle {
String uiDataReportPanel(); String uiDataReportPanel();
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,8 +40,12 @@
margin: 0px !important; margin: 0px !important;
} }
.uiDataFiltersControlGroup {
margin-bottom: 10px;
}
.uiDataFiltersControls { .uiDataFiltersControls {
margin-left: 60px; margin-left: 80px;
} }
.uiDataExploreTree { .uiDataExploreTree {
@ -63,10 +67,27 @@
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,7 +3,9 @@ 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;
@ -26,8 +28,10 @@ public interface AccountingDashboardService extends RemoteService {
*/ */
public UserInfo hello() throws ServiceException; public UserInfo hello() throws ServiceException;
public ScopeData getScopeData() throws ServiceException; public ScopeData getScopeData(TreeOptions treeOptions) throws ServiceException;
public ReportData getReport(RequestReportData requestReportdata) throws ServiceException; public ReportData getReport(RequestReportData requestReportdata, TreeOptions treeOptions) throws ServiceException;
public EnvironmentData getEnvironment() throws ServiceException;
} }

View File

@ -6,6 +6,8 @@ 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;
@ -24,8 +26,11 @@ public interface AccountingDashboardServiceAsync {
void hello(AsyncCallback<UserInfo> callback); void hello(AsyncCallback<UserInfo> callback);
void getScopeData(AsyncCallback<ScopeData> callback); void getEnvironment(AsyncCallback<EnvironmentData> 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,12 +6,14 @@ 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;
@ -63,13 +65,30 @@ 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 @Override
public ScopeData getScopeData() throws ServiceException { 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())); AccountingService as = new AccountingService(getAccountingContext(serviceCredentials.getScope()),treeOptions);
ScopeData scopeData = as.getTree(this.getThreadLocalRequest()); ScopeData scopeData = as.getTree(this.getThreadLocalRequest());
return scopeData; return scopeData;
} catch (ServiceException e) { } catch (ServiceException e) {
@ -83,11 +102,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
} }
@Override @Override
public ReportData getReport(RequestReportData requestReportData) throws ServiceException { public ReportData getReport(RequestReportData requestReportData,TreeOptions treeOptions) 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())); AccountingService as = new AccountingService(getAccountingContext(serviceCredentials.getScope()), treeOptions);
ReportData reportData = as.getReport(this.getThreadLocalRequest(), requestReportData); ReportData reportData = as.getReport(this.getThreadLocalRequest(), requestReportData);
return reportData; return reportData;
} catch (ServiceException e) { } catch (ServiceException e) {
@ -117,4 +136,6 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
} }
} }
} }

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