From 09f6b7a29a8a31ed00b838447dd7b45fb37e2d49 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 7 Jul 2015 13:57:47 +0200 Subject: [PATCH] Fixed styles metaconsole --- .../godmode/alerts/alert_actions.php | 2 +- .../godmode/alerts/alert_templates.php | 11 ++--- .../godmode/alerts/configure_alert_action.php | 2 - .../alerts/configure_alert_command.php | 2 - .../alerts/configure_alert_template.php | 8 ++-- pandora_console/godmode/category/category.php | 30 +++++-------- .../godmode/category/edit_category.php | 6 +-- .../modules/manage_network_components.php | 12 ++---- .../manage_network_components_form.php | 2 +- .../godmode/reporting/reporting_builder.php | 6 +-- pandora_console/godmode/servers/plugin.php | 5 --- pandora_console/godmode/tag/edit_tag.php | 5 +-- pandora_console/godmode/tag/tag.php | 7 +++- .../godmode/users/configure_user.php | 4 +- .../agentes/alerts_status.functions.php | 14 +++---- .../operation/agentes/status_monitor.php | 30 +++++-------- .../operation/events/events.build_table.php | 2 +- .../operation/events/events_list.php | 42 +++++++++---------- 18 files changed, 74 insertions(+), 116 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index bc073aedd3..8a2d72d44b 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -344,7 +344,7 @@ $table->head[3] = __('Delete'); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->size = array (); -$table->size[1] = '30px'; +$table->size[1] = '200px'; $table->size[2] = '40px'; $table->size[3] = '40px'; $table->align = array (); diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 50215e9ac3..290cea6751 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -233,8 +233,6 @@ $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; if (defined("METACONSOLE")) { - $table->width = '96%'; - $table->class = 'databox_filters'; $table->cellspacing = 0; $table->cellpadding = 0; @@ -243,10 +241,9 @@ $table->data = array (); $table->head = array (); $table->style = array (); -if (!defined("METACONSOLE")) { - $table->style[0] = 'font-weight: bold'; - $table->style[2] = 'font-weight: bold'; -} +$table->style[0] = 'font-weight: bold'; +$table->style[2] = 'font-weight: bold'; + $table->data[0][0] = __('Type'); $table->data[0][1] = html_print_select (alerts_get_alert_templates_types (), 'search_type', @@ -260,7 +257,7 @@ $table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false, $table->data[0][4] .= ''; if (defined("METACONSOLE")) { - $filter = '
'; + $filter = ''; $filter .= html_print_table ($table,true); $filter .= '
'; ui_toggle($filter, __("Show Options")); diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index bc27c4945b..cfc18f76cb 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -94,8 +94,6 @@ $table->width = '100%'; $table->class = 'databox filters'; if (defined('METACONSOLE')) { - $table->class = 'databox data'; - $table->width = '100%'; if ($id) { $table->head[0] = __('Update Action'); } diff --git a/pandora_console/godmode/alerts/configure_alert_command.php b/pandora_console/godmode/alerts/configure_alert_command.php index 73b1d6188d..7ebf89e34d 100644 --- a/pandora_console/godmode/alerts/configure_alert_command.php +++ b/pandora_console/godmode/alerts/configure_alert_command.php @@ -123,8 +123,6 @@ $table->width = '100%'; $table->class = 'databox filters'; if (defined('METACONSOLE')) { - $table->width = '100%'; - $table->class = 'databox data'; if ($id) { $table->head[0] = __('Update Command'); } diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 2ad6afb6a9..22911d9a2a 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -474,16 +474,14 @@ $table->id = 'template'; $table->width = '100%'; $table->class = 'databox filters'; if(defined("METACONSOLE")) { - $table->class = 'databox data'; $table->head[0] = __('Create Template'); $table->head_colspan[0] = 4; $table->headstyle[0] = 'text-align: center'; } $table->style = array (); -if(!defined("METACONSOLE")) { - $table->style[0] = 'font-weight: bold;'; - $table->style[2] = 'font-weight: bold;'; -} +$table->style[0] = 'font-weight: bold;'; +$table->style[2] = 'font-weight: bold;'; + $table->size = array (); $table->size[0] = '20%'; $table->size[2] = '20%'; diff --git a/pandora_console/godmode/category/category.php b/pandora_console/godmode/category/category.php index 3a5da58aee..11c8a1fb91 100755 --- a/pandora_console/godmode/category/category.php +++ b/pandora_console/godmode/category/category.php @@ -134,33 +134,23 @@ if (!empty($result)) { } html_print_table ($table); - - if (defined('METACONSOLE')) { - echo "
"; - if(defined('METACONSOLE')) - echo '
'; - else - echo ''; - html_print_input_hidden ("create_category", "1", true); - html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"'); - echo "
"; - echo "
"; - } + } else { // No categories available or selected ui_print_info_message ( array('no_close'=>true, 'message'=> __('No categories found') ) ); } // Form to add new categories or search categories -if (!defined('METACONSOLE')) { - echo "
"; +echo "
"; + if(defined('METACONSOLE')) + echo '
'; + else echo ''; - html_print_input_hidden ("create_category", "1", true); - html_print_submit_button (__('Create category'), - 'create_button', false, 'class="sub next"'); - echo "
"; - echo "
"; -} + html_print_input_hidden ("create_category", "1", true); + html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"'); + echo ""; +echo "
"; + enterprise_hook('close_meta_frame'); ?> diff --git a/pandora_console/godmode/category/edit_category.php b/pandora_console/godmode/category/edit_category.php index eb72e64d1b..43e3efce7e 100755 --- a/pandora_console/godmode/category/edit_category.php +++ b/pandora_console/godmode/category/edit_category.php @@ -127,10 +127,8 @@ if(!defined('METACONSOLE')) else echo '
'; -if(!defined('METACONSOLE')) - echo ""; -else - echo "
"; +echo "
"; + if (defined("METACONSOLE")) { if ($action == "update") { echo " diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index 0a067b94b2..7d49abdbfb 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -441,18 +441,14 @@ $url = ui_get_url_refresh (array ('offset' => false, $search_id_group = (int) get_parameter ('search_id_group'); $search_string = (string) get_parameter ('search_string'); +$table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; -if(defined("METACONSOLE")) { - $table->width = '50%'; - $table->class = 'databox_filters'; -} $table->style = array (); -if (!defined('METACONSOLE')) { - $table->style[0] = 'font-weight: bold'; - $table->style[2] = 'font-weight: bold'; -} +$table->style[0] = 'font-weight: bold'; +$table->style[2] = 'font-weight: bold'; + $table->data = array (); $table->data[0][0] = __('Group'); diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index 3ec67632b8..8376708a0b 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -204,6 +204,7 @@ if ($create_network_from_snmp_browser) { * You can see this values in file godmode/modules/manage_network_components.php * in the last lines (in the call function "html_print_select"). */ +$table = new stdClass(); if ($id_component_type == 6) { $categories = array (0, 1, 2); @@ -236,7 +237,6 @@ $table->width = '100%'; $table->class = 'databox filters'; /* $table came from manage_network_components_form_common.php */ if (defined('METACONSOLE')) { - $table->class = 'databox data'; if ($id) { $table->head[0] = __('Update Network Component'); } diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index d7c61c93a4..b5860f750c 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -375,8 +375,8 @@ switch ($action) { $table_aux->cellpadding = 0; $table_aux->cellspacing = 0; if (defined('METACONSOLE')) { - $table_aux->class = 'databox_filters'; - $table_aux->width = '96%'; + $table_aux->class = 'databox filters'; + $table_aux->width = '100%'; $table_aux->cellpadding = 0; $table_aux->cellspacing = 0; } @@ -391,7 +391,7 @@ switch ($action) { $table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true); if (defined('METACONSOLE')) { - $filter = "head[0] = __('General'); $table->head_colspan[0] = 4; $table->headstyle[0] = 'text-align: center'; - echo '
'; html_print_table($table); } else { @@ -339,7 +338,6 @@ if (($create != "") OR ($view != "")) { $table->head[0] = __('Command'); $table->head_colspan[0] = 4; $table->headstyle[0] = 'text-align: center'; - echo '
'; html_print_table($table); } else { @@ -473,12 +471,9 @@ if (($create != "") OR ($view != "")) { if (defined("METACONSOLE")) { - $table->width = '100%'; - $table->class = 'databox data'; $table->head[0] = __('Parameters macros'); $table->head_colspan[0] = 4; $table->headstyle[0] = 'text-align: center'; - echo '
'; html_print_table($table); } else { diff --git a/pandora_console/godmode/tag/edit_tag.php b/pandora_console/godmode/tag/edit_tag.php index f7a546e9aa..08fa5a231e 100644 --- a/pandora_console/godmode/tag/edit_tag.php +++ b/pandora_console/godmode/tag/edit_tag.php @@ -150,10 +150,7 @@ echo ''; -if (defined('METACONSOLE')) - echo "
"; -else - echo "
"; +echo "
"; if (defined('METACONSOLE')) { if ($action == "update") { echo ""; diff --git a/pandora_console/godmode/tag/tag.php b/pandora_console/godmode/tag/tag.php index 9cc6122df0..b4a1c38534 100644 --- a/pandora_console/godmode/tag/tag.php +++ b/pandora_console/godmode/tag/tag.php @@ -138,8 +138,8 @@ if (!empty($result)) { } else { - $filters = ''; - $filters .= "
" . __("Update Tag") . "
"; + $filters = ''; + $filters .= "
"; $filters .= ""; $filters .= "
"; $filters .= __("Name") . "/" . __("Description"); @@ -247,6 +247,9 @@ else{ require_once ($config['homedir'] . "/general/firts_task/tags.php"); return; } + else{ + ui_print_info_message(array("no_close"=>true,"message"=>__("No tags defined."))); + } } echo ""; echo ""; diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 96dfa17ea8..67340cca35 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -418,8 +418,6 @@ $table->id = 'user_configuration_table'; $table->width = '100%'; $table->class = 'databox filters'; if (defined('METACONSOLE')) { - $table->width = '100%'; - $table->class = 'databox data'; if ($id) { $table->head[0] = __('Update User'); } @@ -605,7 +603,7 @@ if (!empty ($id) && !$new_user) { $table->head_colspan[0] = 0; $table->width = '100%'; $table->class = 'databox_tactical data'; - $table->title = '' . __('Profiles/Groups assigned to this user') . ''; + $table->title = __('Profiles/Groups assigned to this user'); } $table->data = array (); $table->head = array (); diff --git a/pandora_console/operation/agentes/alerts_status.functions.php b/pandora_console/operation/agentes/alerts_status.functions.php index fb19c0a392..2a4c9be6f5 100755 --- a/pandora_console/operation/agentes/alerts_status.functions.php +++ b/pandora_console/operation/agentes/alerts_status.functions.php @@ -45,8 +45,8 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st $table->cellpadding = '0'; $table->cellspacing = '0'; if (defined('METACONSOLE')) { - $table->class = 'databox_filters'; - $table->width = '96%'; + $table->class = 'databox filters'; + $table->width = '100%'; $table->cellpadding = '0'; $table->cellspacing = '0'; } @@ -58,11 +58,11 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st $table->style[3] = 'font-weight: bold;'; $table->style[4] = 'font-weight: bold;'; if (defined('METACONSOLE')) { - $table->style[0] = 'vertical-align:middle; font-weight: bold;'; - $table->style[1] = 'vertical-align:middle; font-weight: bold;'; - $table->style[2] = 'vertical-align:middle; font-weight: bold;'; - $table->style[3] = 'vertical-align:middle; font-weight: bold;'; - $table->style[4] = 'vertical-align:middle; font-weight: bold;'; + $table->style[0] = 'font-weight: bold;'; + $table->style[1] = 'font-weight: bold;'; + $table->style[2] = 'font-weight: bold;'; + $table->style[3] = 'font-weight: bold;'; + $table->style[4] = 'font-weight: bold;'; } $table->data[0][0] = __('Group'); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 68f6392913..953d7d1ba1 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -91,26 +91,15 @@ if ($id_module) { enterprise_hook('open_meta_frame'); -if (!defined('METACONSOLE')) { - $filters = ''; - //echo '
'; - $table->width = "100%"; - $table->cellspacing = 0; - $table->cellpadding = 0; - $table->class = "databox filters"; -} -else { - $filters = ''; - //echo '
'; - $table->width = "96%"; - $table->cellspacing = 0; - $table->cellpadding = 0; - $table->class = "databox_filters"; -} +$filters = ''; +//echo '
'; +$table->width = "100%"; +$table->cellspacing = 0; +$table->cellpadding = 0; +$table->class = "databox filters"; + // Get Groups and profiles from user $user_groups = implode (",", array_keys (users_get_groups ())); @@ -527,6 +516,7 @@ foreach ($custom_fields as $custom_field) { if (defined('METACONSOLE')) { $table->colspan[2][0] = 7; + $table->cellstyle[2][0] = 'padding: 10px;'; $table->data[2][0] = ui_toggle( html_print_table($table_custom_fields, true), __('Advanced Options'), '', true, true); diff --git a/pandora_console/operation/events/events.build_table.php b/pandora_console/operation/events/events.build_table.php index 327256bc00..58c3042814 100644 --- a/pandora_console/operation/events/events.build_table.php +++ b/pandora_console/operation/events/events.build_table.php @@ -48,7 +48,7 @@ if (in_array('server_name', $show_fields)) { } if (in_array('estado', $show_fields)) { $table->head[$i] = __('Status'); - $table->align[$i] = 'center'; + $table->align[$i] = 'left'; $i++; } if (in_array('id_evento', $show_fields)) { diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 11ad516101..d4a43d579a 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -189,18 +189,18 @@ if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, $table->class = 'databox'; if (defined('METACONSOLE')) { $table->width = '100%'; - $table->class = 'databox data'; + $table->class = 'databox filters'; $table->cellspacing = 0; $table->cellpadding = 0; } - $table->styleTable = 'font-weight: bold; color: #555; text-align:left;'; + $table->styleTable = 'font-weight: bold; text-align:left;'; if (!defined("METACONSOLE")) $table->style[0] = 'width: 50%; width:50%;'; $data = array(); $table->rowid[0] = 'update_save_selector'; - $data[0] = html_print_radio_button('filter_mode', 'new', '', true, true) . __('New filter') . '

'; - $data[1] = html_print_radio_button('filter_mode', 'update', '', false, true) . __('Update filter') . '

'; + $data[0] = html_print_radio_button('filter_mode', 'new', '', true, true) . __('New filter') . ''; + $data[1] = html_print_radio_button('filter_mode', 'update', '', false, true) . __('Update filter') . ''; $table->data[] = $data; $table->rowclass[] = ''; @@ -213,16 +213,14 @@ if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, else $data[1] = __('Filter group') . $jump; # Fix : Only admin users can see group ALL - $data[1] .= html_print_select_groups($config['id_user'], "ER", users_can_manage_group_all(), "id_group_filter", $id_group_filter, '', '', 0, true, false, false, 'w130', false, '', false, false, 'id_grupo', $strict_user); + $data[1] .= html_print_select_groups($config['id_user'], "ER", users_can_manage_group_all(), "id_group_filter", + $id_group_filter, '', '', 0, true, false, false, 'w130', false, '', false, false, 'id_grupo', $strict_user); $table->data[] = $data; $table->rowclass[] = ''; $data = array(); $table->rowid[2] = 'save_filter_row2'; - $data[0] = html_print_submit_button (__('Save filter'), 'save_filter', false, 'class="sub upd"', true); - $table->colspan[2][0] = 2; - if(!defined("METACONSOLE")) - $table->cellstyle[2][0] = 'text-align:right;'; + $table->data[] = $data; $table->rowclass[] = ''; @@ -240,6 +238,9 @@ if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, html_print_table($table); unset($table); + echo '
'; + echo html_print_submit_button (__('Save filter'), 'save_filter', false, 'class="sub upd" style="float:right;"', true); + echo '
'; echo ''; } @@ -317,14 +318,14 @@ if (defined('METACONSOLE')) { $data = array(); $data[0] = html_print_select ($tags_select_with, 'select_with', '', '', '', 0, - true, true, true, '', false, 'width: 400px;'); + true, true, true, '', false, 'width: 335px;'); $data[1] = html_print_image('images/darrowright.png', true, array('id' => 'button-add_with', 'style' => 'cursor: pointer;', 'title' => __('Add'))); $data[1] .= html_print_input_hidden('tag_with', $tag_with_base64, true); $data[1] .= '

' . html_print_image('images/darrowleft.png', true, array('id' => 'button-remove_with', 'style' => 'cursor: pointer;', 'title' => __('Remove'))); $data[2] = html_print_select ($tag_with_temp, 'tag_with_temp', array(), '', '', - 0, true, true, true, '', false, "width: 400px;"); + 0, true, true, true, '', false, "width: 335px;"); $tabletags_with->data[] = $data; $tabletags_with->rowclass[] = ''; @@ -346,12 +347,12 @@ $tabletags_without->styleTable = 'border: 0px;'; $data = array(); $data[0] = html_print_select ($tags_select_without, 'select_without', '', '', '', 0, - true, true, true, '', false, 'width: 400px;'); + true, true, true, '', false, 'width: 335px;'); $data[1] = html_print_image('images/darrowright.png', true, array('id' => 'button-add_without', 'style' => 'cursor: pointer;', 'title' => __('Add'))); $data[1] .= html_print_input_hidden('tag_without', $tag_without_base64, true); $data[1] .= '

' . html_print_image('images/darrowleft.png', true, array('id' => 'button-remove_without', 'style' => 'cursor: pointer;', 'title' => __('Remove'))); $data[2] = html_print_select ($tag_without_temp, 'tag_without_temp', array(), '', '', - 0, true, true, true, '', false, "width: 400px;"); + 0, true, true, true, '', false, "width: 335px;"); $tabletags_without->data[] = $data; $tabletags_without->rowclass[] = ''; @@ -476,13 +477,13 @@ $data = array(); if (defined('METACONSOLE')) { $data[0] = '
' . - '' . + '' . __('Events with following tags') . '' . html_print_table($tabletags_with, true) . '
'; $data2[1] = '
' . - '' . + '' . __('Events without following tags') . '' . html_print_table($tabletags_without, true) . @@ -503,7 +504,9 @@ else { '
'; } $table_advanced->data[] = $data; -$table_advanced->data[] = $data2; +if (defined('METACONSOLE')) + $table_advanced->data[] = $data2; + $table_advanced->rowclass[] = ''; //- END ADVANCE FILTER ------------------------------------------------- @@ -514,10 +517,7 @@ $table->width = '100%'; $table->cellspacing = 4; $table->cellpadding = 4; $table->class = 'databox filters'; -if (defined('METACONSOLE')) { - $table->width = '96%'; - $table->class = 'databox_filters'; -} + $table->styleTable = 'font-weight: bold; color: #555;'; $table->data = array(); @@ -564,7 +564,7 @@ $data = array(); $data[0] = ui_toggle(html_print_table($table_advanced, true), __('Advanced options'), '', true, true); $table->colspan[count($table->data)][0] = 3; -$table->cellstyle[count($table->data)][0] = 'padding-top: 15px;'; +$table->cellstyle[count($table->data)][0] = 'padding: 10px;'; $table->data[] = $data; $table->rowclass[] = '';