open-consul/ui-v2/app/routes/dc/kv/folder.js
John Cowen c0abe1e406
ui: Outlet Loading (#8779)
Moves all Route/model hook loading to use Outlet components which listen on route change.
2020-10-01 09:33:22 +01:00

13 lines
325 B
JavaScript

import Route from './index';
export default Route.extend({
templateName: 'dc/kv/index',
beforeModel: function(transition) {
this._super(...arguments);
const params = this.paramsFor('dc.kv.folder');
if (params.key === '/' || params.key == null) {
return this.transitionTo('dc.kv.index');
}
},
});