Commit da9f33b3 authored by Ad Schellevis's avatar Ad Schellevis

(ids) add some documentation and reload general settings after download (to...

(ids) add some documentation and reload general settings after download (to show cron after initial download)
parent 9bf87d8a
...@@ -106,19 +106,21 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -106,19 +106,21 @@ POSSIBILITY OF SUCH DAMAGE.
} }
// load initial data // load initial data
mapDataToFormUI(data_get_map).done(function(data){ function loadGeneralSettings() {
// set schedule updates link to cron mapDataToFormUI(data_get_map).done(function(data){
$.each(data.frm_GeneralSettings.ids.general.UpdateCron, function(key, value) { // set schedule updates link to cron
if (value.selected == 1) { $.each(data.frm_GeneralSettings.ids.general.UpdateCron, function(key, value) {
$("#scheduled_updates").attr("href","/ui/cron/item/open/"+key); if (value.selected == 1) {
$("#scheduled_updates").show(); $("#scheduled_updates").attr("href","/ui/cron/item/open/"+key);
} $("#scheduled_updates").show();
}
});
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
}); });
//alert(JSON.stringify(data.frm_GeneralSettings.ids.general.UpdateCron)); }
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
});
loadGeneralSettings();
updateStatus(); updateStatus();
/** /**
...@@ -244,6 +246,7 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -244,6 +246,7 @@ POSSIBILITY OF SUCH DAMAGE.
$("#updateRulesAct_progress").removeClass("fa fa-spinner fa-pulse"); $("#updateRulesAct_progress").removeClass("fa fa-spinner fa-pulse");
$('#grid-rule-files').bootgrid('reload'); $('#grid-rule-files').bootgrid('reload');
updateStatus(); updateStatus();
loadGeneralSettings();
}); });
}); });
...@@ -272,16 +275,16 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -272,16 +275,16 @@ POSSIBILITY OF SUCH DAMAGE.
<tr> <tr>
<td><div class="control-label"> <td><div class="control-label">
<i class="fa fa-info-circle text-muted"></i> <i class="fa fa-info-circle text-muted"></i>
<b>rulesets</b> <b>{{ lang._('rulesets') }}</b>
</div> </div>
</td> </td>
<td> <td>
<table id="grid-rule-files" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="DialogRule"> <table id="grid-rule-files" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="DialogRule">
<thead> <thead>
<tr> <tr>
<th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">enabled</th> <th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">{{ lang._('Enabled') }}</th>
<th data-column-id="description" data-type="string" data-sortable="false" data-visible="true">description</th> <th data-column-id="description" data-type="string" data-sortable="false" data-visible="true">{{ lang._('Description') }}</th>
<th data-column-id="modified_local" data-type="string" data-sortable="false" data-visible="true">last updated</th> <th data-column-id="modified_local" data-type="string" data-sortable="false" data-visible="true">{{ lang._('Last updated') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -307,10 +310,10 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -307,10 +310,10 @@ POSSIBILITY OF SUCH DAMAGE.
<thead> <thead>
<tr> <tr>
<th data-column-id="sid" data-type="number" data-visible="true" data-identifier="true" data-width="6em">sid</th> <th data-column-id="sid" data-type="number" data-visible="true" data-identifier="true" data-width="6em">sid</th>
<th data-column-id="source" data-type="string">Source</th> <th data-column-id="source" data-type="string">{{ lang._('Source') }}</th>
<th data-column-id="classtype" data-type="string">ClassType</th> <th data-column-id="classtype" data-type="string">{{ lang._('ClassType') }}</th>
<th data-column-id="msg" data-type="string">Message</th> <th data-column-id="msg" data-type="string">{{ lang._('Message') }}</th>
<th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">info / enabled</th> <th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">{{ lang._('Info / enabled') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -329,11 +332,11 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -329,11 +332,11 @@ POSSIBILITY OF SUCH DAMAGE.
<table id="grid-alerts" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="DialogAlert"> <table id="grid-alerts" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="DialogAlert">
<thead> <thead>
<tr> <tr>
<th data-column-id="timestamp" data-type="string" data-sortable="false">timestamp</th> <th data-column-id="timestamp" data-type="string" data-sortable="false">{{ lang._('Timestamp') }}</th>
<th data-column-id="src_ip" data-type="string" data-sortable="false" data-width="10em">source</th> <th data-column-id="src_ip" data-type="string" data-sortable="false" data-width="10em">{{ lang._('Source') }}</th>
<th data-column-id="dest_ip" data-type="string" data-sortable="false" data-width="10em">destination</th> <th data-column-id="dest_ip" data-type="string" data-sortable="false" data-width="10em">{{ lang._('Destination') }}</th>
<th data-column-id="alert" data-type="string" data-sortable="false" >Alert</th> <th data-column-id="alert" data-type="string" data-sortable="false" >{{ lang._('Alert') }}</th>
<th data-column-id="info" data-formatter="info" data-sortable="false" data-width="4em">info</th> <th data-column-id="info" data-formatter="info" data-sortable="false" data-width="4em">{{ lang._('Info') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -342,8 +345,10 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -342,8 +345,10 @@ POSSIBILITY OF SUCH DAMAGE.
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<hr/> <hr/>
<button class="btn btn-primary" id="reconfigureAct" type="button"><b>Apply</b><i id="reconfigureAct_progress" class=""></i></button> <button class="btn btn-primary" id="reconfigureAct" type="button"><b>{{ lang._('Apply') }}</b><i id="reconfigureAct_progress" class=""></i></button>
<button class="btn btn-primary" id="updateRulesAct" type="button"><b>Download & Update Rules</b><i id="updateRulesAct_progress" class=""></i></button> <button class="btn btn-primary" id="updateRulesAct" type="button"><b>{{ lang._('Download & Update Rules') }}</b><i id="updateRulesAct_progress" class=""></i></button>
<br/>
<i>{{ lang._('Please use "Download & Update Rules" to fetch your initial ruleset, automatic updating can be scheduled after the first download') }} </i>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment