mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-09 08:56:23 -04:00
www/nginx: Load logs for single server on demand (#2711)
Loading of the logging page takes very look if many servers are configured. With this change the single log files for a server are loaded only after clicking the down error for the server entry in the log view.
This commit is contained in:
parent
47988bc563
commit
5fbb28375b
3 changed files with 8 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
|
@ -38,7 +38,6 @@ let LogCategoryList = Backbone.View.extend({
|
|||
logview: this.logview
|
||||
});
|
||||
this.$el.append(logList.$el);
|
||||
files.fetch();
|
||||
},
|
||||
|
||||
render_global_error_tab: function () {
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@ let TabLogList = Backbone.View.extend({
|
|||
tagName: 'li',
|
||||
events: {
|
||||
"click .mainentry": "mainMenuClick",
|
||||
"click .menuEntry": "menuEntryClick"
|
||||
"click .menuEntry": "menuEntryClick",
|
||||
"click .dropdown-toggle": "menuDropdownClick"
|
||||
},
|
||||
|
||||
initialize: function(data) {
|
||||
this.listenTo(this.collection, "update", this.render);
|
||||
this.logType = data.logType;
|
||||
this.logview = data.logview;
|
||||
this.render();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
|
@ -36,11 +38,14 @@ let TabLogList = Backbone.View.extend({
|
|||
},
|
||||
mainMenuClick: function () {
|
||||
if (this.collection.models[0]) {
|
||||
this.handleElementClick(this.model.get('id'), this.collection.models[0].get('number'));
|
||||
this.handleElementClick(this.model.get('id'), -1);
|
||||
$(`#tab_${this.model.get('id')} li`).removeClass('active');
|
||||
$(`#subtab_item_${this.model.get('id')}_${this.collection.models[0].get('number')}`).parent().addClass('active');
|
||||
}
|
||||
},
|
||||
menuDropdownClick: function (event) {
|
||||
this.collection.fetch();
|
||||
},
|
||||
menuEntryClick: function (event) {
|
||||
this.handleElementClick(event.target.dataset['modelUuid'], event.target.dataset['modelFileno']);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue