aboutsummaryrefslogtreecommitdiff
path: root/frontend/src
diff options
context:
space:
mode:
authorVaiTon2023-04-29 15:36:34 +0000
committerVaiTon2023-04-29 15:36:34 +0000
commitcb0faa871efecacc25ded7c2b0a0b983ca2b69ae (patch)
tree886f8a735b91a32acf83d2aa6b5042d7be59e4f6 /frontend/src
parentf636945a42e8d0d0408c2a980ca0a9b9cbbc2927 (diff)
Enable update for already created rules
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/components/panels/RulesPane.js36
1 files changed, 26 insertions, 10 deletions
diff --git a/frontend/src/components/panels/RulesPane.js b/frontend/src/components/panels/RulesPane.js
index 771c764..eb424c7 100644
--- a/frontend/src/components/panels/RulesPane.js
+++ b/frontend/src/components/panels/RulesPane.js
@@ -322,8 +322,15 @@ class RulesPane extends Component {
<td>{p["min_occurrences"]}</td>
<td>{p["max_occurrences"]}</td>
<td>{this.directions[p.direction]}</td>
- {!isUpdate && <td><ButtonField variant="blue" small rounded name="edit"
- onClick={() => this.editPattern(p)} /></td>}
+ <td>
+ <ButtonField
+ variant="blue"
+ small
+ rounded
+ name="edit"
+ onClick={() => this.editPattern(p)}
+ />
+ </td>
</tr>
);
@@ -382,16 +389,25 @@ class RulesPane extends Component {
<Col style={{ "paddingTop": "6px" }}>
<span>filters:</span>
- <NumericField name="service_port" inline value={rule.filter["service_port"]}
+ <NumericField name="service_port"
+ inline
+ value={rule.filter["service_port"]}
onChange={(v) => this.updateParam((r) => r.filter["service_port"] = v)}
- min={0} max={65565} error={this.state.ruleServicePortError}
- readonly={isUpdate} />
- <NumericField name="client_port" inline value={rule.filter["client_port"]}
+ min={0}
+ max={65565}
+ error={this.state.ruleServicePortError}
+ />
+ <NumericField name="client_port"
+ inline
+ value={rule.filter["client_port"]}
onChange={(v) => this.updateParam((r) => r.filter["client_port"] = v)}
- min={0} max={65565} error={this.state.ruleClientPortError}
- readonly={isUpdate} />
- <InputField name="client_address" value={rule.filter["client_address"]}
- error={this.state.ruleClientAddressError} readonly={isUpdate}
+ min={0}
+ max={65565}
+ error={this.state.ruleClientPortError}
+ />
+ <InputField name="client_address"
+ value={rule.filter["client_address"]}
+ error={this.state.ruleClientAddressError}
onChange={(v) => this.updateParam((r) => r.filter["client_address"] = v)} />
</Col>