Skip to content

Commit 27a2f21

Browse files
committed
Merge branch '7.8' of github.com:gchq/stroom
2 parents f81efba + 09fa868 commit 27a2f21

File tree

77 files changed

+551
-13596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+551
-13596
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ DO NOT ADD CHANGES HERE - ADD THEM USING log_change.sh
1313
~~~
1414

1515

16+
* Issue **#4855** : Fix Plan B session state range.
17+
18+
* Improve log message when proxy HTTP forwarding fails. Now includes the time taken and the bytes sent.
19+
20+
* Issue **#4858** : Fix Plan B query field error.
21+
22+
* Issue **#4859** : Fix query on open for embedded queries.
23+
24+
* Issue **#4861** : Allow embedded queries to have a set page size.
25+
26+
* Issue **#4748** : Add user group icon to API key page.
27+
28+
* Issue **#4806** : Add filter/group/sort indicators to hidden field menu items.
29+
30+
1631
## [v7.9-beta.8] - 2025-04-09
1732

1833
* Uplift BCrypt lib to 0.4.3.

replay_pid79302.log

-13,377
This file was deleted.

stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AbstractScheduledQueryExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public List<UserDependency> getUserDependencies(final UserRef userRef) {
307307
return new UserDependency(userRef, details, executionSchedule.getOwningDoc());
308308
})
309309
// .filter(userDependency ->
310-
// GwtNullSafe.getOrElse(
310+
// NullSafe.getOrElse(
311311
// userDependency.getDocRef(),
312312
// docRef -> securityContext.hasDocumentPermission(docRef, DocumentPermission.VIEW),
313313
// true))

stroom-app/src/main/resources/ui/css/theme-root.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
/* Visualisations */
288288
--vis__background-color: var(--dashboard-panel__background-color);
289289
--vis-axis__color: rgba(0,0,0,0.54);
290-
--vis- GwtNullSafe: rgba(0,0,0,0.87);
290+
--vis-text__color: rgba(0,0,0,0.87);
291291
--vis-text__color--faint: rgba(0,0,0,0.12);
292292
--vis-icon__color: rgba(0,0,0,0.6);
293293
--vis-icon__color--hover: rgba(0,0,0,0.87);

stroom-core-client-widget/src/main/java/stroom/cell/info/client/HoverActionMenuCell.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ public void render(final Context context, final T value, final SafeHtmlBuilder s
163163
menuItems.get(0) instanceof final MenuItem menuItem &&
164164
menuItem.getCommand() != null) {
165165
// Single item with a command so no menu popup needed
166-
sb.append(template.divWithToolTip(NullSafe
167-
.getOrElse(menuItem.getText(), SafeHtml::asString, ""), icon));
166+
final SafeHtml tooltip = NullSafe.getOrElse(menuItem, MenuItem::getTooltip, menuItem.getText());
167+
sb.append(template.divWithTitle(tooltip.asString(), icon));
168168
} else {
169169
// Build the menu popup
170-
sb.append(template.divWithToolTip("Actions...", icon));
170+
sb.append(template.divWithTitle("Actions...", icon));
171171
}
172172

173173
sb.appendHtmlConstant("</div>");
@@ -192,6 +192,6 @@ interface Template extends SafeHtmlTemplates {
192192
SafeHtml div(String className, SafeHtml content);
193193

194194
@Template("<div title=\"{0}\">{1}</div>")
195-
SafeHtml divWithToolTip(String title, SafeHtml content);
195+
SafeHtml divWithTitle(String title, SafeHtml content);
196196
}
197197
}

