Compare commits
35 Commits
Author | SHA1 | Date |
---|---|---|
Giancarlo Panichi | 358add45aa | |
Giancarlo Panichi | 3d9e6bc63a | |
Giancarlo Panichi | a4edbbd9cb | |
Giancarlo Panichi | 9801dea0d9 | |
Giancarlo Panichi | 602458627b | |
Giancarlo Panichi | ff7ab51743 | |
Roberto Cirillo | bae895059b | |
Giancarlo Panichi | d31c9b9f09 | |
Giancarlo Panichi | 6fbc30f520 | |
Giancarlo Panichi | a027c3aefd | |
Giancarlo Panichi | 464022838a | |
Giancarlo Panichi | b820edce39 | |
Giancarlo Panichi | 95f5670e9f | |
Giancarlo Panichi | 95b009ae60 | |
Giancarlo Panichi | c327d0b00c | |
Giancarlo Panichi | 68dc1588fb | |
Giancarlo Panichi | 44cca496c9 | |
Giancarlo Panichi | 6b7d32fcbf | |
Giancarlo Panichi | 2081513f2f | |
Giancarlo Panichi | e368c174dd | |
Giancarlo Panichi | 3e0c975f91 | |
Giancarlo Panichi | 4e5c3a9b4b | |
Giancarlo Panichi | 82361090f7 | |
Giancarlo Panichi | d5266a0b7c | |
Giancarlo Panichi | d0e815d7f7 | |
Giancarlo Panichi | 58ccefa0b7 | |
Giancarlo Panichi | b8f99d099e | |
Giancarlo Panichi | e140afebe4 | |
Giancarlo Panichi | 8726e63ad7 | |
Giancarlo Panichi | 52cc4ad7c9 | |
Giancarlo Panichi | 5641f23fe1 | |
Giancarlo Panichi | ac010a1dd3 | |
Giancarlo Panichi | c8f081427a | |
Giancarlo Panichi | 975779d8e4 | |
Giancarlo Panichi | 3cddab592a |
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</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>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -50,5 +50,5 @@
|
|||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
||||
<classpathentry kind="output" path="target/accounting-dashboard-1.1.0/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/accounting-dashboard-1.2.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="accounting-dashboard-1.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="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
|
|
@ -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).
|
|
@ -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);
|
|
@ -1,9 +1,10 @@
|
|||
# European Union Public Licence V. 1.1
|
||||
|
||||
##*EUPL © the European Community 2007*
|
||||
|
||||
EUPL © the European Community 2007
|
||||
|
||||
|
||||
This **European Union Public Licence** (the **“EUPL”**) applies to the Work or Software
|
||||
This European Union Public Licence (the “EUPL”) applies to the Work or Software
|
||||
(as defined below) which is provided under the terms of this Licence. Any use of
|
||||
the Work, other than as authorised under this Licence is prohibited (to the
|
||||
extent such use is covered by a right of the copyright holder of the Work).
|
||||
|
@ -12,7 +13,7 @@ The Original Work is provided under the terms of this Licence when the Licensor
|
|||
(as defined below) has placed the following notice immediately following the
|
||||
copyright notice for the Original Work:
|
||||
|
||||
**Licensed under the EUPL V.1.1**
|
||||
Licensed under the EUPL V.1.1
|
||||
|
||||
or has expressed by any other mean his willingness to license under the EUPL.
|
||||
|
||||
|
@ -291,13 +292,12 @@ This licence shall be governed by the Belgian law if:
|
|||
- or registered office inside a European Union country.
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Appendix
|
||||
|
||||
|
||||
**“Compatible Licences”** according to article 5 EUPL are:
|
||||
|
||||
“Compatible Licences” according to article 5 EUPL are:
|
||||
|
||||
|
||||
- GNU General Public License (GNU GPL) v. 2
|
||||
|
|
|
@ -35,12 +35,4 @@ open-source software toolkit used for building and operating Hybrid Data
|
|||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||
by favouring the realisation of reuse oriented policies.
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes 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);
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
|
@ -1,8 +1,25 @@
|
|||
<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"
|
||||
date="2019-10-01">
|
||||
<Change>Updated to support accounting data visualization at the
|
||||
infrastructure level [ticket #17847]</Change>
|
||||
infrastructure level [#17847]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-0-0"
|
||||
date="2018-08-01">
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
<includes>
|
||||
<include>README.md</include>
|
||||
<include>LICENSE.md</include>
|
||||
<include>CHANGELOG.md</include>
|
||||
<include>FUNDING.md</include>
|
||||
<include>profile.xml</include>
|
||||
<include>changelog.xml</include>
|
||||
</includes>
|
||||
<fileMode>755</fileMode>
|
||||
<filtered>true</filtered>
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>accounting-dashboard</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.2</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>accounting-dashboard</name>
|
||||
<description>Accounting Dashboard is a tool for monitoring and displaying statistical data concerning the D4Science Infrastructure</description>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/accounting-dashboard.git</connection>
|
||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/accounting-dashboard.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/gCubeSystem/accounting-dashboard</url>
|
||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
|
||||
</scm>
|
||||
|
||||
|
||||
|
@ -205,7 +205,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-scope-maps</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -223,7 +223,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>client-context-library</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,)</version>
|
||||
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -253,9 +253,17 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.accounting</groupId>
|
||||
<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>
|
||||
|
||||
<!-- detachedres-library -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.infrastructure.detachedres</groupId>
|
||||
<artifactId>detachedres-library</artifactId>
|
||||
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Portal Service -->
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
|
@ -351,7 +359,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
|
@ -366,7 +373,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
|
@ -403,7 +409,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<version>3.6.4</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/accountingdashb.gwt.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/accountingdashb.gwt.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationModule.java
Normal file → Executable file
25
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationPresenter.java
Normal file → Executable file
25
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationPresenter.java
Normal file → Executable file
|
@ -1,8 +1,11 @@
|
|||
package org.gcube.portlets.user.accountingdashboard.client.application;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.controller.Controller;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.menu.MenuPresenter;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.place.NameTokens;
|
||||
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -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.NavigationHandler;
|
||||
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
|
||||
extends Presenter<ApplicationPresenter.PresenterView, ApplicationPresenter.ApplicationPresenterProxy>
|
||||
implements NavigationHandler {
|
||||
|
||||
private static Logger logger = java.util.logging.Logger.getLogger("");
|
||||
|
||||
interface PresenterView extends View {
|
||||
}
|
||||
|
||||
|
@ -37,10 +44,9 @@ public class ApplicationPresenter
|
|||
private MenuPresenter menuPresenter;
|
||||
private Controller controller;
|
||||
|
||||
|
||||
@Inject
|
||||
ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy, MenuPresenter menuPresenter,
|
||||
Controller controller) {
|
||||
ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy,
|
||||
MenuPresenter menuPresenter, Controller controller) {
|
||||
super(eventBus, view, proxy, RevealType.Root);
|
||||
this.menuPresenter = menuPresenter;
|
||||
this.controller = controller;
|
||||
|
@ -63,16 +69,21 @@ public class ApplicationPresenter
|
|||
|
||||
@Override
|
||||
public void onNavigation(NavigationEvent navigationEvent) {
|
||||
if (navigationEvent != null) {
|
||||
PlaceRequest placeRequest = navigationEvent.getRequest();
|
||||
logger.log(Level.FINE, "Navigation: " + placeRequest);
|
||||
// If the navigation is related to mainarea scrollbar is not reset
|
||||
if (placeRequest.getNameToken().compareTo(NameTokens.getMainArea()) != 0) {
|
||||
Window.scrollTo(0, 0);
|
||||
// PlaceRequest placeRequest=navigationEvent.getRequest();
|
||||
}
|
||||
// placeManager.revealPlace(placeRequest);
|
||||
|
||||
} else {
|
||||
Window.scrollTo(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void callHello() {
|
||||
controller.callHello();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/CommonMessages.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/CommonMessages.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ApplicationCache.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ApplicationCache.java
Normal file → Executable file
39
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/Controller.java
Normal file → Executable file
39
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/Controller.java
Normal file → Executable 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.info.InfoPresenter;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.monitor.MonitorPresenter;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.event.EnvironmentEvent;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.event.HelloEvent;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.event.ReportEvent;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.event.ScopeDataEvent;
|
||||
|
@ -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.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
|
||||
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
|
@ -37,6 +40,7 @@ public class Controller {
|
|||
private MonitorPresenter monitorPresenter;
|
||||
private ErrorPresenter errorPresenter;
|
||||
private InfoPresenter infoPresenter;
|
||||
private TreeOptions treeOptions=null;
|
||||
|
||||
@Inject
|
||||
Controller(@Named("ControllerEventBus") EventBus eventBus, AccountingDashboardServiceAsync service,
|
||||
|
@ -47,6 +51,7 @@ public class Controller {
|
|||
this.errorPresenter = errorPresenter;
|
||||
this.infoPresenter = infoPresenter;
|
||||
//this.cache = new ApplicationCache();
|
||||
this.setTreeOptions(new TreeOptions(false));
|
||||
|
||||
}
|
||||
|
||||
|
@ -72,6 +77,14 @@ public class Controller {
|
|||
infoPresenter.infoMessage(info);
|
||||
}
|
||||
|
||||
public TreeOptions getTreeOptions() {
|
||||
return treeOptions;
|
||||
}
|
||||
|
||||
public void setTreeOptions(TreeOptions treeOptions) {
|
||||
this.treeOptions = treeOptions;
|
||||
}
|
||||
|
||||
|
||||
public void hello() {
|
||||
eventBus.fireEvent(new HelloEvent());
|
||||
|
@ -101,8 +114,29 @@ public class Controller {
|
|||
|
||||
}
|
||||
|
||||
public void getEnvironment() {
|
||||
service.getEnvironment(new AsyncCallback<EnvironmentData>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
logger.log(Level.FINE, "Error in getEnvironment(): ", caught);
|
||||
errorPresenter.errorMessage(caught.getLocalizedMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(EnvironmentData environmentData) {
|
||||
logger.log(Level.FINE, "ScopeData: " + environmentData);
|
||||
EnvironmentEvent event = new EnvironmentEvent(environmentData);
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void getTree() {
|
||||
service.getScopeData(new AsyncCallback<ScopeData>() {
|
||||
service.getScopeData(treeOptions,new AsyncCallback<ScopeData>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -123,7 +157,7 @@ public class Controller {
|
|||
|
||||
public void getReport(RequestReportData requestReportData) {
|
||||
monitorPresenter.enable(true);
|
||||
service.getReport(requestReportData, new AsyncCallback<ReportData>() {
|
||||
service.getReport(requestReportData,treeOptions, new AsyncCallback<ReportData>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -144,4 +178,5 @@ public class Controller {
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ControllerModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ControllerModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidgetHideEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidgetHideEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorView.ui.xml
Normal file → Executable 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 + "]";
|
||||
}
|
||||
|
||||
}
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/HelloEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/HelloEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/MonitorEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/MonitorEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/ReportEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/ReportEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/RequestReportEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/RequestReportEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/ScopeDataEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/ScopeDataEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaModule.java
Normal file → Executable file
25
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaPresenter.java
Normal file → Executable file
25
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaPresenter.java
Normal file → Executable file
|
@ -5,9 +5,12 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.controller.Controller;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.event.EnvironmentEvent;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.application.event.ScopeDataEvent;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -30,6 +33,8 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
|
||||
void displayScopeData(ScopeData scopeData);
|
||||
|
||||
void setEnvironment(EnvironmentData environmentData);
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -48,7 +53,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
|
||||
private void addProviders() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void bindToEvent() {
|
||||
|
@ -63,11 +67,29 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
}
|
||||
});
|
||||
|
||||
controller.getEventBus().addHandler(EnvironmentEvent.TYPE, new EnvironmentEvent.EnvironmentEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onInit(EnvironmentEvent event) {
|
||||
logger.log(Level.FINE, "EnvironmentEvent received");
|
||||
getView().setEnvironment(event.getEnvironmentData());
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBind() {
|
||||
super.onBind();
|
||||
controller.getEnvironment();
|
||||
controller.getTree();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTreeOptions(TreeOptions treeOptions) {
|
||||
logger.fine("UpdateTreeOption: " + treeOptions);
|
||||
controller.setTreeOptions(treeOptions);
|
||||
controller.getTree();
|
||||
}
|
||||
|
||||
|
@ -92,7 +114,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
Date dateEndD = null;
|
||||
try {
|
||||
logger.fine("DateTemp2: " + dateEnd);
|
||||
|
|
3
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaUiHandlers.java
Normal file → Executable file
3
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaUiHandlers.java
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.filter;
|
||||
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
|
||||
import com.gwtplatform.mvp.client.UiHandlers;
|
||||
|
||||
|
@ -12,4 +13,6 @@ import com.gwtplatform.mvp.client.UiHandlers;
|
|||
public interface FilterAreaUiHandlers extends UiHandlers {
|
||||
|
||||
public void getReport(RequestReportData requestReportData);
|
||||
|
||||
public void updateTreeOptions(TreeOptions treeOptions);
|
||||
}
|
||||
|
|
73
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaView.java
Normal file → Executable file
73
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaView.java
Normal file → Executable 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.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.ControlGroup;
|
||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
||||
import com.github.gwtbootstrap.client.ui.RadioButton;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ChangeEvent;
|
||||
import com.google.gwt.event.dom.client.ChangeHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
|
||||
import com.google.gwt.i18n.client.LocaleInfo;
|
||||
|
@ -62,6 +68,15 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
@UiField(provided = true)
|
||||
ListBox monthEnd;
|
||||
|
||||
@UiField(provided = false)
|
||||
ControlGroup cgDetachedREs;
|
||||
|
||||
@UiField(provided = true)
|
||||
RadioButton btnShowDetachedREs;
|
||||
|
||||
@UiField(provided = true)
|
||||
RadioButton btnHideDetachedREs;
|
||||
|
||||
@UiField(provided = true)
|
||||
CellTree scopeTree;
|
||||
|
||||
|
@ -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>();
|
||||
|
||||
RequestReportEventHandler handler = new RequestReportEventHandler() {
|
||||
|
@ -177,10 +219,38 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
ScopeTreeResources scopeTreeResources = GWT.create(ScopeTreeResources.class);
|
||||
scopeTree = new CellTree(scopeTreeModel, null, scopeTreeResources);
|
||||
scopeTree.setDefaultNodeSize(500);
|
||||
|
||||
logger.log(Level.FINE, "FilterAreaView init end");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnvironment(EnvironmentData environmentData) {
|
||||
logger.log(Level.FINE, "displayScopeData()");
|
||||
if(environmentData!=null&&environmentData.getAccountingServiceType()!=null){
|
||||
switch(environmentData.getAccountingServiceType()){
|
||||
case CurrentScope:
|
||||
cgDetachedREs.setVisible(false);
|
||||
break;
|
||||
case Infrastructure:
|
||||
cgDetachedREs.setVisible(true);
|
||||
break;
|
||||
case PortalContex:
|
||||
cgDetachedREs.setVisible(false);
|
||||
break;
|
||||
default:
|
||||
cgDetachedREs.setVisible(false);
|
||||
break;
|
||||
|
||||
}
|
||||
} else {
|
||||
cgDetachedREs.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void displayScopeData(ScopeData scopeData) {
|
||||
logger.log(Level.FINE, "displayScopeData()");
|
||||
ArrayList<ScopeData> scopeDataList = new ArrayList<>();
|
||||
scopeDataList.add(scopeData);
|
||||
this.scopeData = scopeData;
|
||||
|
@ -194,6 +264,7 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
}
|
||||
|
||||
private void requestReport() {
|
||||
logger.log(Level.FINE, "requestReport()");
|
||||
String[] months = LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().monthsFull();
|
||||
logger.log(Level.FINE, "Months: " + months.length);
|
||||
|
||||
|
@ -238,4 +309,6 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
17
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaView.ui.xml
Normal file → Executable file
17
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaView.ui.xml
Normal file → Executable file
|
@ -16,8 +16,8 @@
|
|||
styleName="{res.uiDataCss.uiDataFiltersPeriodPanel}">
|
||||
<b:Form type="HORIZONTAL" styleName="{res.uiDataCss.uiDataFiltersFormPanel}">
|
||||
<b:Fieldset>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="fromPeriod">From:</b:ControlLabel>
|
||||
<b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
|
||||
<b:ControlLabel width="70px" for="fromPeriod">From:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ListBox ui:field="yearStart" width="104px" b:id="yearStart">
|
||||
</b:ListBox>
|
||||
|
@ -26,8 +26,8 @@
|
|||
<b:HelpBlock>Select the start date</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="endPeriod">To:</b:ControlLabel>
|
||||
<b:ControlGroup styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
|
||||
<b:ControlLabel width="70px" for="endPeriod">To:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ListBox ui:field="yearEnd" width="104px" b:id="yearEnd">
|
||||
</b:ListBox>
|
||||
|
@ -36,6 +36,15 @@
|
|||
<b:HelpBlock>Select the end date</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
<b:ControlGroup ui:field="cgDetachedREs" styleName="{res.uiDataCss.uiDataFiltersControlGroup}">
|
||||
<b:ControlLabel width="70px" for="detachedREs">Detached:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:RadioButton ui:field="btnShowDetachedREs" text="Show" />
|
||||
<b:RadioButton ui:field="btnHideDetachedREs" text="Hide" />
|
||||
<b:HelpBlock>Detached REs</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
</b:Fieldset>
|
||||
</b:Form>
|
||||
</g:HTMLPanel>
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/scopetree/ScopeTreeModel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/scopetree/ScopeTreeModel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaUiHandlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaUiHandlers.java
Normal file → Executable file
36
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaView.java
Normal file → Executable file
36
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaView.java
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.report;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
@ -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.ReportElementData;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.NavHeader;
|
||||
import com.github.gwtbootstrap.client.ui.NavLink;
|
||||
import com.github.gwtbootstrap.client.ui.Tab;
|
||||
import com.github.gwtbootstrap.client.ui.TabPanel;
|
||||
import com.github.gwtbootstrap.client.ui.WellNavList;
|
||||
import com.github.gwtbootstrap.client.ui.base.IconAnchor;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
|
@ -87,10 +92,39 @@ public class ReportAreaView extends ViewWithUiHandlers<ReportAreaPresenter>
|
|||
TabPanel tabPanel = new TabPanel();
|
||||
tabPanel.addStyleName(resources.uiDataCss().uiDataReportTabPanel());
|
||||
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.setHeading(category);
|
||||
HTMLPanel tabContent = new HTMLPanel("");
|
||||
if(categories.get(category).size()>0){
|
||||
WellNavList toc=new WellNavList();
|
||||
toc.addStyleName(resources.uiDataCss().uiDataReportToc());
|
||||
NavHeader navHeader=new NavHeader();
|
||||
if(categories.get(category).size()>1){
|
||||
navHeader.setText("Available Graphs");
|
||||
}else {
|
||||
navHeader.setText("Available Graph");
|
||||
}
|
||||
toc.add(navHeader);
|
||||
for (Chart chart : categories.get(category)) {
|
||||
ReportElementData reData=chart.getReportElementData();
|
||||
StringBuilder navLinkText=new StringBuilder();
|
||||
navLinkText.append(reData.getLabel());
|
||||
//navLinkText.append("[");
|
||||
//navLinkText.append(reData.getCategory());
|
||||
//navLinkText.append("]");
|
||||
NavLink navLink=new NavLink(navLinkText.toString(),"#"+chart.getWrapperName());
|
||||
navLink.setIcon(IconType.BAR_CHART);
|
||||
navLink.addStyleName(resources.uiDataCss().uiDataReportTocNavLink());
|
||||
toc.add(navLink);
|
||||
}
|
||||
tabContent.add(toc);
|
||||
}
|
||||
|
||||
for (Chart chart : categories.get(category)) {
|
||||
tabContent.add(chart);
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaView.ui.xml
Normal file → Executable file
32
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/chartjs/Chart.java
Normal file → Executable file
32
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/chartjs/Chart.java
Normal file → Executable file
|
@ -14,6 +14,7 @@ import com.google.gwt.user.client.ui.HTMLPanel;
|
|||
public class Chart extends HTMLPanel {
|
||||
|
||||
private String name;
|
||||
private String wrapperName;
|
||||
|
||||
private ReportElementData reportElementData;
|
||||
|
||||
|
@ -30,7 +31,9 @@ public class Chart extends HTMLPanel {
|
|||
+ "</ul>" + "</div>" + "<canvas id=" + name + " class='" + resources.uiDataCss().uiDataChartCanvas()
|
||||
+ "'></canvas>");
|
||||
this.name = name;
|
||||
this.wrapperName="wrapper_"+name;
|
||||
this.reportElementData = reportElementData;
|
||||
this.getElement().setId(wrapperName);
|
||||
this.addStyleName(resources.uiDataCss().uiDataChartWrapper());
|
||||
|
||||
addAttachHandler(new AttachEvent.Handler() {
|
||||
|
@ -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() {
|
||||
redrawChart();
|
||||
}
|
||||
|
@ -181,16 +196,19 @@ public class Chart extends HTMLPanel {
|
|||
heading += "," + recordData.getX();
|
||||
datasetRow += "," + recordData.getY();
|
||||
}
|
||||
csvContent += heading + "\r\n";
|
||||
csvContent += datasetRow + "\r\n";
|
||||
|
||||
var csvData = heading + "\n" + datasetRow + "\n";
|
||||
var csvDataEncoded = encodeURI(csvData);
|
||||
csvContent += csvDataEncoded;
|
||||
} else {
|
||||
var datasetRow = seriesData.getLabel();
|
||||
for (var j = 0; j < dataRowLen; j++) {
|
||||
var recordData = dataRow[j];
|
||||
datasetRow += "," + recordData.getY();
|
||||
}
|
||||
csvContent += datasetRow + "\r\n";
|
||||
var csvData = datasetRow + "\n";
|
||||
var csvDataEncoded = encodeURI(csvData);
|
||||
csvContent += csvDataEncoded;
|
||||
}
|
||||
}
|
||||
this.href = csvContent;
|
||||
|
@ -317,8 +335,10 @@ public class Chart extends HTMLPanel {
|
|||
datasets : datasetsArray
|
||||
};
|
||||
|
||||
var label = [ reportElementData.getLabel(), ' [',
|
||||
reportElementData.getCategory(), ']' ].filter(Boolean).join("");
|
||||
//var label = [ reportElementData.getLabel(), ' [',
|
||||
// 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);
|
||||
|
||||
|
@ -352,7 +372,7 @@ public class Chart extends HTMLPanel {
|
|||
|
||||
},
|
||||
zoom : {
|
||||
enabled : true,
|
||||
enabled : false,
|
||||
mode : 'xy',
|
||||
limits : {
|
||||
max : 20,
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuUiHanlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuUiHanlers.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuView.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuView.ui.xml
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/DataProviderModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/DataProviderModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/DeadFishBySpecificDiseasesProvider.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/DeadFishBySpecificDiseasesProvider.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/utils/CheckCellHead.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/utils/CheckCellHead.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/utils/DateTimeUtils.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/utils/DateTimeUtils.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/gin/AccountingDashBoardClientModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/gin/AccountingDashBoardClientModule.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/gin/CustomRootPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/gin/CustomRootPresenter.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/place/NameTokens.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/place/NameTokens.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/place/TokenParameters.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/place/TokenParameters.java
Normal file → Executable file
6
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/AppResources.java
Normal file → Executable file
6
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/AppResources.java
Normal file → Executable file
|
@ -29,6 +29,8 @@ public interface AppResources extends ClientBundle {
|
|||
|
||||
String uiDataFiltersFormPanel();
|
||||
|
||||
String uiDataFiltersControlGroup();
|
||||
|
||||
String uiDataFiltersControls();
|
||||
|
||||
String uiDataExploreTree();
|
||||
|
@ -37,6 +39,10 @@ public interface AppResources extends ClientBundle {
|
|||
|
||||
String uiDataReportTabPanel();
|
||||
|
||||
String uiDataReportToc();
|
||||
|
||||
String uiDataReportTocNavLink();
|
||||
|
||||
String uiDataChartWrapper();
|
||||
|
||||
String uiDataChartCanvas();
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/Chart.bundle.js
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/Chart.bundle.js
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/Chart.bundle.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/Chart.bundle.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/ResourceLoader.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/ResourceLoader.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/ScopeTreeResources.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/ScopeTreeResources.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/cellTreeSelectedBackgroundCustom.png
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/cellTreeSelectedBackgroundCustom.png
Normal file → Executable file
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/chartjs-plugin-zoom.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/chartjs-plugin-zoom.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/hammer.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/hammer.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/jspdf.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/jspdf.min.js
vendored
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/settings.png
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/settings.png
Normal file → Executable file
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 430 B |
23
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/uiData.css
Normal file → Executable file
23
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/uiData.css
Normal file → Executable file
|
@ -40,8 +40,12 @@
|
|||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.uiDataFiltersControlGroup {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.uiDataFiltersControls {
|
||||
margin-left: 60px;
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.uiDataExploreTree {
|
||||
|
@ -63,10 +67,27 @@
|
|||
max-width: 800px;
|
||||
}
|
||||
|
||||
/* TOC WellNavList */
|
||||
.uiDataReportToc {
|
||||
padding: 8px 0px;
|
||||
max-width: 650px;
|
||||
}
|
||||
|
||||
/* TOC NavLink */
|
||||
.uiDataReportTocNavLink {
|
||||
color: rgb(59, 89, 152);
|
||||
}
|
||||
|
||||
/* TOC NavLink href */
|
||||
.uiDataReportTocNavLink a {
|
||||
color: rgb(59, 89, 152);
|
||||
}
|
||||
|
||||
|
||||
/* Chart */
|
||||
.uiDataChartWrapper {
|
||||
width: 800px;
|
||||
padding-top: 50px;
|
||||
/*border: solid 1px;*/
|
||||
}
|
||||
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/uiScopeTree.css
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/uiScopeTree.css
Normal file → Executable file
8
src/main/java/org/gcube/portlets/user/accountingdashboard/client/rpc/AccountingDashboardService.java
Normal file → Executable file
8
src/main/java/org/gcube/portlets/user/accountingdashboard/client/rpc/AccountingDashboardService.java
Normal file → Executable 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.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.exception.ServiceException;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
|
||||
|
||||
import com.google.gwt.user.client.rpc.RemoteService;
|
||||
|
@ -26,8 +28,10 @@ public interface AccountingDashboardService extends RemoteService {
|
|||
*/
|
||||
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;
|
||||
|
||||
}
|
||||
|
|
9
src/main/java/org/gcube/portlets/user/accountingdashboard/client/rpc/AccountingDashboardServiceAsync.java
Normal file → Executable file
9
src/main/java/org/gcube/portlets/user/accountingdashboard/client/rpc/AccountingDashboardServiceAsync.java
Normal file → Executable 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.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -24,8 +26,11 @@ public interface AccountingDashboardServiceAsync {
|
|||
|
||||
void hello(AsyncCallback<UserInfo> callback);
|
||||
|
||||
void getScopeData(AsyncCallback<ScopeData> callback);
|
||||
void getEnvironment(AsyncCallback<EnvironmentData> callback);
|
||||
|
||||
void getReport(RequestReportData requestReportdata, AsyncCallback<ReportData> asyncCallback);
|
||||
void getScopeData(TreeOptions treeOptions, AsyncCallback<ScopeData> callback);
|
||||
|
||||
void getReport(RequestReportData requestReportdata, TreeOptions treeOptions,
|
||||
AsyncCallback<ReportData> asyncCallback);
|
||||
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/portlets/user/accountingdashboard/portlet/AccountingDashboardPortlet.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/user/accountingdashboard/portlet/AccountingDashboardPortlet.java
Normal file → Executable file
31
src/main/java/org/gcube/portlets/user/accountingdashboard/server/AccountingDashboardServiceImpl.java
Normal file → Executable file
31
src/main/java/org/gcube/portlets/user/accountingdashboard/server/AccountingDashboardServiceImpl.java
Normal file → Executable file
|
@ -6,12 +6,14 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
||||
import org.gcube.portlets.user.accountingdashboard.client.rpc.AccountingDashboardService;
|
||||
import org.gcube.portlets.user.accountingdashboard.server.accounting.AccountingService;
|
||||
import org.gcube.portlets.user.accountingdashboard.server.accounting.AccountingServiceType;
|
||||
import org.gcube.portlets.user.accountingdashboard.server.util.ServiceCredentials;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.AccountingServiceType;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.env.EnvironmentData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.exception.ServiceException;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -65,11 +67,28 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public ScopeData getScopeData() throws ServiceException {
|
||||
public EnvironmentData getEnvironment() throws ServiceException {
|
||||
try {
|
||||
logger.debug("AccountingDashboardServiceImpl getEnvironment()");
|
||||
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest());
|
||||
AccountingServiceType accountingServiceType=getAccountingContext(serviceCredentials.getScope());
|
||||
EnvironmentData environmentData=new EnvironmentData(accountingServiceType);
|
||||
return environmentData;
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage(), e);
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
logger.error("GetEnvironment(): " + e.getLocalizedMessage(), e);
|
||||
throw new ServiceException("Error retrieving environment info: " + e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScopeData getScopeData(TreeOptions treeOptions) throws ServiceException {
|
||||
try {
|
||||
logger.debug("AccountingDashboardServiceImpl getScopeData()");
|
||||
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());
|
||||
return scopeData;
|
||||
} catch (ServiceException e) {
|
||||
|
@ -83,11 +102,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public ReportData getReport(RequestReportData requestReportData) throws ServiceException {
|
||||
public ReportData getReport(RequestReportData requestReportData,TreeOptions treeOptions) throws ServiceException {
|
||||
try {
|
||||
logger.debug("AccountingDashboardServiceImpl getReport(): " + requestReportData);
|
||||
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);
|
||||
return reportData;
|
||||
} 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
Loading…
Reference in New Issue