nginx-proxy-manager/frontend/js/app/error/main.js

28 lines
625 B
JavaScript
Raw Normal View History

2018-07-08 21:22:10 -04:00
const Mn = require('backbone.marionette');
const template = require('./main.ejs');
module.exports = Mn.View.extend({
template: template,
className: 'alert alert-icon alert-warning m-5',
ui: {
retry: 'a.retry'
},
events: {
'click @ui.retry': function (e) {
e.preventDefault();
this.getOption('retry')();
}
},
templateContext: function () {
return {
message: this.getOption('message'),
code: this.getOption('code'),
retry: typeof this.getOption('retry') === 'function'
};
}
});