mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
2013-02-08 Sergio Martin <sergio.martin@artica.es>
* godmode/servers/plugin.php: Prepare plugin manager to be used from metaconsole git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7614 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0cf9ab99f4
commit
31ab8c1a3f
@ -1,3 +1,8 @@
|
|||||||
|
2013-02-08 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* godmode/servers/plugin.php: Prepare plugin manager to be used
|
||||||
|
from metaconsole
|
||||||
|
|
||||||
2013-02-07 Ramon Novoa <rnovoa@artica.es>
|
2013-02-07 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* operation/menu.php: Fixed the SNMP menu.
|
* operation/menu.php: Fixed the SNMP menu.
|
||||||
|
@ -38,6 +38,8 @@ if (! check_acl ($config['id_user'], 0, "LM")) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enterprise_include_once ('meta/include/functions_components_meta.php');
|
||||||
|
|
||||||
$view = get_parameter ("view", "");
|
$view = get_parameter ("view", "");
|
||||||
$create = get_parameter ("create", "");
|
$create = get_parameter ("create", "");
|
||||||
|
|
||||||
@ -68,20 +70,29 @@ if ($create != "") {
|
|||||||
// SHOW THE FORM
|
// SHOW THE FORM
|
||||||
// =================================================================
|
// =================================================================
|
||||||
|
|
||||||
|
$sec = 'gservers';
|
||||||
|
|
||||||
if (($create != "") OR ($view != "")) {
|
if (($create != "") OR ($view != "")) {
|
||||||
|
|
||||||
|
if(defined('METACONSOLE')) {
|
||||||
|
components_meta_print_header();
|
||||||
|
$sec = 'advanced';
|
||||||
|
}
|
||||||
|
else {
|
||||||
if ($create != "")
|
if ($create != "")
|
||||||
ui_print_page_header (__('Plugin creation') . ui_print_help_icon("plugin_definition", true), "", false, "", true);
|
ui_print_page_header (__('Plugin creation') . ui_print_help_icon("plugin_definition", true), "", false, "", true);
|
||||||
else {
|
else {
|
||||||
ui_print_page_header (__('Plugin update') . ui_print_help_icon("plugin_definition", true), "", false, "", true);
|
ui_print_page_header (__('Plugin update') . ui_print_help_icon("plugin_definition", true), "", false, "", true);
|
||||||
$plugin_id = get_parameter ("view","");
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($create == "") {
|
||||||
if ($create == "")
|
$plugin_id = get_parameter ("view","");
|
||||||
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&update_plugin=$plugin_id'>";
|
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&update_plugin=$plugin_id&pure=" . $config['pure'] . "'>";
|
||||||
else
|
}
|
||||||
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&create_plugin=1'>";
|
else {
|
||||||
|
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&create_plugin=1&pure=" . $config['pure'] . "'>";
|
||||||
|
}
|
||||||
|
|
||||||
$table->width = '98%';
|
$table->width = '98%';
|
||||||
$table->id = 'table-form';
|
$table->id = 'table-form';
|
||||||
@ -273,8 +284,14 @@ if (($create != "") OR ($view != "")) {
|
|||||||
}
|
}
|
||||||
echo '</form></table>';
|
echo '</form></table>';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if(defined('METACONSOLE')) {
|
||||||
|
components_meta_print_header();
|
||||||
|
$sec = 'advanced';
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
ui_print_page_header (__('Plugins registered in Pandora FMS'), "", false, "", true);
|
ui_print_page_header (__('Plugins registered in Pandora FMS'), "", false, "", true);
|
||||||
|
}
|
||||||
|
|
||||||
// Update plugin
|
// Update plugin
|
||||||
if (isset($_GET["update_plugin"])){ // if modified any parameter
|
if (isset($_GET["update_plugin"])){ // if modified any parameter
|
||||||
@ -425,7 +442,7 @@ else {
|
|||||||
}
|
}
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td class=$tdcolor>";
|
echo "<td class=$tdcolor>";
|
||||||
echo "<b><a href='index.php?sec=gservers&sec2=godmode/servers/plugin&view=".$row["id"]."'>";
|
echo "<b><a href='index.php?sec=$sec&sec2=godmode/servers/plugin&view=".$row["id"]."&tab=plugins&pure=" . $config['pure'] . "'>";
|
||||||
echo $row["name"];
|
echo $row["name"];
|
||||||
echo "</a></b></td>";
|
echo "</a></b></td>";
|
||||||
echo "<td class=$tdcolor>";
|
echo "<td class=$tdcolor>";
|
||||||
@ -436,8 +453,8 @@ else {
|
|||||||
echo "</td><td class=$tdcolor>";
|
echo "</td><td class=$tdcolor>";
|
||||||
echo $row["execute"];
|
echo $row["execute"];
|
||||||
echo "</td><td class=$tdcolor>";
|
echo "</td><td class=$tdcolor>";
|
||||||
echo "<a href='index.php?sec=gservers&sec2=godmode/servers/plugin&view=".$row["id"]."'>" . html_print_image('images/config.png', true, array("title" => __("Edit"))) . "</a> ";
|
echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&view=".$row["id"]."&tab=plugins&pure=" . $config['pure'] . "'>" . html_print_image('images/config.png', true, array("title" => __("Edit"))) . "</a> ";
|
||||||
echo "<a href='index.php?sec=gservers&sec2=godmode/servers/plugin&kill_plugin=".$row["id"]."'>" . html_print_image("images/cross.png", true, array("border" => '0')) . "</a>";
|
echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&kill_plugin=".$row["id"]."&tab=plugins&pure=" . $config['pure'] . "'>" . html_print_image("images/cross.png", true, array("border" => '0')) . "</a>";
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
@ -448,7 +465,7 @@ else {
|
|||||||
}
|
}
|
||||||
echo "<table width='98%'>";
|
echo "<table width='98%'>";
|
||||||
echo "<tr><td align=right>";
|
echo "<tr><td align=right>";
|
||||||
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&create=1'>";
|
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&create=1&pure=" . $config['pure'] . "'>";
|
||||||
echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>";
|
echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>";
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user