diff --git a/pandora_console/include/styles/custom_field.css b/pandora_console/include/styles/custom_field.css new file mode 100644 index 0000000000..fcb12d492f --- /dev/null +++ b/pandora_console/include/styles/custom_field.css @@ -0,0 +1,85 @@ +/** + * + * Name: Default theme + * Pandora Stylesheet + * + * @category Stylesheet + * @package Pandora FMS + * @subpackage Community + * @version 1.0.0 + * @license See below + * + * ______ ___ _______ _______ ________ + * | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __| + * | __/| _ | | _ || _ | _| _ | | ___| |__ | + * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| + * + * ============================================================================ + * Copyright (c) 2005-2023 Pandora FMS + * Please see https://pandorafms.com for full contribution list + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation for version 2. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * ============================================================================ + */ + +.dt-buttons { + float: left; +} + +.dt-button.buttons-csv.buttons-html5 { + box-shadow: none; +} + +.dataTables_filter > label { + color: #000; +} + +.top { + background-color: #fff !important; + color: #000 !important; + border-radius: 5px !important; + border: 1px solid #e5e9ed !important; +} + +.bottom { + background-color: #fff !important; + color: #000 !important; + border-radius: 5px !important; + border: 1px solid #e5e9ed !important; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + color: #000 !important; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.current, +.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + color: #fff !important; + background: #14524f !important; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button { + background-color: #f6f7fb !important; + color: #000 !important; + border: 1px solid #cacaca; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button:hover { + background: #e2e2e2 !important; + color: #000 !important; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.next { + border: 1px solid #cacaca !important; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.previous { + border: 1px solid #cacaca !important; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 7c740bba2b..e5e92fea81 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -12547,9 +12547,10 @@ form.cfv_status_agent input:checked + label:before { float: left; margin-left: 10px; padding-right: 10px; - max-height: 890px; + max-height: 760px; overflow: auto; background-color: #f9f9f9; + margin-bottom: 20px; } .agents_custom_fields { @@ -12558,15 +12559,6 @@ form.cfv_status_agent input:checked + label:before { margin-bottom: 15px; padding: 25px 5px; } -div.agents_custom_fields #datatables_wrapper div.top, -div.agents_custom_fields #datatables_wrapper div.bottom { - background-color: #414141; - color: #ffffff; - border: none; - padding: 5px; - height: 38px; - width: 99%; -} /*Horizontal tree*/ @@ -12597,16 +12589,6 @@ div.agents_custom_fields #datatables_wrapper div.bottom { margin-top: 15px; } -.custom_fields_view { - width: 30%; - float: left; - margin-left: 10px; - padding-right: 10px; - max-height: 890px; - overflow: auto; - background-color: #f9f9f9; -} - .agents_custom_fields { width: 100%; diff --git a/pandora_console/operation/custom_fields/custom_fields_view.php b/pandora_console/operation/custom_fields/custom_fields_view.php index bd95ab26fd..83d35533c7 100644 --- a/pandora_console/operation/custom_fields/custom_fields_view.php +++ b/pandora_console/operation/custom_fields/custom_fields_view.php @@ -67,12 +67,12 @@ $info_user = get_user_info($config['id_user']); $group = get_parameter('group', 0); $id_custom_fields = get_parameter('id_custom_fields', 0); $id_custom_fields_data = get_parameter('id_custom_fields_data', -1); -$id_status = get_parameter('id_status', AGENT_MODULE_STATUS_NOT_NORMAL); +$id_status = get_parameter('id_status', -1); $module_search = get_parameter('module_search', ''); $search = get_parameter('uptbutton', ''); $id_filter = get_parameter('id_name', 0); $recursion = get_parameter('recursion', 0); -$module_status = get_parameter('module_status', AGENT_MODULE_STATUS_NOT_NORMAL); +$module_status = get_parameter('module_status', -1); // ===================================================================== // Custom filter search @@ -304,21 +304,12 @@ $table->data[2][5] = html_print_submit_button( ); if (check_acl($config['id_user'], 0, 'PM')) { - // Pass the parameters to the page that generates the csv file (arrays) + // Pass the parameters to the page that generates the csv file (arrays). $decode_id_status = base64_encode(json_encode($id_status)); $decode_module_status = base64_encode(json_encode($module_status)); $decode_filters = base64_encode(json_encode($filters)); $table->data[3][5] = '
'; @@ -755,6 +741,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) { echo ''; ui_require_css_file('datatables.min', 'include/styles/js/'); +ui_require_css_file('custom_field', 'include/styles/'); ui_require_javascript_file_enterprise('functions_csv'); ui_require_javascript_file('datatables.min'); ui_require_javascript_file('buttons.dataTables.min'); @@ -904,7 +891,6 @@ function dialog_filter_cf(title, type_form){ } function table_datatables(filters, indexed_descriptions, processing){ - console.log(indexed_descriptions); array_data = JSON.parse(filters); table = $('#datatables').DataTable({ processing: true, @@ -913,7 +899,6 @@ function table_datatables(filters, indexed_descriptions, processing){ searching: true, pageLength: Number(array_data.block_size), lengthMenu: [ 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 75, 100], - //buttons: [{ extend: 'csvHtml5', text: 'Save as csvHtml5' }], responsive: false, ajax: { type: "POST", @@ -933,21 +918,16 @@ function table_datatables(filters, indexed_descriptions, processing){ 'paging': true, 'ordering': true, 'scrollX': true, - 'scroller': true + 'scroller': true, }, }, language: { processing: processing, lengthMenu: "Show _MENU_ items per page", zeroRecords: "Nothing found. Please change your search term", - //info: "Page _PAGE_ of _PAGES_", infoEmpty: "No results", infoFiltered: "", search: "Search:", - /*paginate:{ - next: "Next", - previous: "Next" - }*/ }, sDom: '<"top"lfp>rt<"bottom"ip><"clear">', columns: [ |
---|