Commit 646f9838 authored by Ad Schellevis's avatar Ad Schellevis

(ids) move installable rules to separate tab, make room for additional settings

parent ddca91c1
...@@ -421,6 +421,18 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -421,6 +421,18 @@ POSSIBILITY OF SUCH DAMAGE.
} }
}); });
$("#grid-rule-files-search").keydown(function (e) {
var searchString = $(this).val();
$("#grid-rule-files > tbody > tr").each(function(){
var itemName = $(this).children('td:eq(1)').html();
if (itemName.toLowerCase().indexOf(searchString.toLowerCase())>=0) {
$(this).show();
} else {
$(this).hide();
}
});
});
/** /**
* Change sid to action selector after DialogAlert show * Change sid to action selector after DialogAlert show
*/ */
...@@ -509,6 +521,7 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -509,6 +521,7 @@ POSSIBILITY OF SUCH DAMAGE.
<ul class="nav nav-tabs" data-tabs="tabs" id="maintabs"> <ul class="nav nav-tabs" data-tabs="tabs" id="maintabs">
<li class="active"><a data-toggle="tab" href="#settings" id="settings_tab">{{ lang._('Settings') }}</a></li> <li class="active"><a data-toggle="tab" href="#settings" id="settings_tab">{{ lang._('Settings') }}</a></li>
<li><a data-toggle="tab" href="#download_settings" id="download_settings_tab">{{ lang._('Download') }}</a></li>
<li><a data-toggle="tab" href="#rules" id="rule_tab">{{ lang._('Rules') }}</a></li> <li><a data-toggle="tab" href="#rules" id="rule_tab">{{ lang._('Rules') }}</a></li>
<li><a data-toggle="tab" href="#userrules" id="userrules_tab">{{ lang._('User defined') }}</a></li> <li><a data-toggle="tab" href="#userrules" id="userrules_tab">{{ lang._('User defined') }}</a></li>
<li><a data-toggle="tab" href="#alerts" id="alert_tab">{{ lang._('Alerts') }}</a></li> <li><a data-toggle="tab" href="#alerts" id="alert_tab">{{ lang._('Alerts') }}</a></li>
...@@ -517,13 +530,17 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -517,13 +530,17 @@ POSSIBILITY OF SUCH DAMAGE.
<div class="tab-content content-box tab-content"> <div class="tab-content content-box tab-content">
<div id="settings" class="tab-pane fade in active"> <div id="settings" class="tab-pane fade in active">
{{ partial("layout_partials/base_form",['fields':formGeneralSettings,'id':'frm_GeneralSettings'])}} {{ partial("layout_partials/base_form",['fields':formGeneralSettings,'id':'frm_GeneralSettings'])}}
<!-- add installable rule files --> <div class="col-md-12">
<table class="table table-striped table-condensed table-responsive"> <hr/>
<colgroup> <button class="btn btn-primary" id="reconfigureAct" type="button"><b>{{ lang._('Apply') }}</b><i id="reconfigureAct_progress" class=""></i></button>
<col class="col-md-3"/> <br/>
<col class="col-md-9"/> <br/>
</colgroup> </div>
<tbody> </div>
<div id="download_settings" class="tab-pane fade in">
<!-- add installable rule files -->
<table class="table table-striped table-condensed table-responsive">
<tbody>
<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>
...@@ -534,35 +551,55 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -534,35 +551,55 @@ POSSIBILITY OF SUCH DAMAGE.
<table class="table table-condensed table-responsive"> <table class="table table-condensed table-responsive">
<tr> <tr>
<td> <td>
<button data-toggle="tooltip" id="enableSelectedRuleSets" type="button" class="btn btn-xs btn-default btn-primary">{{ lang._('Enable selected') }}</span></button> <div class="row">
<button data-toggle="tooltip" id="disableSelectedRuleSets" type="button" class="btn btn-xs btn-default btn-primary">{{ lang._('Disable selected') }}</span></button> <div class="col-xs-9">
<button data-toggle="tooltip" id="enableSelectedRuleSets" type="button" class="btn btn-xs btn-default btn-primary">{{ lang._('Enable selected') }}</span></button>
<button data-toggle="tooltip" id="disableSelectedRuleSets" type="button" class="btn btn-xs btn-default btn-primary">{{ lang._('Disable selected') }}</span></button>
</div>
<div class="col-xs-3" style="padding-top:0px;">
<input type="text" placeholder="{{ lang._('Search') }}" id="grid-rule-files-search" value=""/>
</div>
</div>
</td> </td>
</tr> </tr>
</table> </table>
<table id="grid-rule-files" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="DialogRuleset"> <div style="max-height: 400px; width: 100%; margin: 0; overflow-y: auto;" id="grid-rule-files-container">
<thead> <table id="grid-rule-files" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="DialogRuleset">
<tr> <thead>
<th data-column-id="filename" data-type="string" data-visible="false" data-identifier="true">{{ lang._('Filename') }}</th> <tr>
<th data-column-id="description" data-type="string" data-sortable="false" data-visible="true">{{ lang._('Description') }}</th> <th data-column-id="filename" data-type="string" data-visible="false" data-identifier="true">{{ lang._('Filename') }}</th>
<th data-column-id="modified_local" data-type="rulets" data-sortable="false" data-visible="true">{{ lang._('Last updated') }}</th> <th data-column-id="description" data-type="string" data-sortable="false" data-visible="true">{{ lang._('Description') }}</th>
<th data-column-id="filter_str" data-type="string" data-identifier="true">{{ lang._('Filter') }}</th> <th data-column-id="modified_local" data-type="rulets" data-sortable="false" data-visible="true">{{ lang._('Last updated') }}</th>
<th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">{{ lang._('Commands') }}</th> <th data-column-id="filter_str" data-type="string" data-identifier="true">{{ lang._('Filter') }}</th>
</tr> <th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">{{ lang._('Commands') }}</th>
</thead> </tr>
<tbody> </thead>
</tbody> <tbody>
</table> </tbody>
</table>
</div>
</td> </td>
</tr> </tr>
</tbody> <!--
</table> <tr>
<div class="col-md-12"> <td><div class="control-label">
<hr/> <i class="fa fa-info-circle text-muted"></i>
<button class="btn btn-primary" id="reconfigureAct" type="button"><b>{{ lang._('Apply') }}</b><i id="reconfigureAct_progress" class=""></i></button> <b>{{ lang._('Settings') }}</b>
<button class="btn btn-primary" id="updateRulesAct" type="button"><b>{{ lang._('Download & Update Rules') }}</b><i id="updateRulesAct_progress" class=""></i></button> </div>
<br/> </td>
<i>{{ lang._('Please use "Download & Update Rules" to fetch your initial ruleset, automatic updating can be scheduled after the first download.') }} </i> <td>
</div>
</td>
</tr>
-->
</tbody>
</table>
<div class="col-md-12">
<hr/>
<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 id="rules" class="tab-pane fade in"> <div id="rules" class="tab-pane fade in">
<div class="bootgrid-header container-fluid"> <div class="bootgrid-header container-fluid">
......
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