From ebf958afc17409fa54da9df3a6325960ee4e736b Mon Sep 17 00:00:00 2001 From: alexhigh Date: Wed, 27 Aug 2014 17:09:07 +0000 Subject: [PATCH] 2014-08-27 Alejandro Gallardo * operation/visual_console/render_view.php, godmode/reporting/visual_console_builder.php: Added hooks to the enterprise wizard of services. * include/constants.php: Added constants for the services modes. * operation/events/events.php, operation/events/events.build_query.php: Now is possible to filter the events by module id programmatically. * images/wand_services.png: Added image. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10464 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- .../reporting/visual_console_builder.php | 78 ++++++++++++------ pandora_console/images/wand_services.png | Bin 0 -> 1351 bytes pandora_console/include/constants.php | 5 +- .../operation/events/events.build_query.php | 5 ++ pandora_console/operation/events/events.php | 1 + .../operation/visual_console/render_view.php | 6 ++ 6 files changed, 71 insertions(+), 24 deletions(-) create mode 100644 pandora_console/images/wand_services.png diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 50b47d9d34..a72ce6dc71 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -47,7 +47,7 @@ else { $action = get_parameterBetweenListValues('action2', array('new', 'save', 'edit', 'update', 'delete'), 'new'); } -$activeTab = get_parameterBetweenListValues('tab', array('data', 'list_elements', 'wizard', 'editor'), 'data'); +$activeTab = get_parameterBetweenListValues('tab', array('data', 'list_elements', 'wizard', 'wizard_services', 'editor'), 'data'); $refr = (int) get_parameter ('refr', $config['vc_refr']); @@ -397,6 +397,25 @@ switch ($activeTab) { break; } break; + case 'wizard_services': + $visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole)); + $visualConsoleName = $visualConsole['name']; + switch ($action) { + case 'update': + enterprise_include_once("/include/functions_visual_map.php"); + + $icon = (string) get_parameter('icon'); + $id_services = (array) get_parameter('services_selected'); + + $result = enterprise_hook('enterprise_visual_map_process_services_wizard_add', array($id_services, $idVisualConsole, $icon)); + if ($result != ENTERPRISE_NOT_HOOK) { + $statusProcessInDB = array('flag' => $result['status'], 'message' => $result['message']); + } + + $action = 'edit'; + break; + } + break; case 'editor': switch ($action) { case 'new': @@ -429,28 +448,36 @@ else { // Hash for auto-auth in public link $hash = md5($config["dbpass"] . $id_layout . $config["id_user"]); -$buttons = array( - 'consoles_list' => array('active' => false, - 'text' => '' . - html_print_image ("images/visual_console.png", true, array ("title" => __('Visual consoles list'))) .''), - 'public_link' => array('active' => false, - 'text' => ''. - html_print_image ("images/camera_mc.png", true, array ("title" => __('Show link to public Visual Console'))).''), - 'data' => array('active' => false, - 'text' => '' . - html_print_image ("images/op_reporting.png", true, array ("title" => __('Main data'))) .''), - 'list_elements' => array('active' => false, - 'text' => '' . - html_print_image ("images/list.png", true, array ("title" => __('List elements'))) .''), - 'wizard' => array('active' => false, - 'text' => '' . - html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .''), - 'editor' => array('active' => false, - 'text' => '' . - html_print_image ("images/builder.png", true, array ("title" => __('Builder'))) .''), - 'view' => array('active' => false, - 'text' => '' . - html_print_image ("images/operation.png", true, array ("title" => __('View'))) .'')); +$buttons = array(); + +$buttons['consoles_list'] = array('active' => false, + 'text' => '' . + html_print_image ("images/visual_console.png", true, array ("title" => __('Visual consoles list'))) .''); +$buttons['public_link'] = array('active' => false, + 'text' => ''. + html_print_image ("images/camera_mc.png", true, array ("title" => __('Show link to public Visual Console'))).''); +$buttons['data'] = array('active' => false, + 'text' => '' . + html_print_image ("images/op_reporting.png", true, array ("title" => __('Main data'))) .''); +$buttons['list_elements'] = array('active' => false, + 'text' => '' . + html_print_image ("images/list.png", true, array ("title" => __('List elements'))) .''); + +if (enterprise_installed()) { + $buttons['wizard_services'] = array('active' => false, + 'text' => '' . + html_print_image ("images/wand_services.png", true, array ("title" => __('Services wizard'))) .''); +} + +$buttons['wizard'] = array('active' => false, + 'text' => '' . + html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .''); +$buttons['editor'] = array('active' => false, + 'text' => '' . + html_print_image ("images/builder.png", true, array ("title" => __('Builder'))) .''); +$buttons['view'] = array('active' => false, + 'text' => '' . + html_print_image ("images/operation.png", true, array ("title" => __('View'))) .''); if ($action == 'new' || $idVisualConsole === false) { $buttons = array('data' => $buttons['data']); //Show only the data tab @@ -474,6 +501,11 @@ switch ($activeTab) { case 'wizard': require_once($config['homedir'] . '/godmode/reporting/visual_console_builder.wizard.php'); break; + case 'wizard_services': + if (enterprise_installed()) { + enterprise_include('/godmode/reporting/visual_console_builder.wizard_services.php'); + } + break; case 'data': require_once($config['homedir'] . '/godmode/reporting/visual_console_builder.data.php'); break; diff --git a/pandora_console/images/wand_services.png b/pandora_console/images/wand_services.png new file mode 100644 index 0000000000000000000000000000000000000000..2654e5ee9da3dade348da8a6574b550789b079b2 GIT binary patch literal 1351 zcmbVMZ%i9y7=PPB!@6}NghZH%=XGcz(0kwO{|l9tYik=QtEI_^`oW`j&;#zz?v7C~ zn&M^@V~krInnm5%SlkD*0P%yU2_upvny54J!=fgRN!&Mq#D!$R%=dtzF=QXS?d%0t`gN&O>5v8sEoc zV~HJKSPGK`!%!KD8W|aJk9gdQ)=!~OC`3V;qUjclXwgSygDbYkx~psD$H$VMs_Ch;FPFY*lZ1tCHKFAUJoA4Dh^ z^~VzN03C|AqnHQ5vW>mCw3np={s5%?bONEcH|UA7?LnW{p5%rY0DOoo-IWLs` zirDWq*PnPGmti%5GZZbSC`085$P^Sq(F=-7u-!g4BGO!5lueDM?Y}vX-#II)_T77-)(NbOQr1Q$buWlDJ8SDDX{FAe{)-Ds?Itcd9 zI`$>^B;FCqi$_9JVYx(BeT#SUjg3R|wH;S|rOCj| z^ofRZUpgZ5^>5s<&05cly-U8GxmkBj3tU-SA}P>uF*97L>JzhIAZg7GY##d7cISsP ze~wMJM$c6i>i7Si<-y!9z{MxmEX`Hlu_u?n __('Main data'))) .''; $options['list_elements']['text'] = '' . html_print_image ("images/list.png", true, array ("title" => __('List elements'))) .''; + + if (enterprise_installed()) { + $options['wizard_services']['text'] = '' . + html_print_image ("images/wand_services.png", true, array ("title" => __('Services wizard'))) .''; + } + $options['wizard']['text'] = '' . html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .''; $options['editor']['text'] = '' .