mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 06:49:56 +00:00
Fixed bug 4060: The grouping isn't reset anymore when the statistic is changed
This commit is contained in:
1 parent
b1e52742be
commit
f0ab4e760f
8 files changed
+37
-34
No files matched your search
@@ -60,7 +60,7 @@
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-incremental -workDir "${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work" -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9876 -startupUrl /gwt/Home.html com.sap.sailing.gwt.home.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/EmbeddedMapAndWindChart com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.regattaoverview.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/AutoPlay.html com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.home.Home com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.regattaoverview.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.ui.RaceBoard com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-incremental -workDir "${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work" -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9876 -startupUrl /gwt/Home.html com.sap.sailing.gwt.home.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/EmbeddedMapAndWindChart com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.regattaoverview.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/AutoPlay.html com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.AutoPlay"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms1024m -Xmx3072m -Dgwt.watchFileChanges=false"/>
|
||||
</launchConfiguration>
|
||||
@@ -69,7 +69,7 @@
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto -startupUrl /gwt/Home.html com.sap.sailing.gwt.home.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.regattaoverview.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/AutoPlay.html com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.home.Home com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.regattaoverview.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto -startupUrl /gwt/Home.html com.sap.sailing.gwt.home.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.regattaoverview.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/AutoPlay.html com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.home.Home com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.regattaoverview.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false -Dgwt.watchFileChanges=false"/>
|
||||
</launchConfiguration>
|
||||
+2
-2
@@ -26,8 +26,8 @@ public interface DataMiningService extends RemoteService {
|
||||
HashSet<FunctionDTO> getStatisticsFor(DataRetrieverChainDefinitionDTO retrieverChainDefinition, String localeInfoName);
|
||||
|
||||
HashSet<AggregationProcessorDefinitionDTO> getAggregatorDefinitionsFor(FunctionDTO extractionFunction, String localeInfoName);
|
||||
|
||||
HashSet<FunctionDTO> getDimensionsFor(FunctionDTO statisticToCalculate, String localeInfoName);
|
||||
|
||||
HashSet<FunctionDTO> getDimensionsFor(DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName);
|
||||
HashMap<DataRetrieverLevelDTO, HashSet<FunctionDTO>> getDimensionsMappedByLevelFor(
|
||||
DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName);
|
||||
HashMap<DataRetrieverLevelDTO, HashSet<FunctionDTO>> getReducedDimensionsMappedByLevelFor(
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ public interface DataMiningServiceAsync {
|
||||
void getAggregatorDefinitionsFor(FunctionDTO extractionFunction, String localeInfoName,
|
||||
AsyncCallback<HashSet<AggregationProcessorDefinitionDTO>> asyncCallback);
|
||||
|
||||
void getDimensionsFor(FunctionDTO statisticToCalculate, String localeInfoName, AsyncCallback<HashSet<FunctionDTO>> callback);
|
||||
void getDimensionsFor(DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName, AsyncCallback<HashSet<FunctionDTO>> callback);
|
||||
void getDimensionsMappedByLevelFor(DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName,
|
||||
AsyncCallback<HashMap<DataRetrieverLevelDTO, HashSet<FunctionDTO>>> callback);
|
||||
public void getReducedDimensionsMappedByLevelFor(DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName,
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.sap.sse.common.settings.SerializableSettings;
|
||||
import com.sap.sse.datamining.shared.dto.StatisticQueryDefinitionDTO;
|
||||
import com.sap.sse.datamining.shared.impl.dto.FunctionDTO;
|
||||
|
||||
public interface GroupingProvider extends DataMiningComponentProvider<SerializableSettings>, StatisticChangedListener{
|
||||
public interface GroupingProvider extends DataMiningComponentProvider<SerializableSettings>, DataRetrieverChainDefinitionChangedListener {
|
||||
|
||||
public Collection<FunctionDTO> getDimensionsToGroupBy();
|
||||
public String getCustomGrouperScriptText();
|
||||
|
||||
+10
-8
@@ -145,7 +145,7 @@ public class BufferingQueryDefinitionProviderWithControls extends AbstractQueryD
|
||||
statisticProvider = new SimpleStatisticProvider(getStringMessages(), getDataMiningService(), getErrorReporter(), retrieverChainProvider);
|
||||
statisticProvider.addStatisticChangedListener(providerListener);
|
||||
|
||||
groupingProvider = new MultiDimensionalGroupingProvider(getStringMessages(), getDataMiningService(), getErrorReporter(), statisticProvider);
|
||||
groupingProvider = new MultiDimensionalGroupingProvider(getStringMessages(), getDataMiningService(), getErrorReporter(), retrieverChainProvider);
|
||||
groupingProvider.addGroupingChangedListener(providerListener);
|
||||
|
||||
SplitLayoutPanel footerPanel = new SplitLayoutPanel(15);
|
||||
@@ -305,10 +305,7 @@ public class BufferingQueryDefinitionProviderWithControls extends AbstractQueryD
|
||||
|
||||
@Override
|
||||
public void statisticChanged(FunctionDTO newStatisticToCalculate, AggregationProcessorDefinitionDTO newAggregatorDefinition) {
|
||||
if (isAwatingReload()) {
|
||||
groupingProvider.statisticChanged(statisticProvider.getStatisticToCalculate(), statisticProvider.getAggregatorDefinition());
|
||||
groupingProvider.reloadComponents();
|
||||
} else {
|
||||
if (!isAwatingReload()) {
|
||||
scheduleQueryDefinitionChanged();
|
||||
}
|
||||
}
|
||||
@@ -323,11 +320,16 @@ public class BufferingQueryDefinitionProviderWithControls extends AbstractQueryD
|
||||
@Override
|
||||
public void dataRetrieverChainDefinitionChanged(DataRetrieverChainDefinitionDTO newDataRetrieverChainDefinition) {
|
||||
if (isAwatingReload()) {
|
||||
statisticProvider.dataRetrieverChainDefinitionChanged(retrieverChainProvider.getDataRetrieverChainDefinition());
|
||||
statisticProvider.reloadComponents();
|
||||
DataRetrieverChainDefinitionDTO retrieverChainDefinition = retrieverChainProvider.getDataRetrieverChainDefinition();
|
||||
|
||||
filterSelectionProvider.dataRetrieverChainDefinitionChanged(retrieverChainProvider.getDataRetrieverChainDefinition());
|
||||
groupingProvider.dataRetrieverChainDefinitionChanged(retrieverChainDefinition);
|
||||
groupingProvider.reloadComponents();
|
||||
|
||||
filterSelectionProvider.dataRetrieverChainDefinitionChanged(retrieverChainDefinition);
|
||||
filterSelectionProvider.reloadComponents();
|
||||
|
||||
statisticProvider.dataRetrieverChainDefinitionChanged(retrieverChainDefinition);
|
||||
statisticProvider.reloadComponents();
|
||||
} else {
|
||||
scheduleQueryDefinitionChanged();
|
||||
}
|
||||
|
||||
+12
-11
@@ -19,12 +19,12 @@ import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.gwt.ui.client.shared.controls.AbstractObjectRenderer;
|
||||
import com.sap.sailing.gwt.ui.datamining.DataMiningServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.datamining.DataRetrieverChainDefinitionProvider;
|
||||
import com.sap.sailing.gwt.ui.datamining.GroupingChangedListener;
|
||||
import com.sap.sailing.gwt.ui.datamining.GroupingProvider;
|
||||
import com.sap.sailing.gwt.ui.datamining.StatisticProvider;
|
||||
import com.sap.sse.common.settings.SerializableSettings;
|
||||
import com.sap.sse.datamining.shared.dto.StatisticQueryDefinitionDTO;
|
||||
import com.sap.sse.datamining.shared.impl.dto.AggregationProcessorDefinitionDTO;
|
||||
import com.sap.sse.datamining.shared.impl.dto.DataRetrieverChainDefinitionDTO;
|
||||
import com.sap.sse.datamining.shared.impl.dto.FunctionDTO;
|
||||
import com.sap.sse.gwt.client.ErrorReporter;
|
||||
import com.sap.sse.gwt.client.shared.components.SettingsDialogComponent;
|
||||
@@ -42,16 +42,16 @@ public class MultiDimensionalGroupingProvider implements GroupingProvider {
|
||||
private final List<ValueListBox<FunctionDTO>> dimensionToGroupByBoxes;
|
||||
|
||||
private boolean isAwaitingReload;
|
||||
private FunctionDTO currentStatisticToCalculate;
|
||||
private DataRetrieverChainDefinitionDTO currentRetrieverChainDefinition;
|
||||
private final List<FunctionDTO> availableDimensions;
|
||||
|
||||
public MultiDimensionalGroupingProvider(StringMessages stringMessages, DataMiningServiceAsync dataMiningService, ErrorReporter errorReporter,
|
||||
StatisticProvider statisticProvider) {
|
||||
DataRetrieverChainDefinitionProvider retrieverChainProvider) {
|
||||
this.stringMessages = stringMessages;
|
||||
this.dataMiningService = dataMiningService;
|
||||
this.errorReporter = errorReporter;
|
||||
listeners = new HashSet<GroupingChangedListener>();
|
||||
currentStatisticToCalculate = null;
|
||||
currentRetrieverChainDefinition = null;
|
||||
availableDimensions = new ArrayList<>();
|
||||
isAwaitingReload = false;
|
||||
dimensionToGroupByBoxes = new ArrayList<ValueListBox<FunctionDTO>>();
|
||||
@@ -63,7 +63,7 @@ public class MultiDimensionalGroupingProvider implements GroupingProvider {
|
||||
|
||||
ValueListBox<FunctionDTO> firstDimensionToGroupByBox = createDimensionToGroupByBox();
|
||||
addDimensionToGroupByBoxAndUpdateAcceptableValues(firstDimensionToGroupByBox);
|
||||
statisticProvider.addStatisticChangedListener(this);
|
||||
retrieverChainProvider.addDataRetrieverChainDefinitionChangedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,10 +82,11 @@ public class MultiDimensionalGroupingProvider implements GroupingProvider {
|
||||
updateAvailableDimensions();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void statisticChanged(FunctionDTO newStatisticToCalculate, AggregationProcessorDefinitionDTO newAggregatorDefinition) {
|
||||
if (!Objects.equals(currentStatisticToCalculate, newStatisticToCalculate)) {
|
||||
currentStatisticToCalculate = newStatisticToCalculate;
|
||||
public void dataRetrieverChainDefinitionChanged(DataRetrieverChainDefinitionDTO newRetrieverChainDefinition) {
|
||||
if (!Objects.equals(currentRetrieverChainDefinition, newRetrieverChainDefinition)) {
|
||||
currentRetrieverChainDefinition = newRetrieverChainDefinition;
|
||||
if (!isAwaitingReload) {
|
||||
updateAvailableDimensions();
|
||||
}
|
||||
@@ -93,8 +94,8 @@ public class MultiDimensionalGroupingProvider implements GroupingProvider {
|
||||
}
|
||||
|
||||
private void updateAvailableDimensions() {
|
||||
if (currentStatisticToCalculate != null) {
|
||||
dataMiningService.getDimensionsFor(currentStatisticToCalculate, LocaleInfo.getCurrentLocale()
|
||||
if (currentRetrieverChainDefinition != null) {
|
||||
dataMiningService.getDimensionsFor(currentRetrieverChainDefinition, LocaleInfo.getCurrentLocale()
|
||||
.getLocaleName(), new AsyncCallback<HashSet<FunctionDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(HashSet<FunctionDTO> dimensions) {
|
||||
|
||||
+9
-9
@@ -117,17 +117,12 @@ public class DataMiningServiceImpl extends RemoteServiceServlet implements DataM
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashSet<FunctionDTO> getDimensionsFor(FunctionDTO statisticToCalculate, String localeInfoName) {
|
||||
SecurityUtils.getSubject().checkPermission(Permission.DATA_MINING.getStringPermissionForObjects(Mode.READ, statisticToCalculate.getFunctionName()));
|
||||
Class<?> baseDataType = getBaseDataType(statisticToCalculate);
|
||||
Iterable<Function<?>> dimensions = getDataMiningServer().getDimensionsFor(baseDataType);
|
||||
public HashSet<FunctionDTO> getDimensionsFor(DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName) {
|
||||
SecurityUtils.getSubject().checkPermission(Permission.DATA_MINING.getStringPermissionForObjects(Mode.READ, dataRetrieverChainDefinitionDTO.getName()));
|
||||
Class<?> retrievedType = getDataMiningServer().getDataRetrieverChainDefinitionForDTO(dataRetrieverChainDefinitionDTO).getRetrievedDataType();
|
||||
Iterable<Function<?>> dimensions = getDataMiningServer().getDimensionsFor(retrievedType);
|
||||
return functionsAsDTOs(dimensions, localeInfoName);
|
||||
}
|
||||
|
||||
private Class<?> getBaseDataType(FunctionDTO statisticToCalculate) {
|
||||
Function<?> function = getDataMiningServer().getFunctionForDTO(statisticToCalculate);
|
||||
return function.getDeclaringType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<DataRetrieverLevelDTO, HashSet<FunctionDTO>> getDimensionsMappedByLevelFor(DataRetrieverChainDefinitionDTO dataRetrieverChainDefinitionDTO, String localeInfoName) {
|
||||
@@ -186,6 +181,11 @@ public class DataMiningServiceImpl extends RemoteServiceServlet implements DataM
|
||||
Iterable<DataRetrieverChainDefinition<?, ?>> dataRetrieverChainDefinitions = (Iterable<DataRetrieverChainDefinition<?, ?>>)(Iterable<?>) getDataMiningServer().getDataRetrieverChainDefinitionsByDataType(baseDataType);
|
||||
return dataRetrieverChainDefinitionsAsDTOs(dataRetrieverChainDefinitions, localeInfoName);
|
||||
}
|
||||
|
||||
private Class<?> getBaseDataType(FunctionDTO statisticToCalculate) {
|
||||
Function<?> function = getDataMiningServer().getFunctionForDTO(statisticToCalculate);
|
||||
return function.getDeclaringType();
|
||||
}
|
||||
|
||||
private ArrayList<DataRetrieverChainDefinitionDTO> dataRetrieverChainDefinitionsAsDTOs(
|
||||
Iterable<DataRetrieverChainDefinition<?, ?>> dataRetrieverChainDefinitions, String localeInfoName) {
|
||||
|
||||
Reference in new issue
Block a user