From 813bc4b851c8f97578d8dc6b8a5a48e481a2ef3b Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 13 Nov 2023 09:49:19 +0100 Subject: [PATCH] #12424 class error input ranges warning critical --- .../godmode/agentes/module_manager_editor_common.php | 3 +++ pandora_console/include/javascript/pandora.js | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index de08a299de..884696c932 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -2368,6 +2368,9 @@ ui_require_jquery_file('json'); ); } } else { + if (max_c !== 0 && max_c < min_c) { + error_c = 2; + } error_w = 1; paint_graph_status( 0, 0, 0, 0, 0, 0, error_w, error_c, diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 7da7aed2a5..332502d6b6 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1652,6 +1652,10 @@ function paint_graph_status( max_c = 0; } + // Remove Error class. + $("#text-max_warning").removeClass("input_error"); + $("#text-max_critical").removeClass("input_error"); + //if haven't errors if (error_w == 0 && error_c == 0) { //parse element @@ -1957,6 +1961,9 @@ function paint_graph_status( .html(message_error_critical) .style("text-anchor", "first"); } + if (error_c == 2) { + $("#text-max_critical").addClass("input_error"); + } } }