mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-10 04:51:07 +00:00
bug4686: Added a busy indicator overlay while applying a query
This commit is contained in:
1 parent
8ca4fc2c02
commit
c2346f9c8d
6 files changed
+61
-20
No files matched your search
@@ -160,7 +160,7 @@ input.magnifier {
|
||||
font-size: 20px;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
padding: 49px 0 0 80px;
|
||||
padding: 25px 0 0 80px;
|
||||
width: 400px;
|
||||
color: #7c7c7c;
|
||||
background: url(images/important-message.png) left center no-repeat;
|
||||
@@ -172,7 +172,7 @@ input.magnifier {
|
||||
font-size: 20px;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
padding: 49px 0 0 40px;
|
||||
padding: 25px 0 0 40px;
|
||||
width: 400px;
|
||||
color: #7c7c7c;
|
||||
background: url(images/busy_indicator_circle.gif) left center no-repeat;
|
||||
@@ -346,4 +346,23 @@ input.magnifier {
|
||||
|
||||
.floatRight {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.whiteGlass {
|
||||
background-color: #fff;
|
||||
opacity: 0.6;
|
||||
z-index: 19;
|
||||
}
|
||||
|
||||
.applyQueryBusyMessage {
|
||||
font-family: 'Open Sans',Arial,Verdana,sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
height: 70px;
|
||||
margin: auto auto;
|
||||
padding: 25px 0 0 40px;
|
||||
width: 200px;
|
||||
color: #7c7c7c;
|
||||
background: url(images/busy_indicator_circle.gif) left center no-repeat;
|
||||
z-index: 20;
|
||||
}
|
||||
+1
@@ -86,5 +86,6 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages {
|
||||
String discardChangesChangeLossStrategyTooltip();
|
||||
String keepChangesChangeLossStrategyName();
|
||||
String keepChangesChangeLossStrategyTooltip();
|
||||
String applyingQuery();
|
||||
|
||||
}
|
||||
+2
-1
@@ -69,4 +69,5 @@ askChangeLossStrategyTooltip=Asks for the strategy to use with a dialog
|
||||
discardChangesChangeLossStrategyName=Discard Changes
|
||||
discardChangesChangeLossStrategyTooltip=Display the query overwriting the current selection
|
||||
keepChangesChangeLossStrategyName=Keep Changes
|
||||
keepChangesChangeLossStrategyTooltip=Keep current selection preventing the query to be displayed
|
||||
keepChangesChangeLossStrategyTooltip=Keep current selection preventing the query to be displayed
|
||||
applyingQuery=Applying Query
|
||||
+2
-1
@@ -72,4 +72,5 @@ askChangeLossStrategyTooltip=Erfragen der zu verwendenden Strategie mit einem Di
|
||||
discardChangesChangeLossStrategyName=Änderungen Verwerfen
|
||||
discardChangesChangeLossStrategyTooltip=Anzeigen der Query, wodurch die aktuelle Selektion überschrieben wird
|
||||
keepChangesChangeLossStrategyName=Änderungen Behalten
|
||||
keepChangesChangeLossStrategyTooltip=Aktuelle Selektion zu behalten, wodurch die Query nicht angezeigt wird
|
||||
keepChangesChangeLossStrategyTooltip=Aktuelle Selektion zu behalten, wodurch die Query nicht angezeigt wird
|
||||
applyingQuery=Query wird angezeigt
|
||||
+1
-2
@@ -342,9 +342,8 @@ public class HierarchicalDimensionListFilterSelectionProvider extends AbstractDa
|
||||
updateDimensionFilterSelectionProviders(dimensionsToUpdate.iterator(), null, () -> {
|
||||
mainPanel.setWidgetHidden(filterSelectionPresenterContainer, getSelection().isEmpty());
|
||||
filterSelectionPresenter.selectionChanged();
|
||||
callback.accept(messages);
|
||||
});
|
||||
|
||||
callback.accept(messages);
|
||||
}
|
||||
|
||||
private class InnerSelectionCallback implements Consumer<Iterable<String>> {
|
||||
|
||||
+34
-14
@@ -23,6 +23,9 @@ import com.google.gwt.user.client.ui.DialogBox;
|
||||
import com.google.gwt.user.client.ui.DockLayoutPanel;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.LayoutPanel;
|
||||
import com.google.gwt.user.client.ui.Panel;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.google.gwt.user.client.ui.SplitLayoutPanel;
|
||||
import com.google.gwt.user.client.ui.ToggleButton;
|
||||
import com.google.gwt.user.client.ui.ValueListBox;
|
||||
@@ -70,7 +73,7 @@ public class QueryDefinitionProviderWithControls extends AbstractQueryDefinition
|
||||
private static final double FooterPanelHeight = 50;
|
||||
private static final int SplitterSize = 10;
|
||||
|
||||
private final DockLayoutPanel mainPanel;
|
||||
private final Panel mainPanel;
|
||||
private final FlowPanel controlsPanel;
|
||||
private final ToggleButton queryDefinitionViewerToggleButton;
|
||||
private final QueryDefinitionViewer queryDefinitionViewer;
|
||||
@@ -86,6 +89,8 @@ public class QueryDefinitionProviderWithControls extends AbstractQueryDefinition
|
||||
private final SplitLayoutPanel filterSplitPanel;
|
||||
private final FilterSelectionProvider filterSelectionProvider;
|
||||
|
||||
private final Panel applyQueryBusyIndicator;
|
||||
|
||||
private final DialogBox confirmChangeLossDialog;
|
||||
private StatisticQueryDefinitionDTO queryDefinitionToBeApplied;
|
||||
private boolean queryDefinitionChanged;
|
||||
@@ -157,15 +162,26 @@ public class QueryDefinitionProviderWithControls extends AbstractQueryDefinition
|
||||
filterSplitPanel.addEast(queryDefinitionViewer.getEntryWidget(), 600);
|
||||
filterSplitPanel.setWidgetHidden(queryDefinitionViewer.getEntryWidget(), true);
|
||||
filterSplitPanel.add(filterSelectionProvider.getEntryWidget());
|
||||
|
||||
Widget glass = new SimplePanel();
|
||||
glass.addStyleName("whiteGlass");
|
||||
HTML labeledBusyIndicator = new HTML(SafeHtmlUtils.fromString(getDataMiningStringMessages().applyingQuery()));
|
||||
labeledBusyIndicator.setStyleName("applyQueryBusyMessage");
|
||||
applyQueryBusyIndicator = new LayoutPanel();
|
||||
applyQueryBusyIndicator.add(glass);
|
||||
applyQueryBusyIndicator.add(labeledBusyIndicator);
|
||||
|
||||
SplitLayoutPanel headerPanel = new SplitLayoutPanel(SplitterSize);
|
||||
headerPanel.addStyleName("dataMiningMarginBase");
|
||||
headerPanel.addWest(statisticProvider.getEntryWidget(), 800);
|
||||
headerPanel.add(controlsPanel);
|
||||
|
||||
mainPanel = new DockLayoutPanel(Unit.PX);
|
||||
mainPanel.addNorth(headerPanel, HeaderPanelHeight);
|
||||
mainPanel.add(filterSplitPanel);
|
||||
DockLayoutPanel contentPanel = new DockLayoutPanel(Unit.PX);
|
||||
contentPanel.addNorth(headerPanel, HeaderPanelHeight);
|
||||
contentPanel.add(filterSplitPanel);
|
||||
|
||||
mainPanel = new LayoutPanel();
|
||||
mainPanel.add(contentPanel);
|
||||
|
||||
// Storing the different component providers in a list
|
||||
providers = new ArrayList<>();
|
||||
@@ -402,14 +418,22 @@ public class QueryDefinitionProviderWithControls extends AbstractQueryDefinition
|
||||
for (ApplyCallback callback : callbacks) {
|
||||
callback.isArmed = true;
|
||||
}
|
||||
} else {
|
||||
if (!errorMessages.isEmpty()) {
|
||||
showErrorWhileApplyingQueryDialog(errorMessages, retrieverChainName);
|
||||
if (applyQueryBusyIndicator.getParent() == null) {
|
||||
mainPanel.add(applyQueryBusyIndicator);
|
||||
}
|
||||
setBlockChangeNotification(false);
|
||||
queryDefinitionChanged = false;
|
||||
} else {
|
||||
applyQueryDefinitionCompleted(errorMessages, retrieverChainName);
|
||||
}
|
||||
}
|
||||
|
||||
private void applyQueryDefinitionCompleted(Collection<String> errorMessages, String retrieverChainName) {
|
||||
if (!errorMessages.isEmpty()) {
|
||||
showErrorWhileApplyingQueryDialog(errorMessages, retrieverChainName);
|
||||
}
|
||||
applyQueryBusyIndicator.removeFromParent();
|
||||
setBlockChangeNotification(false);
|
||||
queryDefinitionChanged = false;
|
||||
}
|
||||
|
||||
private void showErrorWhileApplyingQueryDialog(Iterable<String> errorMessages, String retrieverChainName) {
|
||||
StringMessages stringMessages = getDataMiningStringMessages();
|
||||
@@ -540,11 +564,7 @@ public class QueryDefinitionProviderWithControls extends AbstractQueryDefinition
|
||||
Util.addAll(messages, allMessages);
|
||||
callbacks.remove(this);
|
||||
if (isArmed && callbacks.isEmpty()) {
|
||||
if (!allMessages.isEmpty()) {
|
||||
showErrorWhileApplyingQueryDialog(allMessages, retrieverChainName);
|
||||
}
|
||||
setBlockChangeNotification(false);
|
||||
queryDefinitionChanged = false;
|
||||
applyQueryDefinitionCompleted(allMessages, retrieverChainName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user