ui: Ensure intention form cancel button works (#9901)

* ui: Ensure intention form cancel button works

By adding `@action` decorators to the actions called form within the
template
This commit is contained in:
John Cowen 2021-03-19 15:14:46 +00:00 committed by GitHub
parent 9fc31000f5
commit 49cf327ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

3
.changelog/9901.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fix intention form cancel button
```

View File

@ -23,6 +23,7 @@ export default class ConsulIntentionForm extends Component {
this.updateCRDManagement();
}
@action
ondelete() {
if (this.args.ondelete) {
this.args.ondelete(...arguments);
@ -31,6 +32,7 @@ export default class ConsulIntentionForm extends Component {
}
}
@action
oncancel() {
if (this.args.oncancel) {
this.args.oncancel(...arguments);
@ -39,6 +41,7 @@ export default class ConsulIntentionForm extends Component {
}
}
@action
onsubmit() {
if (this.args.onsubmit) {
this.args.onsubmit(...arguments);
@ -49,6 +52,7 @@ export default class ConsulIntentionForm extends Component {
updateCRDManagement() {
this.isManagedByCRDs = this.repo.isManagedByCRDs();
}
@action
submit(item, submit, e) {
e.preventDefault();
@ -60,6 +64,7 @@ export default class ConsulIntentionForm extends Component {
submit();
}
}
@action
createServices(item, e) {
// Services in the menus should: