-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuptime_tab.php
85 lines (68 loc) · 2.89 KB
/
uptime_tab.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2021-2024 Petr Macek |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDtool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| https://github.com/xmacan/ |
| https://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
chdir('../../');
include_once('./include/auth.php');
include_once('./lib/snmp.php');
include_once('./plugins/uptime/functions.php');
set_default_action();
$selectedTheme = get_selected_theme();
switch (get_request_var('action')) {
case 'ajax_hosts':
$sql_where = '';
get_allowed_ajax_hosts (false, 'applyFilter', $sql_where);
break;
default:
general_header();
uptime_display_form();
if (get_filter_request_var('host_id')) {
uptime_display_events(get_request_var('host_id'));
}
bottom_footer();
break;
}
function uptime_display_form() {
global $config;
print get_md5_include_js($config['base_path'].'/plugins/uptime/uptime.js');
$host_where = '';
html_start_box('<strong>Uptime</strong>', '100%', '', '3', 'center', '');
?>
<tr>
<td>
<form name="form_uptime" action="uptime_tab.php">
<table width="30%" cellpadding="0" cellspacing="0">
<tr class="navigate_form">
<td>
<?php print html_host_filter(get_request_var('host_id'), 'applyFilter', $host_where);?>
<td>
<input type='button' class='ui-button ui-corner-all ui-widget' id='clear' value='<?php print __('Clear');?>' title='<?php print __esc('Clear Filters');?>'>
</td>
</tr>
</table>
</form>
</td>
<tr>
<td>
<?php
}