Rename `peers.edit` to `peers.show`

pull/14947/head
Michael Klein 2 years ago
parent d6f0fe9f6e
commit 35c7cc8ec1

@ -9,7 +9,7 @@
{{#if (can "delete peer" item=item)}} {{#if (can "delete peer" item=item)}}
<a <a
data-test-peer={{item.Name}} data-test-peer={{item.Name}}
href={{href-to "dc.peers.edit" item.Name}} href={{href-to "dc.peers.show" item.Name}}
> >
{{item.Name}} {{item.Name}}
</a> </a>
@ -60,7 +60,7 @@
{{/if}} {{/if}}
<Action <Action
data-test-edit-action data-test-edit-action
@href={{href-to "dc.peers.edit" item.Name}} @href={{href-to "dc.peers.show" item.Name}}
> >
<BlockSlot @name="label"> <BlockSlot @name="label">
View View

@ -6,6 +6,6 @@ export default class DcPeersEditIndexController extends Controller {
@service router; @service router;
@action transitionToImported() { @action transitionToImported() {
this.router.replaceWith("dc.peers.edit.imported"); this.router.replaceWith("dc.peers.show.imported");
} }
} }

@ -22,7 +22,7 @@
}, },
}, },
}, },
edit: { show: {
_options: { _options: {
path: "/:name", path: "/:name",
}, },

@ -22,18 +22,18 @@ export default class PeeringsProvider extends Component {
let tabs = [ let tabs = [
{ {
label: 'Imported Services', label: 'Imported Services',
route: 'dc.peers.edit.imported', route: 'dc.peers.show.imported',
tooltip: this.intl.t('routes.dc.peers.index.detail.imported.tab-tooltip', { name }), tooltip: this.intl.t('routes.dc.peers.index.detail.imported.tab-tooltip', { name }),
}, },
{ {
label: 'Exported Services', label: 'Exported Services',
route: 'dc.peers.edit.exported', route: 'dc.peers.show.exported',
tooltip: this.intl.t('routes.dc.peers.index.detail.exported.tab-tooltip', { name }), tooltip: this.intl.t('routes.dc.peers.index.detail.exported.tab-tooltip', { name }),
}, },
]; ];
if (isReceiver) { if (isReceiver) {
tabs = [...tabs, { label: 'Addresses', route: 'dc.peers.edit.addresses' }]; tabs = [...tabs, { label: 'Addresses', route: 'dc.peers.show.addresses' }];
} }
return tabs.map((tab) => new Tab({ ...tab, currentRouteName: router.currentRouteName, owner })); return tabs.map((tab) => new Tab({ ...tab, currentRouteName: router.currentRouteName, owner }));

Loading…
Cancel
Save