Skip to content
Snippets Groups Projects
Commit f78bc37b authored by Mathis Neumann's avatar Mathis Neumann
Browse files

use /architectures as alias for /deployments

parent 63c79439
No related branches found
No related tags found
No related merge requests found
import Ember from 'ember';
import EmberData from 'ember-data';
import Resolver from './resolver';
import Resolver from './resolver'; // uses ember-route-alias
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
......
import Resolver from 'ember-resolver';
import RouteAliasResolver from 'ember-route-alias/mixins/route-alias-resolver';
export default Resolver;
export default Resolver.extend(RouteAliasResolver);
......@@ -13,6 +13,8 @@ Router.map(function() {
});
});
this.alias('architectures', '/architectures', 'deployments'); // uses ember-route-alias, inherits nested routes
this.route('not-found', { path: '*path' });
});
......
......@@ -14,7 +14,10 @@ export default Ember.Route.extend({
* update whenever new records are pushed into the store.
* The controller can observe this.
* Also note that since we changed the behavior of findAll() to use the systemId
* Ember will probably also update for other systems. These are filtered in the controller
* Ember will probably also update for other systems. These are filtered in the controller.
*
* We also load all the data, so that the transformation strategies can assume that the whole
* meta model is cached. This also allowes that the architecture view is only an alias
*/
const load = (type) => this.store.findAll(type);
......@@ -44,7 +47,7 @@ export default Ember.Route.extend({
* passing object parameters to transitionTo which break with the current path variables.
* Otherwise this would use transitionTo('deployments.single.details', {...})
*/
const url = this.router.generate('deployments.single.details', {
const url = this.router.generate(`${this.get('routeName')}.details`, { // use routeName to support architectures alias
systemId: this.get('session.systemId'),
entityType,
entityId
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment