aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/panels/RulesPane.js6
-rw-r--r--frontend/src/components/panels/ServicesPane.js4
2 files changed, 5 insertions, 5 deletions
diff --git a/frontend/src/components/panels/RulesPane.js b/frontend/src/components/panels/RulesPane.js
index b3d2bdd..d16748d 100644
--- a/frontend/src/components/panels/RulesPane.js
+++ b/frontend/src/components/panels/RulesPane.js
@@ -455,9 +455,9 @@ class RulesPane extends Component {
<div className="section-footer">
{<ButtonField variant="red" name="cancel" bordered onClick={this.reset} />}
- { isUpdate && <ButtonField variant="red" name="delete_rule" bordered onClick={this.deleteRule} />}
- <ButtonField variant={isUpdate ? "blue" : "green"} name={isUpdate ? "update_rule" : "add_rule"}
- bordered onClick={isUpdate ? this.updateRule : this.addRule} />
+ {isUpdate && <ButtonField variant="red" name="delete_rule" bordered onClick={this.deleteRule} />}
+ {!isUpdate && <ButtonField variant={isUpdate ? "blue" : "green"} name={isUpdate ? "update_rule" : "add_rule"}
+ bordered onClick={isUpdate ? this.updateRule : this.addRule} />}
</div>
</div>
</div>
diff --git a/frontend/src/components/panels/ServicesPane.js b/frontend/src/components/panels/ServicesPane.js
index 338ebad..958b18c 100644
--- a/frontend/src/components/panels/ServicesPane.js
+++ b/frontend/src/components/panels/ServicesPane.js
@@ -219,9 +219,9 @@ class ServicesPane extends Component {
{<ButtonField variant="red" name="cancel" bordered onClick={this.reset}/>}
{isUpdate && <ButtonField variant="red" name= "delete_service"
bordered onClick={this.deleteService}/>}
- <ButtonField variant={isUpdate ? "blue" : "green"}
+ {!isUpdate && <ButtonField variant={isUpdate ? "blue" : "green"}
name={isUpdate ? "update_service" : "add_service"}
- bordered onClick={this.updateService}/>
+ bordered onClick={this.updateService}/>}
</div>
</div>
</div>