mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
system: add local settings tab (read only) to logging #6830
This commit is contained in:
parent
0e63a68955
commit
ed1bd094bf
1
plist
1
plist
@ -414,6 +414,7 @@
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/Syslog/Api/SettingsController.php
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/Syslog/IndexController.php
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/Syslog/forms/dialogDestination.xml
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/Syslog/forms/local.xml
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/Api/ServiceController.php
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/Api/SettingsController.php
|
||||
/usr/local/opnsense/mvc/app/controllers/OPNsense/TrafficShaper/IndexController.php
|
||||
|
||||
@ -42,8 +42,12 @@ class IndexController extends \OPNsense\Base\IndexController
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
// local settings form
|
||||
$this->view->localForm = $this->getForm('local');
|
||||
|
||||
// link destination dialog
|
||||
$this->view->formDialogDestination = $this->getForm("dialogDestination");
|
||||
|
||||
// choose template
|
||||
$this->view->pick('OPNsense/Syslog/index');
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
<form>
|
||||
<field>
|
||||
<id>syslog.general.loglocal</id>
|
||||
<label>Enable local logging</label>
|
||||
<type>checkbox</type>
|
||||
<help>Enable writing log files to the local disk.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>syslog.general.maxpreserve</id>
|
||||
<label>Maximum preserved files</label>
|
||||
<type>text</type>
|
||||
<help>Number of logs to preserve. When no maximum file size is offered or the logs are smaller than the the size requested, this equals the number of days.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>syslog.general.maxfilesize</id>
|
||||
<label>Maximum file size (MB)</label>
|
||||
<type>text</type>
|
||||
<help>Maximum file size per log file. When set and a log file exceeds the amount specified, it will be rotated.</help>
|
||||
</field>
|
||||
</form>
|
||||
@ -1,5 +1,5 @@
|
||||
{#
|
||||
# Copyright (c) 2019 Deciso B.V.
|
||||
# Copyright (c) 2019-2024 Deciso B.V.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -25,8 +25,13 @@
|
||||
#}
|
||||
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
var data_get_map = {'frm_local_settings':"/api/syslog/settings/get"};
|
||||
mapDataToFormUI(data_get_map).done(function(data){
|
||||
formatTokenizersUI();
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
$("#grid-destinations").UIBootgrid(
|
||||
{ search:'/api/syslog/settings/searchDestinations',
|
||||
get:'/api/syslog/settings/getDestination/',
|
||||
@ -43,9 +48,8 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Reconfigure syslog
|
||||
*/
|
||||
|
||||
/* reconfigure syslog */
|
||||
$("#reconfigureAct").SimpleActionButton();
|
||||
updateServiceControlUI('syslog');
|
||||
|
||||
@ -60,11 +64,11 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<ul class="nav nav-tabs" data-tabs="tabs" id="maintabs">
|
||||
<li class="active"><a data-toggle="tab" id="destinations" href="#tab_destinations">{{ lang._('Destinations') }}</a></li>
|
||||
<li><a data-toggle="tab" id="destinations" href="#tab_local">{{ lang._('Local') }}</a></li>
|
||||
<li><a data-toggle="tab" id="statistics" href="#tab_statistics">{{ lang._('Statistics') }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content content-box">
|
||||
@ -94,6 +98,9 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tab_local" class="tab-pane fade in">
|
||||
{{ partial("layout_partials/base_form",['fields':localForm,'id':'frm_local_settings'])}}
|
||||
</div>
|
||||
<div id="tab_statistics" class="tab-pane fade in">
|
||||
<table id="grid-statistics" class="table table-condensed table-hover table-striped table-responsive">
|
||||
<thead>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user