stroom-core-client-widget/src/main/java/stroom/data/grid/client/HeadingBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public Header<SafeHtml> build() {
8686

8787
builder.appendHtmlConstant(">")
8888
.append(headingText);
89-
// if (GwtNullSafe.isBlankString(headingText)) {
89+
// if (NullSafe.isBlankString(headingText)) {
9090
// builder.append(SafeHtmlUtils.EMPTY_SAFE_HTML);
9191
// } else {
9292
// builder.appendEscaped(headingText);

stroom-core-client-widget/src/main/java/stroom/item/client/SelectionList.java

+5
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ public void init(final SelectionListModel<T, I> model) {
258258
refresh(false, false);
259259
}
260260

261+
public void refresh() {
262+
quickFilter.clear();
263+
refresh(true, true);
264+
}
265+
261266
public void destroy() {
262267
if (model != null) {
263268
lastFilter = null;

stroom-core-client-widget/src/main/java/stroom/item/client/SelectionPopup.java

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public void init(final SelectionListModel<T, I> model) {
5151
selectionList.init(model);
5252
}
5353

54+
public void refresh() {
55+
selectionList.refresh();
56+
}
57+
5458
public MultiSelectionModel<I> getSelectionModel() {
5559
return selectionList.getSelectionModel();
5660
}

stroom-core-client-widget/src/main/java/stroom/widget/form/client/FormGroup.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void setHelpText(final String helpText) {
155155
// // This allows us to have hard coded help in the ui.xml but override it
156156
// // using helpText, or set helpText back to null to use the hardcoded
157157
// // ui.xml content
158-
// if (GwtNullSafe.isBlankString(helpText) && helpHTML != null) {
158+
// if (NullSafe.isBlankString(helpText) && helpHTML != null) {
159159
// this.helpText = helpHTML.getHTML();
160160
// }
161161
updateHelpButton();
@@ -212,19 +212,19 @@ private void updateHelpButton() {
212212
// }
213213
updateLabelPanel();
214214

215-
// if (GwtNullSafe.isNonBlankString(plainHelpText)) {
215+
// if (NullSafe.isNonBlankString(plainHelpText)) {
216216
// haveHelpText = true;
217217
// // Escape any html in there
218218
// effectiveHelpText = SafeHtmlUtils.fromString(plainHelpText);
219219
// }
220220
//
221-
// if (GwtNullSafe.isBlankString(helpText) && helpHTML != null) {
221+
// if (NullSafe.isBlankString(helpText) && helpHTML != null) {
222222
// effectiveHelpText = SafeHtmlUtils.fromTrustedString(helpHTML.getHTML());
223223
// haveHelpText = true;
224224
// } else {
225225
//
226226
// }
227-
// if (!GwtNullSafe.isBlankString(getHelpText())) {
227+
// if (!NullSafe.isBlankString(getHelpText())) {
228228
// helpButton.setHelpContent(SafeHtmlUtils.fromSafeConstant(getHelpText()));
229229
// } else {
230230
// helpButton.setHelpContent(null);
@@ -282,7 +282,7 @@ private void addHelpHtml(final HelpHTML helpHTML) {
282282

283283
updateHelpButton();
284284
// // helpText trumps helpHTML
285-
// if (GwtNullSafe.isBlankString(helpText)) {
285+
// if (NullSafe.isBlankString(helpText)) {
286286
// this.helpText = this.helpHTML.getHTML();
287287
// }
288288
}

stroom-core-client-widget/src/main/java/stroom/widget/menu/client/presenter/IconMenuItem.java

+5-18
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,22 @@ public class IconMenuItem extends MenuItem {
3131
private final SvgImage disabledIcon;
3232
private final IconColour iconColour;
3333
private final boolean highlight;
34-
public final String tooltip;
3534

3635
protected IconMenuItem(final int priority,
3736
final SvgImage enabledIcon,
3837
final SvgImage disabledIcon,
3938
final IconColour iconColour,
4039
final SafeHtml text,
40+
final SafeHtml tooltip,
4141
final Action action,
4242
final boolean enabled,
4343
final Command command,
44-
final boolean highlight,
45-
final String tooltip) {
46-
super(priority, text, action, enabled, command);
44+
final boolean highlight) {
45+
super(priority, text, tooltip, action, enabled, command);
4746
this.enabledIcon = enabledIcon;
4847
this.disabledIcon = disabledIcon;
4948
this.iconColour = iconColour;
5049
this.highlight = highlight;
51-
this.tooltip = tooltip;
5250
}
5351

5452
public SvgImage getEnabledIcon() {
@@ -67,13 +65,6 @@ public boolean isHighlight() {
6765
return highlight;
6866
}
6967

70-
public String getTooltip() {
71-
return NullSafe.string(tooltip);
72-
}
73-
74-
// --------------------------------------------------------------------------------
75-
76-
7768
protected abstract static class AbstractBuilder<T extends IconMenuItem, B extends AbstractBuilder<T, ?>>
7869
extends MenuItem.AbstractBuilder<T, B> {
7970

@@ -117,10 +108,6 @@ public B highlight(final boolean highlight) {
117108
public abstract T build();
118109
}
119110

120-
121-
// --------------------------------------------------------------------------------
122-
123-
124111
public static class Builder
125112
extends AbstractBuilder<IconMenuItem, Builder> {
126113

@@ -139,11 +126,11 @@ public IconMenuItem build() {
139126
disabledIcon,
140127
iconColour,
141128
text,
129+
tooltip,
142130
action,
143131
enabled,
144132
command,
145-
highlight,
146-
tooltip);
133+
highlight);
147134
}
148135
}
149136
}

stroom-core-client-widget/src/main/java/stroom/widget/menu/client/presenter/IconParentMenuItem.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ protected IconParentMenuItem(final int priority,
3535
final SvgImage disabledIcon,
3636
final IconColour iconColour,
3737
final SafeHtml text,
38+
final SafeHtml tooltip,
3839
final Action action,
3940
final boolean enabled,
4041
final boolean highlight,
41-
final String tooltip,
4242
final Future<List<Item>> children) {
4343
super(priority,
4444
enabledIcon,
4545
disabledIcon,
4646
iconColour,
4747
text,
48+
tooltip,
4849
action,
4950
enabled,
5051
null,
51-
highlight,
52-
tooltip);
52+
highlight);
5353
this.children = children;
5454
}
5555

@@ -89,10 +89,10 @@ public IconParentMenuItem build() {
8989
disabledIcon,
9090
iconColour,
9191
text,
92+
tooltip,
9293
action,
9394
enabled,
9495
highlight,
95-
tooltip,
9696
children);
9797
}
9898
}

stroom-core-client-widget/src/main/java/stroom/widget/menu/client/presenter/InfoMenuItem.java

+1-8
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,11 @@
88

99
public class InfoMenuItem extends MenuItem {
1010

11-
private final SafeHtml text;
12-
1311
public InfoMenuItem(final SafeHtml text,
1412
final Action action,
1513
final Boolean enabled,
1614
final Command command) {
17-
super(0, SafeHtmlUtils.EMPTY_SAFE_HTML, action, enabled, command);
18-
this.text = text;
19-
}
20-
21-
public SafeHtml getText() {
22-
return text;
15+
super(0, text, SafeHtmlUtils.EMPTY_SAFE_HTML, action, enabled, command);
2316
}
2417

2518
public static Builder builder() {

stroom-core-client-widget/src/main/java/stroom/widget/menu/client/presenter/KeyedParentMenuItem.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ public class KeyedParentMenuItem extends IconMenuItem implements HasChildren {
3737
final SvgImage disabledIcon,
3838
final IconColour iconColour,
3939
final SafeHtml text,
40+
final SafeHtml tooltip,
4041
final Action action,
4142
final boolean enabled,
4243
final MenuItems menuItems,
43-
final MenuKey menuKey,
44-
final String tooltip) {
44+
final MenuKey menuKey) {
4545
super(priority,
4646
enabledIcon,
4747
disabledIcon,
4848
iconColour,
4949
text,
50+
tooltip,
5051
action,
5152
enabled,
5253
null,
53-
false,
54-
tooltip);
54+
false);
5555
this.menuItems = menuItems;
5656
this.menuKey = menuKey;
5757
}
@@ -110,11 +110,11 @@ public KeyedParentMenuItem build() {
110110
disabledIcon,
111111
iconColour,
112112
text,
113+
tooltip,
113114
action,
114115
enabled,
115116
menuItems,
116-
menuKey,
117-
tooltip);
117+
menuKey);
118118
}
119119
}
120120
}

