From 195611a3c1872824c08ce69c04a7a56d451ef34b Mon Sep 17 00:00:00 2001 From: "jose.gonzalez@pandorafms.com" Date: Fri, 28 Oct 2022 15:01:00 +0200 Subject: [PATCH] Adapt views and refactor --- .../general/first_task/planned_downtime.php | 47 ++++++++--- .../godmode/agentes/planned_downtime.list.php | 23 ++++-- .../manage_network_components_form.php | 37 +++++++-- .../godmode/reporting/graph_builder.main.php | 25 +++--- .../godmode/setup/setup_ehorus.php | 1 + .../godmode/setup/setup_integria.php | 3 +- .../wizards/DiscoveryTaskList.class.php | 4 +- .../godmode/wizards/HostDevices.class.php | 4 +- .../godmode/wizards/Wizard.main.php | 2 +- .../include/class/CustomNetScan.class.php | 8 +- .../class/ManageNetScanScripts.class.php | 40 +++++++-- pandora_console/include/functions_html.php | 13 +-- pandora_console/include/styles/discovery.css | 4 - pandora_console/include/styles/pandora.css | 10 +-- pandora_console/include/styles/tables.css | 4 - .../operation/agentes/exportdata.php | 81 ++++++++++++------- 16 files changed, 195 insertions(+), 111 deletions(-) diff --git a/pandora_console/general/first_task/planned_downtime.php b/pandora_console/general/first_task/planned_downtime.php index 6bfbe5627b..a88a3e0fc3 100644 --- a/pandora_console/general/first_task/planned_downtime.php +++ b/pandora_console/general/first_task/planned_downtime.php @@ -1,16 +1,32 @@ __('Scehduled Downtime')]); ?>
-

+

- +
diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index 78f717d7d1..fc80aa77ea 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -369,7 +369,10 @@ $row[] = html_print_submit_button( __('Search'), 'search', false, - 'class="sub search"', + [ + 'icon' => 'search', + 'mode' => 'mini', + ], true ); @@ -582,17 +585,23 @@ if ($downtimes === false && $filter_performed === false) { // Info message. echo '
'.__('No scheduled downtime').'
'; - echo '
'; - // Create button. if ($write_permisson === true) { - echo ' '; echo '
'; - html_print_submit_button(__('Create'), 'create', false, 'class="sub next"'); + html_print_div( + [ + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Create'), + 'create', + false, + ['icon' => 'next'], + true + ), + ] + ); echo '
'; } - - echo '
'; } else { // Has downtimes. echo '
'; diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index c39fbc86b6..6323b955fa 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -324,7 +324,7 @@ if ($id_component_type == COMPONENT_TYPE_WMI) { 4, 5, ]; - if (enterprise_installed()) { + if (enterprise_installed() === true) { $categories[] = 10; } @@ -335,7 +335,7 @@ if ($id_component_type == COMPONENT_TYPE_WMI) { 4, 5, ]; - if (enterprise_installed()) { + if (enterprise_installed() === true) { $categories[] = 10; } @@ -350,7 +350,7 @@ echo ''; $table->width = '100%'; $table->class = 'databox filters'; -if (defined('METACONSOLE')) { +if (is_metaconsole() === true) { if ($id) { $table->head[0] = __('Update Network Component'); } else { @@ -363,26 +363,47 @@ if (defined('METACONSOLE')) { html_print_table($table); -echo '
'; -html_print_button(__('Go back'), 'go_back', false, '', 'class="sub cancel"'); html_print_input_hidden('id_component_type', $id_component_type); if ($id) { html_print_input_hidden('update_component', 1); html_print_input_hidden('id', $id); + $buttonCaption = __('Update'); + $buttonIcon = 'update'; + $buttonName = 'upd'; html_print_submit_button(__('Update'), 'upd', false, 'class="sub upd"'); } else { html_print_input_hidden('create_component', 1); html_print_input_hidden('create_network_from_module', 0); - html_print_submit_button(__('Create'), 'crt', false, 'class="sub wand"'); + $buttonCaption = __('Create'); + $buttonIcon = 'wand'; + $buttonName = 'crt'; } -echo '
'; +html_print_div( + [ + 'class' => 'action-buttons', + 'content' => html_print_button( + __('Go back'), + 'go_back', + false, + '', + ['icon' => 'cancel'], + true + ).html_print_submit_button( + $buttonCaption, + $buttonName, + false, + ['icon' => $buttonIcon], + true + ), + ] +); + echo '
'; ui_require_javascript_file('pandora_modules'); ?>