Skip to content

Commit 92fbe3c

Browse files
committed
Merge branch '7.3' of github.com:gchq/stroom
2 parents 8eae675 + 78642ae commit 92fbe3c

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

stroom-core-client/src/main/java/stroom/processor/client/presenter/ProcessorPresenter.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ public class ProcessorPresenter extends MyPresenterWidget<ProcessorPresenter.Pro
7171
private ButtonView removeButton;
7272
private ButtonView permissionsButton;
7373

74+
private boolean allowCreate;
7475
private boolean allowUpdate;
7576
private boolean isAdmin;
76-
private boolean allowEdit;
7777

7878
private ExpressionOperator defaultExpression;
7979

@@ -105,10 +105,10 @@ public void read(final DocRef docRef, final Object document, final boolean readO
105105
this.docRef = docRef;
106106
processorListPresenter.read(docRef, document, readOnly);
107107
if (document instanceof PipelineDoc) {
108-
allowEdit = true;
108+
allowCreate = true;
109109
} else if (document instanceof AnalyticRuleDoc) {
110110
processorType = ProcessorType.STREAMING_ANALYTIC;
111-
allowEdit = true;
111+
allowCreate = true;
112112
}
113113
}
114114

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

129129
private void createButtons() {
130130
if (removeButton == null) {
131-
if (allowEdit) {
131+
if (allowCreate) {
132132
addButton = processorListPresenter.getView().addButton(SvgPresets.ADD);
133133
addButton.setTitle("Add Processor");
134134
registerHandler(addButton.addClickHandler(event -> {
@@ -146,7 +146,7 @@ private void createButtons() {
146146
}
147147
}));
148148

149-
if (allowEdit) {
149+
if (allowCreate) {
150150
duplicateButton = processorListPresenter.getView().addButton(SvgPresets.COPY);
151151
duplicateButton.setTitle("Duplicate Processor");
152152
registerHandler(duplicateButton.addClickHandler(event -> {
@@ -252,7 +252,7 @@ public MultiSelectionModel<ProcessorListRow> getSelectionModel() {
252252
}
253253

254254
private void addProcessor() {
255-
if (allowEdit) {
255+
if (allowCreate) {
256256
edit(null, defaultExpression, null);
257257
}
258258
}
@@ -261,7 +261,7 @@ private void addProcessor() {
261261
* Make a copy of the currently selected processor
262262
*/
263263
private void duplicateProcessor() {
264-
if (allowEdit) {
264+
if (allowCreate) {
265265
// Now create the processor filter using the find stream criteria.
266266
final ProcessorFilterRow row = (ProcessorFilterRow) selectedProcessor;
267267
final ProcessorFilter processorFilter = row.getProcessorFilter();
@@ -280,7 +280,7 @@ private void duplicateProcessor() {
280280
}
281281

282282
private void editProcessor() {
283-
if (allowEdit && selectedProcessor != null) {
283+
if (selectedProcessor != null) {
284284
if (selectedProcessor instanceof ProcessorFilterRow) {
285285
final ProcessorFilterRow processorFilterRow = (ProcessorFilterRow) selectedProcessor;
286286
final ProcessorFilter filter = processorFilterRow.getProcessorFilter();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
* Issue **#4183** : Fix processor filter edit.
2+
3+
4+
```sh
5+
# ********************************************************************************
6+
# Issue title: Can't edit a Proc Filter from the System/Processors tab
7+
# Issue link: https://github.com/gchq/stroom/issues/4183
8+
# ********************************************************************************
9+
10+
# ONLY the top line will be included as a change entry in the CHANGELOG.
11+
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
12+
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
13+
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
14+
# 'Fixed nasty bug'.
15+
#
16+
# Examples of acceptable entries are:
17+
#
18+
#
19+
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
20+
#
21+
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
22+
#
23+
# * Fix bug with no associated GitHub issue.
24+
```

0 commit comments

Comments
 (0)