diff --git a/ui/packages/consul-peerings/app/controllers/dc/peers/index.js b/ui/packages/consul-peerings/app/controllers/dc/peers/index.js new file mode 100644 index 0000000000..e8812e4861 --- /dev/null +++ b/ui/packages/consul-peerings/app/controllers/dc/peers/index.js @@ -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); + }; +} diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs index aa1bfee1c8..2d57dec8d2 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs @@ -76,7 +76,7 @@ {{did-insert (set this "form" form)}} diff --git a/ui/packages/consul-ui/tests/acceptance/dc/peers/establish.feature b/ui/packages/consul-ui/tests/acceptance/dc/peers/establish.feature index f037d45725..c773155aca 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/peers/establish.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/peers/establish.feature @@ -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