From 175e2d5da75ddf6dacd4cca7971b06f6668c7ffd Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 8 Feb 2013 09:28:25 +0000 Subject: [PATCH] 2013-02-08 Sergio Martin * 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 --- pandora_console/ChangeLog | 5 +++ pandora_console/godmode/servers/plugin.php | 45 +++++++++++++++------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7bc478448b..eaaf49cd83 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-02-08 Sergio Martin + + * godmode/servers/plugin.php: Prepare plugin manager to be used + from metaconsole + 2013-02-07 Ramon Novoa * operation/menu.php: Fixed the SNMP menu. diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 07e1ace789..3ae3c897f9 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -38,6 +38,8 @@ if (! check_acl ($config['id_user'], 0, "LM")) { return; } +enterprise_include_once ('meta/include/functions_components_meta.php'); + $view = get_parameter ("view", ""); $create = get_parameter ("create", ""); @@ -68,20 +70,29 @@ if ($create != "") { // SHOW THE FORM // ================================================================= +$sec = 'gservers'; + if (($create != "") OR ($view != "")) { - if ($create != "") - ui_print_page_header (__('Plugin creation') . ui_print_help_icon("plugin_definition", true), "", false, "", true); + if(defined('METACONSOLE')) { + components_meta_print_header(); + $sec = 'advanced'; + } else { - ui_print_page_header (__('Plugin update') . ui_print_help_icon("plugin_definition", true), "", false, "", true); - $plugin_id = get_parameter ("view",""); + if ($create != "") + ui_print_page_header (__('Plugin creation') . ui_print_help_icon("plugin_definition", true), "", false, "", true); + else { + ui_print_page_header (__('Plugin update') . ui_print_help_icon("plugin_definition", true), "", false, "", true); + } } - - if ($create == "") - echo "
"; - else - echo ""; + if ($create == "") { + $plugin_id = get_parameter ("view",""); + echo ""; + } + else { + echo ""; + } $table->width = '98%'; $table->id = 'table-form'; @@ -274,7 +285,13 @@ if (($create != "") OR ($view != "")) { echo '
'; } else { - ui_print_page_header (__('Plugins registered in Pandora FMS'), "", false, "", true); + if(defined('METACONSOLE')) { + components_meta_print_header(); + $sec = 'advanced'; + } + else { + ui_print_page_header (__('Plugins registered in Pandora FMS'), "", false, "", true); + } // Update plugin if (isset($_GET["update_plugin"])){ // if modified any parameter @@ -425,7 +442,7 @@ else { } echo ""; echo ""; - echo ""; + echo ""; echo $row["name"]; echo ""; echo ""; @@ -436,8 +453,8 @@ else { echo ""; echo $row["execute"]; echo ""; - echo "" . html_print_image('images/config.png', true, array("title" => __("Edit"))) . "  "; - echo "" . html_print_image("images/cross.png", true, array("border" => '0')) . ""; + echo "" . html_print_image('images/config.png', true, array("title" => __("Edit"))) . "  "; + echo "" . html_print_image("images/cross.png", true, array("border" => '0')) . ""; echo ""; } echo ""; @@ -448,7 +465,7 @@ else { } echo ""; echo "
"; - echo "
"; + echo ""; echo ""; echo "
"; }