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

33 lines
777 B
JavaScript
Raw Normal View History

2018-07-17 18:35:49 -04:00
const Mn = require('backbone.marionette');
2018-07-18 19:47:55 -04:00
const App = require('../../../main');
2018-07-17 18:35:49 -04:00
const ItemView = require('./item');
const template = require('./main.ejs');
2018-07-08 21:22:10 -04:00
const TableBody = Mn.CollectionView.extend({
tagName: 'tbody',
childView: ItemView
});
module.exports = Mn.View.extend({
tagName: 'table',
className: 'table table-hover table-outline table-vcenter card-table',
2018-07-08 21:22:10 -04:00
template: template,
regions: {
body: {
el: 'tbody',
replaceElement: true
}
},
2018-07-17 18:35:49 -04:00
templateContext: {
2018-07-18 19:47:55 -04:00
canManage: App.Cache.User.canManage('proxy_hosts')
2018-07-17 18:35:49 -04:00
},
2018-07-08 21:22:10 -04:00
onRender: function () {
this.showChildView('body', new TableBody({
collection: this.collection
}));
}
});