File: on-demand-filter.header.html

package info (click to toggle)
nagvis 1:1.9.25-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,192 kB
  • sloc: php: 27,941; javascript: 27,404; sh: 1,693; makefile: 17; xml: 8
file content (33 lines) | stat: -rw-r--r-- 1,377 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<script type="text/javascript" src="{$pathTemplates}default.header.js"></script>
<script type="text/javascript" src="{$pathTemplates}jquery.min.js"></script>
<script type="text/javascript" src="{$pathTemplates}select2.min.js"></script>
<link href="{$pathTemplates}select2.min.css" rel="stylesheet" />
<script type="text/javascript">
function filter_group(field) \{
    var grp = field.value;
    if (g_worker_id)
        window.clearTimeout(g_worker_id);

    window.location = makeuri(\{'filter_group': grp});
    storeUserOption('params-', '\{"filter_group": "'+grp+'"}');
}
</script>
<div id="headershow" class="header"><a href="#" onclick="toggleHeader(true)" title="Show header menu">&gt;</a></div>
<div id="header" class="header">
<ul class="head">
    <li class="toggle"><a href="#" onclick="toggleHeader(true)" title="Hide header menu">&lt;</a></li>
    <li><span>Filter:</span></li>
    <li><span>
      <select class="hostgroup-filter" onchange="filter_group(this)">
        {foreach $hostgroups hostgroup}<option {if $filter_group == $hostgroup.name1}selected {/if}value="{$hostgroup.name1}">{$hostgroup.name2}</option>{/foreach}
      </select>
    </span></li>
</ul>
</div>
<div id="headerspacer"></div>
<script type="text/javascript">
addDOMLoadEvent(function()\{headerDraw();});
$(document).ready(function() {
    $('.hostgroup-filter').select2();
});
</script>