mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-04-26 00:52:28 +00:00
34 lines
659 B
JavaScript
34 lines
659 B
JavaScript
'use strict';
|
|
|
|
import Mn from 'backbone.marionette';
|
|
|
|
const template = require('./main.ejs');
|
|
|
|
module.exports = Mn.View.extend({
|
|
id: 'error',
|
|
template: template,
|
|
|
|
options: {
|
|
err: null,
|
|
nice_msg: 'Unknown error'
|
|
},
|
|
|
|
templateContext: function () {
|
|
let view = this;
|
|
return {
|
|
getNiceMessage: function () {
|
|
return view.options.nice_msg;
|
|
},
|
|
|
|
getErrorMessage: function () {
|
|
return view.options.err ? view.options.err.message : '';
|
|
}
|
|
};
|
|
},
|
|
|
|
initialize: function () {
|
|
console.error(this.options.err);
|
|
}
|
|
});
|
|
|