Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 1 | /// <reference path="../typings/index.d.ts" /> |
| 2 | |
| 3 | export default routesConfig; |
| 4 | |
| 5 | /** @ngInject */ |
| 6 | function routesConfig($stateProvider: angular.ui.IStateProvider, $urlRouterProvider: angular.ui.IUrlRouterProvider, $locationProvider: angular.ILocationProvider) { |
| 7 | $locationProvider.html5Mode(false).hashPrefix(''); |
| 8 | $urlRouterProvider.otherwise('/'); |
| 9 | |
| 10 | $stateProvider |
| 11 | .state('xos', { |
| 12 | abstract: true, |
| 13 | url: '/', |
| 14 | component: 'xos' |
| 15 | }) |
| 16 | .state('xos.dashboard', { |
| 17 | url: '', |
| 18 | parent: 'xos', |
| 19 | template: '<h1>Dashboard</h1>' |
| 20 | }) |
| 21 | .state('xos.instances', { |
| 22 | url: 'instances', |
| 23 | parent: 'xos', |
| 24 | template: '<h1>Instances</h1>' |
| 25 | }) |
| 26 | .state('xos.slices', { |
| 27 | url: 'slices', |
| 28 | parent: 'xos', |
| 29 | component: `xosCrud`, |
| 30 | data: { |
| 31 | title: 'Slices', |
Matteo Scandolo | 035c593 | 2016-12-14 09:55:15 -0800 | [diff] [blame] | 32 | store: 'SlicesStore', |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 33 | xosTableCfg: { |
Matteo Scandolo | 9f87f30 | 2016-12-13 18:11:10 -0800 | [diff] [blame] | 34 | columns: [ |
| 35 | { |
| 36 | label: 'Name', |
| 37 | prop: 'name' |
| 38 | }, |
| 39 | { |
| 40 | label: 'Default Isolation', |
| 41 | prop: 'default_isolation' |
| 42 | } |
| 43 | ] |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 44 | } |
| 45 | } |
| 46 | }) |
| 47 | .state('xos.nodes', { |
| 48 | url: 'nodes', |
| 49 | parent: 'xos', |
| 50 | template: '<h1>Nodes</h1>' |
| 51 | }); |
| 52 | } |