mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-16 00:00:03 +01:00

Admins can create/edit and delete users (with all their projects etc.) Deleting a user/project/visualization automatically deletes all its belonging data (e.g. deleting a visualization deletes all plots). When creating and deleting objects the relationship is (mostly) handled server side. Only the first required relationship (e.g. when creating a new project, the project's owner is set client-side, the rest is matched on the server).
38 lines
985 B
JavaScript
38 lines
985 B
JavaScript
import Ember from 'ember';
|
|
import config from './config/environment';
|
|
|
|
const Router = Ember.Router.extend({
|
|
location: config.locationType
|
|
});
|
|
|
|
Router.map(function() {
|
|
this.route('login');
|
|
this.route('logout');
|
|
|
|
this.route('projects');
|
|
this.route('project', function() {
|
|
this.route('index', { path: '/:projectid' });
|
|
this.route('new');
|
|
this.route('edit', { path: '/edit/:projectid' });
|
|
this.route('delete', { path: '/delete/:projectid' });
|
|
});
|
|
|
|
this.route('me');
|
|
|
|
this.route('visualization', function() {
|
|
this.route('index', { path: '/:visualizationid' });
|
|
this.route('new');
|
|
this.route('edit', { path: '/edit/:visualizationid' });
|
|
this.route('delete', { path: '/delete/:visualizationid' });
|
|
});
|
|
|
|
this.route('user', function() {
|
|
this.route('edit', { path: '/edit/:userid' });
|
|
this.route('new');
|
|
this.route('delete', { path: '/delete/:userid' });
|
|
});
|
|
|
|
this.route('404', { path: '/*path' });
|
|
});
|
|
|
|
export default Router;
|