mirror of https://github.com/status-im/consul.git
Redirect to peers.show after establishing peering
This commit is contained in:
parent
63a2d5a1f5
commit
3ba50bd5a3
|
@ -0,0 +1,12 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default class DcPeersIndexController extends Controller {
|
||||
@service router;
|
||||
|
||||
redirectToPeerShow = (modalCloseFn, peerModel) => {
|
||||
modalCloseFn?.();
|
||||
|
||||
this.router.transitionTo("dc.peers.show", peerModel.Name);
|
||||
};
|
||||
}
|
|
@ -76,7 +76,7 @@
|
|||
<Consul::Peer::Form @params={{route.params}} as |form|>
|
||||
<form.Form
|
||||
@onchange={{loader.invalidate}}
|
||||
@onsubmit={{modal.close}}
|
||||
@onsubmit={{fn this.redirectToPeerShow modal.close}}
|
||||
as |form|
|
||||
>
|
||||
{{did-insert (set this "form" form)}}
|
||||
|
|
|
@ -28,3 +28,4 @@ Feature: dc / peers / establish: Peer Establish Peering
|
|||
---
|
||||
And "[data-notification]" has the "notification-update" class
|
||||
And "[data-notification]" has the "success" class
|
||||
And the url should be /dc-1/peers/new-peer/imported-services
|
||||
|
|
Loading…
Reference in New Issue