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:
Giancarlo Panichi 2019-05-02 17:46:56 +00:00
parent 9ee552d5e2
commit d7c79991a0
10 changed files with 93 additions and 78 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <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> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/accounting-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> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -45,5 +45,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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> </classpath>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="accounting-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="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>

View File

@ -1,4 +1,8 @@
<ReleaseNotes> <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" <Changeset component="org.gcube.portlets.admin.accounting-manager.1-11-0"
date="2018-12-28"> date="2018-12-28">
<Change>Added scope selection [Ticket #10188]</Change> <Change>Added scope selection [Ticket #10188]</Change>

View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.admin</groupId> <groupId>org.gcube.portlets.admin</groupId>
<artifactId>accounting-manager</artifactId> <artifactId>accounting-manager</artifactId>
<version>1.11.0-SNAPSHOT</version> <version>1.12.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>

View File

@ -8,11 +8,11 @@
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> --> <!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
<inherits name='com.sencha.gxt.ui.GXT' /> <inherits name='com.sencha.gxt.ui.GXT' />
<!-- Add this for using GXT charts --> <!-- Add this for using GXT charts -->
<inherits name='com.sencha.gxt.chart.Chart' /> <inherits name='com.sencha.gxt.chart.Chart' />
<!-- GXT Theme --> <!-- GXT Theme -->
<!-- <inherits name='com.sencha.gxt.theme.blue.Blue' /> --> <!-- <inherits name='com.sencha.gxt.theme.blue.Blue' /> -->
<!-- <inherits name='com.sencha.gxt.theme.gray.Gray' /> --> <!-- <inherits name='com.sencha.gxt.theme.gray.Gray' /> -->
@ -44,6 +44,8 @@
name="locale" values="es" /> <set-property name="locale" value="en, it, es" name="locale" values="es" /> <set-property name="locale" value="en, it, es"
/> <set-property-fallback name="locale" value="en" /> --> /> <set-property-fallback name="locale" value="en" /> -->
<!-- <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" name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED" value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"

View File

@ -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.DndDragStartEvent.DndDragStartHandler;
import com.sencha.gxt.dnd.core.client.GridDragSource; import com.sencha.gxt.dnd.core.client.GridDragSource;
import com.sencha.gxt.dnd.core.client.GridDropTarget; 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.ButtonBar;
import com.sencha.gxt.widget.core.client.button.TextButton; import com.sencha.gxt.widget.core.client.button.TextButton;
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData; 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.SimpleContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer; 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.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;
import com.sencha.gxt.widget.core.client.event.BeforeStartEditEvent.BeforeStartEditHandler; import com.sencha.gxt.widget.core.client.event.BeforeStartEditEvent.BeforeStartEditHandler;
import com.sencha.gxt.widget.core.client.event.CancelEditEvent; import com.sencha.gxt.widget.core.client.event.CancelEditEvent;
@ -496,8 +498,10 @@ public class ActiveFiltersPanel extends SimpleContainer {
comboScope = new ComboBox<GenresData>(storeComboScope, genresDataPropertiesCombo.label()); comboScope = new ComboBox<GenresData>(storeComboScope, genresDataPropertiesCombo.label());
comboScope.setClearValueOnParseError(false); comboScope.setClearValueOnParseError(false);
comboScope.setEditable(false); comboScope.setEditable(false);
comboScope.setTriggerAction(TriggerAction.ALL); comboScope.setTriggerAction(TriggerAction.ALL);
comboScope.getListView().addStyleName(AccountingManagerResources.INSTANCE.accountingManagerCSS().getScopeListView());
addHandlersForComboScope(genresDataPropertiesCombo.label()); addHandlersForComboScope(genresDataPropertiesCombo.label());
comboScopeLabel = new FieldLabel(comboScope, "Scope"); comboScopeLabel = new FieldLabel(comboScope, "Scope");
@ -715,7 +719,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
storeComboTopFilterKey.addAll(accountingStateData.getAvailableFilterKeys()); storeComboTopFilterKey.addAll(accountingStateData.getAvailableFilterKeys());
storeComboTopFilterKey.commitChanges(); storeComboTopFilterKey.commitChanges();
ChartType chartType = accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType(); ChartType chartType = accountingStateData.getSeriesRequest().getAccountingFilterDefinition().getChartType();
switch (chartType) { switch (chartType) {
@ -746,8 +749,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
AccountingFilterBasic accountingFilterBasic = (AccountingFilterBasic) accountingStateData.getSeriesRequest() AccountingFilterBasic accountingFilterBasic = (AccountingFilterBasic) accountingStateData.getSeriesRequest()
.getAccountingFilterDefinition(); .getAccountingFilterDefinition();
if(accountingStateData.getAvailableContext().getContexts()!=null&& if (accountingStateData.getAvailableContext().getContexts() != null
!accountingStateData.getAvailableContext().getContexts().isEmpty()){ && !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts(); ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
ArrayList<GenresData> scopes = new ArrayList<>(); ArrayList<GenresData> scopes = new ArrayList<>();
@ -804,8 +807,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
storeFilter.commitChanges(); storeFilter.commitChanges();
seq = 0; seq = 0;
if(accountingStateData.getAvailableContext().getContexts()!=null&& if (accountingStateData.getAvailableContext().getContexts() != null
!accountingStateData.getAvailableContext().getContexts().isEmpty()){ && !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts(); ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
ArrayList<GenresData> scopes = new ArrayList<>(); ArrayList<GenresData> scopes = new ArrayList<>();
@ -836,7 +839,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
comboChartType.setValue(ChartType.Basic); comboChartType.setValue(ChartType.Basic);
comboScopeLabel.setVisible(true); comboScopeLabel.setVisible(true);
gridGenres.setVisible(false); gridGenres.setVisible(false);
@ -859,8 +861,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
AccountingFilterTop accountingFilterTop = (AccountingFilterTop) accountingStateData.getSeriesRequest() AccountingFilterTop accountingFilterTop = (AccountingFilterTop) accountingStateData.getSeriesRequest()
.getAccountingFilterDefinition(); .getAccountingFilterDefinition();
if(accountingStateData.getAvailableContext().getContexts()!=null&& if (accountingStateData.getAvailableContext().getContexts() != null
!accountingStateData.getAvailableContext().getContexts().isEmpty()){ && !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts(); ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
ArrayList<GenresData> scopes = new ArrayList<>(); ArrayList<GenresData> scopes = new ArrayList<>();
@ -881,9 +883,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
comboScope.reset(); comboScope.reset();
} }
if (accountingFilterTop.getFilterKey() != null) { if (accountingFilterTop.getFilterKey() != null) {
comboTopFilterKey.setValue(accountingFilterTop.getFilterKey()); comboTopFilterKey.setValue(accountingFilterTop.getFilterKey());
topNumber.setValue(accountingFilterTop.getTopNumber()); topNumber.setValue(accountingFilterTop.getTopNumber());
@ -918,8 +917,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
} else { } else {
if(accountingStateData.getAvailableContext().getContexts()!=null&& if (accountingStateData.getAvailableContext().getContexts() != null
!accountingStateData.getAvailableContext().getContexts().isEmpty()){ && !accountingStateData.getAvailableContext().getContexts().isEmpty()) {
ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts(); ArrayList<String> scopesAvailables = accountingStateData.getAvailableContext().getContexts();
ArrayList<GenresData> scopes = new ArrayList<>(); ArrayList<GenresData> scopes = new ArrayList<>();
@ -1257,7 +1256,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
Log.debug("Scope selected: " + scope); Log.debug("Scope selected: " + scope);
Boolean noContextValue = false; Boolean noContextValue = false;
if (noContextLabel != null && noContextLabel.isVisible()) { if (noContextLabel != null && noContextLabel.isVisible()) {
noContextValue = noContextYes.getValue(); noContextValue = noContextYes.getValue();
@ -1266,8 +1264,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
Log.debug("noContextValue: " + noContextValue); Log.debug("noContextValue: " + noContextValue);
if (storeFilter == null || storeFilter.size() <= 0) { if (storeFilter == null || storeFilter.size() <= 0) {
return new AccountingFilterBasic(scope, noContextValue); return new AccountingFilterBasic(scope, noContextValue);
} else { } else {
@ -1685,7 +1681,6 @@ public class ActiveFiltersPanel extends SimpleContainer {
seq = 0; seq = 0;
} }
private void addHandlersForComboScope(final LabelProvider<GenresData> labelProvider) { private void addHandlersForComboScope(final LabelProvider<GenresData> labelProvider) {
comboScope.addSelectionHandler(new SelectionHandler<GenresData>() { comboScope.addSelectionHandler(new SelectionHandler<GenresData>() {
public void onSelection(SelectionEvent<GenresData> event) { public void onSelection(SelectionEvent<GenresData> event) {
@ -1700,5 +1695,4 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
} }

View File

@ -5,3 +5,8 @@
line-height: 13px; line-height: 13px;
font-size: 11px; font-size: 11px;
} }
.scopeListView {
overflow-x: auto!important;
width: 580px!important;
}

View File

@ -16,5 +16,7 @@ public interface AccountingManagerCSS extends CssResource {
@ClassName("ribbon") @ClassName("ribbon")
public String getRibbon(); public String getRibbon();
@ClassName("scopeListView")
public String getScopeListView();
} }

View File

@ -49,6 +49,8 @@
name="locale" values="es" /> <set-property name="locale" value="en, it, es" name="locale" values="es" /> <set-property name="locale" value="en, it, es"
/> <set-property-fallback name="locale" value="en" /> --> /> <set-property-fallback name="locale" value="en" /> -->
<!-- <set-configuration-property name="CssResource.style" value="pretty"/> -->
<!-- <!--
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property <set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger" name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"

View File

@ -5,3 +5,9 @@
line-height: 13px; line-height: 13px;
font-size: 11px; font-size: 11px;
} }
.scopeListView {
overflow-x: auto!important;
width: 580px!important;
}