Skip to content

Commit

Permalink
Merge commit 'ce4ec5f3c364f712d99d5dc25acfe6e49dc0fbd3' of github.com…
Browse files Browse the repository at this point in the history
…:gchq/stroom into 7.6
  • Loading branch information
stroomdev66 committed Sep 25, 2024
2 parents 902ff4d + ce4ec5f commit 0f7fc2f
Show file tree
Hide file tree
Showing 269 changed files with 1,300 additions and 1,119 deletions.
4 changes: 2 additions & 2 deletions stroom-app-gwt/src/main/java/stroom/app/client/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package stroom.app.client;

import stroom.app.client.gin.AppGinjectorUser;
import stroom.dispatch.client.QuietTaskListener;
import stroom.dispatch.client.QuietTaskMonitorFactory;
import stroom.preferences.client.UserPreferencesManager;

import com.google.gwt.core.client.EntryPoint;
Expand Down Expand Up @@ -86,7 +86,7 @@ public void onModuleLoad() {
// Remember how places were used in case we want to use URLs and history
// at some point.
// ginjector.getPlaceManager().revealCurrentPlace();
}, new QuietTaskListener());
}, new QuietTaskMonitorFactory());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
import stroom.iframe.client.presenter.IFramePresenter.IFrameView;
import stroom.iframe.client.view.IFrameContentViewImpl;
import stroom.iframe.client.view.IFrameViewImpl;
import stroom.main.client.presenter.GlobalKeyHandlerImpl;
import stroom.main.client.presenter.MainPresenter;
import stroom.main.client.presenter.MainPresenter.MainProxy;
import stroom.main.client.presenter.MainPresenter.MainView;
Expand All @@ -90,6 +91,7 @@
import stroom.widget.tooltip.client.presenter.TooltipPresenter;
import stroom.widget.tooltip.client.presenter.TooltipPresenter.TooltipView;
import stroom.widget.tooltip.client.view.TooltipViewImpl;
import stroom.widget.util.client.GlobalKeyHandler;

import com.google.inject.Singleton;
import com.google.web.bindery.event.shared.EventBus;
Expand All @@ -111,6 +113,7 @@ protected void configure() {
bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class);
bind(RootPresenter.class).asEagerSingleton();
bind(PlaceManager.class).to(InactivePlaceManager.class).in(Singleton.class);
bind(GlobalKeyHandler.class).to(GlobalKeyHandlerImpl.class).in(Singleton.class);
// bind(PlaceManager.class).to(AppPlaceManager.class).in(Singleton.class);
// install(new DefaultModule(AppPlaceManager.class));

