-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.php
More file actions
86 lines (66 loc) · 3.65 KB
/
Copy pathsetup.php
File metadata and controls
86 lines (66 loc) · 3.65 KB
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
85
86
<?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/ |
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
function plugin_evidence_install () {
api_plugin_register_hook('evidence', 'device_edit_top_links', 'plugin_evidence_device_edit_top_links', 'include/functions.php');
api_plugin_register_hook('evidence', 'top_header_tabs', 'evidence_show_tab', 'include/functions.php');
api_plugin_register_hook('evidence', 'top_graph_header_tabs', 'evidence_show_tab', 'include/functions.php');
api_plugin_register_hook('evidence', 'host_device_remove', 'plugin_evidence_device_remove', 'include/functions.php');
api_plugin_register_hook('evidence', 'config_settings', 'plugin_evidence_config_settings', 'include/settings.php');
api_plugin_register_hook('evidence', 'poller_bottom', 'plugin_evidence_poller_bottom', 'include/functions.php');
api_plugin_register_hook('evidence', 'host_edit_bottom', 'plugin_evidence_host_edit_bottom', 'include/functions.php');
api_plugin_register_realm('evidence', 'evidence.php,evidence_tab.php,', 'Plugin evidence - view', 1);
plugin_evidence_setup_database();
}
function plugin_evidence_uninstall () {
return true;
}
function plugin_evidence_version() {
global $config;
$info = parse_ini_file($config['base_path'] . '/plugins/evidence/INFO', true);
return $info['info'];
}
function plugin_evidence_check_config () {
global $config;
include_once($config['base_path'] . '/plugins/evidence/include/database.php');
plugin_evidence_upgrade_database();
return true;
}
function plugin_evidence_setup_database() {
global $config;
include_once($config['base_path'] . '/plugins/evidence/include/database.php');
plugin_evidence_initialize_database();
}
function plugin_evidence_has_data() {
return true;
}
function plugin_evidence_remove_data() {
db_execute("DROP TABLE IF EXISTS `plugin_evidence_specific_query`");
db_execute("DROP TABLE IF EXISTS `plugin_evidence_organization`");
db_execute("DROP TABLE IF EXISTS `plugin_evidence_entity`");
db_execute("DROP TABLE IF EXISTS `plugin_evidence_mac`");
db_execute("DROP TABLE IF EXISTS `plugin_evidence_vendor_specific`");
db_execute("DROP TABLE IF EXISTS `plugin_evidence_snmp_info`");
return true;
}