2017-07-16 10:51:54 +02:00
|
|
|
import { Level } from '@nsalaun/ng-logger';
|
|
|
|
|
2017-07-07 22:36:04 +02:00
|
|
|
var operationsTmpl = require('./operations/operations.html');
|
|
|
|
var accountsTmpl = require('./accounts/accounts.html');
|
|
|
|
var schedulerTmpl = require('./scheduler/scheduler.html');
|
|
|
|
|
2017-07-16 13:56:49 +02:00
|
|
|
export default function AppConfig($uiRouterProvider) {
|
|
|
|
$uiRouterProvider.trace.enable(1);
|
|
|
|
|
2017-07-07 22:31:49 +02:00
|
|
|
// Defining template and controller in function of route.
|
2017-07-16 13:56:49 +02:00
|
|
|
const $stateRegistry = $uiRouterProvider.stateRegistry;
|
|
|
|
|
|
|
|
$stateRegistry.register({
|
|
|
|
name: 'operations',
|
|
|
|
url: '/account/:accountId/operations',
|
|
|
|
templateUrl: operationsTmpl,
|
|
|
|
controller: 'OperationController',
|
|
|
|
controllerAs: 'operationsCtrl'
|
|
|
|
});
|
|
|
|
|
|
|
|
$stateRegistry.register({
|
|
|
|
name: 'scheduler',
|
|
|
|
url: '/account/:accountId/scheduler',
|
|
|
|
templateUrl: schedulerTmpl,
|
|
|
|
controller: 'SchedulerController',
|
|
|
|
controllerAs: 'schedulerCtrl'
|
|
|
|
});
|
|
|
|
|
|
|
|
$stateRegistry.register({
|
|
|
|
name: 'accounts',
|
|
|
|
url: '/accounts',
|
|
|
|
templateUrl: accountsTmpl,
|
|
|
|
controller: 'AccountController',
|
|
|
|
controllerAs: 'accountsCtrl'
|
|
|
|
});
|
|
|
|
|
|
|
|
const $urlService = $uiRouterProvider.urlService;
|
|
|
|
$urlService.rules.otherwise({
|
|
|
|
state: 'accounts'
|
|
|
|
});
|
2017-07-07 22:31:49 +02:00
|
|
|
};
|
2017-07-16 10:37:52 +02:00
|
|
|
|
|
|
|
export const ApiBaseURL = "http://localhost:8080/api";
|
2017-07-16 10:51:54 +02:00
|
|
|
export const LogLevel = Level.LOG;
|