Expand Down
12 changes: 12 additions & 0 deletions stroom-app/src/main/resources/ui/noauth/swagger/stroom.json
Original file line number Diff line number Diff line change
Expand Up @@ -12145,6 +12145,10 @@
"type" : "integer",
"format" : "int64"
},
"hashAlgorithm" : {
"type" : "string",
"enum" : [ "SHA3_256", "SHA2_256", "BCRYPT", "ARGON_2" ]
},
"name" : {
"type" : "string"
},
Expand Down Expand Up @@ -15097,6 +15101,10 @@
"type" : "integer",
"format" : "int64"
},
"hashAlgorithm" : {
"type" : "string",
"enum" : [ "SHA3_256", "SHA2_256", "BCRYPT", "ARGON_2" ]
},
"id" : {
"type" : "integer",
"format" : "int32"
Expand Down Expand Up @@ -20628,6 +20636,10 @@
"authErrorMessage" : {
"type" : "string"
},
"defaultApiKeyHashAlgorithm" : {
"type" : "string",
"enum" : [ "SHA3_256", "SHA2_256", "BCRYPT", "ARGON_2" ]
},
"defaultMaxResults" : {
"type" : "string"
},
Expand Down
21 changes: 21 additions & 0 deletions stroom-app/src/main/resources/ui/noauth/swagger/stroom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8472,6 +8472,13 @@ components:
expireTimeMs:
type: integer
format: int64
hashAlgorithm:
type: string
enum:
- SHA3_256
- SHA2_256
- BCRYPT
- ARGON_2
name:
type: string
owner:
Expand Down Expand Up @@ -11438,6 +11445,13 @@ components:
expireTimeMs:
type: integer
format: int64
hashAlgorithm:
type: string
enum:
- SHA3_256
- SHA2_256
- BCRYPT
- ARGON_2
id:
type: integer
format: int32
Expand Down Expand Up @@ -16036,6 +16050,13 @@ components:
$ref: '#/components/schemas/AnalyticUiDefaultConfig'
authErrorMessage:
type: string
defaultApiKeyHashAlgorithm:
type: string
enum:
- SHA3_256
- SHA2_256
- BCRYPT
- ARGON_2
defaultMaxResults:
type: string
helpSubPathDocumentation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package com.gwtplatform.mvp.client;

import stroom.task.client.DefaultTaskListener;
import stroom.task.client.HasTaskHandlerFactory;
import stroom.task.client.TaskHandler;
import stroom.task.client.TaskHandlerFactory;
import stroom.task.client.DefaultTaskMonitorFactory;
import stroom.task.client.HasTaskMonitorFactory;
import stroom.task.client.TaskMonitor;
import stroom.task.client.TaskMonitorFactory;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.user.client.ui.RequiresResize;
Expand All @@ -31,9 +31,9 @@

public abstract class MyPresenter<T_VIEW extends View, T_PROXY extends Proxy<?>>
extends Presenter<T_VIEW, T_PROXY>
implements Layer, TaskHandlerFactory, HasTaskHandlerFactory {
implements Layer, TaskMonitorFactory, HasTaskMonitorFactory {

private TaskHandlerFactory taskHandlerFactory = new DefaultTaskListener(this);
private TaskMonitorFactory taskMonitorFactory = new DefaultTaskMonitorFactory(this);
private boolean firstReveal = true;

public MyPresenter(final EventBus eventBus, final T_VIEW view, final T_PROXY proxy) {
Expand Down Expand Up @@ -90,12 +90,12 @@ protected final <H extends EventHandler> void addRegisteredHandlerToSource(final
}

@Override
public void setTaskHandlerFactory(final TaskHandlerFactory taskHandlerFactory) {
this.taskHandlerFactory = taskHandlerFactory;
public void setTaskMonitorFactory(final TaskMonitorFactory taskMonitorFactory) {
this.taskMonitorFactory = taskMonitorFactory;
}

@Override
public TaskHandler createTaskHandler() {
return taskHandlerFactory.createTaskHandler();
public TaskMonitor createTaskMonitor() {
return taskMonitorFactory.createTaskMonitor();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package com.gwtplatform.mvp.client;

import stroom.task.client.DefaultTaskListener;
import stroom.task.client.HasTaskHandlerFactory;
import stroom.task.client.TaskHandler;
import stroom.task.client.TaskHandlerFactory;
import stroom.task.client.DefaultTaskMonitorFactory;
import stroom.task.client.HasTaskMonitorFactory;
import stroom.task.client.TaskMonitor;
import stroom.task.client.TaskMonitorFactory;

import com.google.gwt.user.client.ui.RequiresResize;
import com.google.web.bindery.event.shared.Event.Type;
Expand All @@ -28,9 +28,9 @@

public class MyPresenterWidget<V extends View>
extends PresenterWidget<V>
implements Layer, TaskHandlerFactory, HasTaskHandlerFactory {
implements Layer, TaskMonitorFactory, HasTaskMonitorFactory {

private TaskHandlerFactory taskHandlerFactory = new DefaultTaskListener(this);
private TaskMonitorFactory taskMonitorFactory = new DefaultTaskMonitorFactory(this);

public MyPresenterWidget(final EventBus eventBus, final V view) {
super(eventBus, view);
Expand Down Expand Up @@ -64,12 +64,12 @@ protected final <H> HandlerRegistration addHandlerToSource(final Type<H> type, f
}

@Override
public void setTaskHandlerFactory(final TaskHandlerFactory taskHandlerFactory) {
this.taskHandlerFactory = taskHandlerFactory;
public void setTaskMonitorFactory(final TaskMonitorFactory taskMonitorFactory) {
this.taskMonitorFactory = taskMonitorFactory;
}

@Override
public TaskHandler createTaskHandler() {
return taskHandlerFactory.createTaskHandler();
public TaskMonitor createTaskMonitor() {
return taskMonitorFactory.createTaskMonitor();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import stroom.data.client.event.SelectAllEvent;
import stroom.hyperlink.client.Hyperlink;
import stroom.hyperlink.client.HyperlinkEvent;
import stroom.task.client.DefaultTaskListener;
import stroom.task.client.DefaultTaskMonitorFactory;
import stroom.util.shared.GwtNullSafe;
import stroom.widget.util.client.AbstractSelectionEventManager;
import stroom.widget.util.client.DoubleSelectTester;
Expand Down Expand Up @@ -93,7 +93,7 @@ protected void onMouseDown(final CellPreviewEvent<T> event) {
if (hyperlink != null) {
consumed = true;
// TODO : Don't use the default task listener here.
HyperlinkEvent.fire(dataGrid, hyperlink, new DefaultTaskListener(this));
HyperlinkEvent.fire(dataGrid, hyperlink, new DefaultTaskMonitorFactory(this));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

import stroom.data.pager.client.RefreshButton;
import stroom.svg.client.Preset;
import stroom.task.client.TaskHandlerFactory;
import stroom.task.client.TaskMonitorFactory;
import stroom.widget.button.client.ButtonView;
import stroom.widget.button.client.ToggleButtonView;

import com.google.gwt.user.cellview.client.AbstractHasData;
import com.gwtplatform.mvp.client.View;

public interface PagerView extends View, TaskHandlerFactory {
public interface PagerView extends View, TaskMonitorFactory {

ButtonView addButton(Preset preset);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import stroom.data.pager.client.RefreshButton;
import stroom.svg.client.Preset;
import stroom.task.client.Task;
import stroom.task.client.TaskHandler;
import stroom.task.client.TaskMonitor;
import stroom.widget.button.client.ButtonPanel;
import stroom.widget.button.client.ButtonView;
import stroom.widget.button.client.ToggleButtonView;
Expand Down Expand Up @@ -95,8 +95,8 @@ public void setPagerVisible(final boolean visible) {
}

@Override
public TaskHandler createTaskHandler() {
return new TaskHandler() {
public TaskMonitor createTaskMonitor() {
return new TaskMonitor() {
@Override
public void onStart(final Task task) {
taskCount++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@

import stroom.data.pager.client.RefreshButton;
import stroom.svg.client.Preset;
import stroom.task.client.TaskHandlerFactory;
import stroom.task.client.TaskMonitorFactory;
import stroom.widget.button.client.ButtonView;
import stroom.widget.button.client.ToggleButtonView;

import com.google.gwt.user.cellview.client.AbstractHasData;
import com.gwtplatform.mvp.client.View;

public interface PagerViewWithHeading extends View, TaskHandlerFactory {
public interface PagerViewWithHeading extends View, TaskMonitorFactory {

/**
* Set a form group label for the pager view. If not set it won't take up any
* space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import stroom.data.pager.client.RefreshButton;
import stroom.svg.client.Preset;
import stroom.task.client.Task;
import stroom.task.client.TaskHandler;
import stroom.task.client.TaskMonitor;
import stroom.widget.button.client.ButtonPanel;
import stroom.widget.button.client.ButtonView;
import stroom.widget.button.client.ToggleButtonView;
Expand Down Expand Up @@ -109,8 +109,8 @@ public void setPagerVisible(final boolean visible) {
}

@Override
public TaskHandler createTaskHandler() {
return new TaskHandler() {
public TaskMonitor createTaskMonitor() {
return new TaskMonitor() {
@Override
public void onStart(final Task task) {
taskCount++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import stroom.svg.shared.SvgImage;
import stroom.task.client.Task;
import stroom.task.client.TaskHandler;
import stroom.task.client.TaskHandlerFactory;
import stroom.task.client.TaskMonitor;
import stroom.task.client.TaskMonitorFactory;
import stroom.widget.button.client.SvgButton;

import com.google.gwt.core.client.GWT;
Expand All @@ -16,7 +16,7 @@

public class RefreshButton
extends Composite
implements TaskHandlerFactory {
implements TaskMonitorFactory {

private final SvgButton button;
private int taskCount;
Expand Down Expand Up @@ -81,20 +81,16 @@ public void setAllowPause(final boolean allowPause) {
} else {
button.removeStyleName("allowPause");
}

update();
}

public void setPaused(final boolean paused) {
this.paused = paused;
if (paused) {
button.setTitle("Resume Update");
button.addStyleName("paused");
} else {
button.setTitle("Pause Update");
button.removeStyleName("paused");
}

update();
}

Expand All @@ -107,8 +103,8 @@ public HandlerRegistration addClickHandler(ClickHandler handler) {
}

@Override
public TaskHandler createTaskHandler() {
return new TaskHandler() {
public TaskMonitor createTaskMonitor() {
return new TaskMonitor() {
@Override
public void onStart(final Task task) {
taskCount++;
Expand Down Expand Up @@ -143,6 +139,16 @@ public void updateRefreshState() {
private void update() {
if (allowPause) {
setEnabled(paused || refreshing || taskCount > 0);

if (paused) {
button.setTitle("Resume Update");
} else if (refreshing || taskCount > 0) {
button.setTitle("Pause Update");
} else {
button.setTitle("Not Updating");
}
} else {
button.setTitle("Refresh");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package stroom.editor.client.presenter;

import stroom.util.shared.GwtNullSafe;
import stroom.widget.util.client.GlobalKeyHandler;

import com.google.gwt.core.client.Scheduler;
import com.google.gwt.event.logical.shared.HasValueChangeHandlers;
Expand All @@ -25,7 +26,8 @@ public abstract class AbstractEditorPresenter<V extends BaseEditorView>
AbstractEditorPresenter(final EventBus eventBus,
final V view,
final DelegatingAceCompleter delegatingAceCompleter,
final CurrentPreferences currentPreferences) {
final CurrentPreferences currentPreferences,
final GlobalKeyHandler globalKeyHandler) {
super(eventBus, view);
this.delegatingAceCompleter = delegatingAceCompleter;

Expand All @@ -35,11 +37,8 @@ public abstract class AbstractEditorPresenter<V extends BaseEditorView>

// registerHandler(view.addMouseDownHandler(event -> contextMenu.hide()));

registerHandler(view.addKeyDownHandler(event -> {
if (event.isAltKeyDown() || event.isControlKeyDown()) {
eventBus.fireEvent(event);
}
}));
registerHandler(view.addKeyDownHandler(globalKeyHandler::onKeyDown));
registerHandler(view.addKeyUpHandler(globalKeyHandler::onKeyUp));
registerHandler(eventBus.addHandler(
ChangeCurrentPreferencesEvent.getType(),
this::handlePreferencesChange));
Expand Down
Loading

0 comments on commit 0f7fc2f

Please sign in to comment.