Updated to marionette 4
This commit is contained in:
@ -73,25 +73,6 @@ const App = Mn.Application.extend({
|
||||
}
|
||||
},
|
||||
|
||||
Error: function (code, message, debug) {
|
||||
let temp = Error.call(this, message);
|
||||
temp.name = this.name = 'AppError';
|
||||
this.stack = temp.stack;
|
||||
this.message = temp.message;
|
||||
this.code = code;
|
||||
this.debug = debug;
|
||||
},
|
||||
|
||||
showError: function () {
|
||||
let ErrorView = Mn.View.extend({
|
||||
tagName: 'section',
|
||||
id: 'error',
|
||||
template: _.template(i18n('main', 'unknown-error'))
|
||||
});
|
||||
|
||||
this.getRegion().show(new ErrorView());
|
||||
},
|
||||
|
||||
getParam: function (name) {
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
let url = window.location.href;
|
||||
|
@ -1,10 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
const Mn = require('../lib/marionette');
|
||||
const AppRouter = require('marionette.approuter');
|
||||
const Controller = require('./controller');
|
||||
|
||||
module.exports = Mn.AppRouter.extend({
|
||||
appRoutes: {
|
||||
module.exports = AppRouter.default.extend({
|
||||
controller: Controller,
|
||||
appRoutes: {
|
||||
users: 'showUsers',
|
||||
logout: 'logout',
|
||||
'nginx/proxy': 'showNginxProxy',
|
||||
@ -15,9 +16,5 @@ module.exports = Mn.AppRouter.extend({
|
||||
'nginx/certificates': 'showNginxCertificates',
|
||||
'audit-log': 'showAuditLog',
|
||||
'*default': 'showDashboard'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.controller = Controller;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user