Refs #10188:AccountingManager - Add a way to esplicitly set the scope in accounting-analytics
https://support.d4science.org/issues/10188 Fixed list view width git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/accounting-manager@179232 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9ee552d5e2
commit
d7c79991a0
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/accounting-manager-1.11.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/accounting-manager-1.12.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.11.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/accounting-manager-1.12.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.11.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/accounting-manager-1.12.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="accounting-manager-1.11.0-SNAPSHOT">
|
||||
<wb-module deploy-name="accounting-manager-1.12.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"/>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-12-0"
|
||||
date="2019-05-02">
|
||||
<Change>Fixed scope list view width</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-11-0"
|
||||
date="2018-12-28">
|
||||
<Change>Added scope selection [Ticket #10188]</Change>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>accounting-manager</artifactId>
|
||||
<version>1.11.0-SNAPSHOT</version>
|
||||
<version>1.12.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
|
||||
|
||||
<!-- Add this for using GXT charts -->
|
||||
<inherits name='com.sencha.gxt.chart.Chart' />
|
||||
|
||||
|
||||
|
||||
<!-- GXT Theme -->
|
||||
<!-- <inherits name='com.sencha.gxt.theme.blue.Blue' /> -->
|
||||
<!-- <inherits name='com.sencha.gxt.theme.gray.Gray' /> -->
|
||||
|
@ -44,6 +44,8 @@
|
|||
name="locale" values="es" /> <set-property name="locale" value="en, it, es"
|
||||
/> <set-property-fallback name="locale" value="en" /> -->
|
||||
|
||||
<!-- <set-configuration-property name="CssResource.style" value="pretty"/> -->
|
||||
|
||||
<!-- <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"
|
||||
|
|
|
@ -63,6 +63,7 @@ import com.sencha.gxt.dnd.core.client.DndDragStartEvent;
|
|||
import com.sencha.gxt.dnd.core.client.DndDragStartEvent.DndDragStartHandler;
|
||||
import com.sencha.gxt.dnd.core.client.GridDragSource;
|
||||
import com.sencha.gxt.dnd.core.client.GridDropTarget;
|
||||
import com.sencha.gxt.widget.core.client.ListView;
|
||||
import com.sencha.gxt.widget.core.client.button.ButtonBar;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
|
@ -73,6 +74,7 @@ import com.sencha.gxt.widget.core.client.container.MarginData;
|
|||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeShowEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeStartEditEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeStartEditEvent.BeforeStartEditHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.CancelEditEvent;
|
||||
|
@ -489,15 +491,17 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
addHandlersForComboChartType(comboChartTypeLabelProvider);
|
||||
comboChartTypeLabel = new FieldLabel(comboChartType, "Chart");
|
||||
|
||||
//TODO ScopeCombo for Top and Basic
|
||||
// TODO ScopeCombo for Top and Basic
|
||||
GenresDataPropertiesCombo genresDataPropertiesCombo = GWT.create(GenresDataPropertiesCombo.class);
|
||||
|
||||
storeComboScope = new ListStore<GenresData>(genresDataPropertiesCombo.id());
|
||||
comboScope = new ComboBox<GenresData>(storeComboScope, genresDataPropertiesCombo.label());
|
||||
comboScope.setClearValueOnParseError(false);
|
||||
comboScope.setEditable(false);
|
||||
|
||||
comboScope.setTriggerAction(TriggerAction.ALL);
|
||||
|
||||
comboScope.getListView().addStyleName(AccountingManagerResources.INSTANCE.accountingManagerCSS().getScopeListView());
|
||||
|
||||
addHandlersForComboScope(genresDataPropertiesCombo.label());
|
||||
|
||||
comboScopeLabel = new FieldLabel(comboScope, "Scope");
|
||||
|
@ -714,7 +718,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
storeComboTopFilterKey.clear();
|
||||
storeComboTopFilterKey.addAll(accountingStateData.getAvailableFilterKeys());
|
||||
storeComboTopFilterKey.commitChanges();
|
||||
|
||||
|
||||
ChartType chartType = accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType();
|
||||
|
||||
|
@ -745,29 +748,29 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
.getSeriesRequest().getAccountingFilterDefinition() instanceof AccountingFilterBasic) {
|
||||
AccountingFilterBasic accountingFilterBasic = (AccountingFilterBasic) accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition();
|
||||
|
||||
if(accountingStateData.getAvailableContext().getContexts()!=null&&
|
||||
!accountingStateData.getAvailableContext().getContexts().isEmpty()){
|
||||
|
||||
ArrayList<String> scopesAvailables=accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes=new ArrayList<>();
|
||||
for(String scopeAvailable:scopesAvailables){
|
||||
|
||||
if (accountingStateData.getAvailableContext().getContexts() != null
|
||||
&& !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
|
||||
|
||||
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes = new ArrayList<>();
|
||||
for (String scopeAvailable : scopesAvailables) {
|
||||
scopes.add(new GenresData(scopeAvailable));
|
||||
}
|
||||
storeComboScope.clear();
|
||||
storeComboScope.addAll(scopes);
|
||||
storeComboScope.commitChanges();
|
||||
if(accountingFilterBasic.getScope()!=null&&!accountingFilterBasic.getScope().isEmpty()){
|
||||
if (accountingFilterBasic.getScope() != null && !accountingFilterBasic.getScope().isEmpty()) {
|
||||
comboScope.setValue(new GenresData(accountingFilterBasic.getScope()));
|
||||
} else {
|
||||
comboScope.setValue(storeComboScope.get(0));
|
||||
}
|
||||
} else{
|
||||
} else {
|
||||
storeComboScope.clear();
|
||||
storeComboScope.commitChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (accountingFilterBasic.getFilters() != null) {
|
||||
List<AccountingFilter> filters = accountingFilterBasic.getFilters();
|
||||
storeFilter.clear();
|
||||
|
@ -804,26 +807,26 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
storeFilter.commitChanges();
|
||||
seq = 0;
|
||||
|
||||
if(accountingStateData.getAvailableContext().getContexts()!=null&&
|
||||
!accountingStateData.getAvailableContext().getContexts().isEmpty()){
|
||||
|
||||
ArrayList<String> scopesAvailables=accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes=new ArrayList<>();
|
||||
for(String scopeAvailable:scopesAvailables){
|
||||
if (accountingStateData.getAvailableContext().getContexts() != null
|
||||
&& !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
|
||||
|
||||
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes = new ArrayList<>();
|
||||
for (String scopeAvailable : scopesAvailables) {
|
||||
scopes.add(new GenresData(scopeAvailable));
|
||||
}
|
||||
|
||||
|
||||
storeComboScope.clear();
|
||||
storeComboScope.addAll(scopes);
|
||||
storeComboScope.commitChanges();
|
||||
comboScope.setValue(storeComboScope.get(0));
|
||||
|
||||
} else{
|
||||
|
||||
} else {
|
||||
storeComboScope.clear();
|
||||
storeComboScope.commitChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (accountingStateData.getRootScope()) {
|
||||
noContextToggle.reset();
|
||||
noContextNo.setValue(true);
|
||||
|
@ -835,8 +838,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
comboChartType.setValue(ChartType.Basic);
|
||||
comboScopeLabel.setVisible(true);
|
||||
gridGenres.setVisible(false);
|
||||
|
@ -858,32 +860,29 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
.getSeriesRequest().getAccountingFilterDefinition() instanceof AccountingFilterTop) {
|
||||
AccountingFilterTop accountingFilterTop = (AccountingFilterTop) accountingStateData.getSeriesRequest()
|
||||
.getAccountingFilterDefinition();
|
||||
|
||||
if(accountingStateData.getAvailableContext().getContexts()!=null&&
|
||||
!accountingStateData.getAvailableContext().getContexts().isEmpty()){
|
||||
|
||||
ArrayList<String> scopesAvailables=accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes=new ArrayList<>();
|
||||
for(String scopeAvailable:scopesAvailables){
|
||||
|
||||
if (accountingStateData.getAvailableContext().getContexts() != null
|
||||
&& !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
|
||||
|
||||
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes = new ArrayList<>();
|
||||
for (String scopeAvailable : scopesAvailables) {
|
||||
scopes.add(new GenresData(scopeAvailable));
|
||||
}
|
||||
storeComboScope.clear();
|
||||
storeComboScope.addAll(scopes);
|
||||
storeComboScope.commitChanges();
|
||||
if(accountingFilterTop.getScope()!=null&&!accountingFilterTop.getScope().isEmpty()){
|
||||
if (accountingFilterTop.getScope() != null && !accountingFilterTop.getScope().isEmpty()) {
|
||||
comboScope.setValue(new GenresData(accountingFilterTop.getScope()));
|
||||
} else {
|
||||
comboScope.setValue(storeComboScope.get(0));
|
||||
}
|
||||
} else{
|
||||
} else {
|
||||
storeComboScope.clear();
|
||||
storeComboScope.commitChanges();
|
||||
comboScope.reset();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (accountingFilterTop.getFilterKey() != null) {
|
||||
comboTopFilterKey.setValue(accountingFilterTop.getFilterKey());
|
||||
topNumber.setValue(accountingFilterTop.getTopNumber());
|
||||
|
@ -917,26 +916,26 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
seq = 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(accountingStateData.getAvailableContext().getContexts()!=null&&
|
||||
!accountingStateData.getAvailableContext().getContexts().isEmpty()){
|
||||
|
||||
ArrayList<String> scopesAvailables=accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes=new ArrayList<>();
|
||||
for(String scopeAvailable:scopesAvailables){
|
||||
|
||||
if (accountingStateData.getAvailableContext().getContexts() != null
|
||||
&& !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
|
||||
|
||||
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
|
||||
ArrayList<GenresData> scopes = new ArrayList<>();
|
||||
for (String scopeAvailable : scopesAvailables) {
|
||||
scopes.add(new GenresData(scopeAvailable));
|
||||
}
|
||||
storeComboScope.clear();
|
||||
storeComboScope.addAll(scopes);
|
||||
storeComboScope.commitChanges();
|
||||
comboScope.setValue(storeComboScope.get(0));
|
||||
|
||||
} else{
|
||||
|
||||
} else {
|
||||
storeComboScope.clear();
|
||||
storeComboScope.commitChanges();
|
||||
comboScope.reset();
|
||||
}
|
||||
|
||||
|
||||
comboScopeLabel.setVisible(true);
|
||||
comboTopFilterKey.reset();
|
||||
showOthersToggle.reset();
|
||||
|
@ -1248,16 +1247,15 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
|
||||
// TODO
|
||||
private AccountingFilterDefinition getActiveFiltersForBasic() {
|
||||
String scope=null;
|
||||
if(comboScopeLabel!=null&&comboScopeLabel.isVisible()){
|
||||
GenresData genresData=comboScope.getCurrentValue();
|
||||
if(genresData!=null){
|
||||
scope=genresData.getLabel();
|
||||
String scope = null;
|
||||
if (comboScopeLabel != null && comboScopeLabel.isVisible()) {
|
||||
GenresData genresData = comboScope.getCurrentValue();
|
||||
if (genresData != null) {
|
||||
scope = genresData.getLabel();
|
||||
}
|
||||
}
|
||||
Log.debug("Scope selected: "+scope);
|
||||
|
||||
|
||||
}
|
||||
Log.debug("Scope selected: " + scope);
|
||||
|
||||
Boolean noContextValue = false;
|
||||
if (noContextLabel != null && noContextLabel.isVisible()) {
|
||||
noContextValue = noContextYes.getValue();
|
||||
|
@ -1266,8 +1264,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
}
|
||||
Log.debug("noContextValue: " + noContextValue);
|
||||
|
||||
|
||||
|
||||
if (storeFilter == null || storeFilter.size() <= 0) {
|
||||
return new AccountingFilterBasic(scope, noContextValue);
|
||||
} else {
|
||||
|
@ -1289,15 +1285,15 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
private AccountingFilterDefinition getActiveFiltersForTop() {
|
||||
String scope=null;
|
||||
if(comboScopeLabel!=null&&comboScopeLabel.isVisible()){
|
||||
GenresData genresData=comboScope.getCurrentValue();
|
||||
if(genresData!=null){
|
||||
scope=genresData.getLabel();
|
||||
String scope = null;
|
||||
if (comboScopeLabel != null && comboScopeLabel.isVisible()) {
|
||||
GenresData genresData = comboScope.getCurrentValue();
|
||||
if (genresData != null) {
|
||||
scope = genresData.getLabel();
|
||||
}
|
||||
}
|
||||
Log.debug("Scope selected: "+scope);
|
||||
|
||||
}
|
||||
Log.debug("Scope selected: " + scope);
|
||||
|
||||
Boolean showOthersValue = showOthersYes.getValue();
|
||||
Integer topN = topNumber.getCurrentValue();
|
||||
FilterKey filterKey = comboTopFilterKey.getCurrentValue();
|
||||
|
@ -1685,7 +1681,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
seq = 0;
|
||||
}
|
||||
|
||||
|
||||
private void addHandlersForComboScope(final LabelProvider<GenresData> labelProvider) {
|
||||
comboScope.addSelectionHandler(new SelectionHandler<GenresData>() {
|
||||
public void onSelection(SelectionEvent<GenresData> event) {
|
||||
|
@ -1697,8 +1692,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
|
|||
}
|
||||
|
||||
private void updateScope(GenresData selectedFilterKey) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,3 +5,8 @@
|
|||
line-height: 13px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.scopeListView {
|
||||
overflow-x: auto!important;
|
||||
width: 580px!important;
|
||||
}
|
||||
|
|
|
@ -16,5 +16,7 @@ public interface AccountingManagerCSS extends CssResource {
|
|||
@ClassName("ribbon")
|
||||
public String getRibbon();
|
||||
|
||||
|
||||
@ClassName("scopeListView")
|
||||
public String getScopeListView();
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
name="locale" values="es" /> <set-property name="locale" value="en, it, es"
|
||||
/> <set-property-fallback name="locale" value="en" /> -->
|
||||
|
||||
<!-- <set-configuration-property name="CssResource.style" value="pretty"/> -->
|
||||
|
||||
<!--
|
||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||
|
|
|
@ -5,3 +5,9 @@
|
|||
line-height: 13px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.scopeListView {
|
||||
overflow-x: auto!important;
|
||||
width: 580px!important;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue