Skip to content

Commit

Permalink
Merge branch '7.3' of github.com:gchq/stroom
Browse files Browse the repository at this point in the history
  • Loading branch information
stroomdev66 committed Mar 26, 2024
2 parents 8eae675 + 78642ae commit 92fbe3c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ public class ProcessorPresenter extends MyPresenterWidget<ProcessorPresenter.Pro
private ButtonView removeButton;
private ButtonView permissionsButton;

private boolean allowCreate;
private boolean allowUpdate;
private boolean isAdmin;
private boolean allowEdit;

private ExpressionOperator defaultExpression;

Expand Down Expand Up @@ -105,10 +105,10 @@ public void read(final DocRef docRef, final Object document, final boolean readO
this.docRef = docRef;
processorListPresenter.read(docRef, document, readOnly);
if (document instanceof PipelineDoc) {
allowEdit = true;
allowCreate = true;
} else if (document instanceof AnalyticRuleDoc) {
processorType = ProcessorType.STREAMING_ANALYTIC;
allowEdit = true;
allowCreate = true;
}
}

Expand All @@ -128,7 +128,7 @@ public void setAllowUpdate(final boolean allowUpdate) {

private void createButtons() {
if (removeButton == null) {
if (allowEdit) {
if (allowCreate) {
addButton = processorListPresenter.getView().addButton(SvgPresets.ADD);
addButton.setTitle("Add Processor");
registerHandler(addButton.addClickHandler(event -> {
Expand All @@ -146,7 +146,7 @@ private void createButtons() {
}
}));

if (allowEdit) {
if (allowCreate) {
duplicateButton = processorListPresenter.getView().addButton(SvgPresets.COPY);
duplicateButton.setTitle("Duplicate Processor");
registerHandler(duplicateButton.addClickHandler(event -> {
Expand Down Expand Up @@ -252,7 +252,7 @@ public MultiSelectionModel<ProcessorListRow> getSelectionModel() {
}

private void addProcessor() {
if (allowEdit) {
if (allowCreate) {
edit(null, defaultExpression, null);
}
}
Expand All @@ -261,7 +261,7 @@ private void addProcessor() {
* Make a copy of the currently selected processor
*/
private void duplicateProcessor() {
if (allowEdit) {
if (allowCreate) {
// Now create the processor filter using the find stream criteria.
final ProcessorFilterRow row = (ProcessorFilterRow) selectedProcessor;
final ProcessorFilter processorFilter = row.getProcessorFilter();
Expand All @@ -280,7 +280,7 @@ private void duplicateProcessor() {
}

private void editProcessor() {
if (allowEdit && selectedProcessor != null) {
if (selectedProcessor != null) {
if (selectedProcessor instanceof ProcessorFilterRow) {
final ProcessorFilterRow processorFilterRow = (ProcessorFilterRow) selectedProcessor;
final ProcessorFilter filter = processorFilterRow.getProcessorFilter();
Expand Down
24 changes: 24 additions & 0 deletions unreleased_changes/20240326_152934_719__4183.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* Issue **#4183** : Fix processor filter edit.


```sh
# ********************************************************************************
# Issue title: Can't edit a Proc Filter from the System/Processors tab
# Issue link: https://github.com/gchq/stroom/issues/4183
# ********************************************************************************

# ONLY the top line will be included as a change entry in the CHANGELOG.
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
# 'Fixed nasty bug'.
#
# Examples of acceptable entries are:
#
#
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
#
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
#
# * Fix bug with no associated GitHub issue.
```

0 comments on commit 92fbe3c

Please sign in to comment.