Compare commits
29 Commits
feature/21
...
master
Author | SHA1 | Date |
---|---|---|
Giancarlo Panichi | c4c4313e31 | |
Giancarlo Panichi | a727f479c0 | |
Giancarlo Panichi | e27701bcff | |
Giancarlo Panichi | b45f65d2e3 | |
Giancarlo Panichi | 6cef907cf4 | |
Giancarlo Panichi | df73990175 | |
Giancarlo Panichi | 0650a1ed5e | |
Giancarlo Panichi | 109e04f8e8 | |
Giancarlo Panichi | 4ab9e3ea97 | |
Giancarlo Panichi | 8e68cdcf4b | |
Giancarlo Panichi | ec06f615d7 | |
Giancarlo Panichi | ac4c236019 | |
Giancarlo Panichi | 3ffb9f8523 | |
Giancarlo Panichi | a36fef1aa9 | |
Giancarlo Panichi | b829c6bf2f | |
Giancarlo Panichi | bbaa3b46df | |
Giancarlo Panichi | 2ef2cd0cff | |
Giancarlo Panichi | a8fb472d5c | |
Giancarlo Panichi | 52e093ea22 | |
Giancarlo Panichi | d1ef570b36 | |
Giancarlo Panichi | 41e86e44ca | |
Giancarlo Panichi | 49f9a8e05c | |
Giancarlo Panichi | 36f917f6b5 | |
Giancarlo Panichi | 0c8a85ee73 | |
Giancarlo Panichi | 3ec119c2c3 | |
Giancarlo Panichi | f808798a28 | |
Giancarlo Panichi | 942b28330f | |
Giancarlo Panichi | 6b719cc0b7 | |
Giancarlo Panichi | 5c219fd246 |
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/accounting-manager-1.13.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/accounting-manager-1.16.0-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-manager-1.13.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/accounting-manager-1.16.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -45,5 +45,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/accounting-manager-1.13.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/accounting-manager-1.16.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="accounting-manager-1.13.0-SNAPSHOT">
|
||||
<wb-module deploy-name="accounting-manager-1.16.0-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"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="accounting-manager-theme-1.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/accounting-manager-theme/accounting-manager-theme">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/accounting-manager/target/accounting-manager-1.3.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<property name="context-root" value="accounting-manager"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -1,133 +1,103 @@
|
|||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
# Changelog for "dataminer-manager"
|
||||
# Changelog for "accounting-manager"
|
||||
|
||||
|
||||
## [v1-13-0-SNAPSHOT] - 2021-03-23
|
||||
## [v1.16.0]
|
||||
|
||||
### Features
|
||||
- Updated to maven-portal-bom 4.0.0
|
||||
|
||||
|
||||
## [v1.15.0] - 2021-11-30
|
||||
|
||||
- Improve query support of the new persistence [#21354]
|
||||
|
||||
|
||||
## [v1.14.0] - 2021-06-28
|
||||
|
||||
- Fixed display errors generated in Root scope [#21729]
|
||||
|
||||
|
||||
## [v1.13.0] - 2021-03-23
|
||||
|
||||
- Migrate accounting-manager to postgresql persistence [#21013]
|
||||
|
||||
|
||||
|
||||
## [v1-12-0] - 2019-05-02
|
||||
|
||||
### Features
|
||||
## [v1.12.0] - 2019-05-02
|
||||
|
||||
- Added autocomplete combo scope and fixed scope list view width
|
||||
|
||||
|
||||
|
||||
## [v1-11-0] - 2018-12-28
|
||||
|
||||
### Features
|
||||
## [v1.11.0] - 2018-12-28
|
||||
|
||||
- Added scope selection [#10188]
|
||||
|
||||
|
||||
|
||||
## [v1-10-0] - 2018-10-01
|
||||
|
||||
### Features
|
||||
## [v1.10.0] - 2018-10-01
|
||||
|
||||
- Updated to StorageHub [#12474]
|
||||
|
||||
|
||||
|
||||
## [v1-9-1] - 2018-04-11
|
||||
|
||||
### Features
|
||||
## [v1.9.1] - 2018-04-11
|
||||
|
||||
- Updated log level to debug [#11259]
|
||||
|
||||
|
||||
|
||||
## [v1-9-0] - 2017-11-20
|
||||
|
||||
### Features
|
||||
## [v1.9.0] - 2017-11-20
|
||||
|
||||
- Updated to support Operation Count as default in all charts
|
||||
|
||||
|
||||
|
||||
## [v1-8-0] - 2017-10-01
|
||||
|
||||
### Features
|
||||
## [v1.8.0] - 2017-10-01
|
||||
|
||||
- Updated to new version of accounting client library
|
||||
|
||||
|
||||
|
||||
## [v1-7-0] - 2017-06-12
|
||||
|
||||
### Features
|
||||
## [v1.7.0] - 2017-06-12
|
||||
|
||||
- Added Spaces chart [#8397]
|
||||
|
||||
|
||||
|
||||
## [v1-6-0] - 2017-02-28
|
||||
|
||||
### Features
|
||||
## [v1.6.0] - 2017-02-28
|
||||
|
||||
- Fixed download in case of multitab on different scopes
|
||||
|
||||
|
||||
|
||||
## [v1-5-0] - 2016-12-01
|
||||
|
||||
### Features
|
||||
## [v1.5.0] - 2016-12-01
|
||||
|
||||
- Added Context Chart
|
||||
- Added Cache
|
||||
- Updated to PortalContext
|
||||
|
||||
|
||||
|
||||
## [v1-4-0] - 2016-10-01
|
||||
|
||||
### Features
|
||||
## [v1.4.0] - 2016-10-01
|
||||
|
||||
- Updated to AUTH2.0
|
||||
- Added Job
|
||||
- Added configuration by generic resource
|
||||
|
||||
|
||||
|
||||
## [v1-3-0] - 2016-07-15
|
||||
|
||||
### Features
|
||||
## [v1.3.0] - 2016-07-15
|
||||
|
||||
- Added CSV download [Ticket #4041]
|
||||
- Added Show Others option
|
||||
- Updated to Liferay 6.2
|
||||
|
||||
|
||||
|
||||
## [v1-2-0] - 2016-05-01
|
||||
|
||||
### Features
|
||||
## [v1.2.0] - 2016-05-01
|
||||
|
||||
- Added Top N Chart[#2251]
|
||||
- Fixed back button behavior[#3251]
|
||||
|
||||
|
||||
|
||||
## [v1-1-0] - 2016-01-31
|
||||
|
||||
### Features
|
||||
## [v1.1.0] - 2016-01-31
|
||||
|
||||
- Added to Storage Accounting more formats for DataVolume axis [#1831]
|
||||
- Fixed on Storage Accounting the popup validation on filters [#1832]
|
||||
- Fixed library dependencies
|
||||
|
||||
|
||||
|
||||
## [v1-0-0] - 2015-10-15
|
||||
|
||||
### Features
|
||||
## [v1.0.0] - 2015-10-15
|
||||
|
||||
- First Release
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-16-0"
|
||||
date="2022-05-20">
|
||||
<Change>Updated pom for Storage Hub 2</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-15-0"
|
||||
date="2021-11-30">
|
||||
<Change>Improve query support of the new persistence [#21354]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-14-0"
|
||||
date="2021-06-28">
|
||||
<Change>Fixed display errors generated in Root scope [#21729]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-13-0"
|
||||
date="2021-03-23">
|
||||
<Change>Migrate accounting-manager to postgresql persistence [#21013]</Change>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>accounting-manager</artifactId>
|
||||
<version>1.13.0-SNAPSHOT</version>
|
||||
<version>1.16.0</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.accounting</groupId>
|
||||
<artifactId>accounting-lib</artifactId>
|
||||
<version>[4.0.0,5.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
@ -214,12 +214,12 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Social -->
|
||||
<!-- Social
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>social-networking-library</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Common Encryption -->
|
||||
<dependency>
|
||||
|
@ -235,6 +235,13 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Document Store Lib -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.publishing</groupId>
|
||||
<artifactId>document-store-lib</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Accounting Lib -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.accounting</groupId>
|
||||
|
@ -246,14 +253,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.accounting</groupId>
|
||||
<artifactId>accounting-analytics</artifactId>
|
||||
<version>[3.0.0-SNAPSHOT,4.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Document Store Lib -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.publishing</groupId>
|
||||
<artifactId>document-store-lib</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>[4.0.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@ -261,7 +261,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.accounting</groupId>
|
||||
<artifactId>accounting-analytics-persistence-postgresql</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -310,7 +310,7 @@
|
|||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<scope>provided</scope>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@ -445,7 +445,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<version>4.0.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
|
6
src/main/java/org/gcube/portlets/admin/accountingmanager/accountingman.gwt.xml
Normal file → Executable file
|
@ -46,7 +46,8 @@
|
|||
|
||||
<!-- <set-configuration-property name="CssResource.style" value="pretty"/> -->
|
||||
|
||||
<!-- <set-property name="log_DivLogger" value="ENABLED" /> <set-property
|
||||
<!--
|
||||
<set-property name="log_DivLogger" value="ENABLED" /> <set-property
|
||||
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||
/> -->
|
||||
|
@ -56,8 +57,7 @@
|
|||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/AccountingManager.java
Normal file → Executable file
93
src/main/java/org/gcube/portlets/admin/accountingmanager/client/AccountingManagerController.java
Normal file → Executable file
|
@ -68,6 +68,7 @@ public class AccountingManagerController {
|
|||
private BorderLayoutContainer mainPanel;
|
||||
private AccountingMonitor accountingMonitor;
|
||||
private EnableTabs enableTabs;
|
||||
private Context availableContext;
|
||||
|
||||
public AccountingManagerController() {
|
||||
eventBus = new SimpleEventBus();
|
||||
|
@ -106,7 +107,7 @@ public class AccountingManagerController {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.info("No valid user found: " + caught.getMessage());
|
||||
Log.error("No valid user found: " + caught.getLocalizedMessage(), caught);
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session");
|
||||
sessionExpiredShowDelayed();
|
||||
|
@ -131,7 +132,7 @@ public class AccountingManagerController {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.info("No valid user found: " + caught.getMessage());
|
||||
Log.error("Error in check root scope: " + caught.getLocalizedMessage(), caught);
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session");
|
||||
sessionExpiredShowDelayed();
|
||||
|
@ -156,7 +157,7 @@ public class AccountingManagerController {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.error("Error retrieving enable tabs: " + caught.getLocalizedMessage());
|
||||
Log.error("Error retrieving enable tabs: " + caught.getLocalizedMessage(), caught);
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session");
|
||||
sessionExpiredShowDelayed();
|
||||
|
@ -293,7 +294,7 @@ public class AccountingManagerController {
|
|||
Log.debug("AccountingType: " + event.getAccountingType());
|
||||
accountingStateData = accountingState.getState(event.getAccountingType());
|
||||
if (accountingStateData == null) {
|
||||
createDefaultChart(event.getAccountingType());
|
||||
configureDefaultChart(event.getAccountingType());
|
||||
} else {
|
||||
accountingType = event.getAccountingType();
|
||||
StateChangeEvent stateChangeEvent = new StateChangeEvent(StateChangeType.Restore, accountingStateData);
|
||||
|
@ -310,18 +311,51 @@ public class AccountingManagerController {
|
|||
if (enableTabs != null && enableTabs.getTabs() != null && enableTabs.getTabs().size() > 0
|
||||
&& enableTabs.getTabs().get(0) != null) {
|
||||
Log.debug("Create DefaultChart");
|
||||
createDefaultChart(enableTabs.getTabs().get(0).getAccountingType());
|
||||
configureDefaultChart(enableTabs.getTabs().get(0).getAccountingType());
|
||||
}
|
||||
}
|
||||
|
||||
private void createDefaultChart(AccountingType accountingType) {
|
||||
private void configureDefaultChart(AccountingType accountingType) {
|
||||
accountingMonitor = new AccountingMonitor();
|
||||
this.accountingType = accountingType;
|
||||
if (availableContext == null) {
|
||||
retrieveContext();
|
||||
} else {
|
||||
createDefaultChart();
|
||||
}
|
||||
}
|
||||
|
||||
private void createDefaultChart() {
|
||||
AccountingClientStateData accountingStateData = new AccountingClientStateData(accountingType, rootScope);
|
||||
accountingStateData.setAvailableContext(availableContext);
|
||||
accountingState.setState(accountingType, accountingStateData);
|
||||
|
||||
retrieveFilterKey();
|
||||
}
|
||||
|
||||
private void retrieveContext() {
|
||||
|
||||
AccountingManagerServiceAsync.INSTANCE.getContext(new AsyncCallback<Context>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
accountingMonitor.hide();
|
||||
Log.error("Error retrieving contexts: " + caught.getLocalizedMessage(), caught);
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
UtilsGXT3.alert("Error retrieving contexts ", caught.getLocalizedMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Context result) {
|
||||
Log.debug("Available Context: " + result);
|
||||
availableContext = result;
|
||||
createDefaultChart();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -332,6 +366,7 @@ public class AccountingManagerController {
|
|||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
accountingMonitor.hide();
|
||||
Log.error("Error retrieving filter keys: " + caught.getLocalizedMessage(), caught);
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
|
@ -348,34 +383,6 @@ public class AccountingManagerController {
|
|||
AccountingClientStateData accountingStateData = accountingState.getState(accountingType);
|
||||
accountingStateData.setAvailableFilterKeys(result);
|
||||
accountingState.setState(accountingType, accountingStateData);
|
||||
retrieveContext();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void retrieveContext() {
|
||||
|
||||
AccountingManagerServiceAsync.INSTANCE.getContext(new AsyncCallback<Context>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
accountingMonitor.hide();
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrieving contexts for " + accountingType + ":" + caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving contexts ", caught.getLocalizedMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Context result) {
|
||||
Log.debug("Available Context: " + result);
|
||||
AccountingClientStateData accountingStateData = accountingState.getState(accountingType);
|
||||
accountingStateData.setAvailableContext(result);
|
||||
accountingState.setState(accountingType, accountingStateData);
|
||||
retrieveSpace();
|
||||
}
|
||||
});
|
||||
|
@ -383,7 +390,7 @@ public class AccountingManagerController {
|
|||
}
|
||||
|
||||
private void retrieveSpace() {
|
||||
if (rootScope) {
|
||||
/* if (rootScope) {
|
||||
|
||||
AccountingManagerServiceAsync.INSTANCE.getSpaces(new AsyncCallback<Spaces>() {
|
||||
|
||||
|
@ -393,7 +400,7 @@ public class AccountingManagerController {
|
|||
if (caught instanceof SessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrieving sapces for " + accountingType + ":" + caught.getLocalizedMessage());
|
||||
Log.error("Error retrieving spaces for " + accountingType + ":" + caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error retrieving spaces ", caught.getLocalizedMessage());
|
||||
}
|
||||
|
||||
|
@ -407,7 +414,9 @@ public class AccountingManagerController {
|
|||
});
|
||||
} else {
|
||||
createDefaultSeriesRequest(null);
|
||||
}
|
||||
} */
|
||||
createDefaultSeriesRequest(null);
|
||||
|
||||
}
|
||||
|
||||
private void createDefaultSeriesRequest(Spaces spaces) {
|
||||
|
@ -421,7 +430,8 @@ public class AccountingManagerController {
|
|||
|
||||
AccountingClientStateData accountingStateData = accountingState.getState(accountingType);
|
||||
SeriesRequest seriesRequest = null;
|
||||
|
||||
Context defaultContext=availableContext;
|
||||
|
||||
switch (accountingType) {
|
||||
case JOB:
|
||||
case PORTLET:
|
||||
|
@ -430,9 +440,8 @@ public class AccountingManagerController {
|
|||
case TASK:
|
||||
seriesRequest = new SeriesRequest(
|
||||
new AccountingPeriod(dtf.format(lastMonth), dtf.format(date), AccountingPeriodMode.DAILY),
|
||||
new AccountingFilterBasic());
|
||||
new AccountingFilterBasic(defaultContext));
|
||||
Log.debug("DefaultSeriesRequest: " + seriesRequest);
|
||||
|
||||
break;
|
||||
case SPACE:
|
||||
accountingStateData.setAvailableSpaces(spaces);
|
||||
|
@ -838,8 +847,6 @@ public class AccountingManagerController {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void doExportRequest(ExportRequestEvent event) {
|
||||
StringBuilder actionUrl = new StringBuilder();
|
||||
actionUrl.append(GWT.getModuleBaseURL());
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/PortalViewport.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/carousel/CarouselPanel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/custom/FormatedTimeAxis.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/AccountingMenuEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/AccountingPeriodEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/AccountingPeriodRequestEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/EnableTabsEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/ExportRequestEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/FiltersChangeEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/SessionExpiredEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/StateChangeEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/event/UIStateEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/filters/AccountingPeriodPanel.java
Normal file → Executable file
1211
src/main/java/org/gcube/portlets/admin/accountingmanager/client/filters/ActiveFiltersPanel.java
Normal file → Executable file
2
src/main/java/org/gcube/portlets/admin/accountingmanager/client/filters/FiltersPanel.java
Normal file → Executable file
|
@ -92,7 +92,7 @@ public class FiltersPanel extends FramedPanel {
|
|||
AccountingFilterDefinition accountingFilterDefinition = activeFiltersPanel
|
||||
.getActiveFilters();
|
||||
|
||||
if (accountingPeriod != null) {
|
||||
if (accountingPeriod != null && accountingFilterDefinition!=null) {
|
||||
SeriesRequest seriesRequest = new SeriesRequest(accountingPeriod,
|
||||
accountingFilterDefinition);
|
||||
Log.debug("UpdateChart: " + seriesRequest);
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/graphics/Vector2D.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/ChartViewerPanel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/MainDataPanel.java
Normal file → Executable file
27
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChart4Job.java
Normal file → Executable file
|
@ -1,7 +1,6 @@
|
|||
package org.gcube.portlets.admin.accountingmanager.client.maindata.charts;
|
||||
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.job.JobChartBasicPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.job.JobChartContextPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.job.JobChartTopPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.state.AccountingClientStateData;
|
||||
import org.gcube.portlets.admin.accountingmanager.shared.data.response.SeriesJob;
|
||||
|
@ -13,7 +12,7 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
|||
/**
|
||||
* Accounting Chart 4 Job
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@ -22,8 +21,7 @@ public class AccountingChart4Job extends AccountingChartBuilder {
|
|||
private AccountingClientStateData accountingStateData;
|
||||
private EventBus eventBus;
|
||||
|
||||
public AccountingChart4Job(EventBus eventBus,
|
||||
AccountingClientStateData accountingStateData) {
|
||||
public AccountingChart4Job(EventBus eventBus, AccountingClientStateData accountingStateData) {
|
||||
this.eventBus = eventBus;
|
||||
this.accountingStateData = accountingStateData;
|
||||
}
|
||||
|
@ -32,10 +30,8 @@ public class AccountingChart4Job extends AccountingChartBuilder {
|
|||
public void buildChart() throws ChartDrawException {
|
||||
AccountingChartPanel accountingChartPanel = null;
|
||||
|
||||
if (accountingStateData == null
|
||||
|| accountingStateData.getAccountingType() == null
|
||||
|| accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesResponse() == null) {
|
||||
if (accountingStateData == null || accountingStateData.getAccountingType() == null
|
||||
|| accountingStateData.getSeriesRequest() == null || accountingStateData.getSeriesResponse() == null) {
|
||||
accountingChartSpec.setChart(accountingChartPanel);
|
||||
return;
|
||||
}
|
||||
|
@ -55,25 +51,18 @@ public class AccountingChart4Job extends AccountingChartBuilder {
|
|||
|
||||
private SimpleContainer createJobChartPanel() throws ChartDrawException {
|
||||
|
||||
if (accountingStateData == null
|
||||
|| accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition() == null
|
||||
|| accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition().getChartType() == null) {
|
||||
if (accountingStateData == null || accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesRequest().getAccountingFilterDefinition() == null
|
||||
|| accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition().getChartType()) {
|
||||
switch (accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType()) {
|
||||
|
||||
case Top:
|
||||
return new JobChartTopPanel(eventBus, accountingStateData);
|
||||
case Basic:
|
||||
return new JobChartBasicPanel(eventBus, accountingStateData);
|
||||
case Context:
|
||||
return new JobChartContextPanel(eventBus, accountingStateData);
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChart4Portlet.java
Normal file → Executable file
32
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChart4Service.java
Normal file → Executable file
|
@ -1,7 +1,6 @@
|
|||
package org.gcube.portlets.admin.accountingmanager.client.maindata.charts;
|
||||
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.service.ServiceChartBasicPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.service.ServiceChartContextPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.service.ServiceChartTopPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.state.AccountingClientStateData;
|
||||
import org.gcube.portlets.admin.accountingmanager.shared.data.response.SeriesService;
|
||||
|
@ -13,17 +12,16 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
|||
/**
|
||||
* Accounting Chart 4 Service
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class AccountingChart4Service extends AccountingChartBuilder {
|
||||
private EventBus eventBus;
|
||||
private AccountingClientStateData accountingStateData;
|
||||
|
||||
|
||||
public AccountingChart4Service(EventBus eventBus, AccountingClientStateData accountingStateData) {
|
||||
this.eventBus=eventBus;
|
||||
this.eventBus = eventBus;
|
||||
this.accountingStateData = accountingStateData;
|
||||
}
|
||||
|
||||
|
@ -31,10 +29,8 @@ public class AccountingChart4Service extends AccountingChartBuilder {
|
|||
public void buildChart() throws ChartDrawException {
|
||||
AccountingChartPanel accountingChartPanel = null;
|
||||
|
||||
if (accountingStateData == null
|
||||
|| accountingStateData.getAccountingType() == null
|
||||
|| accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesResponse() == null) {
|
||||
if (accountingStateData == null || accountingStateData.getAccountingType() == null
|
||||
|| accountingStateData.getSeriesRequest() == null || accountingStateData.getSeriesResponse() == null) {
|
||||
accountingChartSpec.setChart(accountingChartPanel);
|
||||
return;
|
||||
}
|
||||
|
@ -52,28 +48,20 @@ public class AccountingChart4Service extends AccountingChartBuilder {
|
|||
|
||||
}
|
||||
|
||||
private SimpleContainer createServiceChartPanel()
|
||||
throws ChartDrawException {
|
||||
private SimpleContainer createServiceChartPanel() throws ChartDrawException {
|
||||
|
||||
if (accountingStateData == null
|
||||
|| accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition() == null
|
||||
|| accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition().getChartType() == null) {
|
||||
if (accountingStateData == null || accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesRequest().getAccountingFilterDefinition() == null
|
||||
|| accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition().getChartType()) {
|
||||
switch (accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType()) {
|
||||
|
||||
case Top:
|
||||
return new ServiceChartTopPanel(eventBus,accountingStateData);
|
||||
return new ServiceChartTopPanel(eventBus, accountingStateData);
|
||||
case Basic:
|
||||
return new ServiceChartBasicPanel(eventBus, accountingStateData);
|
||||
case Context:
|
||||
return new ServiceChartContextPanel(eventBus, accountingStateData);
|
||||
|
||||
default:
|
||||
|
||||
return null;
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChart4Space.java
Normal file → Executable file
27
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChart4Storage.java
Normal file → Executable file
|
@ -1,7 +1,6 @@
|
|||
package org.gcube.portlets.admin.accountingmanager.client.maindata.charts;
|
||||
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.storage.StorageChartBasicPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.storage.StorageChartContextPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.storage.StorageChartTopPanel;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.state.AccountingClientStateData;
|
||||
import org.gcube.portlets.admin.accountingmanager.shared.data.response.SeriesStorage;
|
||||
|
@ -13,7 +12,7 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
|||
/**
|
||||
* Accounting Chart 4 Storage
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@ -21,8 +20,7 @@ public class AccountingChart4Storage extends AccountingChartBuilder {
|
|||
private EventBus eventBus;
|
||||
private AccountingClientStateData accountingStateData;
|
||||
|
||||
public AccountingChart4Storage(EventBus eventBus,
|
||||
AccountingClientStateData accountingStateData) {
|
||||
public AccountingChart4Storage(EventBus eventBus, AccountingClientStateData accountingStateData) {
|
||||
this.eventBus = eventBus;
|
||||
this.accountingStateData = accountingStateData;
|
||||
}
|
||||
|
@ -31,10 +29,8 @@ public class AccountingChart4Storage extends AccountingChartBuilder {
|
|||
public void buildChart() throws ChartDrawException {
|
||||
AccountingChartPanel accountingChartPanel = null;
|
||||
|
||||
if (accountingStateData == null
|
||||
|| accountingStateData.getAccountingType() == null
|
||||
|| accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesResponse() == null) {
|
||||
if (accountingStateData == null || accountingStateData.getAccountingType() == null
|
||||
|| accountingStateData.getSeriesRequest() == null || accountingStateData.getSeriesResponse() == null) {
|
||||
accountingChartSpec.setChart(accountingChartPanel);
|
||||
return;
|
||||
}
|
||||
|
@ -54,25 +50,18 @@ public class AccountingChart4Storage extends AccountingChartBuilder {
|
|||
|
||||
private SimpleContainer createStorageChartPanel() throws ChartDrawException {
|
||||
|
||||
if (accountingStateData == null
|
||||
|| accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition() == null
|
||||
|| accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition().getChartType() == null) {
|
||||
if (accountingStateData == null || accountingStateData.getSeriesRequest() == null
|
||||
|| accountingStateData.getSeriesRequest().getAccountingFilterDefinition() == null
|
||||
|| accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition().getChartType()) {
|
||||
switch (accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType()) {
|
||||
|
||||
case Top:
|
||||
return new StorageChartTopPanel(eventBus, accountingStateData);
|
||||
case Basic:
|
||||
return new StorageChartBasicPanel(eventBus, accountingStateData);
|
||||
case Context:
|
||||
return new StorageChartContextPanel(eventBus, accountingStateData);
|
||||
|
||||
default:
|
||||
|
||||
return null;
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChart4Task.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChartBuilder.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChartDirector.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChartPanel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/AccountingChartSpec.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/job/JobChartBasicPanel.java
Normal file → Executable file
462
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/job/JobChartTopPanel.java
Normal file → Executable file
|
@ -6,6 +6,7 @@ import java.util.Date;
|
|||
import org.gcube.portlets.admin.accountingmanager.client.event.ExportRequestEvent;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ChartDateTimeData;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ChartTimeMeasure;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ColorsPalette;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.DownloadConstants;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.JobChartMeasure;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.TimeUnitMeasure;
|
||||
|
@ -57,8 +58,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
private static final String TIME_UNIT = "Time Unit";
|
||||
// private static final String MEASURE_TYPE = "Measure";
|
||||
|
||||
private DateTimeFormat dtf = DateTimeFormat
|
||||
.getFormat(PredefinedFormat.YEAR_MONTH_DAY);
|
||||
private DateTimeFormat dtf = DateTimeFormat.getFormat(PredefinedFormat.YEAR_MONTH_DAY);
|
||||
|
||||
private EventBus eventBus;
|
||||
private AccountingClientStateData accountingStateData;
|
||||
|
@ -96,8 +96,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
|
||||
private VerticalLayoutContainer vert;
|
||||
|
||||
public JobChartTopPanel(EventBus eventBus,
|
||||
AccountingClientStateData accountingStateData) {
|
||||
public JobChartTopPanel(EventBus eventBus, AccountingClientStateData accountingStateData) {
|
||||
this.eventBus = eventBus;
|
||||
this.accountingStateData = accountingStateData;
|
||||
forceLayoutOnResize = true;
|
||||
|
@ -109,8 +108,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.setSpacing(2);
|
||||
// Download
|
||||
final TextButton downloadButton = new TextButton(
|
||||
DownloadConstants.DOWNLOAD,
|
||||
final TextButton downloadButton = new TextButton(DownloadConstants.DOWNLOAD,
|
||||
AccountingManagerResources.INSTANCE.accountingDownload24());
|
||||
// downloadButton.setScale(ButtonScale.MEDIUM);
|
||||
downloadButton.setIconAlign(IconAlign.RIGHT);
|
||||
|
@ -125,8 +123,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
measureButton.setMenu(createMeasureMenu());
|
||||
|
||||
// Unit
|
||||
unitButton = new TextButton(TIME_UNIT,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitms24());
|
||||
unitButton = new TextButton(TIME_UNIT, AccountingManagerResources.INSTANCE.accountingUnitms24());
|
||||
unitButton.setIconAlign(IconAlign.RIGHT);
|
||||
unitButton.setArrowAlign(ButtonArrowAlign.RIGHT);
|
||||
unitButton.setMenu(createUnitMenu());
|
||||
|
@ -145,8 +142,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
//
|
||||
vert = new VerticalLayoutContainer();
|
||||
vert.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vert.add(highchartsLayoutPanel, new VerticalLayoutData(1, 1,
|
||||
new Margins(0)));
|
||||
vert.add(highchartsLayoutPanel, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
|
||||
add(vert, new MarginData(0));
|
||||
|
||||
|
@ -265,14 +261,11 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
// TODO
|
||||
durationItem = new MenuItem(JobChartMeasure.Duration.getLabel());
|
||||
durationItem.setHeight(30);
|
||||
operationCountItem = new MenuItem(
|
||||
JobChartMeasure.OperationCount.getLabel());
|
||||
operationCountItem = new MenuItem(JobChartMeasure.OperationCount.getLabel());
|
||||
operationCountItem.setHeight(30);
|
||||
maxInvocationTimeItem = new MenuItem(
|
||||
JobChartMeasure.MaxInvocationTime.getLabel());
|
||||
maxInvocationTimeItem = new MenuItem(JobChartMeasure.MaxInvocationTime.getLabel());
|
||||
maxInvocationTimeItem.setHeight(30);
|
||||
minInvocationTimeItem = new MenuItem(
|
||||
JobChartMeasure.MinInvocationTime.getLabel());
|
||||
minInvocationTimeItem = new MenuItem(JobChartMeasure.MinInvocationTime.getLabel());
|
||||
minInvocationTimeItem.setHeight(30);
|
||||
|
||||
durationItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||
|
@ -301,8 +294,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<Item> event) {
|
||||
measureButton.setText(JobChartMeasure.MaxInvocationTime
|
||||
.getLabel());
|
||||
measureButton.setText(JobChartMeasure.MaxInvocationTime.getLabel());
|
||||
measure = JobChartMeasure.MaxInvocationTime;
|
||||
unitButton.setVisible(true);
|
||||
updateChart();
|
||||
|
@ -313,8 +305,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<Item> event) {
|
||||
measureButton.setText(JobChartMeasure.MinInvocationTime
|
||||
.getLabel());
|
||||
measureButton.setText(JobChartMeasure.MinInvocationTime.getLabel());
|
||||
measure = JobChartMeasure.MinInvocationTime;
|
||||
unitButton.setVisible(true);
|
||||
updateChart();
|
||||
|
@ -332,17 +323,13 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
|
||||
private Menu createUnitMenu() {
|
||||
Menu menuUnit = new Menu();
|
||||
msItem = new MenuItem(TimeUnitMeasure.MILLISECONDS,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitms24());
|
||||
msItem = new MenuItem(TimeUnitMeasure.MILLISECONDS, AccountingManagerResources.INSTANCE.accountingUnitms24());
|
||||
msItem.setHeight(30);
|
||||
sItem = new MenuItem(TimeUnitMeasure.SECONDS,
|
||||
AccountingManagerResources.INSTANCE.accountingUnits24());
|
||||
sItem = new MenuItem(TimeUnitMeasure.SECONDS, AccountingManagerResources.INSTANCE.accountingUnits24());
|
||||
sItem.setHeight(30);
|
||||
mItem = new MenuItem(TimeUnitMeasure.MINUTES,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitm24());
|
||||
mItem = new MenuItem(TimeUnitMeasure.MINUTES, AccountingManagerResources.INSTANCE.accountingUnitm24());
|
||||
mItem.setHeight(30);
|
||||
hItem = new MenuItem(TimeUnitMeasure.HOURS,
|
||||
AccountingManagerResources.INSTANCE.accountingUnith24());
|
||||
hItem = new MenuItem(TimeUnitMeasure.HOURS, AccountingManagerResources.INSTANCE.accountingUnith24());
|
||||
hItem.setHeight(30);
|
||||
|
||||
msItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||
|
@ -351,8 +338,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = TimeUnitMeasure.getMilliseconds();
|
||||
unitMeasureLabel = TimeUnitMeasure.MS;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnitms24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnitms24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -363,8 +349,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = TimeUnitMeasure.getSeconds();
|
||||
unitMeasureLabel = TimeUnitMeasure.S;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnits24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnits24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -375,8 +360,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = TimeUnitMeasure.getMinutes();
|
||||
unitMeasureLabel = TimeUnitMeasure.M;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnitm24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnitm24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -387,8 +371,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = TimeUnitMeasure.getHours();
|
||||
unitMeasureLabel = TimeUnitMeasure.H;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnith24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnith24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -402,20 +385,17 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
private void onDownloadCSV() {
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.CSV,
|
||||
accountingStateData.getAccountingType());
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.CSV, accountingStateData.getAccountingType());
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
private void onDownloadXML() {
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.XML,
|
||||
accountingStateData.getAccountingType());
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.XML, accountingStateData.getAccountingType());
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
private void onDownloadJSON() {
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.JSON,
|
||||
accountingStateData.getAccountingType());
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.JSON, accountingStateData.getAccountingType());
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
|
@ -472,15 +452,13 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
}-*/;
|
||||
|
||||
private void createChart() {
|
||||
SeriesJob seriesJob = (SeriesJob) accountingStateData
|
||||
.getSeriesResponse();
|
||||
SeriesJob seriesJob = (SeriesJob) accountingStateData.getSeriesResponse();
|
||||
|
||||
if (!(seriesJob.getSeriesJobDefinition() instanceof SeriesJobTop)) {
|
||||
Log.debug("Invalid SeriesJobTop!");
|
||||
return;
|
||||
}
|
||||
SeriesJobTop seriesJobTop = (SeriesJobTop) seriesJob
|
||||
.getSeriesJobDefinition();
|
||||
SeriesJobTop seriesJobTop = (SeriesJobTop) seriesJob.getSeriesJobDefinition();
|
||||
|
||||
HighchartsOptionFactory highchartsFactory = new JsoHighchartsOptionFactory();
|
||||
|
||||
|
@ -491,32 +469,28 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
options.title().text("Accounting Job Top");
|
||||
|
||||
/*
|
||||
* options.subtitle().text("Click and drag in the plot area to zoom in");
|
||||
* options.subtitle().text("Click and drag in the plot area to zoom in"
|
||||
* );
|
||||
*/
|
||||
|
||||
ColorsPalette colorsPalette=new ColorsPalette();
|
||||
ArrayString colors = options.colors();
|
||||
colors=colorsPalette.getColorsPalette(colors);
|
||||
options.colors(colors);
|
||||
|
||||
// colors.setValue(0, "#cc0038");
|
||||
// colors.setValue(1, "#32cd32");
|
||||
|
||||
// yAxis
|
||||
options.setFieldAsJsonObject("yAxis", retrieveYAxis(colors));
|
||||
|
||||
options.plotOptions().setFieldAsJsonObject(
|
||||
"column",
|
||||
"{ " + "\"stacking\": \"normal\"," + "\"dataLabels\": { "
|
||||
+ " \"enabled\": \"true\","
|
||||
options.plotOptions().setFieldAsJsonObject("column",
|
||||
"{ " + "\"stacking\": \"normal\"," + "\"dataLabels\": { " + " \"enabled\": \"true\","
|
||||
+ " \"color\": \"white\", " + " \"style\": {"
|
||||
+ " \"textShadow\": \"0 0 3px black\"" + " }"
|
||||
+ " }" + " }");
|
||||
+ " \"textShadow\": \"0 0 3px black\"" + " }" + " }" + " }");
|
||||
|
||||
ArrayList<SeriesColumn> seriesColumn = new ArrayList<>();
|
||||
if (seriesJobTop.getShowOthers()) {
|
||||
createSeriesColumnShowOthers(seriesJobTop, highchartsFactory,
|
||||
colors, seriesColumn);
|
||||
} else {
|
||||
createSeriesColumnSimple(seriesJobTop, highchartsFactory, colors,
|
||||
seriesColumn);
|
||||
}
|
||||
createSeriesColumnSimple(seriesJobTop, highchartsFactory, colors, seriesColumn);
|
||||
|
||||
for (SeriesColumn serie : seriesColumn) {
|
||||
options.series().addToEnd(serie);
|
||||
|
@ -528,35 +502,28 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
return;
|
||||
}
|
||||
|
||||
private void createSeriesColumnShowOthers(SeriesJobTop seriesJobTop,
|
||||
HighchartsOptionFactory highchartsFactory, ArrayString colors,
|
||||
ArrayList<SeriesColumn> seriesColumn) {
|
||||
private void createSeriesColumnShowOthers(SeriesJobTop seriesJobTop, HighchartsOptionFactory highchartsFactory,
|
||||
ArrayString colors, ArrayList<SeriesColumn> seriesColumn) {
|
||||
Log.debug("Series ShowOthers");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
|
||||
double minRange = ChartTimeMeasure
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
double interval = ChartTimeMeasure
|
||||
.calculateInterval(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateInterval(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getStartDate());
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest().getAccountingPeriod().getStartDate());
|
||||
|
||||
dateStart.setTime(dateStart.getTime()
|
||||
+ ChartTimeMeasure.timeZoneOffset()
|
||||
* ChartTimeMeasure.MINUTE);
|
||||
dateStart.setTime(dateStart.getTime() + ChartTimeMeasure.timeZoneOffset() * ChartTimeMeasure.MINUTE);
|
||||
|
||||
Log.debug("BuildChart DateStart: "
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL)
|
||||
.format(dateStart));
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL).format(dateStart));
|
||||
|
||||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
|
@ -564,31 +531,25 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
int i = 0;
|
||||
for (; i < seriesJobTop.getSeriesJobDataTopList().size()
|
||||
&& i < seriesJobTop.getTopNumber(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
for (; i < seriesJobTop.getSeriesJobDataTopList().size() && i < seriesJobTop.getTopNumber(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList()
|
||||
.get(i).getFilterValue().getValue());
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayNumber data = seriesColumnData.dataAsArrayNumber();
|
||||
|
||||
for (SeriesJobData seriesJobData : seriesJobTop
|
||||
.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
for (SeriesJobData seriesJobData : seriesJobTop.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
data.push(seriesJobData.getDuration() / unitMeasure);
|
||||
break;
|
||||
case MaxInvocationTime:
|
||||
data.push(seriesJobData.getMaxInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.push(seriesJobData.getMaxInvocationTime() / unitMeasure);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
data.push(seriesJobData.getMinInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.push(seriesJobData.getMinInvocationTime() / unitMeasure);
|
||||
break;
|
||||
case OperationCount:
|
||||
data.push(seriesJobData.getOperationCount());
|
||||
|
@ -601,77 +562,61 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
|
||||
}
|
||||
|
||||
seriesColumnData.pointInterval(interval).pointStart(
|
||||
dateStart.getTime());
|
||||
seriesColumnData.pointInterval(interval).pointStart(dateStart.getTime());
|
||||
seriesColumn.add(seriesColumnData);
|
||||
|
||||
}
|
||||
|
||||
if (i < seriesJobTop.getSeriesJobDataTopList().size()) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name("Others");
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayList<Long> othersData = new ArrayList<>();
|
||||
for (int j = i; j < seriesJobTop.getSeriesJobDataTopList()
|
||||
.size(); j++) {
|
||||
for (int j = i; j < seriesJobTop.getSeriesJobDataTopList().size(); j++) {
|
||||
Long value;
|
||||
for (int k = 0; k < seriesJobTop.getSeriesJobDataTopList()
|
||||
.get(j).getSeries().size(); k++) {
|
||||
SeriesJobData seriesJobData = seriesJobTop
|
||||
.getSeriesJobDataTopList().get(j).getSeries()
|
||||
.get(k);
|
||||
for (int k = 0; k < seriesJobTop.getSeriesJobDataTopList().get(j).getSeries().size(); k++) {
|
||||
SeriesJobData seriesJobData = seriesJobTop.getSeriesJobDataTopList().get(j).getSeries().get(k);
|
||||
if (j == i) {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
othersData.add(seriesJobData.getDuration()
|
||||
/ unitMeasure);
|
||||
othersData.add(seriesJobData.getDuration() / unitMeasure);
|
||||
break;
|
||||
case MaxInvocationTime:
|
||||
othersData.add(seriesJobData
|
||||
.getMaxInvocationTime() / unitMeasure);
|
||||
othersData.add(seriesJobData.getMaxInvocationTime() / unitMeasure);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
othersData.add(seriesJobData
|
||||
.getMinInvocationTime() / unitMeasure);
|
||||
othersData.add(seriesJobData.getMinInvocationTime() / unitMeasure);
|
||||
break;
|
||||
case OperationCount:
|
||||
othersData.add(seriesJobData
|
||||
.getOperationCount());
|
||||
othersData.add(seriesJobData.getOperationCount());
|
||||
break;
|
||||
default:
|
||||
othersData.add(seriesJobData.getDuration()
|
||||
/ unitMeasure);
|
||||
othersData.add(seriesJobData.getDuration() / unitMeasure);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
value = (seriesJobData.getDuration() / unitMeasure)
|
||||
+ othersData.get(k);
|
||||
value = (seriesJobData.getDuration() / unitMeasure) + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
case MaxInvocationTime:
|
||||
value = (seriesJobData.getMaxInvocationTime() / unitMeasure)
|
||||
+ othersData.get(k);
|
||||
value = (seriesJobData.getMaxInvocationTime() / unitMeasure) + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
value = (seriesJobData.getMinInvocationTime() / unitMeasure)
|
||||
+ othersData.get(k);
|
||||
value = (seriesJobData.getMinInvocationTime() / unitMeasure) + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
case OperationCount:
|
||||
value = seriesJobData.getOperationCount()
|
||||
+ othersData.get(k);
|
||||
value = seriesJobData.getOperationCount() + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
default:
|
||||
value = (seriesJobData.getDuration() / unitMeasure)
|
||||
+ othersData.get(k);
|
||||
value = (seriesJobData.getDuration() / unitMeasure) + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
|
||||
|
@ -688,8 +633,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
data.push(value);
|
||||
}
|
||||
|
||||
seriesColumnData.pointInterval(interval).pointStart(
|
||||
dateStart.getTime());
|
||||
seriesColumnData.pointInterval(interval).pointStart(dateStart.getTime());
|
||||
seriesColumn.add(seriesColumnData);
|
||||
|
||||
}
|
||||
|
@ -697,16 +641,15 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%b, %Y");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
// options.tooltip().xDateFormat("%b, %Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
if (accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getPeriod()
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.YEARLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%Y");
|
||||
// options.tooltip().xDateFormat("%Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
|
@ -716,20 +659,16 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
int i = 0;
|
||||
for (; i < seriesJobTop.getSeriesJobDataTopList().size()
|
||||
&& i < seriesJobTop.getTopNumber(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
for (; i < seriesJobTop.getSeriesJobDataTopList().size() && i < seriesJobTop.getTopNumber(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList()
|
||||
.get(i).getFilterValue().getValue());
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
Array<Data> arrayData = seriesColumnData.dataAsArrayObject();
|
||||
|
||||
for (SeriesJobData seriesJobData : seriesJobTop
|
||||
.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
for (SeriesJobData seriesJobData : seriesJobTop.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
long dateFrom1970 = seriesJobData.getDate().getTime();
|
||||
|
||||
Log.debug("SeriersJobData: " + seriesJobData.getDate());
|
||||
|
@ -745,14 +684,12 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
break;
|
||||
case MaxInvocationTime:
|
||||
data.x(dateFrom1970);
|
||||
data.y(seriesJobData.getMaxInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.y(seriesJobData.getMaxInvocationTime() / unitMeasure);
|
||||
arrayData.addToEnd(data);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
data.x(dateFrom1970);
|
||||
data.y(seriesJobData.getMinInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.y(seriesJobData.getMinInvocationTime() / unitMeasure);
|
||||
arrayData.addToEnd(data);
|
||||
break;
|
||||
case OperationCount:
|
||||
|
@ -775,94 +712,72 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
if (i < seriesJobTop.getSeriesJobDataTopList().size()) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name("Others");
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayList<ChartDateTimeData> othersData = new ArrayList<>();
|
||||
for (int j = i; j < seriesJobTop.getSeriesJobDataTopList()
|
||||
.size(); j++) {
|
||||
for (int j = i; j < seriesJobTop.getSeriesJobDataTopList().size(); j++) {
|
||||
ChartDateTimeData chartDateTimeData;
|
||||
for (int k = 0; k < seriesJobTop.getSeriesJobDataTopList()
|
||||
.get(j).getSeries().size(); k++) {
|
||||
SeriesJobData seriesJobData = seriesJobTop
|
||||
.getSeriesJobDataTopList().get(j).getSeries()
|
||||
.get(k);
|
||||
for (int k = 0; k < seriesJobTop.getSeriesJobDataTopList().get(j).getSeries().size(); k++) {
|
||||
SeriesJobData seriesJobData = seriesJobTop.getSeriesJobDataTopList().get(j).getSeries().get(k);
|
||||
if (j == i) {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
seriesJobData.getDuration()
|
||||
/ unitMeasure);
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
seriesJobData.getDuration() / unitMeasure);
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
case MaxInvocationTime:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
seriesJobData.getMaxInvocationTime()
|
||||
/ unitMeasure);
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
seriesJobData.getMaxInvocationTime() / unitMeasure);
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
seriesJobData.getMinInvocationTime()
|
||||
/ unitMeasure);
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
seriesJobData.getMinInvocationTime() / unitMeasure);
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
case OperationCount:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
seriesJobData.getOperationCount());
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
default:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
seriesJobData.getDuration()
|
||||
/ unitMeasure);
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
seriesJobData.getDuration() / unitMeasure);
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
(seriesJobData.getDuration() / unitMeasure)
|
||||
+ othersData.get(k).getValue());
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
(seriesJobData.getDuration() / unitMeasure) + othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
case MaxInvocationTime:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
(seriesJobData.getMaxInvocationTime() / unitMeasure)
|
||||
+ othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
(seriesJobData.getMinInvocationTime() / unitMeasure)
|
||||
+ othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
case OperationCount:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
seriesJobData.getOperationCount()
|
||||
+ othersData.get(k).getValue());
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
seriesJobData.getOperationCount() + othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
default:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesJobData.getDate(),
|
||||
(seriesJobData.getDuration() / unitMeasure)
|
||||
+ othersData.get(k).getValue());
|
||||
chartDateTimeData = new ChartDateTimeData(seriesJobData.getDate(),
|
||||
(seriesJobData.getDuration() / unitMeasure) + othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
|
||||
|
@ -878,8 +793,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
for (ChartDateTimeData chartDateTimeData : othersData) {
|
||||
long dateFrom1970 = chartDateTimeData.getDate().getTime();
|
||||
|
||||
Log.debug("SeriersOthersData: "
|
||||
+ chartDateTimeData.getDate());
|
||||
Log.debug("SeriersOthersData: " + chartDateTimeData.getDate());
|
||||
Log.debug("SeriersOthersData: " + dateFrom1970);
|
||||
|
||||
Data data = highchartsFactory.createSeriesColumnData();
|
||||
|
@ -896,65 +810,53 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
}
|
||||
|
||||
private void createSeriesColumnSimple(SeriesJobTop seriesJobTop,
|
||||
HighchartsOptionFactory highchartsFactory, ArrayString colors,
|
||||
ArrayList<SeriesColumn> seriesColumn) {
|
||||
private void createSeriesColumnSimple(SeriesJobTop seriesJobTop, HighchartsOptionFactory highchartsFactory,
|
||||
ArrayString colors, ArrayList<SeriesColumn> seriesColumn) {
|
||||
Log.debug("Series Simple");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
|
||||
double minRange = ChartTimeMeasure
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
double interval = ChartTimeMeasure
|
||||
.calculateInterval(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateInterval(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getStartDate());
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest().getAccountingPeriod().getStartDate());
|
||||
|
||||
dateStart.setTime(dateStart.getTime()
|
||||
+ ChartTimeMeasure.timeZoneOffset()
|
||||
* ChartTimeMeasure.MINUTE);
|
||||
dateStart.setTime(dateStart.getTime() + ChartTimeMeasure.timeZoneOffset() * ChartTimeMeasure.MINUTE);
|
||||
|
||||
Log.debug("BuildChart DateStart: "
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL)
|
||||
.format(dateStart));
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL).format(dateStart));
|
||||
|
||||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
options.xAxis().minRange(minRange);
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
for (int i = 0; i < seriesJobTop.getSeriesJobDataTopList().size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList()
|
||||
.get(i).getFilterValue().getValue());
|
||||
for (int i = 0; i < seriesJobTop.getSeriesJobDataTopList().size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayNumber data = seriesColumnData.dataAsArrayNumber();
|
||||
|
||||
for (SeriesJobData seriesJobData : seriesJobTop
|
||||
.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
for (SeriesJobData seriesJobData : seriesJobTop.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
data.push(seriesJobData.getDuration() / unitMeasure);
|
||||
break;
|
||||
case MaxInvocationTime:
|
||||
data.push(seriesJobData.getMaxInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.push(seriesJobData.getMaxInvocationTime() / unitMeasure);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
data.push(seriesJobData.getMinInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.push(seriesJobData.getMinInvocationTime() / unitMeasure);
|
||||
break;
|
||||
case OperationCount:
|
||||
data.push(seriesJobData.getOperationCount());
|
||||
|
@ -967,8 +869,7 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
|
||||
}
|
||||
|
||||
seriesColumnData.pointInterval(interval).pointStart(
|
||||
dateStart.getTime());
|
||||
seriesColumnData.pointInterval(interval).pointStart(dateStart.getTime());
|
||||
seriesColumn.add(seriesColumnData);
|
||||
|
||||
}
|
||||
|
@ -976,16 +877,15 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%b, %Y");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
// options.tooltip().xDateFormat("%b, %Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
if (accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getPeriod()
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.YEARLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%Y");
|
||||
// options.tooltip().xDateFormat("%Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
|
@ -995,18 +895,15 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
for (int i = 0; i < seriesJobTop.getSeriesJobDataTopList().size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList()
|
||||
.get(i).getFilterValue().getValue());
|
||||
seriesColumnData.name(seriesJobTop.getSeriesJobDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
Array<Data> arrayData = seriesColumnData.dataAsArrayObject();
|
||||
|
||||
for (SeriesJobData seriesJobData : seriesJobTop
|
||||
.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
for (SeriesJobData seriesJobData : seriesJobTop.getSeriesJobDataTopList().get(i).getSeries()) {
|
||||
long dateFrom1970 = seriesJobData.getDate().getTime();
|
||||
|
||||
Log.debug("SeriersJobData: " + seriesJobData.getDate());
|
||||
|
@ -1022,14 +919,12 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
break;
|
||||
case MaxInvocationTime:
|
||||
data.x(dateFrom1970);
|
||||
data.y(seriesJobData.getMaxInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.y(seriesJobData.getMaxInvocationTime() / unitMeasure);
|
||||
arrayData.addToEnd(data);
|
||||
break;
|
||||
case MinInvocationTime:
|
||||
data.x(dateFrom1970);
|
||||
data.y(seriesJobData.getMinInvocationTime()
|
||||
/ unitMeasure);
|
||||
data.y(seriesJobData.getMinInvocationTime() / unitMeasure);
|
||||
arrayData.addToEnd(data);
|
||||
break;
|
||||
case OperationCount:
|
||||
|
@ -1057,68 +952,45 @@ public class JobChartTopPanel extends SimpleContainer {
|
|||
private String retrieveYAxis(ArrayString colors) {
|
||||
switch (measure) {
|
||||
case Duration:
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.Duration.name()
|
||||
+ "\"," + " \"labels\": {" + " \"format\": \"{value} "
|
||||
+ unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.Duration.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.Duration.name() + "\"," + " \"labels\": {"
|
||||
+ " \"format\": \"{value} " + unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }," + " \"stackLabels\": {"
|
||||
+ " \"enabled\": \"true\"," + " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " }," + " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.Duration.getLabel() + "\"," + " \"style\": {" + " \"color\": \"#434348\""
|
||||
+ " }" + " }" + "}]";
|
||||
case MaxInvocationTime:
|
||||
return "[{" + " \"id\": \""
|
||||
+ JobChartMeasure.MaxInvocationTime.name() + "\","
|
||||
+ " \"labels\": {" + " \"format\": \"{value} "
|
||||
+ unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.MaxInvocationTime.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.MaxInvocationTime.name() + "\"," + " \"labels\": {"
|
||||
+ " \"format\": \"{value} " + unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }," + " \"stackLabels\": {"
|
||||
+ " \"enabled\": \"true\"," + " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " }," + " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.MaxInvocationTime.getLabel() + "\"," + " \"style\": {" + " \"color\": \"#434348\""
|
||||
+ " }" + " }" + "}]";
|
||||
case MinInvocationTime:
|
||||
return "[{" + " \"id\": \""
|
||||
+ JobChartMeasure.MinInvocationTime.name() + "\","
|
||||
+ " \"labels\": {" + " \"format\": \"{value} "
|
||||
+ unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.MinInvocationTime.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.MinInvocationTime.name() + "\"," + " \"labels\": {"
|
||||
+ " \"format\": \"{value} " + unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }," + " \"stackLabels\": {"
|
||||
+ " \"enabled\": \"true\"," + " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " }," + " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.MinInvocationTime.getLabel() + "\"," + " \"style\": {" + " \"color\": \"#434348\""
|
||||
+ " }" + " }" + "}]";
|
||||
case OperationCount:
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.OperationCount.name()
|
||||
+ "\"," + " \"labels\": { "
|
||||
+ " \"format\": \"{value}\"," + " \"style\": { "
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.OperationCount.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.OperationCount.name() + "\"," + " \"labels\": { "
|
||||
+ " \"format\": \"{value}\"," + " \"style\": { " + " \"color\": \"#434348\""
|
||||
+ " }" + " }," + " \"stackLabels\": {" + " \"enabled\": \"true\"," + " \"style\": {"
|
||||
+ " \"fontWeight\": \"bold\"," + " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \"" + JobChartMeasure.OperationCount.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \"#434348\"" + " }" + " }" + "}]";
|
||||
|
||||
default:
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.Duration.name()
|
||||
+ "\"," + " \"labels\": {" + " \"format\": \"{value} "
|
||||
+ unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.Duration.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + JobChartMeasure.Duration.name() + "\"," + " \"labels\": {"
|
||||
+ " \"format\": \"{value} " + unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }," + " \"stackLabels\": {"
|
||||
+ " \"enabled\": \"true\"," + " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " }," + " \"title\": { " + " \"text\": \""
|
||||
+ JobChartMeasure.Duration.getLabel() + "\"," + " \"style\": {" + " \"color\": \"#434348\""
|
||||
+ " }" + " }" + "}]";
|
||||
|
||||
}
|
||||
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/service/ServiceChartBasicPanel.java
Normal file → Executable file
584
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/service/ServiceChartTopPanel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/space/SpaceChartSpacesPanel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/storage/StorageChartBasicPanel.java
Normal file → Executable file
385
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/storage/StorageChartTopPanel.java
Normal file → Executable file
|
@ -7,6 +7,7 @@ import org.gcube.portlets.admin.accountingmanager.client.event.ExportRequestEven
|
|||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ByteUnitMeasure;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ChartDateTimeData;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ChartTimeMeasure;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.ColorsPalette;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.DownloadConstants;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils.StorageChartMeasure;
|
||||
import org.gcube.portlets.admin.accountingmanager.client.resource.AccountingManagerResources;
|
||||
|
@ -57,8 +58,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
private static final String DATA_VOLUME_UNIT = "Data Volume Unit";
|
||||
// private static final String MEASURE_TYPE = "Measure";
|
||||
|
||||
private DateTimeFormat dtf = DateTimeFormat
|
||||
.getFormat(PredefinedFormat.YEAR_MONTH_DAY);
|
||||
private DateTimeFormat dtf = DateTimeFormat.getFormat(PredefinedFormat.YEAR_MONTH_DAY);
|
||||
|
||||
private EventBus eventBus;
|
||||
private AccountingClientStateData accountingStateData;
|
||||
|
@ -94,8 +94,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
private VerticalLayoutContainer vert;
|
||||
|
||||
public StorageChartTopPanel(EventBus eventBus,
|
||||
AccountingClientStateData accountingStateData) {
|
||||
public StorageChartTopPanel(EventBus eventBus, AccountingClientStateData accountingStateData) {
|
||||
this.eventBus = eventBus;
|
||||
this.accountingStateData = accountingStateData;
|
||||
forceLayoutOnResize = true;
|
||||
|
@ -107,8 +106,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.setSpacing(2);
|
||||
// Download
|
||||
final TextButton downloadButton = new TextButton(
|
||||
DownloadConstants.DOWNLOAD,
|
||||
final TextButton downloadButton = new TextButton(DownloadConstants.DOWNLOAD,
|
||||
AccountingManagerResources.INSTANCE.accountingDownload24());
|
||||
// downloadButton.setScale(ButtonScale.MEDIUM);
|
||||
downloadButton.setIconAlign(IconAlign.RIGHT);
|
||||
|
@ -116,16 +114,14 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
downloadButton.setMenu(createDownloadMenu());
|
||||
|
||||
// Measure
|
||||
measureButton = new TextButton(
|
||||
StorageChartMeasure.DataVolume.getLabel(),
|
||||
measureButton = new TextButton(StorageChartMeasure.DataVolume.getLabel(),
|
||||
AccountingManagerResources.INSTANCE.accountingByte24());
|
||||
measureButton.setIconAlign(IconAlign.RIGHT);
|
||||
measureButton.setArrowAlign(ButtonArrowAlign.RIGHT);
|
||||
measureButton.setMenu(createMeasureMenu());
|
||||
|
||||
// Unit
|
||||
unitButton = new TextButton(DATA_VOLUME_UNIT,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitMB24());
|
||||
unitButton = new TextButton(DATA_VOLUME_UNIT, AccountingManagerResources.INSTANCE.accountingUnitMB24());
|
||||
unitButton.setIconAlign(IconAlign.RIGHT);
|
||||
unitButton.setArrowAlign(ButtonArrowAlign.RIGHT);
|
||||
unitButton.setMenu(createUnitMenu());
|
||||
|
@ -143,8 +139,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
//
|
||||
vert = new VerticalLayoutContainer();
|
||||
vert.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vert.add(highchartsLayoutPanel, new VerticalLayoutData(1, 1,
|
||||
new Margins(0)));
|
||||
vert.add(highchartsLayoutPanel, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
|
||||
add(vert, new MarginData(0));
|
||||
|
||||
|
@ -273,8 +268,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
Menu menuMeasure = new Menu();
|
||||
dataVolumeItem = new MenuItem(StorageChartMeasure.DataVolume.getLabel());
|
||||
dataVolumeItem.setHeight(30);
|
||||
operationCountItem = new MenuItem(
|
||||
StorageChartMeasure.OperationCount.getLabel());
|
||||
operationCountItem = new MenuItem(StorageChartMeasure.OperationCount.getLabel());
|
||||
operationCountItem.setHeight(30);
|
||||
|
||||
dataVolumeItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||
|
@ -292,8 +286,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<Item> event) {
|
||||
measureButton.setText(StorageChartMeasure.OperationCount
|
||||
.getLabel());
|
||||
measureButton.setText(StorageChartMeasure.OperationCount.getLabel());
|
||||
measure = StorageChartMeasure.OperationCount;
|
||||
unitButton.setVisible(false);
|
||||
updateChart();
|
||||
|
@ -309,17 +302,13 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
private Menu createUnitMenu() {
|
||||
Menu menuUnit = new Menu();
|
||||
kBItem = new MenuItem(ByteUnitMeasure.KILOBYTE,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitkB24());
|
||||
kBItem = new MenuItem(ByteUnitMeasure.KILOBYTE, AccountingManagerResources.INSTANCE.accountingUnitkB24());
|
||||
kBItem.setHeight(30);
|
||||
MBItem = new MenuItem(ByteUnitMeasure.MEGABYTE,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitMB24());
|
||||
MBItem = new MenuItem(ByteUnitMeasure.MEGABYTE, AccountingManagerResources.INSTANCE.accountingUnitMB24());
|
||||
MBItem.setHeight(30);
|
||||
GBItem = new MenuItem(ByteUnitMeasure.GIGABYTE,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitGB24());
|
||||
GBItem = new MenuItem(ByteUnitMeasure.GIGABYTE, AccountingManagerResources.INSTANCE.accountingUnitGB24());
|
||||
GBItem.setHeight(30);
|
||||
TBItem = new MenuItem(ByteUnitMeasure.TERABYTE,
|
||||
AccountingManagerResources.INSTANCE.accountingUnitTB24());
|
||||
TBItem = new MenuItem(ByteUnitMeasure.TERABYTE, AccountingManagerResources.INSTANCE.accountingUnitTB24());
|
||||
TBItem.setHeight(30);
|
||||
|
||||
kBItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||
|
@ -328,8 +317,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = ByteUnitMeasure.getKiloByteDimForStorage();
|
||||
unitMeasureLabel = ByteUnitMeasure.kB;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnitkB24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnitkB24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -340,8 +328,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = ByteUnitMeasure.getMegaByteDimForStorage();
|
||||
unitMeasureLabel = ByteUnitMeasure.MB;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnitMB24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnitMB24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -352,8 +339,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = ByteUnitMeasure.getGigaByteDimForStorage();
|
||||
unitMeasureLabel = ByteUnitMeasure.GB;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnitGB24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnitGB24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -364,8 +350,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
public void onSelection(SelectionEvent<Item> event) {
|
||||
unitMeasure = ByteUnitMeasure.getTeraByteDimForStorage();
|
||||
unitMeasureLabel = ByteUnitMeasure.TB;
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE
|
||||
.accountingUnitTB24());
|
||||
unitButton.setIcon(AccountingManagerResources.INSTANCE.accountingUnitTB24());
|
||||
updateChart();
|
||||
}
|
||||
});
|
||||
|
@ -379,20 +364,17 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
private void onDownloadCSV() {
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.CSV,
|
||||
accountingStateData.getAccountingType());
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.CSV, accountingStateData.getAccountingType());
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
private void onDownloadXML() {
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.XML,
|
||||
accountingStateData.getAccountingType());
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.XML, accountingStateData.getAccountingType());
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
private void onDownloadJSON() {
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.JSON,
|
||||
accountingStateData.getAccountingType());
|
||||
ExportRequestEvent event = new ExportRequestEvent(ExportType.JSON, accountingStateData.getAccountingType());
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
|
@ -449,15 +431,13 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
}-*/;
|
||||
|
||||
private void createChart() {
|
||||
SeriesStorage seriesStorage = (SeriesStorage) accountingStateData
|
||||
.getSeriesResponse();
|
||||
SeriesStorage seriesStorage = (SeriesStorage) accountingStateData.getSeriesResponse();
|
||||
|
||||
if (!(seriesStorage.getSeriesStorageDefinition() instanceof SeriesStorageTop)) {
|
||||
Log.debug("Invalid SeriesStorageTop!");
|
||||
return;
|
||||
}
|
||||
SeriesStorageTop seriesStorageTop = (SeriesStorageTop) seriesStorage
|
||||
.getSeriesStorageDefinition();
|
||||
SeriesStorageTop seriesStorageTop = (SeriesStorageTop) seriesStorage.getSeriesStorageDefinition();
|
||||
|
||||
HighchartsOptionFactory highchartsFactory = new JsoHighchartsOptionFactory();
|
||||
|
||||
|
@ -468,32 +448,29 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
options.title().text("Accounting Storage Top");
|
||||
|
||||
/*
|
||||
* options.subtitle().text("Click and drag in the plot area to zoom in");
|
||||
* options.subtitle().text("Click and drag in the plot area to zoom in"
|
||||
* );
|
||||
*/
|
||||
|
||||
ColorsPalette colorsPalette = new ColorsPalette();
|
||||
ArrayString colors = options.colors();
|
||||
colors = colorsPalette.getColorsPalette(colors);
|
||||
options.colors(colors);
|
||||
|
||||
// colors.setValue(0, "#cc0038");
|
||||
// colors.setValue(1, "#32cd32");
|
||||
|
||||
// yAxis
|
||||
options.setFieldAsJsonObject("yAxis", retrieveYAxis(colors));
|
||||
|
||||
options.plotOptions().setFieldAsJsonObject(
|
||||
"column",
|
||||
"{ " + "\"stacking\": \"normal\"," + "\"dataLabels\": { "
|
||||
+ " \"enabled\": \"true\","
|
||||
options.plotOptions().setFieldAsJsonObject("column",
|
||||
"{ " + "\"stacking\": \"normal\"," + "\"dataLabels\": { " + " \"enabled\": \"true\","
|
||||
+ " \"color\": \"white\", " + " \"style\": {"
|
||||
+ " \"textShadow\": \"0 0 3px black\"" + " }"
|
||||
+ " }" + " }");
|
||||
+ " \"textShadow\": \"0 0 3px black\"" + " }" + " }" + " }");
|
||||
|
||||
ArrayList<SeriesColumn> seriesColumn = new ArrayList<>();
|
||||
if (seriesStorageTop.getShowOthers()) {
|
||||
createSeriesColumnShowOthers(seriesStorageTop, highchartsFactory,
|
||||
colors, seriesColumn);
|
||||
} else {
|
||||
createSeriesColumnSimple(seriesStorageTop, highchartsFactory,
|
||||
colors, seriesColumn);
|
||||
}
|
||||
|
||||
createSeriesColumnSimple(seriesStorageTop, highchartsFactory, colors, seriesColumn);
|
||||
|
||||
for (SeriesColumn serie : seriesColumn) {
|
||||
options.series().addToEnd(serie);
|
||||
|
@ -505,62 +482,51 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
return;
|
||||
}
|
||||
|
||||
private void createSeriesColumnShowOthers(
|
||||
SeriesStorageTop seriesStorageTop,
|
||||
HighchartsOptionFactory highchartsFactory, ArrayString colors,
|
||||
ArrayList<SeriesColumn> seriesColumn) {
|
||||
private void createSeriesColumnShowOthers(SeriesStorageTop seriesStorageTop,
|
||||
HighchartsOptionFactory highchartsFactory, ArrayString colors, ArrayList<SeriesColumn> seriesColumn) {
|
||||
Log.debug("Series ShowOthers");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
|
||||
double minRange = ChartTimeMeasure
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
double interval = ChartTimeMeasure
|
||||
.calculateInterval(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateInterval(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getStartDate());
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest().getAccountingPeriod().getStartDate());
|
||||
|
||||
dateStart.setTime(dateStart.getTime()
|
||||
+ ChartTimeMeasure.timeZoneOffset()
|
||||
* ChartTimeMeasure.MINUTE);
|
||||
dateStart.setTime(dateStart.getTime() + ChartTimeMeasure.timeZoneOffset() * ChartTimeMeasure.MINUTE);
|
||||
|
||||
Log.debug("BuildChart DateStart: "
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL)
|
||||
.format(dateStart));
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL).format(dateStart));
|
||||
|
||||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
options.xAxis().minRange(minRange);
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
|
||||
int i = 0;
|
||||
for (; i < seriesStorageTop.getSeriesStorageDataTopList().size()
|
||||
&& i < seriesStorageTop.getTopNumber(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getFilterValue()
|
||||
.getValue());
|
||||
seriesColumnData
|
||||
.name(seriesStorageTop.getSeriesStorageDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayNumber data = seriesColumnData.dataAsArrayNumber();
|
||||
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getSeries()) {
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop.getSeriesStorageDataTopList().get(i)
|
||||
.getSeries()) {
|
||||
switch (measure) {
|
||||
case DataVolume:
|
||||
data.push(seriesStorageData.getDataVolume()
|
||||
/ unitMeasure);
|
||||
data.push(seriesStorageData.getDataVolume() / unitMeasure);
|
||||
break;
|
||||
case OperationCount:
|
||||
data.push(seriesStorageData.getOperationCount());
|
||||
|
@ -573,43 +539,34 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
}
|
||||
|
||||
seriesColumnData.pointInterval(interval).pointStart(
|
||||
dateStart.getTime());
|
||||
seriesColumnData.pointInterval(interval).pointStart(dateStart.getTime());
|
||||
seriesColumn.add(seriesColumnData);
|
||||
|
||||
}
|
||||
|
||||
if (i < seriesStorageTop.getSeriesStorageDataTopList().size()) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name("Others");
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayList<Long> othersData = new ArrayList<>();
|
||||
for (int j = i; j < seriesStorageTop
|
||||
.getSeriesStorageDataTopList().size(); j++) {
|
||||
for (int j = i; j < seriesStorageTop.getSeriesStorageDataTopList().size(); j++) {
|
||||
Long value;
|
||||
for (int k = 0; k < seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(j).getSeries()
|
||||
.size(); k++) {
|
||||
SeriesStorageData seriesStorageData = seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(j)
|
||||
for (int k = 0; k < seriesStorageTop.getSeriesStorageDataTopList().get(j).getSeries().size(); k++) {
|
||||
SeriesStorageData seriesStorageData = seriesStorageTop.getSeriesStorageDataTopList().get(j)
|
||||
.getSeries().get(k);
|
||||
if (j == i) {
|
||||
switch (measure) {
|
||||
case DataVolume:
|
||||
othersData.add(seriesStorageData
|
||||
.getDataVolume() / unitMeasure);
|
||||
othersData.add(seriesStorageData.getDataVolume() / unitMeasure);
|
||||
break;
|
||||
case OperationCount:
|
||||
othersData.add(seriesStorageData
|
||||
.getOperationCount());
|
||||
othersData.add(seriesStorageData.getOperationCount());
|
||||
break;
|
||||
default:
|
||||
othersData.add(seriesStorageData
|
||||
.getDataVolume() / unitMeasure);
|
||||
othersData.add(seriesStorageData.getDataVolume() / unitMeasure);
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -617,18 +574,15 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
switch (measure) {
|
||||
case DataVolume:
|
||||
|
||||
value = seriesStorageData.getDataVolume()
|
||||
/ unitMeasure + othersData.get(k);
|
||||
value = seriesStorageData.getDataVolume() / unitMeasure + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
case OperationCount:
|
||||
value = seriesStorageData.getOperationCount()
|
||||
+ othersData.get(k);
|
||||
value = seriesStorageData.getOperationCount() + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
default:
|
||||
value = seriesStorageData.getDataVolume()
|
||||
/ unitMeasure + othersData.get(k);
|
||||
value = seriesStorageData.getDataVolume() / unitMeasure + othersData.get(k);
|
||||
othersData.set(k, value);
|
||||
break;
|
||||
|
||||
|
@ -644,8 +598,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
data.push(value);
|
||||
}
|
||||
|
||||
seriesColumnData.pointInterval(interval).pointStart(
|
||||
dateStart.getTime());
|
||||
seriesColumnData.pointInterval(interval).pointStart(dateStart.getTime());
|
||||
seriesColumn.add(seriesColumnData);
|
||||
}
|
||||
|
||||
|
@ -653,16 +606,15 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%b, %Y");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
// options.tooltip().xDateFormat("%b, %Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
if (accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getPeriod()
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.YEARLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%Y");
|
||||
// options.tooltip().xDateFormat("%Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
|
@ -674,23 +626,20 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
int i = 0;
|
||||
for (; i < seriesStorageTop.getSeriesStorageDataTopList().size()
|
||||
&& i < seriesStorageTop.getTopNumber(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getFilterValue()
|
||||
.getValue());
|
||||
seriesColumnData
|
||||
.name(seriesStorageTop.getSeriesStorageDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
Array<Data> arrayData = seriesColumnData.dataAsArrayObject();
|
||||
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getSeries()) {
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop.getSeriesStorageDataTopList().get(i)
|
||||
.getSeries()) {
|
||||
long dateFrom1970 = seriesStorageData.getDate().getTime();
|
||||
|
||||
Log.debug("SeriersStorageData: "
|
||||
+ seriesStorageData.getDate());
|
||||
Log.debug("SeriersStorageData: " + seriesStorageData.getDate());
|
||||
Log.debug("SeriersStorageData: " + dateFrom1970);
|
||||
|
||||
Data data = highchartsFactory.createSeriesColumnData();
|
||||
|
@ -721,65 +670,51 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
if (i < seriesStorageTop.getSeriesStorageDataTopList().size()) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name("Others");
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayList<ChartDateTimeData> othersData = new ArrayList<>();
|
||||
for (int j = i; j < seriesStorageTop
|
||||
.getSeriesStorageDataTopList().size(); j++) {
|
||||
for (int j = i; j < seriesStorageTop.getSeriesStorageDataTopList().size(); j++) {
|
||||
ChartDateTimeData chartDateTimeData;
|
||||
for (int k = 0; k < seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(j).getSeries()
|
||||
.size(); k++) {
|
||||
SeriesStorageData seriesStorageData = seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(j)
|
||||
for (int k = 0; k < seriesStorageTop.getSeriesStorageDataTopList().get(j).getSeries().size(); k++) {
|
||||
SeriesStorageData seriesStorageData = seriesStorageTop.getSeriesStorageDataTopList().get(j)
|
||||
.getSeries().get(k);
|
||||
if (j == i) {
|
||||
switch (measure) {
|
||||
case DataVolume:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesStorageData.getDate(),
|
||||
seriesStorageData.getDataVolume()
|
||||
/ unitMeasure);
|
||||
chartDateTimeData = new ChartDateTimeData(seriesStorageData.getDate(),
|
||||
seriesStorageData.getDataVolume() / unitMeasure);
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
case OperationCount:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesStorageData.getDate(),
|
||||
chartDateTimeData = new ChartDateTimeData(seriesStorageData.getDate(),
|
||||
seriesStorageData.getOperationCount());
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
default:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesStorageData.getDate(),
|
||||
seriesStorageData.getDataVolume()
|
||||
/ unitMeasure);
|
||||
chartDateTimeData = new ChartDateTimeData(seriesStorageData.getDate(),
|
||||
seriesStorageData.getDataVolume() / unitMeasure);
|
||||
othersData.add(chartDateTimeData);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (measure) {
|
||||
case DataVolume:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesStorageData.getDate(),
|
||||
chartDateTimeData = new ChartDateTimeData(seriesStorageData.getDate(),
|
||||
(seriesStorageData.getDataVolume() / unitMeasure)
|
||||
+ othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
case OperationCount:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesStorageData.getDate(),
|
||||
seriesStorageData.getOperationCount()
|
||||
+ othersData.get(k).getValue());
|
||||
chartDateTimeData = new ChartDateTimeData(seriesStorageData.getDate(),
|
||||
seriesStorageData.getOperationCount() + othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
break;
|
||||
default:
|
||||
chartDateTimeData = new ChartDateTimeData(
|
||||
seriesStorageData.getDate(),
|
||||
chartDateTimeData = new ChartDateTimeData(seriesStorageData.getDate(),
|
||||
(seriesStorageData.getDataVolume() / unitMeasure)
|
||||
+ othersData.get(k).getValue());
|
||||
othersData.set(k, chartDateTimeData);
|
||||
|
@ -796,8 +731,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
for (ChartDateTimeData chartDateTimeData : othersData) {
|
||||
long dateFrom1970 = chartDateTimeData.getDate().getTime();
|
||||
|
||||
Log.debug("SeriersOthersData: "
|
||||
+ chartDateTimeData.getDate());
|
||||
Log.debug("SeriersOthersData: " + chartDateTimeData.getDate());
|
||||
Log.debug("SeriersOthersData: " + dateFrom1970);
|
||||
|
||||
Data data = highchartsFactory.createSeriesColumnData();
|
||||
|
@ -815,61 +749,50 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
}
|
||||
|
||||
private void createSeriesColumnSimple(SeriesStorageTop seriesStorageTop,
|
||||
HighchartsOptionFactory highchartsFactory, ArrayString colors,
|
||||
ArrayList<SeriesColumn> seriesColumn) {
|
||||
private void createSeriesColumnSimple(SeriesStorageTop seriesStorageTop, HighchartsOptionFactory highchartsFactory,
|
||||
ArrayString colors, ArrayList<SeriesColumn> seriesColumn) {
|
||||
|
||||
Log.debug("Series Simple");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.DAILY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.HOURLY) == 0
|
||||
|| accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MINUTELY) == 0) {
|
||||
|
||||
double minRange = ChartTimeMeasure
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateMinRange(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
double interval = ChartTimeMeasure
|
||||
.calculateInterval(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod());
|
||||
.calculateInterval(accountingStateData.getSeriesRequest().getAccountingPeriod());
|
||||
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getStartDate());
|
||||
Date dateStart = dtf.parse(accountingStateData.getSeriesRequest().getAccountingPeriod().getStartDate());
|
||||
|
||||
dateStart.setTime(dateStart.getTime()
|
||||
+ ChartTimeMeasure.timeZoneOffset()
|
||||
* ChartTimeMeasure.MINUTE);
|
||||
dateStart.setTime(dateStart.getTime() + ChartTimeMeasure.timeZoneOffset() * ChartTimeMeasure.MINUTE);
|
||||
|
||||
Log.debug("BuildChart DateStart: "
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL)
|
||||
.format(dateStart));
|
||||
+ DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_FULL).format(dateStart));
|
||||
|
||||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
options.xAxis().minRange(minRange);
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
for (int i = 0; i < seriesStorageTop.getSeriesStorageDataTopList()
|
||||
.size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getFilterValue()
|
||||
.getValue());
|
||||
for (int i = 0; i < seriesStorageTop.getSeriesStorageDataTopList().size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData
|
||||
.name(seriesStorageTop.getSeriesStorageDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
ArrayNumber data = seriesColumnData.dataAsArrayNumber();
|
||||
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getSeries()) {
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop.getSeriesStorageDataTopList().get(i)
|
||||
.getSeries()) {
|
||||
switch (measure) {
|
||||
case DataVolume:
|
||||
data.push(seriesStorageData.getDataVolume()
|
||||
/ unitMeasure);
|
||||
data.push(seriesStorageData.getDataVolume() / unitMeasure);
|
||||
break;
|
||||
case OperationCount:
|
||||
data.push(seriesStorageData.getOperationCount());
|
||||
|
@ -882,8 +805,7 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
}
|
||||
|
||||
seriesColumnData.pointInterval(interval).pointStart(
|
||||
dateStart.getTime());
|
||||
seriesColumnData.pointInterval(interval).pointStart(dateStart.getTime());
|
||||
seriesColumn.add(seriesColumnData);
|
||||
|
||||
}
|
||||
|
@ -892,16 +814,15 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
// xAxis
|
||||
options.xAxis().type("datetime");
|
||||
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod()
|
||||
.getPeriod().compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%b, %Y");
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.MONTHLY) == 0) {
|
||||
// options.tooltip().xDateFormat("%b, %Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
if (accountingStateData.getSeriesRequest()
|
||||
.getAccountingPeriod().getPeriod()
|
||||
if (accountingStateData.getSeriesRequest().getAccountingPeriod().getPeriod()
|
||||
.compareTo(AccountingPeriodMode.YEARLY) == 0) {
|
||||
//options.tooltip().xDateFormat("%Y");
|
||||
// options.tooltip().xDateFormat("%Y");
|
||||
options.tooltip().xDateFormat("Selected Data");
|
||||
|
||||
} else {
|
||||
|
@ -910,25 +831,21 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
|
||||
}
|
||||
|
||||
for (int i = 0; i < seriesStorageTop.getSeriesStorageDataTopList()
|
||||
.size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory
|
||||
.createSeriesColumn();
|
||||
for (int i = 0; i < seriesStorageTop.getSeriesStorageDataTopList().size(); i++) {
|
||||
SeriesColumn seriesColumnData = highchartsFactory.createSeriesColumn();
|
||||
|
||||
seriesColumnData.name(seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getFilterValue()
|
||||
.getValue());
|
||||
seriesColumnData
|
||||
.name(seriesStorageTop.getSeriesStorageDataTopList().get(i).getFilterValue().getValue());
|
||||
seriesColumnData.color(colors.get(i));
|
||||
seriesColumnData.type("column");
|
||||
|
||||
Array<Data> arrayData = seriesColumnData.dataAsArrayObject();
|
||||
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop
|
||||
.getSeriesStorageDataTopList().get(i).getSeries()) {
|
||||
for (SeriesStorageData seriesStorageData : seriesStorageTop.getSeriesStorageDataTopList().get(i)
|
||||
.getSeries()) {
|
||||
long dateFrom1970 = seriesStorageData.getDate().getTime();
|
||||
|
||||
Log.debug("SeriersStorageData: "
|
||||
+ seriesStorageData.getDate());
|
||||
Log.debug("SeriersStorageData: " + seriesStorageData.getDate());
|
||||
Log.debug("SeriersStorageData: " + dateFrom1970);
|
||||
|
||||
Data data = highchartsFactory.createSeriesColumnData();
|
||||
|
@ -964,44 +881,30 @@ public class StorageChartTopPanel extends SimpleContainer {
|
|||
private String retrieveYAxis(ArrayString colors) {
|
||||
switch (measure) {
|
||||
case DataVolume:
|
||||
return "[{" + " \"id\": \"" + StorageChartMeasure.DataVolume.name()
|
||||
+ "\"," + " \"labels\": {" + " \"format\": \"{value} "
|
||||
+ unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ StorageChartMeasure.DataVolume.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + StorageChartMeasure.DataVolume.name() + "\"," + " \"labels\": {"
|
||||
+ " \"format\": \"{value} " + unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }," + " \"stackLabels\": {"
|
||||
+ " \"enabled\": \"true\"," + " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " }," + " \"title\": { " + " \"text\": \""
|
||||
+ StorageChartMeasure.DataVolume.getLabel() + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }" + "}]";
|
||||
|
||||
case OperationCount:
|
||||
return "[{" + " \"id\": \""
|
||||
+ StorageChartMeasure.OperationCount.name() + "\","
|
||||
+ " \"labels\": { " + " \"format\": \"{value}\","
|
||||
+ " \"style\": { " + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " },"
|
||||
+ " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ StorageChartMeasure.OperationCount.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + StorageChartMeasure.OperationCount.name() + "\"," + " \"labels\": { "
|
||||
+ " \"format\": \"{value}\"," + " \"style\": { " + " \"color\": \"#434348\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\"," + " \"style\": {"
|
||||
+ " \"fontWeight\": \"bold\"," + " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \"" + StorageChartMeasure.OperationCount.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \"#434348\"" + " }" + " }" + "}]";
|
||||
|
||||
default:
|
||||
return "[{" + " \"id\": \"" + StorageChartMeasure.DataVolume.name()
|
||||
+ "\"," + " \"labels\": {" + " \"format\": \"{value} "
|
||||
+ unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"" + colors.get(1) + "\"" + " }"
|
||||
+ " }," + " \"stackLabels\": {" + " \"enabled\": \"true\","
|
||||
+ " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " },"
|
||||
+ " \"title\": { " + " \"text\": \""
|
||||
+ StorageChartMeasure.DataVolume.getLabel() + "\","
|
||||
+ " \"style\": {" + " \"color\": \""
|
||||
+ colors.get(1) + "\"" + " }" + " }" + "}]";
|
||||
return "[{" + " \"id\": \"" + StorageChartMeasure.DataVolume.name() + "\"," + " \"labels\": {"
|
||||
+ " \"format\": \"{value} " + unitMeasureLabel + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }," + " \"stackLabels\": {"
|
||||
+ " \"enabled\": \"true\"," + " \"style\": {" + " \"fontWeight\": \"bold\","
|
||||
+ " \"color\": \"gray\"" + " } " + " }," + " \"title\": { " + " \"text\": \""
|
||||
+ StorageChartMeasure.DataVolume.getLabel() + "\"," + " \"style\": {"
|
||||
+ " \"color\": \"#434348\"" + " }" + " }" + "}]";
|
||||
|
||||
}
|
||||
|
||||
|
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/ByteUnitMeasure.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/ChartDateTimeData.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/ChartTimeMeasure.java
Normal file → Executable file
|
@ -0,0 +1,35 @@
|
|||
package org.gcube.portlets.admin.accountingmanager.client.maindata.charts.utils;
|
||||
|
||||
import com.github.highcharts4gwt.model.array.api.ArrayString;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class ColorsPalette {
|
||||
|
||||
private String[] palette = { "#87CEEB", "#DAA520", "#3CB371", "#FF4500", "#8FBC8F", "#FF00FF", "#BDB76B", "#5F9EA0",
|
||||
"#A0522D", "#6B8E23", "#FFA07A", "#696969", "#DDA0DD", "#C71585", "#1E90FF", "#D2B48C", "#90EE90",
|
||||
"#B22222", "#00CED1", "#9400D3", "#FFDAB9", "#663399", "#FFE4C4", "#ADFF2F", "#FF0000", "#00FFFF",
|
||||
"#483D8B", "#FFFF00", "#00008B", "#FFDEAD", "#7CFC00", "#FF6347", "#AFEEEE", "#6A5ACD", "#FFFACD",
|
||||
"#0000CD", "#F5DEB3", "#00FF00", "#FF7F50", "#7FFFD4", "#7B68EE", "#FFEFD5", "#0000FF", "#DEB887",
|
||||
"#32CD32", "#FFA500", "#40E0D0", "#9370DB", "#FFE4B5", "#4169E1", "#BC8F8F", "#98FB98", "#8B0000",
|
||||
"#48D1CC", "#800080", "#EEE8AA", "#00BFFF", "#F4A460", "#00FA9A", "#800000", "#556B2F", "#8A2BE2",
|
||||
"#F0E68C", "#6495ED", "#B8860B", "#2E8B57", "#FFD700", "#66CDAA", "#9932CC", "#FFC0CB", "#87CEFA",
|
||||
"#CD853F", "#228B22", "#DC143C", "#20B2AA", "#BA55D3", "#FFB6C1", "#B0E0E6", "#D2691E", "#008000",
|
||||
"#CD5C5C", "#008B8B", "#FF00FF", "#FF69B4", "#B0C4DE", "#808000", "#006400", "#F08080", "#008080",
|
||||
"#EE82EE", "#FF1493", "#4682B4", "#8B4513", "#9ACD32", "#FA8072", "#778899", "#DA70D6", "#DB7093" };
|
||||
|
||||
public ColorsPalette() {
|
||||
|
||||
}
|
||||
|
||||
public ArrayString getColorsPalette(ArrayString colors) {
|
||||
for (int i = 0; i < palette.length; i++) {
|
||||
colors.setValue(i, palette[i]);
|
||||
}
|
||||
colors.setLength(palette.length);
|
||||
return colors;
|
||||
}
|
||||
}
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/DownloadConstants.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/JobChartMeasure.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/ServiceChartMeasure.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/SpaceChartMeasure.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/StorageChartMeasure.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/maindata/charts/utils/TimeUnitMeasure.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/menu/AccountingManagerMenu.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/menu/EmptyPanel.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/monitor/AccountingMonitor.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/monitor/MonitorRequest.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/monitor/MonitorRequestEvent.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/monitor/MonitorRequestType.java
Normal file → Executable file
3
src/main/java/org/gcube/portlets/admin/accountingmanager/client/properties/AccountingFilterProperties.java
Normal file → Executable file
|
@ -9,8 +9,7 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public interface AccountingFilterProperties extends
|
||||
|
|
8
src/main/java/org/gcube/portlets/admin/accountingmanager/client/properties/AccountingPeriodModePropertiesCombo.java
Normal file → Executable file
|
@ -9,12 +9,10 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public interface AccountingPeriodModePropertiesCombo extends
|
||||
PropertyAccess<AccountingPeriodMode> {
|
||||
public interface AccountingPeriodModePropertiesCombo extends PropertyAccess<AccountingPeriodMode> {
|
||||
|
||||
@Path("id")
|
||||
ModelKeyProvider<AccountingPeriodMode> id();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.admin.accountingmanager.client.properties;
|
||||
|
||||
import org.gcube.portlets.admin.accountingmanager.shared.data.GenresData;
|
||||
import org.gcube.portlets.admin.accountingmanager.shared.data.ContextData;
|
||||
|
||||
import com.google.gwt.editor.client.Editor.Path;
|
||||
import com.sencha.gxt.core.client.ValueProvider;
|
||||
|
@ -9,13 +9,14 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface GenresDataProperties extends PropertyAccess<GenresData> {
|
||||
@Path("genre")
|
||||
ModelKeyProvider<GenresData> id();
|
||||
public interface ContextDataProperties extends PropertyAccess<ContextData> {
|
||||
|
||||
ValueProvider<GenresData, String> label();
|
||||
@Path("contextData")
|
||||
ModelKeyProvider<ContextData> id();
|
||||
|
||||
ValueProvider<ContextData, String> label();
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package org.gcube.portlets.admin.accountingmanager.client.properties;
|
||||
|
||||
import org.gcube.portlets.admin.accountingmanager.shared.data.GenresData;
|
||||
|
||||
import com.google.gwt.editor.client.Editor.Path;
|
||||
import com.sencha.gxt.data.shared.LabelProvider;
|
||||
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||
import com.sencha.gxt.data.shared.PropertyAccess;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface GenresDataPropertiesCombo extends
|
||||
PropertyAccess<GenresData> {
|
||||
|
||||
@Path("genre")
|
||||
ModelKeyProvider<GenresData> id();
|
||||
|
||||
LabelProvider<GenresData> label();
|
||||
|
||||
}
|
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/AccountingManager.css
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/AccountingManagerCSS.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/AccountingManagerResources.java
Normal file → Executable file
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-byte_24.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-byte_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-chart-variable-axis_24.png
Normal file → Executable file
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-chart-variable-axis_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-download_24.png
Normal file → Executable file
Before Width: | Height: | Size: 869 B After Width: | Height: | Size: 869 B |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-download_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-csv_24.png
Normal file → Executable file
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-csv_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-jpg_24.png
Normal file → Executable file
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-jpg_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-json_24.png
Normal file → Executable file
Before Width: | Height: | Size: 900 B After Width: | Height: | Size: 900 B |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-json_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-pdf_24.png
Normal file → Executable file
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 866 B |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-pdf_32.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
src/main/java/org/gcube/portlets/admin/accountingmanager/client/resource/accounting-file-png_24.png
Normal file → Executable file
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 943 B |