stroom-core-client-widget/src/main/java/stroom/widget/menu/client/presenter/MenuItem.java

+13-6
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@
2525
public abstract class MenuItem extends Item {
2626

2727
private final SafeHtml text;
28+
private final SafeHtml tooltip;
2829
private final Action action;
2930
private final Command command;
3031
private final boolean enabled;
3132

3233
protected MenuItem(final int priority,
3334
final SafeHtml text,
35+
final SafeHtml tooltip,
3436
final Action action,
3537
final boolean enabled,
3638
final Command command) {
3739
super(priority);
3840
this.text = text;
41+
this.tooltip = tooltip;
3942
this.action = action;
4043
this.enabled = enabled;
4144
this.command = command;
@@ -45,6 +48,10 @@ public SafeHtml getText() {
4548
return text;
4649
}
4750

51+
public SafeHtml getTooltip() {
52+
return tooltip;
53+
}
54+
4855
public Action getAction() {
4956
return action;
5057
}
@@ -65,10 +72,10 @@ protected abstract static class AbstractBuilder<T extends MenuItem, B extends Me
6572
extends Item.AbstractBuilder<T, B> {
6673

6774
protected SafeHtml text;
75+
protected SafeHtml tooltip;
6876
protected Action action;
6977
protected Command command;
7078
protected boolean enabled = true;
71-
protected String tooltip;
7279

7380
public B text(final SafeHtml text) {
7481
this.text = text;
@@ -80,6 +87,11 @@ public B text(final String text) {
8087
return self();
8188
}
8289

90+
public B tooltip(final String tooltip) {
91+
this.tooltip = SafeHtmlUtil.from(tooltip);
92+
return self();
93+
}
94+
8395
public B action(final Action action) {
8496
this.action = action;
8597
return self();
@@ -95,11 +107,6 @@ public B enabled(final boolean enabled) {
95107
return self();
96108
}
97109

98-
public B tooltip(final String tooltip) {
99-
this.tooltip = tooltip;
100-
return self();
101-
}
102-
103110
protected abstract B self();
104111

105112
public abstract T build();

stroom-core-client-widget/src/main/java/stroom/widget/menu/client/presenter/MenuItemCell.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import stroom.svg.client.IconColour;
2020
import stroom.svg.shared.SvgImage;
21+
import stroom.util.shared.NullSafe;
2122
import stroom.widget.util.client.KeyBinding;
2223
import stroom.widget.util.client.SvgImageUtil;
2324

@@ -195,7 +196,8 @@ public void render(final MenuItemCell cell,
195196
className += value.isEnabled()
196197
? ""
197198
: " menuItem-disabled";
198-
sb.append(TEMPLATE.outer(className, value.getTooltip(), inner.toSafeHtml()));
199+
final SafeHtml tooltip = NullSafe.getOrElse(value, MenuItem::getTooltip, value.getText());
200+
sb.append(TEMPLATE.outer(className, tooltip.asString(), inner.toSafeHtml()));
199201
}
200202
}
201203

0 commit comments

Comments
 (0)