refs #2251: Accounting Manager - Stacked column chart for tops

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

Added limit on filter for Top Charts


git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/accounting-manager@128101 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-04-15 08:56:24 +00:00
parent 6d164eb7f1
commit 8b71c7fdfe
1 changed files with 9 additions and 0 deletions

View File

@ -704,6 +704,15 @@ public class ActiveFiltersPanel extends SimpleContainer {
remainingFilterKeys.removeAll(removableFilterKeys);
if (remainingFilterKeys.size() > 0) {
if (comboChartType.getCurrentValue() != null
&& comboChartType.getCurrentValue().compareTo(
ChartType.Top) == 0) {
if(!(store.getAll().size()<2)){
UtilsGXT3.info("Attention", "You can add at most 2 filters for top chart!");
return;
}
}
fk = remainingFilterKeys.get(0);
seq++;
AccountingFilter newAccountingFilter = new AccountingFilter(