From faee7b7b14ab699b5e9674d7fb17515c37d8f60a Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 13 Mar 2019 16:32:58 +0100 Subject: [PATCH 001/206] Pending Q&A Former-commit-id: f41aafc6077f1b725cf7c9f360974ba62609eedd --- pandora_console/godmode/agentes/modificar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 4673bf2f46..dfaf6bcba8 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -162,7 +162,7 @@ echo ''; echo __('Group').' '; $own_info = get_user_info($config['id_user']); -if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) { +if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR')) { $return_all_group = false; } else { $return_all_group = true; From 97df41245e4b77efedd6659faa6b249b1698a3d9 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 13 Mar 2019 16:36:30 +0100 Subject: [PATCH 002/206] Para revision Former-commit-id: 5823cfd9976382ad8074d2ed8cf0340e24181693 --- pandora_console/godmode/agentes/modificar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index dfaf6bcba8..3094c2fdc8 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -162,7 +162,7 @@ echo ''; echo __('Group').' '; $own_info = get_user_info($config['id_user']); -if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR')) { +if (!$own_info['is_admin'] && check_acl($config['id_user'], 0, 'AW')) { $return_all_group = false; } else { $return_all_group = true; From f0d664eec3f7930513241eec057a6765f9185198 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 27 Mar 2019 12:29:15 +0100 Subject: [PATCH 003/206] Fixed bug in Agent-Module fullscreen view Former-commit-id: 7dfaa8e637af0d6a0865f5f6eb0505f79393d026 --- pandora_console/extensions/agents_modules.php | 132 ++++++++++-------- 1 file changed, 73 insertions(+), 59 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 8c0eaa7dae..7b2ffab6ee 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -1,23 +1,24 @@ '.__('Group').''; $filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;'); $filter_recursion_label = ''.__('Recursion').''; $filter_recursion = html_print_checkbox('recursion', 1, 0, true); - // groups module + // Groups module. $filter_module_groups_label = ''.__('Module group').''; $filter_module_groups = html_print_select_from_sql( 'SELECT * FROM tmodule_group ORDER BY name', @@ -146,7 +146,7 @@ function mainAgentsModules() 'width: auto;' ); - // agent + // Agent. $agents = agents_get_group_agents($group_id); if ((empty($agents)) || $agents == -1) { $agents = []; @@ -155,7 +155,7 @@ function mainAgentsModules() $filter_agents_label = ''.__('Agents').''; $filter_agents = html_print_select($agents, 'id_agents2[]', $agents_id, '', '', 0, true, true, true, '', false, 'min-width: 180px; max-width: 200px;'); - // type show + // Type show. $selection = [ 0 => __('Show common modules'), 1 => __('Show all modules'), @@ -163,12 +163,12 @@ function mainAgentsModules() $filter_type_show_label = ''.__('Show common modules').''; $filter_type_show = html_print_select($selection, 'selection_agent_module', $selection_a_m, '', '', 0, true, false, true, '', false, 'min-width: 180px;'); - // modules + // Modules. $all_modules = select_modules_for_agent_group($group_id, $agents_id, $selection_a_m, false); $filter_modules_label = ''.__('Module').''; $filter_modules = html_print_select($all_modules, 'module[]', $modules_selected, '', '', 0, true, true, false, '', false, 'min-width: 180px; max-width: 200px;'); - // update + // Update. $filter_update = html_print_submit_button(__('Update item'), 'edit_item', false, 'class="sub upd"', true); $onheader = [ @@ -178,10 +178,13 @@ function mainAgentsModules() 'combo_groups' => $filter_groups, ]; - // Old style table, we need a lot of special formatting,don't use table function - // Prepare old-style table + /* + * Old style table, we need a lot of special formatting,don't use table function. + * Prepare old-style table. + */ + if ($config['pure'] == 0) { - // Header + // Header. ui_print_page_header(__('Agents/Modules'), 'images/module_mc.png', false, '', false, $updated_time); echo ''; echo ''; @@ -193,38 +196,51 @@ function mainAgentsModules() $full_modules = urlencode(implode(';', $full_modules_selected)); $full_agents = urlencode(implode(';', $full_agents_id)); - $url = " index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset + $url = 'index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset &group_id=$group_id&modulegroup=$modulegroup&refresh=$refr&full_modules_selected=$full_modules - &full_agents_id=$full_agents&selection_agent_module=$selection_a_m"; + &full_agents_id=$full_agents&selection_agent_module=$selection_a_m'; } else { - $url = " index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr"; + $url = 'index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr'; } - // Floating menu - Start + // Floating menu - Start. echo '
'; echo ''; echo '
'; - // Floating menu - End + // Floating menu - End. ui_require_jquery_file('countdown'); } @@ -284,7 +300,7 @@ function mainAgentsModules() $count = 0; foreach ($agents as $agent) { - // TODO TAGS agents_get_modules + // TODO TAGS agents_get_modules. $module = agents_get_modules( $agent, false, @@ -332,7 +348,7 @@ function mainAgentsModules() } } } else { - // TODO TAGS agents_get_modules + // TODO TAGS agents_get_modules. $all_modules = agents_get_modules( $agents, false, @@ -407,11 +423,11 @@ function mainAgentsModules() if ($hor_offset > 0) { $new_hor_offset = ($hor_offset - $block); - echo "'; + ).''; } $nmodules = 0; @@ -433,11 +449,11 @@ function mainAgentsModules() if (($hor_offset + $block) < $nmodules) { $new_hor_offset = ($hor_offset + $block); - echo "'; + ).''; } echo ''; @@ -450,12 +466,12 @@ function mainAgentsModules() $filter_agents['id_grupo'] = $group_id; } - // Prepare pagination - $url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&'.'hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m; + // Prepare pagination. + $url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m; ui_pagination($total_pagination, $url); foreach ($agents as $agent) { - // Get stats for this group + // Get stats for this group. $agent_status = agents_get_status($agent['id_agente']); $alias = db_get_row('tagente', 'id_agente', $agent['id_agente']); if (empty($alias['alias'])) { @@ -464,29 +480,29 @@ function mainAgentsModules() switch ($agent_status) { case 4: - // Alert fired status + // Alert fired status. $rowcolor = 'group_view_alrm'; break; case 1: - // Critical status + // Critical status. $rowcolor = 'group_view_crit'; break; case 2: - // Warning status + // Warning status. $rowcolor = 'group_view_warn'; break; case 0: - // Normal status + // Normal status. $rowcolor = 'group_view_ok'; break; case 3: case -1: default: - // Unknown status + // Unknown status. $rowcolor = 'group_view_unk'; break; } @@ -495,7 +511,7 @@ function mainAgentsModules() echo "'; - // TODO TAGS agents_get_modules + // TODO TAGS agents_get_modules. $agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true); $nmodules = 0; @@ -620,15 +636,13 @@ $ignored_params['refresh'] = ''; $.each($('.th_class_module_r'), function (i, elem) { id = $(elem).attr('id').replace('th_module_r_', ''); $("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px'); - - //$("#div_module_r_" + id).css('margin-top', (max_width - $("#div_module_r_" + id).width()) + 'px'); $("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px'); $("#div_module_r_" + id).show(); }); var refr =" . $refr . "; var pure =" . $pure_var . "; - var href ='" . ui_get_url_refresh ($ignored_params) . "'; + var href =' '; if (pure) { var startCountDown = function (duration, cb) { @@ -638,13 +652,13 @@ $ignored_params['refresh'] = ''; t.setTime(t.getTime() + duration * 1000); $('div.vc-countdown').countdown({ until: t, - format: 'MS', - layout: '(%M%nn%M:%S%nn%S Until refresh)', + layout: '(%M%nn%M:%S%nn%S ) ', alwaysExpire: true, onExpiry: function () { $('div.vc-countdown').countdown('destroy'); url = js_html_entity_decode( href ) + duration; $(document).attr ("location", url); + cb(); } }); } @@ -826,4 +840,4 @@ $ignored_params['refresh'] = ''; } } - \ No newline at end of file + From 4c95a160defd8039fa345c36e361537b29c867bf Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 1 Apr 2019 17:57:22 +0200 Subject: [PATCH 004/206] Changed Jquery .text for .html for html conversion Former-commit-id: 9dd9c63e637e504ff51e38165687bacfae59ed38 --- pandora_console/godmode/alerts/configure_alert_action.php | 4 ++-- pandora_console/include/javascript/pandora_alerts.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index c29cda623b..e7927a2a3a 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -318,9 +318,9 @@ $(document).ready (function () { jQuery.post (, values, function (data, status) { - original_command = js_html_entity_decode (data["command"]); + original_command = data["command"]; render_command_preview (original_command); - command_description = js_html_entity_decode (data["description"]); + command_description = data["description"]; render_command_description(command_description); var max_fields = parseInt(''); diff --git a/pandora_console/include/javascript/pandora_alerts.js b/pandora_console/include/javascript/pandora_alerts.js index 41f8d20ad8..668950ce9c 100644 --- a/pandora_console/include/javascript/pandora_alerts.js +++ b/pandora_console/include/javascript/pandora_alerts.js @@ -1,5 +1,4 @@ var original_command = ""; - function parse_alert_command(command, classs) { if (classs == "recovery") { classs = "fields_recovery"; @@ -28,13 +27,13 @@ function parse_alert_command(command, classs) { } function render_command_preview(original_command) { - $("#textarea_command_preview").text( + $("#textarea_command_preview").html( parse_alert_command(original_command, "") ); } function render_command_recovery_preview(original_command) { - $("#textarea_command_recovery_preview").text( + $("#textarea_command_recovery_preview").html( parse_alert_command(original_command, "recovery") ); } From 9c3d26f12030f683f8e7e32a13fe3aafd819ec22 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 3 Apr 2019 11:22:20 +0200 Subject: [PATCH 005/206] Deleted Servers menu option for operator(read) Former-commit-id: 89723d23cb2199152cfc9f3d72997ddcd7b31796 --- pandora_console/godmode/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index ac3154b657..6224d361c9 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -208,7 +208,7 @@ if (!empty($sub)) { } -if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, 'RR')) { +if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'PM')) { // Servers $menu_godmode['gservers']['text'] = __('Servers'); $menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server'; From 9df4cb86dc496c8aecd56be96f785695da16b25d Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Thu, 4 Apr 2019 09:45:29 +0200 Subject: [PATCH 006/206] Added inline-block and fixed size to label Former-commit-id: 40c1ca6d5c06fb771eb7e8d1ac81dde6e7012cfb --- pandora_console/include/styles/login.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/styles/login.css b/pandora_console/include/styles/login.css index bffcda19d5..648eadb503 100644 --- a/pandora_console/include/styles/login.css +++ b/pandora_console/include/styles/login.css @@ -407,6 +407,8 @@ div.form_message_alert ul li input { } div.form_message_alert ul li label { + display: inline-block; + width: 145px; font-size: 10pt; padding-right: 20px; } From 1b6a01cfd5ac0f97266abd35471788ef32cca8fb Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Thu, 4 Apr 2019 14:11:44 +0200 Subject: [PATCH 007/206] Changed modal size to fit err. msg Former-commit-id: 2676ac1d217cc5245ce09277b8b76d1d562cdf5f --- .../include/javascript/jquery.pandora.js | 697 +++++++++--------- 1 file changed, 358 insertions(+), 339 deletions(-) diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 9e0b3447af..ed75400386 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -1,386 +1,405 @@ (function($) { - $.fn.check = function () { - return this.each (function () { - this.checked = true; - });}; + $.fn.check = function() { + return this.each(function() { + this.checked = true; + }); + }; - $.fn.uncheck = function () { - return this.each (function () { - this.checked = false; - });}; + $.fn.uncheck = function() { + return this.each(function() { + this.checked = false; + }); + }; - $.fn.enable = function () { - return $(this).removeAttr ("disabled"); - }; + $.fn.enable = function() { + return $(this).removeAttr("disabled"); + }; - $.fn.disable = function () { - return $(this).attr ("disabled", "disabled"); - }; + $.fn.disable = function() { + return $(this).attr("disabled", "disabled"); + }; - $.fn.pulsate = function () { - var i = 0; - for (i = 0; i <= 2; i++) { - $(this).fadeOut ("slow").fadeIn ("slow"); - } - }; + $.fn.pulsate = function() { + var i = 0; + for (i = 0; i <= 2; i++) { + $(this) + .fadeOut("slow") + .fadeIn("slow"); + } + }; - $.fn.showMessage = function (msg) { - return $(this).hide ().empty () - // here, previously .text (msg) - .html (msg) - .slideDown (); - }; -}) (jQuery); + $.fn.showMessage = function(msg) { + return ( + $(this) + .hide() + .empty() + // here, previously .text (msg) + .html(msg) + .slideDown() + ); + }; +})(jQuery); -$(document).ready (function () { - $("a#show_messages_dialog").click (function () { - jQuery.post ("ajax.php", - { - "page": "operation/messages/message_list" - }, - function (data, status) { - $("#dialog_messages").hide () - .empty () - .append (data) - .dialog ({ - title: $("a#show_messages_dialog").attr ("title"), - resizable: false, - modal: true, - overlay: { - opacity: 0.5, - background: "black" - }, - width: 700, - height: 300 - }).show (); - }, - "html" - ); +$(document).ready(function() { + $("a#show_messages_dialog").click(function() { + jQuery.post( + "ajax.php", + { + page: "operation/messages/message_list" + }, + function(data, status) { + $("#dialog_messages") + .hide() + .empty() + .append(data) + .dialog({ + title: $("a#show_messages_dialog").attr("title"), + resizable: false, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 700, + height: 300 + }) + .show(); + }, + "html" + ); - return false; - }); + return false; + }); - $("a.show_systemalert_dialog").click (function () { - $('body').append( "
" ); - $("#opacidad").css('opacity', 0.5); + $("a.show_systemalert_dialog").click(function() { + $("body").append( + "
" + ); + $("#opacidad").css("opacity", 0.5); - jQuery.post ("ajax.php", - { - "page": "operation/system_alert"}, - function (data, status) { - $("#alert_messages").show(); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('opacity', 1); + jQuery.post( + "ajax.php", + { + page: "operation/system_alert" + }, + function(data, status) { + $("#alert_messages").show(); + $("#alert_messages") + .empty() + .append(data); + $("#alert_messages").css("opacity", 1); + }, + "html" + ); + }); - }, - "html" - ); - }); - - $("a.modalpopup").click (function () { - var elem = $(this).attr("id"); - $('body').append( "
" ); - $("#opacidad").css('opacity', 0.5); + $("a.modalpopup").click(function() { + var elem = $(this).attr("id"); + $("body").append( + "
" + ); + $("#opacidad").css("opacity", 0.5); - jQuery.post ("ajax.php", - { - "page": "general/alert_enterprise", - "message": elem - }, - function (data, status) { - $("#alert_messages").show(); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('opacity', 1); - }, - "html" - ); - return false; - }); + jQuery.post( + "ajax.php", + { + page: "general/alert_enterprise", + message: elem + }, + function(data, status) { + $("#alert_messages").show(); + $("#alert_messages") + .empty() + .append(data); + $("#alert_messages").css("opacity", 1); + }, + "html" + ); + return false; + }); - // Creacion de ventana modal y botones - $(".publienterprise").click (function () { - var elem = $(this).attr("id"); - $('body').append( "
" ); - $("#opacidad").css('opacity', 0.5); + // Creacion de ventana modal y botones + $(".publienterprise").click(function() { + var elem = $(this).attr("id"); + $("body").append( + "
" + ); + $("#opacidad").css("opacity", 0.5); - jQuery.post ("ajax.php", - { - "page": "general/alert_enterprise", - "message": elem - }, - function (data, status) { - $("#alert_messages").show(); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('opacity', 1); - }, - "html" - ); - return false; - }); - - - $(".publienterprisehide").click (function () { - var elem = $(this).attr("id"); - $('body').append( "
" ); - $("#opacidad").css('opacity', 0.5); + jQuery.post( + "ajax.php", + { + page: "general/alert_enterprise", + message: elem + }, + function(data, status) { + $("#alert_messages").show(); + $("#alert_messages") + .empty() + .append(data); + $("#alert_messages").css("opacity", 1); + }, + "html" + ); + return false; + }); - jQuery.post ("ajax.php", - { - "page": "general/alert_enterprise", - "message": elem - }, - function (data, status) { - $("#alert_messages").show(); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('opacity', 1); - }, - "html" - ); - return false; - }); + $(".publienterprisehide").click(function() { + var elem = $(this).attr("id"); + $("body").append( + "
" + ); + $("#opacidad").css("opacity", 0.5); + jQuery.post( + "ajax.php", + { + page: "general/alert_enterprise", + message: elem + }, + function(data, status) { + $("#alert_messages").show(); + $("#alert_messages") + .empty() + .append(data); + $("#alert_messages").css("opacity", 1); + }, + "html" + ); + return false; + }); + if ($("#license_error_msg_dialog").length) { + if (typeof process_login_ok == "undefined") process_login_ok = 0; - if ($('#license_error_msg_dialog').length) { - if (typeof(process_login_ok) == "undefined") - process_login_ok = 0; + if (typeof show_error_license == "undefined") show_error_license = 0; - if (typeof(show_error_license) == "undefined") - show_error_license = 0; + if (process_login_ok || show_error_license) { + $("#license_error_msg_dialog").dialog({ + dialogClass: "no-close", + closeOnEscape: false, + resizable: false, + draggable: true, + modal: true, + height: 470, + width: 850, + overlay: { + opacity: 0.5, + background: "black" + }, + open: function() { + var remaining = 30; - if (process_login_ok || show_error_license) { + // Timeout counter. + var count = function() { + if (remaining > 0) { + $("#license_error_remaining").text(remaining); + remaining -= 1; + } else { + $("#license_error_remaining").hide(); + $("#ok_buttom").show(); + clearInterval(count); + } + }; - $( "#license_error_msg_dialog" ).dialog({ - dialogClass: "no-close", - closeOnEscape: false, - resizable: false, - draggable: true, - modal: true, - height: 450, - width: 850, - overlay: { - opacity: 0.5, - background: "black" - }, - open: function() { - var remaining = 30; + setInterval(count, 1000); + } + }); - // Timeout counter. - var count = function() { - if (remaining > 0) { - $("#license_error_remaining").text(remaining); - remaining -= 1; - } else { - $("#license_error_remaining").hide(); - $("#ok_buttom").show(); - clearInterval(count); - } - } + $("#submit-hide-license-error-msg").click(function() { + $("#license_error_msg_dialog").dialog("close"); + }); + } + } - setInterval(count, 1000); - } - }); + if ($("#msg_change_password").length) { + $("#msg_change_password").dialog({ + resizable: false, + draggable: true, + modal: true, + height: 450, + width: 620, + overlay: { + opacity: 0.5, + background: "black" + } + }); + } - $("#submit-hide-license-error-msg").click (function () { - $("#license_error_msg_dialog" ).dialog('close') - }); + if ($("#login_blocked").length) { + $("#login_blocked").dialog({ + resizable: true, + draggable: true, + modal: true, + height: 200, + width: 520, + overlay: { + opacity: 0.5, + background: "black" + } + }); + } - } - } + if ($("#login_correct_pass").length) { + $("#login_correct_pass").dialog({ + resizable: true, + draggable: true, + modal: true, + height: 200, + width: 520, + overlay: { + opacity: 0.5, + background: "black" + } + }); + } + forced_title_callback(); - if ($('#msg_change_password').length) { + $(document).on("scroll", function() { + if ( + document.documentElement.scrollTop != 0 || + document.body.scrollTop != 0 + ) { + if ($("#head").css("position") == "fixed") { + if ($("#menu").css("position") == "fixed") { + $("#menu").css("top", "80px"); + } else { + $("#menu").css("top", "60px"); + } + } else { + if ($("#menu").css("position") == "fixed") { + $("#menu").css("top", "20px"); + } else { + $("#menu").css("top", "80px"); + } + } + } else { + if ($("#head").css("position") == "fixed") { + if ($("#menu").css("position") == "fixed") { + $("#menu").css("top", "80px"); + } else { + $("#menu").css("top", "60px"); + } + } else { + if ($("#menu").css("position") == "fixed") { + $("#menu").css("top", "80px"); + } else { + $("#menu").css("top", "80px"); + } + } + } - $( "#msg_change_password" ).dialog({ - resizable: false, - draggable: true, - modal: true, - height: 350, - width: 620, - overlay: { - opacity: 0.5, - background: "black" - } - }); + // if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){ + // if($('#head').css('position') =='fixed'){ + // $('#menu').css('top','80px'); + // } + // else{ + // $('#menu').css('top','20px'); + // } + // } + // else{ + // if($('#head').css('position') =='fixed'){ + // if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){ + // $('#menu').css('top','60px'); + // }else{ + // $('#menu').css('top','80px'); + // } + // + // } + // else{ + // $('#menu').css('top','60px'); + // } + // } + }); - } - - if ($('#login_blocked').length) { - - $( "#login_blocked" ).dialog({ - resizable: true, - draggable: true, - modal: true, - height: 200, - width: 520, - overlay: { - opacity: 0.5, - background: "black" - } - }); - - } - - if ($('#login_correct_pass').length) { - - $( "#login_correct_pass" ).dialog({ - resizable: true, - draggable: true, - modal: true, - height: 200, - width: 520, - overlay: { - opacity: 0.5, - background: "black" - } - }); - - } - - forced_title_callback(); - - - $(document).on("scroll", function(){ - - if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){ - if($('#head').css('position') =='fixed'){ - if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','80px'); - } else { - $('#menu').css('top','60px'); - } - } else { - if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','20px'); - } else { - $('#menu').css('top','80px'); - } - } - } else { - if($('#head').css('position') =='fixed'){ - if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','80px'); - } else { - $('#menu').css('top','60px'); - } - } else { - if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','80px'); - } else { - $('#menu').css('top','80px'); - } - } - } - - // if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){ - // if($('#head').css('position') =='fixed'){ - // $('#menu').css('top','80px'); - // } - // else{ - // $('#menu').css('top','20px'); - // } - // } - // else{ - // if($('#head').css('position') =='fixed'){ - // if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){ - // $('#menu').css('top','60px'); - // }else{ - // $('#menu').css('top','80px'); - // } - // - // } - // else{ - // $('#menu').css('top','60px'); - // } - // } - }); - - $("#alert_messages").draggable(); - $("#alert_messages").css({'left':+parseInt(screen.width/2)-parseInt($("#alert_messages").css('width'))/2+'px'}); - + $("#alert_messages").draggable(); + $("#alert_messages").css({ + left: + +parseInt(screen.width / 2) - + parseInt($("#alert_messages").css("width")) / 2 + + "px" + }); }); - - - function forced_title_callback() { - // Forced title code - $('body').on('mouseenter', '.forced_title', function() { - /////////////////////////////////////////// - // Put the layer in the left-top corner to fill it - /////////////////////////////////////////// - $('#forced_title_layer').css('left', 0); - $('#forced_title_layer').css('top', 0); + // Forced title code + $("body").on("mouseenter", ".forced_title", function() { + /////////////////////////////////////////// + // Put the layer in the left-top corner to fill it + /////////////////////////////////////////// + $("#forced_title_layer").css("left", 0); + $("#forced_title_layer").css("top", 0); - /////////////////////////////////////////// - // Get info of the image - /////////////////////////////////////////// + /////////////////////////////////////////// + // Get info of the image + /////////////////////////////////////////// - var img_top = $(this).offset().top; - var img_width = $(this).width(); - var img_height = $(this).height(); - var img_id = $(this).attr('id'); - var img_left_mid = $(this).offset().left + (img_width / 2); + var img_top = $(this).offset().top; + var img_width = $(this).width(); + var img_height = $(this).height(); + var img_id = $(this).attr("id"); + var img_left_mid = $(this).offset().left + img_width / 2; - /////////////////////////////////////////// - // Put title in the layer - /////////////////////////////////////////// + /////////////////////////////////////////// + // Put title in the layer + /////////////////////////////////////////// - // If the '.forced_title' element has 'use_title_for_force_title' = 1 - // into their 'data' prop, the element title will be used for the - // content. - if ($(this).data("use_title_for_force_title")) { - var title = $(this).data("title"); - } - else { - var title = $('#forced_title_'+img_id).html(); - } + // If the '.forced_title' element has 'use_title_for_force_title' = 1 + // into their 'data' prop, the element title will be used for the + // content. + if ($(this).data("use_title_for_force_title")) { + var title = $(this).data("title"); + } else { + var title = $("#forced_title_" + img_id).html(); + } - $('#forced_title_layer').html(title); + $("#forced_title_layer").html(title); - /////////////////////////////////////////// - // Get info of the layer - /////////////////////////////////////////// + /////////////////////////////////////////// + // Get info of the layer + /////////////////////////////////////////// - var layer_width = $('#forced_title_layer').width(); - var layer_height = $('#forced_title_layer').height(); + var layer_width = $("#forced_title_layer").width(); + var layer_height = $("#forced_title_layer").height(); - /////////////////////////////////////////// - // Obtain the new position of the layer - /////////////////////////////////////////// + /////////////////////////////////////////// + // Obtain the new position of the layer + /////////////////////////////////////////// - // Jquery doesnt know the padding of the layer - var layer_padding = 4; + // Jquery doesnt know the padding of the layer + var layer_padding = 4; - // Deduct padding of both sides - var layer_top = img_top - layer_height - (layer_padding * 2) - 5; - if (layer_top < 0) { - layer_top = img_top + img_height + (layer_padding * 2); - } + // Deduct padding of both sides + var layer_top = img_top - layer_height - layer_padding * 2 - 5; + if (layer_top < 0) { + layer_top = img_top + img_height + layer_padding * 2; + } - // Deduct padding of one side - var layer_left = img_left_mid - (layer_width / 2) - layer_padding; - if (layer_left < 0) { - layer_left = 0; - } + // Deduct padding of one side + var layer_left = img_left_mid - layer_width / 2 - layer_padding; + if (layer_left < 0) { + layer_left = 0; + } - var real_layer_width = layer_width + (layer_padding * 2) + 5; - var layer_right = layer_left + real_layer_width; - var screen_width = $(window).width(); - if (screen_width < layer_right) { - layer_left = screen_width - real_layer_width; - } + var real_layer_width = layer_width + layer_padding * 2 + 5; + var layer_right = layer_left + real_layer_width; + var screen_width = $(window).width(); + if (screen_width < layer_right) { + layer_left = screen_width - real_layer_width; + } - /////////////////////////////////////////// - // Set the layer position and show - /////////////////////////////////////////// + /////////////////////////////////////////// + // Set the layer position and show + /////////////////////////////////////////// - $('#forced_title_layer').css('left', layer_left); - $('#forced_title_layer').css('top', layer_top); - $('#forced_title_layer').show(); - }); - $('body').on('mouseout', '.forced_title', function () { - $('#forced_title_layer').hide().empty(); - }); + $("#forced_title_layer").css("left", layer_left); + $("#forced_title_layer").css("top", layer_top); + $("#forced_title_layer").show(); + }); + $("body").on("mouseout", ".forced_title", function() { + $("#forced_title_layer") + .hide() + .empty(); + }); } - From 5998b30a161d95cac697f43084e17f405ea2d7b3 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 10 Apr 2019 17:30:35 +0200 Subject: [PATCH 008/206] Added css hint to discovery tasks when task list is empty Former-commit-id: 1da71cda1b1ed376bb6bae0281b0dd882dbfbeff --- pandora_console/general/firts_task/recon_view.php | 1 + pandora_console/godmode/servers/discovery.php | 5 +++++ pandora_console/include/styles/discovery-hint.css | 10 ++++++++++ 3 files changed, 16 insertions(+) create mode 100644 pandora_console/include/styles/discovery-hint.css diff --git a/pandora_console/general/firts_task/recon_view.php b/pandora_console/general/firts_task/recon_view.php index 282a6b75be..8c59b23f64 100755 --- a/pandora_console/general/firts_task/recon_view.php +++ b/pandora_console/general/firts_task/recon_view.php @@ -35,6 +35,7 @@ ui_require_css_file('firts_task');

+ diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index d9e19abdff..e20588b97d 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -130,5 +130,10 @@ if ($classname_selected === null) { } } + // Show hints if there is no task + if (get_parameter('discovery_hint', 0)) { + ui_require_css_file('discovery-hint'); + } + Wizard::printBigButtonsList($wiz_data); } diff --git a/pandora_console/include/styles/discovery-hint.css b/pandora_console/include/styles/discovery-hint.css new file mode 100644 index 0000000000..8247b26c96 --- /dev/null +++ b/pandora_console/include/styles/discovery-hint.css @@ -0,0 +1,10 @@ +/* + * Discovery show help css + */ +li.discovery:not(:first-child) > a:hover { + color: #000; +} + +li.discovery:not(:first-child) div.data_container:not(:hover) { + box-shadow: 2px 2px 10px #80ba27; +} From 6276936e1d30fffe29cb4e2e0fa1122e0d7d247e Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 10 Apr 2019 17:51:50 +0200 Subject: [PATCH 009/206] Added info message Former-commit-id: 11f4c9c8b52f6ef3bed2236534010f2caa3bb8e0 --- pandora_console/godmode/servers/discovery.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index e20588b97d..a2c0abd5d6 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -133,6 +133,7 @@ if ($classname_selected === null) { // Show hints if there is no task if (get_parameter('discovery_hint', 0)) { ui_require_css_file('discovery-hint'); + ui_print_info_message(__('You must create a task first')); } Wizard::printBigButtonsList($wiz_data); From 553ec48f5451a331f33e292ee37ff14bbe88bc57 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Mon, 15 Apr 2019 15:21:07 +0200 Subject: [PATCH 010/206] changed title plugin creation to plugin registration Former-commit-id: bd5ee299d91c52d3064eafa85b092b525b70381a --- pandora_console/godmode/servers/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index b04643e1c3..5ff8022afa 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -281,7 +281,7 @@ if (($create != '') || ($view != '')) { } else { if ($create != '') { ui_print_page_header( - __('Plugin creation'), + __('Plugin registration'), 'images/gm_servers.png', false, 'plugin_definition', From e9e24505fe43057d3d44ca36ebcfd37e405f145f Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Tue, 30 Apr 2019 10:29:42 +0200 Subject: [PATCH 011/206] Added option in massive delete alerts to show alerts on disabled modules Former-commit-id: 2ee8db665f9e3ae657887e61e4b99dccd2e6e3a9 --- .../godmode/massive/massive_delete_alerts.php | 19 ++++++++++++++++++- pandora_console/include/functions_alerts.php | 1 - 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/massive/massive_delete_alerts.php b/pandora_console/godmode/massive/massive_delete_alerts.php index 862d54bbbc..d7f316fd4d 100755 --- a/pandora_console/godmode/massive/massive_delete_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_alerts.php @@ -31,6 +31,7 @@ require_once $config['homedir'].'/include/functions_users.php'; if (is_ajax()) { $get_agents = (bool) get_parameter('get_agents'); $recursion = (int) get_parameter('recursion'); + $disabled_modules = (int) get_parameter('disabled_modules'); if ($get_agents) { $id_group = (int) get_parameter('id_group'); @@ -44,12 +45,18 @@ if (is_ajax()) { $groups = [$id_group]; } + if ($disabled_modules == 0) { + $filter['tagente_modulo.disabled'] = '<> 1'; + } else { + unset($filter['tagente_modulo.disabled']); + } + $agents_alerts = []; foreach ($groups as $group) { $agents_alerts_one_group = alerts_get_agents_with_alert_template( $id_alert_template, $group, - false, + $filter, [ 'tagente.alias', 'tagente.id_agente', @@ -253,6 +260,11 @@ $table->data[1][1] = html_print_select_groups( '', $id_alert_template == 0 ); + +$table->data[0][2] = __('Show alerts on disabled modules'); +$table->data[0][3] = html_print_checkbox('disabled_modules', 1, false, true, false); + + $table->data[1][2] = __('Group recursion'); $table->data[1][3] = html_print_checkbox('recursion', 1, false, true, false); @@ -360,6 +372,7 @@ $(document).ready (function () { "get_agents" : 1, "id_group" : this.value, "recursion" : $("#checkbox-recursion").is(":checked") ? 1 : 0, + "disabled_modules" : $("#checkbox-disabled_modules").is(":checked") ? 1 : 0, "id_alert_template" : $("#id_alert_template").val(), // Add a key prefix to avoid auto sorting in js object conversion "keys_prefix" : "_" @@ -387,6 +400,10 @@ $(document).ready (function () { $("#modules_selection_mode").change (function() { $("#id_agents").trigger('change'); }); + + $("#checkbox-disabled_modules").click(function () { + $("#id_group").trigger("change"); + }); }); /* ]]> */ diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 6bfe709c32..e1cc6286d4 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -1913,7 +1913,6 @@ function alerts_get_agents_with_alert_template($id_alert_template, $id_group, $f $filter[] = 'tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module'; $filter[] = 'tagente_modulo.id_agente = tagente.id_agente'; $filter['id_alert_template'] = $id_alert_template; - $filter['tagente_modulo.disabled'] = '<> 1'; $filter['delete_pending'] = '<> 1'; if (empty($id_agents)) { From 8f2dce439b39ff18ea9846261f1d6250196c7de6 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 16 May 2019 12:13:58 +0200 Subject: [PATCH 012/206] Add javascript for insert name to reports Former-commit-id: 75e51a652c0e713379093196ad04a10505c38447 --- .../godmode/reporting/reporting_builder.item_editor.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 549b4eebbb..c523f9415b 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -3502,6 +3502,7 @@ $(document).ready (function () { $("#submit-create_item").click(function () { var type = $('#type').val(); + var name = $('#text-name').val(); switch (type){ case 'alert_report_module': case 'alert_report_agent': @@ -3532,6 +3533,13 @@ $(document).ready (function () { default: break; } + + if($('#text-name').val() == ''){ + alert( ); + return false; + } + + }); $("#submit-edit_item").click(function () { From c0f40a8d5f81a9bc9dbb6ac4d7ea1bcc88b3f8c2 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 21 May 2019 14:23:14 +0200 Subject: [PATCH 013/206] Update dbmetaconsole get setup_id behaviour --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 296be928a4..343aa180a0 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -4807,7 +4807,7 @@ sub pandora_process_event_replication ($) { } # Get server id on metaconsole - my $metaconsole_server_id = enterprise_hook('get_metaconsole_setup_server_id', [$dbh_metaconsole, safe_input($pa_config->{'servername'})]); + my $metaconsole_server_id = enterprise_hook('get_metaconsole_setup_server_id', [$dbh]); # If the server name is not found in metaconsole setup: abort if($metaconsole_server_id == -1) { From bd88cbd42deef83264c72f43da7103d4736796cb Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 22 May 2019 15:31:59 +0200 Subject: [PATCH 014/206] 1st approach simplifying MC management --- pandora_console/general/login_page.php | 4 ++-- pandora_console/include/constants.php | 2 +- pandora_console/include/functions.php | 28 +++++++++++++++++++++++++- pandora_server/util/pandora_manage.pl | 6 ++---- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index d8e28223c6..d90e004c79 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -19,8 +19,8 @@ if (isset($config['homedir'])) { ui_require_css_file('login'); -require_once $homedir.'include/functions_ui.php'; -require_once $homedir.'include/functions.php'; +require_once __DIR__.'/../include/functions_ui.php'; +require_once __DIR__.'/../include/functions.php'; require_once __DIR__.'/../include/functions_html.php'; diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 7266e9eff4..c0abbc4f1e 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -65,7 +65,7 @@ define('ERR_NODATA', -70000); define('ERR_CONNECTION', -80000); define('ERR_DISABLED', -90000); define('ERR_WRONG', -100000); -define('ERR_WRONG_NAME', -100001); +define('ERR_WRONG_MR', -100001); define('ERR_WRONG_PARAMETERS', -100002); define('ERR_ACL', -110000); define('ERR_AUTH', -120000); diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 8628efb700..d2b9696269 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1469,11 +1469,20 @@ function enterprise_include($filename) } +/** + * Includes a file from enterprise section. + * + * @param string $filename Target file. + * + * @return mixed Result code. + */ function enterprise_include_once($filename) { global $config; - // Load enterprise extensions + defined('ENTERPRISE_DIR') || define('ENTERPRISE_DIR', 'enterprise'); + + // Load enterprise extensions. $filepath = realpath($config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename); if ($filepath === false) { @@ -1573,6 +1582,11 @@ function safe_sql_string($string) } +/** + * Verifies if current Pandora FMS installation is a Metaconsole. + * + * @return boolean True metaconsole installation, false if not. + */ function is_metaconsole() { global $config; @@ -1580,6 +1594,18 @@ function is_metaconsole() } +/** + * Check if current Pandora FMS installation has joined a Metaconsole env. + * + * @return boolean True joined, false if not. + */ +function has_metaconsole() +{ + global $config; + return (bool) $config['node_metaconsole'] && (bool) $config['metaconsole_node_id']; +} + + /** * @brief Check if there is management operations are allowed in current context * (node // meta) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a3cef76a26..20faec7fed 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -3801,9 +3801,8 @@ sub cli_get_agent_group() { else { my $id_group = get_agent_group ($dbh_metaconsole, $id_agent); my $group_name = get_group_name ($dbh_metaconsole, $id_group); - my $metaconsole_name = enterprise_hook('get_metaconsole_setup_server_name',[$dbh, $server]); $agent_name = safe_output($agent_name); - print "[INFO] Server: $metaconsole_name Agent: $agent_name Name Group: $group_name\n\n"; + print "[INFO] Agent: $agent_name Name Group: $group_name\n\n"; } } } @@ -3843,7 +3842,6 @@ sub cli_get_agent_group_id() { foreach my $server (@servers_id) { my $dbh_metaconsole = enterprise_hook('get_node_dbh',[$conf, $server, $dbh]); - my $metaconsole_name = enterprise_hook('get_metaconsole_setup_server_name',[$dbh, $server]); my $id_agent = get_agent_id($dbh_metaconsole,$agent_name); if ($id_agent == -1) { @@ -3852,7 +3850,7 @@ sub cli_get_agent_group_id() { else { my $id_group = get_agent_group ($dbh_metaconsole, $id_agent); $agent_name = safe_output($agent_name); - print "Server: $metaconsole_name Agent: $agent_name ID Group: $id_group\n\n"; + print "Agent: $agent_name ID Group: $id_group\n\n"; } } } From d5ac57064bf3deceef1c99cdcc229afe7029c480 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 29 May 2019 11:34:23 +0200 Subject: [PATCH 015/206] Condition is added to keep the selection color in the main menu --- pandora_console/include/functions_menu.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 0dbe1049bc..e26acd5cac 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -50,6 +50,12 @@ function menu_print_menu(&$menu) $sec = (string) get_parameter('sec'); $sec2 = (string) get_parameter('sec2'); + if ($sec2 == 'operation/agentes/ver_agente') { + $sec2 = 'godmode/agentes/configurar_agente'; + } else { + $sec2 = (string) get_parameter('sec2'); + } + $menu_selected = false; $allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']); From e37d120115978b159d0cd29291fdb438129ccee0 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 30 May 2019 13:58:57 +0200 Subject: [PATCH 016/206] Review 1 --- pandora_console/include/styles/pandora.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b4fa370521..44ac0d09f4 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -567,7 +567,6 @@ input.sub { font-weight: normal; -moz-border-radius: 2px; -webkit-border-radius: 2px; - height: auto !important; border-radius: 2px; font-size: 1.2em; background-color: #fff; @@ -843,7 +842,6 @@ input.filter, input.pdf, input.spinn { padding-right: 30px; - height: 23px; } input.next { From 40cca5e1e3c01e746ff3e5b2dbf7ae1552fa5f57 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 30 May 2019 18:21:13 +0200 Subject: [PATCH 017/206] BIG style change, erased all important flags --- .../realtime_graphs/realtime_graphs.css | 2 +- pandora_console/general/footer.php | 14 +- pandora_console/general/main_menu.php | 6 - .../visual_console_builder.editor.php | 2 + .../godmode/update_manager/update_manager.css | 44 +- pandora_console/include/functions_menu.php | 6 +- pandora_console/include/functions_ui.php | 4 +- .../include/styles/agent_manager.css | 8 +- pandora_console/include/styles/agent_view.css | 8 +- pandora_console/include/styles/common.css | 8 +- pandora_console/include/styles/dialog.css | 164 ++-- pandora_console/include/styles/discovery.css | 22 +- pandora_console/include/styles/firts_task.css | 2 +- pandora_console/include/styles/footer.css | 33 + pandora_console/include/styles/ie.css | 4 +- pandora_console/include/styles/install.css | 8 +- .../include/styles/jquery-ui.min.css | 7 + .../js/images/ui-bg_flat_0_aaaaaa_40x100.png | 844 +++++++++++++++++ .../js/images/ui-icons_444444_256x240.png | 850 ++++++++++++++++++ .../js/images/ui-icons_555555_256x240.png | 850 ++++++++++++++++++ .../js/images/ui-icons_777620_256x240.png | 850 ++++++++++++++++++ .../js/images/ui-icons_777777_256x240.png | 850 ++++++++++++++++++ .../js/images/ui-icons_cc0000_256x240.png | 850 ++++++++++++++++++ .../js/images/ui-icons_ffffff_256x240.png | 850 ++++++++++++++++++ pandora_console/include/styles/js/introjs.css | 8 +- .../include/styles/js/jquery-ui_custom.css | 142 +-- pandora_console/include/styles/login.css | 47 +- pandora_console/include/styles/menu.css | 156 ++-- pandora_console/include/styles/pandora.css | 762 ++++++---------- .../include/styles/pandora_black.css | 420 ++++----- .../include/styles/pandora_forms.css | 4 +- .../include/styles/pandora_green_old.css | 438 ++++----- .../include/styles/pandora_minimal.css | 16 +- pandora_console/include/styles/register.css | 38 +- .../include/styles/visual_maps.css | 172 ++++ pandora_console/index.php | 5 +- pandora_console/mobile/include/style/main.css | 320 +++---- 37 files changed, 7395 insertions(+), 1419 deletions(-) create mode 100644 pandora_console/include/styles/footer.css create mode 100644 pandora_console/include/styles/jquery-ui.min.css create mode 100644 pandora_console/include/styles/js/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 pandora_console/include/styles/js/images/ui-icons_444444_256x240.png create mode 100644 pandora_console/include/styles/js/images/ui-icons_555555_256x240.png create mode 100644 pandora_console/include/styles/js/images/ui-icons_777620_256x240.png create mode 100644 pandora_console/include/styles/js/images/ui-icons_777777_256x240.png create mode 100644 pandora_console/include/styles/js/images/ui-icons_cc0000_256x240.png create mode 100644 pandora_console/include/styles/js/images/ui-icons_ffffff_256x240.png create mode 100644 pandora_console/include/styles/visual_maps.css diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.css b/pandora_console/extensions/realtime_graphs/realtime_graphs.css index ab6c94e238..2219c6152a 100644 --- a/pandora_console/extensions/realtime_graphs/realtime_graphs.css +++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.css @@ -11,5 +11,5 @@ #graph_container { width: 800px; - margin: 20px auto !important; + margin: 20px auto; } diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php index b35123b5d3..dcc894989b 100644 --- a/pandora_console/general/footer.php +++ b/pandora_console/general/footer.php @@ -20,6 +20,8 @@ if (isset($_SERVER['REQUEST_TIME'])) { $time = get_system_time(); } +ui_require_css_file('footer'); + $license_file = 'general/license/pandora_info_'.$config['language'].'.html'; if (! file_exists($config['homedir'].$license_file)) { $license_file = 'general/license/pandora_info_en.html'; @@ -41,9 +43,17 @@ if ($current_package == 0) { $build_package_version = $current_package; } -echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR'])); +echo __( + '%s %s - Build %s - MR %s', + get_product_name(), + $pandora_version, + $build_package_version, + $config['MR'] +); +echo '
'; +echo ''.__('Page generated on %s', date('Y-m-d H:i:s')).''; + -echo ' '; if (isset($config['debug'])) { $cache_info = []; diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index 877f171090..ca6c0fd473 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -30,12 +30,6 @@ $(document).ready(function(){ } }); - -// Set the height of the menu. -$(window).on('load', function (){ - $("#menu_full").height($("#container").height()); -}); - button.ui-button.ui-corner-all.ui-widget { - background-color: #cecece !important; - border: none !important; - border-radius: 2px !important; - text-transform: uppercase !important; - font-weight: bold !important; + background-color: #cecece; + border: none; + border-radius: 2px; + text-transform: uppercase; + font-weight: bold; } .ui-dialog-buttonset > button.success_button.ui-button.ui-corner-all.ui-widget, .update_manager_button { - background-color: #82b92e !important; - color: #fff !important; - border-radius: 2px !important; - text-transform: uppercase !important; - font-weight: bold !important; + background-color: #82b92e; + color: #fff; + border-radius: 2px; + text-transform: uppercase; + font-weight: bold; } a.update_manager_button { @@ -214,8 +214,8 @@ a.update_manager_button { margin-top: 10px; display: inline-flex; align-items: center; - font-size: 16px !important; - border-radius: 4px !important; + font-size: 16px; + border-radius: 4px; text-decoration: none; font-family: "Open Sans", sans-serif; } @@ -231,7 +231,7 @@ a.update_manager_button:after { .ui-draggable, .ui-draggable .ui-dialog-titlebar { - cursor: default !important; + cursor: default; } #box_online #pkg_version { @@ -242,10 +242,10 @@ a.update_manager_button:after { /* METACONSOLE */ .box_online_meta { - background: none !important; - min-height: 400px !important; + background: none; + min-height: 400px; text-align: center; - border: none !important; + border: none; } div#box_online.box_online_meta * { @@ -277,7 +277,7 @@ div#box_online.box_online_meta * { } .update_manager_warning p { - font-size: 10pt !important; + font-size: 10pt; } .update_manager_warning img { @@ -287,8 +287,8 @@ div#box_online.box_online_meta * { a.update_manager_button_open { padding: 5px 10px; - font-size: 16px !important; - border-radius: 4px !important; + font-size: 16px; + border-radius: 4px; text-decoration: none; border: 1px solid #82b92e; color: #82b92e; diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 0dbe1049bc..3bf8a3448b 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -87,7 +87,7 @@ function menu_print_menu(&$menu) // ~ if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec)) == false) // ~ continue; if (! isset($main['id'])) { - $id = 'menu_'.++$idcounter; + $id = 'menu_'.(++$idcounter); } else { $id = $main['id']; } @@ -405,9 +405,9 @@ function menu_print_menu(&$menu) $padding_top = ( $length >= 18) ? 6 : 12; if ($config['menu_type'] == 'classic') { - $output .= ''; + $output .= '
'.$main['text'].'
'; } else { - $output .= ''; + $output .= '
'.$main['text'].'
'; } // Add the notification ball if defined diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 59b76ba00f..2ecc7bc96d 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3295,11 +3295,11 @@ function ui_print_page_header( if ($godmode == true) { $type = 'view'; - $type2 = (empty($breadcrumbs)) ? 'menu_tab_frame_view' : 'menu_tab_frame_view_bc'; + $type2 = 'menu_tab_frame_view'; $separator_class = 'separator'; } else { $type = 'view'; - $type2 = (empty($breadcrumbs)) ? 'menu_tab_frame_view' : 'menu_tab_frame_view_bc'; + $type2 = 'menu_tab_frame_view'; $separator_class = 'separator_view'; } diff --git a/pandora_console/include/styles/agent_manager.css b/pandora_console/include/styles/agent_manager.css index fc648aefba..6df9c0f6eb 100644 --- a/pandora_console/include/styles/agent_manager.css +++ b/pandora_console/include/styles/agent_manager.css @@ -100,8 +100,8 @@ a#qr_code_agent_view { } .custom_fields_table .custom_field_row_opened td { - border-bottom-left-radius: 0px !important; - border-bottom-right-radius: 0px !important; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; } .secondary_groups_select { @@ -147,12 +147,12 @@ a#qr_code_agent_view { } .agent_description { - min-height: 4.8em !important; + min-height: 4.8em; } .agent_custom_id { padding-bottom: 0.7em; padding-top: 0.5em; display: inline-block; - border-radius: 5px !important; + border-radius: 5px; border: 1px solid #ccc; } diff --git a/pandora_console/include/styles/agent_view.css b/pandora_console/include/styles/agent_view.css index fca8aaa4fc..3ea40c15f8 100644 --- a/pandora_console/include/styles/agent_view.css +++ b/pandora_console/include/styles/agent_view.css @@ -1,13 +1,13 @@ text.text-tooltip { - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; } div#bullets_modules span { - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; } table#agent_interface_info .noresizevc.graph { - width: 500px !important; + width: 500px; } div.agent_details_agent_alias { @@ -15,5 +15,5 @@ div.agent_details_agent_alias { } div.agent_details_agent_alias * { - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; } diff --git a/pandora_console/include/styles/common.css b/pandora_console/include/styles/common.css index 09c7abb566..c09bc06b4e 100644 --- a/pandora_console/include/styles/common.css +++ b/pandora_console/include/styles/common.css @@ -1,7 +1,7 @@ /* Debug styles */ pre.debug, div.backtrace { - font-family: monospace !important; + font-family: monospace; text-align: left; padding: 10px; margin: 5px; @@ -66,9 +66,9 @@ img.right { text-align: right; } .noshadow { - -moz-box-shadow: 0px !important; - -webkit-box-shadow: 0px !important; - box-shadow: 0px !important; + -moz-box-shadow: 0px; + -webkit-box-shadow: 0px; + box-shadow: 0px; } .center_align { text-align: center; diff --git a/pandora_console/include/styles/dialog.css b/pandora_console/include/styles/dialog.css index ecb4ab61f9..7346e62fdb 100644 --- a/pandora_console/include/styles/dialog.css +++ b/pandora_console/include/styles/dialog.css @@ -1,38 +1,38 @@ /* This file skins dialog */ .ui-dialog { - background: none repeat scroll 0 0 #3f3f3f !important; - border: 1px solid #3f3f3f !important; - color: #333333 !important; - padding: 0.2em !important; - overflow: hidden !important; + background: none repeat scroll 0 0 #3f3f3f; + border: 1px solid #3f3f3f; + color: #333333; + padding: 0.2em; + overflow: hidden; - -moz-border-radius: 6px !important; - -webkit-border-radius: 6px !important; - border-radius: 6px !important; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; - -moz-box-shadow: 0px 5px 5px #010e1b !important; - -webkit-box-shadow: 0px 5px 5px #010e1b !important; - box-shadow: 0px 5px 5px #010e1b !important; + -moz-box-shadow: 0px 5px 5px #010e1b; + -webkit-box-shadow: 0px 5px 5px #010e1b; + box-shadow: 0px 5px 5px #010e1b; } .ui-widget-header { - background: #3f3f3f !important; + background: #3f3f3f; } .ui-dialog .ui-dialog-titlebar { background-color: #ececec; - height: 24px !important; - padding: 0.3em 1em !important; + height: 24px; + padding: 0.3em 1em; position: relative; - margin: 0px auto 0 auto !important; - font-weight: bold !important; - border-bottom: none !important; - border-top: none !important; - border-left: none !important; - border-right: none !important; - color: #ffffff !important; - #padding: 0.1em 1em !important; + margin: 0px auto 0 auto; + font-weight: bold; + border-bottom: none; + border-top: none; + border-left: none; + border-right: none; + color: #ffffff; + #padding: 0.1em 1em; -moz-border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; @@ -40,114 +40,114 @@ } .ui-dialog .ui-dialog-title { - margin-left: 5px !important; - color: white !important; - font-weight: bold !important; - position: relative !important; + margin-left: 5px; + color: white; + font-weight: bold; + position: relative; top: 3px; font-size: 10pt; - left: 4px !important; - float: none !important; + left: 4px; + float: none; } .ui-dialog.ui-draggable .ui-dialog-titlebar { - cursor: move !important; + cursor: move; } .ui-dialog .ui-dialog-titlebar-close { - width: 23px !important; - height: 23px !important; - background: url(images/dialog-titlebar-close.png) no-repeat !important; - position: absolute !important; + width: 23px; + height: 23px; + background: url(images/dialog-titlebar-close.png) no-repeat; + position: absolute; top: 6px; - right: 3px !important; - cursor: pointer !important; + right: 3px; + cursor: pointer; } .ui-dialog .ui-dialog-titlebar-close span { - display: none !important; + display: none; } .ui-dialog .ui-dialog-titlebar-close-hover { - color: #000000 !important; + color: #000000; } .ui-dialog .ui-dialog-titlebar-close:hover span { - display: none !important; + display: none; } .ui-dialog .ui-dialog-titlebar-close:hover { - color: #000000 !important; + color: #000000; } .ui-dialog .ui-dialog-content { - margin: 12px !important; - #padding: 0.5em 1em !important; - overflow: auto !important; + margin: 12px; + #padding: 0.5em 1em; + overflow: auto; - -moz-border-left: 1px solid #a9a9a9 !important; - -moz-border-right: 1px solid #a9a9a9 !important; - -moz-border-bottom: 1px solid #a9a9a9 !important; - -moz-border-radius: 8px 8px 8px 8px !important; + -moz-border-left: 1px solid #a9a9a9; + -moz-border-right: 1px solid #a9a9a9; + -moz-border-bottom: 1px solid #a9a9a9; + -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-left: 1px solid #a9a9a9 !important; - -webkit-border-right: 1px solid #a9a9a9 !important; - -webkit-border-bottom: 1px solid #a9a9a9 !important; - -webkit-border-radius: 8px 8px 8px 8px !important; + -webkit-border-left: 1px solid #a9a9a9; + -webkit-border-right: 1px solid #a9a9a9; + -webkit-border-bottom: 1px solid #a9a9a9; + -webkit-border-radius: 8px 8px 8px 8px; - border-left: 1px solid #a9a9a9 !important; - border-right: 1px solid #a9a9a9 !important; - border-bottom: 1px solid #a9a9a9 !important; - border-radius: 8px 8px 8px 8px !important; + border-left: 1px solid #a9a9a9; + border-right: 1px solid #a9a9a9; + border-bottom: 1px solid #a9a9a9; + border-radius: 8px 8px 8px 8px; - background: #ffffff !important; - position: relative !important; + background: #ffffff; + position: relative; } .ui-tabs .ui-tabs-nav { - background-color: white !important; + background-color: white; } .ui-tabs-panel { - background: #ececec !important; - -moz-border-radius: 8px !important; - -webkit-border-radius: 8px !important; - border-radius: 8px !important; - -moz-border-top-left-radius: 0px !important; - -webkit-border-top-left-radius: 0px !important; - border-top-left-radius: 0px !important; + background: #ececec; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + -moz-border-top-left-radius: 0px; + -webkit-border-top-left-radius: 0px; + border-top-left-radius: 0px; -moz-box-shadow: -1px 1px 6px #aaa; -webkit-box-shadow: -1px 1px 6px #aaa; box-shadow: 1px 1px 6px #aaa; } .ui-widget .ui-widget { - border: 0px !important; + border: 0px; } .ui-state-default:first-child { - margin-left: -3px !important; + margin-left: -3px; } .ui-state-default { - background: #fff !important; - border: 2px solid #ececec !important; - -moz-border-top-left-radius: 10px !important; - -webkit-top-left-border-radius: 10px !important; - border-top-left-radius: 10px !important; - -moz-border-top-right-radius: 10px !important; - -webkit-top-right-border-radius: 10px !important; - border-top-right-radius: 10px !important; - margin-left: 2px !important; + background: #fff; + border: 2px solid #ececec; + -moz-border-top-left-radius: 10px; + -webkit-top-left-border-radius: 10px; + border-top-left-radius: 10px; + -moz-border-top-right-radius: 10px; + -webkit-top-right-border-radius: 10px; + border-top-right-radius: 10px; + margin-left: 2px; } .ui-state-active { - background: #ececec !important; + background: #ececec; } .ui-dialog-content { - overflow: auto !important; - width: auto !important; - #height: auto !important; + overflow: auto; + width: auto; + #height: auto; } .ui-dialog .ui-dialog-buttonpane { @@ -185,8 +185,8 @@ font-weight: bold; outline: medium none; cursor: pointer; - margin: 0.5em 0.4em 0.5em 0 !important; - border-radius: 4px 4px 4px 4px !important; + margin: 0.5em 0.4em 0.5em 0; + border-radius: 4px 4px 4px 4px; } .ui-dialog .ui-button-dialog:hover { @@ -199,5 +199,5 @@ .ui-dialog-overlay { background: url("images/ui-bg_diagonals-thick_20_666666_40x40.png") repeat - scroll 50% 50% #666666 !important; + scroll 50% 50% #666666; } diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index 0209a43a8e..e935657d42 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -28,7 +28,7 @@ li.discovery > a label { } div.data_container > label { - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; font-weight: lighter; } @@ -117,7 +117,7 @@ div.arrow_box:before { min-height: 55px; width: 100%; padding-right: 0px; - margin-left: 0px !important; + margin-left: 0px; margin-bottom: 20px; height: 55px; box-sizing: border-box; @@ -139,14 +139,14 @@ div.arrow_box:before { .breadcrumb_link { color: #848484; - font-size: 10pt !important; - font-family: "lato-bolder", "Open Sans", sans-serif !important; - text-decoration: none !important; + font-size: 10pt; + font-family: "lato-bolder", "Open Sans", sans-serif; + text-decoration: none; } span.breadcrumb_link { color: #d0d0d0; - font-size: 12pt !important; + font-size: 12pt; } .breadcrumb_link.selected { @@ -188,7 +188,7 @@ form.discovery * { } label { - color: #343434 !important; + color: #343434; font-weight: bold; } @@ -201,11 +201,11 @@ li > input[type="password"], .discovery_text_input > input[type="password"], .discovery_text_input > input[type="text"], #interval_manual > input[type="text"] { - background-color: transparent !important; + background-color: transparent; border: none; - border-radius: 0 !important; + border-radius: 0; border-bottom: 1px solid #ccc; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; font-weight: lighter; padding: 0px 0px 2px 0px; box-sizing: border-box; @@ -234,7 +234,7 @@ li > input[type="password"], } .discovery_textarea_input { - background-color: #fbfbfb !important; + background-color: #fbfbfb; padding-left: 10px; width: 100%; height: 100px; diff --git a/pandora_console/include/styles/firts_task.css b/pandora_console/include/styles/firts_task.css index 1b26b2bfbe..c3650d2a8e 100755 --- a/pandora_console/include/styles/firts_task.css +++ b/pandora_console/include/styles/firts_task.css @@ -64,7 +64,7 @@ div.new_task_cluster > div { .button_task { margin-top: 10px; - background-color: #3f3f3f !important; + background-color: #3f3f3f; padding: 10px 10px 10px 10px; font-weight: bold; color: #82b92e; diff --git a/pandora_console/include/styles/footer.css b/pandora_console/include/styles/footer.css new file mode 100644 index 0000000000..84dff3e551 --- /dev/null +++ b/pandora_console/include/styles/footer.css @@ -0,0 +1,33 @@ +/* + * --------------------------------------------------------------------- + * - FOOTER - + * --------------------------------------------------------------------- + */ +a.footer, +a.footer span { + font-size: 9px; + color: white; +} + +div#foot { + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + background: #343434; + clear: both; + width: auto; + height: 38px; + margin-top: auto; + box-sizing: border-box; +} + +div#foot a, +div#foot span { + font-family: "Open Sans", sans-serif; + font-size: 8pt; + color: #9ca4a6; +} + +div#foot small span { + font-size: 0.8em; +} diff --git a/pandora_console/include/styles/ie.css b/pandora_console/include/styles/ie.css index b8077309a8..01ded178be 100644 --- a/pandora_console/include/styles/ie.css +++ b/pandora_console/include/styles/ie.css @@ -20,7 +20,7 @@ background: none; } .title .toggle { - background: transparent url(images/toggle.png) no-repeat scroll !important; + background: transparent url(images/toggle.png) no-repeat scroll; } .title a { @@ -70,7 +70,7 @@ div#foot { box-shadow: 0px 0px 15px #000000; } div#foot a { - color: #333 !important; + color: #333; } div#foot a.white:after { diff --git a/pandora_console/include/styles/install.css b/pandora_console/include/styles/install.css index 51197b9da7..9ccf2a05bd 100644 --- a/pandora_console/include/styles/install.css +++ b/pandora_console/include/styles/install.css @@ -259,16 +259,16 @@ div.installation_step { } .popup-button-green span { - color: #fff !important; + color: #fff; } .popup-button-green:hover { - background-color: transparent !important; + background-color: transparent; border: 1px solid #82b92e; - color: #82b92e !important; + color: #82b92e; } .popup-button-green:hover span { - color: #82b92e !important; + color: #82b92e; } /* POPUP -END */ diff --git a/pandora_console/include/styles/jquery-ui.min.css b/pandora_console/include/styles/jquery-ui.min.css new file mode 100644 index 0000000000..776e2595ad --- /dev/null +++ b/pandora_console/include/styles/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6 +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-checkboxradio-disabled{pointer-events:none}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWK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noGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-text{display:block;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.ui-selectmenu-button.ui-button{text-align:left;white-space:nowrap;width:14em}.ui-selectmenu-icon.ui-icon{float:right;margin-top:0}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:.222em 0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:2em}.ui-spinner-button{width:1.6em;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top-style:none;border-bottom-style:none;border-right-style:none}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.003;filter:Alpha(Opacity=.3)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666} \ No newline at end of file diff --git a/pandora_console/include/styles/js/images/ui-bg_flat_0_aaaaaa_40x100.png b/pandora_console/include/styles/js/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000000..5157978749 --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-bg_flat_0_aaaaaa_40x100.png @@ -0,0 +1,844 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+ + +
+
+ + 2 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @TravisCarden + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 86 Bytes +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-bg_flat_0_aaaaaa_40x100.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/images/ui-icons_444444_256x240.png b/pandora_console/include/styles/js/images/ui-icons_444444_256x240.png new file mode 100644 index 0000000000..b5edd1f893 --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-icons_444444_256x240.png @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-icons_444444_256x240.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + @joliss + joliss + + Themes: Optimize PNG files with zopflipng + + + + cc37fe7 + Nov 29, 2016 + +
+ +
+
+ + 5 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @scottgonzalez + + @peritpatrio + + @jaspermdegroot + + @joliss + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 3.19 KB +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-icons_444444_256x240.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/images/ui-icons_555555_256x240.png b/pandora_console/include/styles/js/images/ui-icons_555555_256x240.png new file mode 100644 index 0000000000..daa09aa2f5 --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-icons_555555_256x240.png @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-icons_555555_256x240.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + @joliss + joliss + + Themes: Optimize PNG files with zopflipng + + + + cc37fe7 + Nov 29, 2016 + +
+ +
+
+ + 5 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @scottgonzalez + + @peritpatrio + + @jaspermdegroot + + @joliss + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 3.2 KB +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-icons_555555_256x240.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/images/ui-icons_777620_256x240.png b/pandora_console/include/styles/js/images/ui-icons_777620_256x240.png new file mode 100644 index 0000000000..e26a7ad1d7 --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-icons_777620_256x240.png @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-icons_777620_256x240.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + @joliss + joliss + + Themes: Optimize PNG files with zopflipng + + + + cc37fe7 + Nov 29, 2016 + +
+ +
+
+ + 5 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @scottgonzalez + + @peritpatrio + + @jaspermdegroot + + @joliss + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 3.19 KB +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-icons_777620_256x240.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/images/ui-icons_777777_256x240.png b/pandora_console/include/styles/js/images/ui-icons_777777_256x240.png new file mode 100644 index 0000000000..2002c8c96d --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-icons_777777_256x240.png @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-icons_777777_256x240.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + @joliss + joliss + + Themes: Optimize PNG files with zopflipng + + + + cc37fe7 + Nov 29, 2016 + +
+ +
+
+ + 5 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @scottgonzalez + + @peritpatrio + + @jaspermdegroot + + @joliss + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 3.19 KB +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-icons_777777_256x240.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/images/ui-icons_cc0000_256x240.png b/pandora_console/include/styles/js/images/ui-icons_cc0000_256x240.png new file mode 100644 index 0000000000..65587cb507 --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-icons_cc0000_256x240.png @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-icons_cc0000_256x240.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + @joliss + joliss + + Themes: Optimize PNG files with zopflipng + + + + cc37fe7 + Nov 29, 2016 + +
+ +
+
+ + 5 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @scottgonzalez + + @peritpatrio + + @jaspermdegroot + + @joliss + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 3.19 KB +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-icons_cc0000_256x240.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/images/ui-icons_ffffff_256x240.png b/pandora_console/include/styles/js/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000000..61962b53d2 --- /dev/null +++ b/pandora_console/include/styles/js/images/ui-icons_ffffff_256x240.png @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jquery-ui/ui-icons_ffffff_256x240.png at master · jquery/jquery-ui · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + @joliss + joliss + + Themes: Optimize PNG files with zopflipng + + + + cc37fe7 + Nov 29, 2016 + +
+ +
+
+ + 5 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @scottgonzalez + + @peritpatrio + + @jaspermdegroot + + @joliss + + @PeterDaveHello + + + +
+
+ + + + + + +
+ +
+ +
+ 3.19 KB +
+ +
+ + + + +
+ +
+ +
+
+
+ + + +
+
+ ui-icons_ffffff_256x240.png +
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/pandora_console/include/styles/js/introjs.css b/pandora_console/include/styles/js/introjs.css index 03db182404..8ca0f3fbf9 100644 --- a/pandora_console/include/styles/js/introjs.css +++ b/pandora_console/include/styles/js/introjs.css @@ -53,14 +53,14 @@ } .introjs-fixParent { - z-index: auto !important; - opacity: 1 !important; + z-index: auto; + opacity: 1; } .introjs-showElement, tr.introjs-showElement > td, tr.introjs-showElement > th { - z-index: 9999999 !important; + z-index: 9999999; } .introjs-relativePosition, @@ -89,7 +89,7 @@ tr.introjs-showElement > th { position: absolute; top: -16px; left: -16px; - z-index: 9999999999 !important; + z-index: 9999999999; padding: 2px; font-family: Arial, verdana, tahoma; font-size: 13px; diff --git a/pandora_console/include/styles/js/jquery-ui_custom.css b/pandora_console/include/styles/js/jquery-ui_custom.css index f5bd560d69..0dde42f6a8 100644 --- a/pandora_console/include/styles/js/jquery-ui_custom.css +++ b/pandora_console/include/styles/js/jquery-ui_custom.css @@ -2,12 +2,12 @@ /* --- JQUERY-UI --- */ .ui-dialog .ui-dialog-titlebar { - background-color: #82b92e !important; + background-color: #82b92e; } /*center ui dialog center*/ .ui-dialog-titlebar .ui-icon-closethick { - margin-top: -5px !important; + margin-top: -5px; } .ui-button-text-only .ui-button-text { font-family: nunito; @@ -20,7 +20,7 @@ } .ui-datepicker .ui-datepicker-title select, .ui-datepicker .ui-datepicker-title option { - color: #111 !important; + color: #111; } .ui-dialog .ui-dialog-titlebar { display: inherit; @@ -31,32 +31,32 @@ } .ui-dialog .ui-dialog-title { font-family: Nunito, sans-serif; - margin: 0.1em 0 !important; - white-space: nowrap !important; - width: 100% !important; - overflow: hidden !important; - text-overflow: ellipsis !important; + margin: 0.1em 0; + white-space: nowrap; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; font-size: 11pt; position: relative; top: 5px; - float: none !important; + float: none; } .ui-dialog .ui-dialog-titlebar-close { - position: absolute !important; - right: 1em !important; - width: 21px !important; - margin: 0px 0 0 0 !important; - padding: 1px !important; - height: 20px !important; - bottom: 30% !important; - top: 20% !important; + position: absolute; + right: 1em; + width: 21px; + margin: 0px 0 0 0; + padding: 1px; + height: 20px; + bottom: 30%; + top: 20%; } .ui-dialog .ui-dialog-content { - position: relative !important; + position: relative; border: 0; - padding: 0.5em 1em !important; - background: none !important; - overflow: auto !important; + padding: 0.5em 1em; + background: none; + overflow: auto; margin-bottom: 1em; } .ui-dialog .ui-dialog-buttonpane { @@ -79,11 +79,11 @@ width: 90px; } .ui-widget-header .ui-icon { - background-image: url(../images/ui-icons_444444_256x240.png) !important; + background-image: url(../images/ui-icons_444444_256x240.png); } .ui-icon, .ui-widget-content .ui-icon { - background-image: url(../images/ui-icons_444444_256x240.png) !important; + background-image: url(../images/ui-icons_444444_256x240.png); } .ui-widget-content { background: #ffffff url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% @@ -93,44 +93,44 @@ .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { margin-top: 3px; - border: 1px solid #d3d3d3 !important; - border-bottom: 0 !important; + border: 1px solid #d3d3d3; + border-bottom: 0; background: #e6e6e6 url(../images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% - repeat-x !important; - font-weight: normal !important; - color: #555555 !important; + repeat-x; + font-weight: normal; + color: #555555; } .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { - border-top-left-radius: 0 !important; + border-top-left-radius: 0; } .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { - border-top-right-radius: 0 !important; + border-top-right-radius: 0; } .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { - border-bottom-left-radius: 0 !important; + border-bottom-left-radius: 0; } .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { - border-bottom-right-radius: 0 !important; + border-bottom-right-radius: 0; } #ui-datepicker-div { border-color: #b1b1b1; background: #ffffff; } .ui-widget-header { - background: #b1b1b1 !important; - color: #ffffff !important; + background: #b1b1b1; + color: #ffffff; } .ui-datepicker-calendar th { background-color: #3f3f3f; @@ -142,7 +142,7 @@ .ui_tpicker_minute, .ui_tpicker_second, .ui-slider-handle { - border: 1px solid #aaaaaa !important; + border: 1px solid #aaaaaa; } .ui-timepicker-div dd { margin: 0px 15px 0px 15px; @@ -151,21 +151,21 @@ color: white; } .ui-datepicker-buttonpane button { - border-color: #b1b1b1 !important; + border-color: #b1b1b1; } .ui-datepicker-buttonpane .ui-datepicker-current { - margin-left: 0.2em !important; + margin-left: 0.2em; } .ui-dialog .ui-widget-content { - border: 0px !important; + border: 0px; } .ui-dialog { box-shadow: 5px 5px 19px #4e4e4e; - border: 0px !important; - padding: 0 !important; + border: 0px; + padding: 0; } .ui-dialog-titlebar { - border: 0px !important; + border: 0px; } .ui-dialog-titlebar .ui-icon-closethick, .ui-dialog-titlebar .ui-state-default, @@ -175,7 +175,7 @@ border: 0px; } .ui-dialog-titlebar .ui-icon-closethick { - background-image: url("../../../images/icono_cerrar.png") !important; + background-image: url("../../../images/icono_cerrar.png"); } .ui-dialog-title { color: #ffffff; @@ -185,7 +185,7 @@ .ui-widget select, .ui-widget textarea, .ui-widget button { - font-family: Verdana, Arial, sans-serif !important; + font-family: Verdana, Arial, sans-serif; } a.ui-button:active, @@ -195,69 +195,69 @@ a.ui-button:active, .ui-state-focus .ui-widget-header, .ui-state-focus .ui-button:hover, .ui-button:focus { - background: transparent !important; - border: none !important; + background: transparent; + border: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover { - border: 1px solid #999999 !important; - border-bottom: 0 !important; + border: 1px solid #999999; + border-bottom: 0; background: #dadada url(../images/ui-bg_glass_75_dadada_1x400.png) 50% 50% - repeat-x !important; + repeat-x; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { - border: 1px solid #aaaaaa !important; - border-bottom: 0 !important; + border: 1px solid #aaaaaa; + border-bottom: 0; background: #ffffff url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% - repeat-x !important; - font-weight: normal !important; - color: #212121 !important; + repeat-x; + font-weight: normal; + color: #212121; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { - color: #212121 !important; + color: #212121; } ul.ui-front { - z-index: 1000000 !important; - padding-right: 0px !important; + z-index: 1000000; + padding-right: 0px; } ul.ui-front li { - padding: 3px !important; + padding: 3px; } ul.ui-front li:hover { - background-color: #e1e3e1 !important; + background-color: #e1e3e1; } ul.ui-front li a.ui-menu-item-wrapper { - background: transparent !important; - border: none !important; + background: transparent; + border: none; } ul.ui-front li a.ui-menu-item-wrapper span { - padding-left: 5px !important; + padding-left: 5px; } ul.ui-front li a.ui-menu-item-wrapper:hover { - text-decoration: none !important; + text-decoration: none; } input[type="submit"].ui-button-dialog { - margin: 0.5em 1em 0.5em 0 !important; - cursor: pointer !important; - background: white !important; - background-color: white !important; - color: #82b92e !important; - text-align: center !important; - border: 1px solid #82b92e !important; - height: 30px !important; - width: 90px !important; + margin: 0.5em 1em 0.5em 0; + cursor: pointer; + background: white; + background-color: white; + color: #82b92e; + text-align: center; + border: 1px solid #82b92e; + height: 30px; + width: 90px; } diff --git a/pandora_console/include/styles/login.css b/pandora_console/include/styles/login.css index bffcda19d5..68fbb52122 100644 --- a/pandora_console/include/styles/login.css +++ b/pandora_console/include/styles/login.css @@ -6,7 +6,7 @@ h1#log_title { font-size: 18px; margin-bottom: 0px; - color: #fff !important; + color: #fff; width: 300px; } @@ -27,7 +27,6 @@ div#error_buttons a { min-height: 100%; min-width: 1200px; width: 100%; - z-index: -9999; position: absolute; background: linear-gradient(74deg, #02020255 36%, transparent 36%), url("../../images/backgrounds/background_pandora_console_keys.jpg"); @@ -35,7 +34,7 @@ div#error_buttons a { } p.log_in { - color: #fff !important; + color: #fff; padding: 0px 10px; width: 300px; } @@ -167,13 +166,13 @@ div.login_pass input { div.login_nick input, div.login_pass input { - border: 0px !important; + border: 0px; color: #343434; border-radius: 3px; width: 100%; height: 40px; font-size: 10pt; - padding: 0px 0px 0px 35px !important; + padding: 0px 0px 0px 35px; background-repeat: no-repeat; background-size: 27px; background-position: left center; @@ -195,8 +194,8 @@ div.login_pass input:-webkit-autofill:hover, div.login_pass input:-webkit-autofill:focus, div.login_pass input:-webkit-autofill:active { transition: background-color 10000s ease-in-out 0s; - -webkit-box-shadow: 0 0 0px 0px transparent inset !important; - -webkit-text-fill-color: #343434 !important; + -webkit-box-shadow: 0 0 0px 0px transparent inset; + -webkit-text-fill-color: #343434; border: 0px; width: 89%; } @@ -217,55 +216,55 @@ div.login_button_saml { div.login_button input { width: 100%; - background-color: #82b92e !important; + background-color: #82b92e; text-align: center; height: 40px; padding: 0px; font-size: 11pt; - color: #fff !important; + color: #fff; border: 1px solid #82b92e; border-radius: 3px; } div.login_button_saml input { border: 1px solid #fff; - background-color: #fff !important; - color: #000 !important; + background-color: #fff; + color: #000; background-image: url("../../images/saml_login.png"); background-repeat: no-repeat; background-position: right 5% center; } div.login_button input:hover { - background-color: #fff !important; - color: #000 !important; - border: 1px solid #fff !important; + background-color: #fff; + color: #000; + border: 1px solid #fff; } div.login_button_saml input:hover { background-image: url("../../images/saml_login_hover.png"); - background-color: transparent !important; - color: #fff !important; - border: 1px solid #fff !important; + background-color: transparent; + color: #fff; + border: 1px solid #fff; } #remove_button input { - background-image: url("../../images/user_login.png") !important; + background-image: url("../../images/user_login.png"); background-repeat: no-repeat; background-position: right 5% center; } #remove_button input:hover { - background-image: url("../../images/user_login_hover.png") !important; + background-image: url("../../images/user_login_hover.png"); } .login_back input { - background-image: url("../../images/back_login.png") !important; - background-position: left 5% center !important; + background-image: url("../../images/back_login.png"); + background-position: left 5% center; } .login_back input:hover { - background-image: url("../../images/back_login_hover.png") !important; + background-image: url("../../images/back_login_hover.png"); } div.login_data { @@ -319,7 +318,7 @@ div.img_banner_login img { } .reset_password a { - color: #ddd !important; + color: #ddd; font-family: "Open Sans", sans-serif; font-size: 8.5pt; } @@ -399,7 +398,7 @@ div.form_message_alert ul li { div.form_message_alert ul li input { border: none; - background-color: #dadada !important; + background-color: #dadada; border-radius: 0px; height: 17px; width: 145px; diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index 7846a3f9a6..c428062537 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -18,7 +18,7 @@ .operation li, .godmode li { - display: flex !important; + display: flex; justify-content: flex-start; align-items: center; } @@ -81,13 +81,13 @@ li:hover ul { } .sub_subMenu { - font-weight: normal !important; + font-weight: normal; background-color: #202020; padding-left: 1.5em; } .sub_subMenu.selected { - font-weight: 600 !important; + font-weight: 600; } .submenu2 li a { @@ -109,29 +109,28 @@ li:hover ul { .menu li.submenu_not_selected a, .menu li.submenu2_not_selected a { - font-weight: normal !important; + font-weight: normal; } .submenu_selected { - margin-bottom: 0px !important; - box-shadow: inset 4px 0 #80ba27 !important; + margin-bottom: 0px; + box-shadow: inset 4px 0 #80ba27; } .selected.submenu_selected { - background-color: #202020 !important; + background-color: #202020; } li.submenu_selected.selected { - background-color: #202020 !important; + background-color: #202020; font-weight: 600; } li.sub_subMenu.selected { - background-color: #161616 !important; + background-color: #161616; } .menu .menu_icon, .menu li.links { - background-position: 4px 4px; background-repeat: no-repeat; cursor: pointer; } @@ -143,73 +142,73 @@ li.sub_subMenu.selected { /* Icons specified here */ #icon_oper-networkconsole { - background: url(../../images/op_network.menu_gray.png) no-repeat; + background-image: url(../../images/op_network.menu_gray.png); } #icon_oper-agents { - background: url(../../images/op_monitoring.menu_gray.png) no-repeat; + background-image: url(../../images/op_monitoring.menu_gray.png); } #icon_oper-events { - background: url(../../images/op_events.menu_gray.png) no-repeat; + background-image: url(../../images/op_events.menu_gray.png); } /* users */ #icon_oper-users { - background: url(../../images/op_workspace.menu_gray.png) no-repeat; + background-image: url(../../images/op_workspace.menu_gray.png); } /* trap console */ #icon_oper-snmpc, #icon_god-snmpc { - background: url(../../images/op_snmp.menu.png) no-repeat 50% 50%; + background-image: url(../../images/op_snmp.menu.png); } #icon_oper-reporting { - background: url(../../images/op_reporting.menu_gray.png) no-repeat; + background-image: url(../../images/op_reporting.menu_gray.png); } #icon_oper-gismaps { - background: url(../../images/op_gis.menu.png) no-repeat 50% 50%; + background-image: url(../../images/op_gis.menu.png); } #icon_oper-netflow { - background: url(../../images/op_netflow.menu.png) no-repeat 50% 50%; + background-image: url(../../images/op_netflow.menu.png); } #icon_oper-extensions { - background: url(../../images/extensions.menu_gray.png) no-repeat; + background-image: url(../../images/extensions.menu_gray.png); } /* Godmode images */ #icon_god-discovery { - background: url(../../images/gm_discovery.menu.png) no-repeat; + background-image: url(../../images/gm_discovery.menu.png); } #icon_god-resources { - background: url(../../images/gm_resources.menu_gray.png) no-repeat; + background-image: url(../../images/gm_resources.menu_gray.png); } #icon_god-configuration { - background: url(../../images/gm_configuration.menu_gray.png) no-repeat; + background-image: url(../../images/gm_configuration.menu_gray.png); } #icon_god-alerts { - background: url(../../images/gm_alerts.menu_gray.png) no-repeat; + background-image: url(../../images/gm_alerts.menu_gray.png); } #icon_god-users { - background: url(../../images/gm_users.menu_gray.png) no-repeat; + background-image: url(../../images/gm_users.menu_gray.png); } #icon_god-reporting { - background: url(../../images/reporting_edit.menu.png) no-repeat 50% 50%; + background-image: url(../../images/reporting_edit.menu.png); } #icon_god-servers { - background: url(../../images/gm_servers.menu_gray.png) no-repeat; + background-image: url(../../images/gm_servers.menu_gray.png); } #icon_god-setup { - background: url(../../images/gm_setup.menu_gray.png) no-repeat; + background-image: url(../../images/gm_setup.menu_gray.png); } #icon_god-events { - background: url(../../images/gm_events.menu_gray.png) no-repeat; + background-image: url(../../images/gm_events.menu_gray.png); } #icon_god-extensions { - background: url(../../images/builder.menu_gray.png) no-repeat; + background-image: url(../../images/builder.menu_gray.png); } #icon_god-links { - background: url(../../images/links.menu_gray.png) no-repeat; + background-image: url(../../images/links.menu_gray.png); } #icon_god-um_messages { - background: url(../../images/um_messages.menu_gray.png) no-repeat; + background-image: url(../../images/um_messages.menu_gray.png); } #menu_container { @@ -267,16 +266,16 @@ ul li { */ .menu_icon:hover { - background-color: #282828 !important; + background-color: #282828; } .submenu_not_selected:hover { - background-color: #202020 !important; + background-color: #202020; } .submenu_selected:hover { - background-color: #202020 !important; + background-color: #202020; } .sub_subMenu:hover { - background-color: #161616 !important; + background-color: #161616; } .menu li.selected { @@ -284,21 +283,25 @@ ul li { } .operation { - background-color: #3d3d3d !important; - padding-top: 20px !important; + background-color: #3d3d3d; + padding-top: 20px; } .operation .selected, .godmode .selected { - background-color: #282828 !important; + background-color: #282828; } .operation .selected #title_menu, .godmode .selected #title_menu { - color: #fff !important; + color: #fff; font-weight: 600; } +.menu > .operation { + padding-top: 2em; +} + .menu li, .menu li a, .menu li div { @@ -312,65 +315,67 @@ ul li { } .godmode { - padding-bottom: 4px !important; + padding-bottom: 4px; background-color: #343434; } /* Menu icons active */ .selected#icon_oper-networkconsole { - background: url(../../images/op_network.menu_white.png) no-repeat; + background-image: url(../../images/op_network.menu_white.png); } .selected#icon_oper-agents { - background: url(../../images/op_monitoring.menu_white.png) no-repeat; + background-image: url(../../images/op_monitoring.menu_white.png); } .selected#icon_oper-events { - background: url(../../images/op_events.menu_white.png) no-repeat; + background-image: url(../../images/op_events.menu_white.png); } .selected#icon_oper-users { - background: url(../../images/op_workspace.menu_white.png) no-repeat; + background-image: url(../../images/op_workspace.menu_white.png); } .selected#icon_oper-reporting { - background: url(../../images/op_reporting.menu_white.png) no-repeat; + background-image: url(../../images/op_reporting.menu_white.png); } .selected#icon_oper-extensions { - background: url(../../images/extensions.menu_white.png) no-repeat; + background-image: url(../../images/extensions.menu_white.png); } .selected#icon_god-discovery { - background: url(../../images/gm_discovery.menu_white.png) no-repeat; + background-image: url(../../images/gm_discovery.menu_white.png); } .selected#icon_god-resources { - background: url(../../images/gm_resources.menu_white.png) no-repeat; + background-image: url(../../images/gm_resources.menu_white.png); } .selected#icon_god-configuration { - background: url(../../images/gm_configuration.menu_white.png) no-repeat; + background-image: url(../../images/gm_configuration.menu_white.png); } .selected#icon_god-alerts { - background: url(../../images/gm_alerts.menu_white.png) no-repeat; + background-image: url(../../images/gm_alerts.menu_white.png); } .selected#icon_god-users { - background: url(../../images/gm_users.menu_white.png) no-repeat; + background-image: url(../../images/gm_users.menu_white.png); } .selected#icon_god-servers { - background: url(../../images/gm_servers.menu_white.png) no-repeat; + background-image: url(../../images/gm_servers.menu_white.png); } .selected#icon_god-setup { - background: url(../../images/gm_setup.menu_white.png) no-repeat; + background-image: url(../../images/gm_setup.menu_white.png); } .selected#icon_god-events { - background: url(../../images/gm_events.menu_white.png) no-repeat; + background-image: url(../../images/gm_events.menu_white.png); } .selected#icon_god-extensions { - background: url(../../images/builder.menu_white.png) no-repeat; + background-image: url(../../images/builder.menu_white.png); } .selected#icon_god-links { - background: url(../../images/links.menu_white.png) no-repeat; + background-image: url(../../images/links.menu_white.png); } .selected#icon_god-um_messages { - background: url(../../images/um_messages.menu_white.png) no-repeat; + background-image: url(../../images/um_messages.menu_white.png); } #menu_full { - width: 60px; /* This is overwritten by the classic menu (215px) */ + height: 100%; + display: flex; + flex-direction: column; position: fixed; z-index: 1; top: 0; @@ -381,15 +386,14 @@ ul li { } .button_collapse { + margin-top: auto; height: 38px; background-color: #505050; - width: 60px; /* This is overwritten by the classic menu (215px) */ text-align: center; color: #fff; cursor: pointer; background-repeat: no-repeat; background-position: center; - margin-top: 15px; } .logo_green { @@ -408,16 +412,24 @@ ul li { .menu_full_classic, .button_classic { - width: 215px !important; + width: 215px; } .menu_full_collapsed, .button_collapsed { - width: 60px !important; + width: 60px; +} + +.menu_full_classic .title_menu_classic { + display: flex; +} + +.menu_full_collapsed .title_menu_collapsed { + display: none; } .button_classic { - width: 215px !important; + width: 215px; background-image: url(../../images/button_collapse_menu.png); background-repeat: no-repeat; background-position: center; @@ -434,13 +446,13 @@ ul li { .menu li, .menu li a, .menu li div { - min-height: 28px !important; + min-height: 28px; } } @media screen and (max-height: 735px) { .operation { - padding-top: 10px !important; + padding-top: 10px; } .button_collapse { margin-top: 10px; @@ -453,29 +465,29 @@ ul li { * --------------------------------------------------------------------- */ .page_classic { - padding-left: 215px !important; + padding-left: 215px; } .page_collapsed { - padding-left: 60px !important; + padding-left: 60px; } .header_table_classic { - padding-left: 235px !important; /* 215 + 35 */ + padding-left: 235px; /* 215 + 35 */ } .header_table_collapsed { - padding-left: 80px !important; /* 60 + 35 */ + padding-left: 80px; /* 60 + 35 */ } .title_menu_classic { - display: flex !important; + display: flex; } .title_menu_collapsed { - display: none !important; + display: none; } .menu_icon_collapsed { - background-position: 50% 50% !important; + background-position: 50% 50%; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 44ac0d09f4..d47ab1c9a4 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -123,9 +123,15 @@ svg * { font-size: 11pt; } +html { + height: 100%; +} body { background-color: #fff; margin: 0 auto; + display: flex; + flex-direction: column; + min-height: 100%; } input, textarea { @@ -142,7 +148,7 @@ input { } input[type="checkbox"] { - display: inline !important; + display: inline; } select { padding: 2px 3px 3px 3px; @@ -210,13 +216,13 @@ th > label { padding-top: 7px; } input:disabled { - background-color: #ddd !important; + background-color: #ddd; } textarea:disabled { - background-color: #ddd !important; + background-color: #ddd; } select:disabled { - background-color: #ddd !important; + background-color: #ddd; } ul { list-style-type: none; @@ -247,7 +253,7 @@ td input[type="checkbox"] { } input[type="image"] { border: 0px; - background-color: transparent !important; + background-color: transparent; } table, img { @@ -274,18 +280,18 @@ textarea:-webkit-autofill:hover textarea:-webkit-autofill:focus, select:-webkit-autofill, select:-webkit-autofill:hover, select:-webkit-autofill:focus { - -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important; + -webkit-box-shadow: 0 0 0px 1000px #ffffff inset; } /* All select type multiple */ select[multiple] option:checked { background: #82b92e linear-gradient(0deg, #82b92e 0%, #82b92e 100%); - color: #fff !important; + color: #fff; } select option:checked { background-color: #82b92e; - color: #fff !important; + color: #fff; } select > option:hover { @@ -457,7 +463,7 @@ select:-internal-list-box { padding: 0; } .no-padding-imp { - padding: 0 !important; + padding: 0; } .no-margin { margin: 0; @@ -469,10 +475,10 @@ select:-internal-list-box { vertical-align: top; } .no-td-borders td { - border: none !important; + border: none; } .no-td-padding td { - padding: 0 !important; + padding: 0; } div#page { @@ -480,10 +486,10 @@ div#page { background-image: none; clear: both; width: auto; - padding-top: 5px !important; - padding-left: 60px; /* This is overwritten by the classic menu (215px)*/ - padding-right: 35px; - margin-left: 20px; + padding-top: 5px; + padding-right: 6em; + display: flex; + flex-direction: column; } body.pure { @@ -500,12 +506,11 @@ div#container { } div#main { - width: auto; + width: 100%; margin: 0 auto; + margin-left: 3em; position: relative; min-height: 850px; - max-width: 100%; - min-width: 93%; } textarea.conf_editor { @@ -577,12 +582,12 @@ input.sub { padding-top: 10px; padding-left: 15px; border-color: #888; - font-family: "lato", "Open Sans", sans-serif !important; + font-family: "lato", "Open Sans", sans-serif; } input.sub[disabled] { - color: #b4b4b4 !important; - background-color: #f3f3f3 !important; + color: #b4b4b4; + background-color: #f3f3f3; border-color: #b6b6b6; cursor: default; } @@ -714,33 +719,6 @@ div#main_help div.databox p { text-align: justify; } -/* - * --------------------------------------------------------------------- - * - FOOTER - - * --------------------------------------------------------------------- - */ -a.footer, -a.footer span { - font-size: 9px; - color: white; -} - -div#foot { - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - background: #343434; - clear: both; - width: auto; -} - -div#foot a, -div#foot span { - font-family: "Open Sans", sans-serif; - font-size: 8pt; - color: #9ca4a6; -} - /* * --------------------------------------------------------------------- * - HEADER AND LEFT MENU STYLES - @@ -788,9 +766,9 @@ div#head { } /*.databox_error { - width: 657px !important; + width: 657px; height: 400px; - border: none !important; + border: none; background-color: #fafafa; background: url(../../images/splash_error.png) no-repeat; } @@ -807,275 +785,6 @@ input.datos { background-color: #050505; }*/ -/* - * --------------------------------------------------------------------- - * - VISUAL MAPS - - * --------------------------------------------------------------------- - */ -input.vs_button_ghost { - background-color: transparent !important; - border: 1px solid #82b92e; - color: #82b92e !important; - text-align: center; - padding: 4px 12px; - font-weight: bold; -} - -input.next, -input.upd, -input.ok, -input.wand, -input.delete, -input.cog, -input.target, -input.search, -input.copy, -input.add, -input.graph, -input.percentile, -input.binary, -input.camera, -input.config, -input.cancel, -input.default, -input.filter, -input.pdf, -input.spinn { - padding-right: 30px; -} - -input.next { - background-image: url(../../images/input_go.png) !important; -} -input.upd { - background-image: url(../../images/input_update.png) !important; -} -input.wand { - background-image: url(../../images/input_wand.png) !important; -} -input.wand:disabled { - background-image: url(../../images/input_wand.disabled.png) !important; -} -input.search { - background-image: url(../../images/input_zoom.png) !important; -} -input.search:disabled { - background-image: url(../../images/input_zoom.disabled.png) !important; -} -input.ok { - background-image: url(../../images/input_tick.png) !important; -} -input.ok:disabled { - background-image: url(../../images/input_tick.disabled.png) !important; -} -input.add { - background-image: url(../../images/input_add.png) !important; -} -input.add:disabled { - background-image: url(../../images/input_add.disabled.png) !important; -} -input.cancel { - background-image: url(../../images/input_cross.png) !important; -} -input.cancel:disabled { - background-image: url(../../images/input_cross.disabled.png) !important; -} -input.delete { - background-image: url(../../images/input_delete.png) !important; -} -input.delete:disabled { - background-image: url(../../images/input_delete.disabled.png) !important; -} -input.cog { - background-image: url(../../images/input_cog.png) !important; -} -input.cog:disabled { - background-image: url(../../images/input_cog.disabled.png) !important; -} -input.config { - background-image: url(../../images/input_config.png) !important; -} -input.config:disabled { - background-image: url(../../images/input_config.disabled.png) !important; -} -input.filter { - background-image: url(../../images/input_filter.png) !important; -} -input.filter:disabled { - background-image: url(../../images/input_filter.disabled.png) !important; -} -input.pdf { - background-image: url(../../images/input_pdf.png) !important; -} -input.pdf:disabled { - background-image: url(../../images/input_pdf.disabled.png) !important; -} -input.camera { - background-image: url(../../images/input_camera.png) !important; -} -input.spinn { - background-image: url(../../images/spinner_green.gif) !important; -} - -#toolbox #auto_save { - padding-top: 5px; -} - -#toolbox { - margin-top: 13px; -} -input.visual_editor_button_toolbox { - padding-right: 15px; - padding-top: 10px; - margin-top: 5px; -} -input.delete_min { - background: #fefefe url(../../images/cross.png) no-repeat center !important; -} -input.delete_min[disabled] { - background: #fefefe url(../../images/cross.disabled.png) no-repeat center !important; -} -input.graph_min { - background: #fefefe url(../../images/chart_curve.png) no-repeat center !important; -} -input.graph_min[disabled] { - background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat - center !important; -} -input.bars_graph_min { - background: #fefefe url(../../images/icono-barras-arriba.png) no-repeat center !important; -} -input.bars_graph_min[disabled] { - background: #fefefe url(../../images/icono-barras-arriba.disabled.png) - no-repeat center !important; -} -input.percentile_min { - background: #fefefe url(../../images/chart_bar.png) no-repeat center !important; -} -input.percentile_min[disabled] { - background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center !important; -} -input.percentile_item_min { - background: #fefefe url(../../images/percentile_item.png) no-repeat center !important; -} -input.percentile_item_min[disabled] { - background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat - center !important; -} -input.auto_sla_graph_min { - background: #fefefe url(../../images/auto_sla_graph.png) no-repeat center !important; -} -input.auto_sla_graph_min[disabled] { - background: #fefefe url(../../images/auto_sla_graph.disabled.png) no-repeat - center !important; -} -input.donut_graph_min { - background: #fefefe url(../../images/icono-quesito.png) no-repeat center !important; -} -input.donut_graph_min[disabled] { - background: #fefefe url(../../images/icono-quesito.disabled.png) no-repeat - center !important; -} -input.binary_min { - background: #fefefe url(../../images/binary.png) no-repeat center !important; -} -input.binary_min[disabled] { - background: #fefefe url(../../images/binary.disabled.png) no-repeat center !important; -} -input.camera_min { - background: #fefefe url(../../images/camera.png) no-repeat center !important; -} -input.camera_min[disabled] { - background: #fefefe url(../../images/camera.disabled.png) no-repeat center !important; -} -input.config_min { - background: #fefefe url(../../images/config.png) no-repeat center !important; -} -input.config_min[disabled] { - background: #fefefe url(../../images/config.disabled.png) no-repeat center !important; -} -input.label_min { - background: #fefefe url(../../images/tag_red.png) no-repeat center !important; -} -input.label_min[disabled] { - background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center !important; -} -input.icon_min { - background: #fefefe url(../../images/photo.png) no-repeat center !important; -} -input.icon_min[disabled] { - background: #fefefe url(../../images/photo.disabled.png) no-repeat center !important; -} -input.clock_min { - background: #fefefe url(../../images/clock-tab.png) no-repeat center !important; -} -input.clock_min[disabled] { - background: #fefefe url(../../images/clock-tab.disabled.png) no-repeat center !important; -} -input.box_item { - background: #fefefe url(../../images/box_item.png) no-repeat center !important; -} -input.box_item[disabled] { - background: #fefefe url(../../images/box_item.disabled.png) no-repeat center !important; -} -input.line_item { - background: #fefefe url(../../images/line_item.png) no-repeat center !important; -} -input.line_item[disabled] { - background: #fefefe url(../../images/line_item.disabled.png) no-repeat center !important; -} -input.copy_item { - background: #fefefe url(../../images/copy_visualmap.png) no-repeat center !important; -} -input.copy_item[disabled] { - background: #fefefe url(../../images/copy_visualmap.disabled.png) no-repeat - center !important; -} -input.grid_min { - background: #fefefe url(../../images/grid.png) no-repeat center !important; -} -input.grid_min[disabled] { - background: #fefefe url(../../images/grid.disabled.png) no-repeat center !important; -} -input.save_min { - background: #fefefe url(../../images/file.png) no-repeat center !important; -} -input.save_min[disabled] { - background: #fefefe url(../../images/file.disabled.png) no-repeat center !important; -} -input.service_min { - background: #fefefe url(../../images/box.png) no-repeat center !important; -} -input.service_min[disabled] { - background: #fefefe url(../../images/box.disabled.png) no-repeat center !important; -} - -input.group_item_min { - background: #fefefe url(../../images/group_green.png) no-repeat center !important; -} -input.group_item_min[disabled] { - background: #fefefe url(../../images/group_green.disabled.png) no-repeat - center !important; -} -input.color_cloud_min { - background: #fefefe url(../../images/color_cloud_item.png) no-repeat center !important; -} -input.color_cloud_min[disabled] { - background: #fefefe url(../../images/color_cloud_item.disabled.png) no-repeat - center !important; -} - -div#cont { - position: fixed; - max-height: 320px; - overflow-y: auto; - overflow-x: hidden; -} - -/*.termframe{ - background-color: #80BA27 !important; -}*/ - /* * --------------------------------------------------------------------- * - REPORTS - @@ -1094,18 +803,18 @@ div#cont { td.datos3, td.datos4 { background-color: #fff; - color: #000 !important; - border-bottom: 2px solid #82b92e !important; - border-left: none !important; - border-right: none !important; + color: #000; + border-bottom: 2px solid #82b92e; + border-left: none; + border-right: none; height: 30px; font-size: 8.6pt; font-weight: normal; } td.datos4 { - /*Add !important because in php the function html_print_table write style in cell and this is style head.*/ - text-align: center !important; + /*Add because in php the function html_print_table write style in cell and this is style head.*/ + text-align: center; } td.datos3 *, @@ -1331,9 +1040,8 @@ div.title_line { justify-content: space-between; border-bottom: 2px solid #82b92e; min-height: 50px; - width: 100%; + width: calc(100% + 3em); padding-right: 0px; - margin-left: 0px !important; margin-bottom: 20px; height: 50px; box-sizing: border-box; @@ -1341,6 +1049,7 @@ div.title_line { border-top-right-radius: 7px; border-top-left-radius: 7px; box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1); + margin-left: -3em; } /* Breadcrum */ @@ -1366,14 +1075,14 @@ div.title_line { padding-top: 4px; text-indent: 0.25em; color: #848484; - font-size: 10pt !important; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-size: 10pt; + font-family: "lato-bolder", "Open Sans", sans-serif; } .breadcrumb_active { color: #82b92e; - font-size: 10pt !important; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-size: 10pt; + font-family: "lato-bolder", "Open Sans", sans-serif; } /* End - Breadcrum */ @@ -1447,11 +1156,11 @@ ul.subsubmenu li a { float: right; z-index: 9999; display: none; - margin-top: 5px !important ; - left: 0px !important; + margin-top: 5px; + left: 0px; } .subsubmenu li { - margin-top: 0px !important ; + margin-top: 0px; } div#agent_wizard_subtabs { @@ -1496,7 +1205,7 @@ div#agent_wizard_subtabs { } #menu_tab_left li.view { - margin-left: 0px !important; + margin-left: 0px; padding-left: 10px; padding-bottom: 4px; white-space: nowrap; @@ -1510,7 +1219,7 @@ div#agent_wizard_subtabs { #menu_tab_left li a, #menu_tab_left li span { color: #343434; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; font-size: 18pt; line-height: 18pt; } @@ -1624,9 +1333,9 @@ span.rmess, span.nrmess { table.databox { background-color: #f9faf9; border-spacing: 0px; - -moz-box-shadow: 0px 0px 0px #ddd !important; - -webkit-box-shadow: 0px 0px 0px #ddd !important; - box-shadow: 0px 0px 0px #ddd !important; + -moz-box-shadow: 0px 0px 0px #ddd; + -webkit-box-shadow: 0px 0px 0px #ddd; + box-shadow: 0px 0px 0px #ddd; } .databox > tbody > tr > td { @@ -1656,7 +1365,7 @@ table.databox { .databox > th > textarea, .databox > th > select, .databox > th > select > option { - color: #222 !important; + color: #222; } .databox.data > tbody > tr > td:first-child { @@ -1722,9 +1431,9 @@ table.alternate tr:nth-child(even) td { table.rounded_cells td { padding: 4px 4px 4px 10px; - -moz-border-radius: 6px !important; - -webkit-border-radius: 6px !important; - border-radius: 6px !important; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } /*#head_l { @@ -1774,6 +1483,103 @@ div#logo_text3 { .action-buttons { text-align: right; } + +input.next, +input.upd, +input.ok, +input.wand, +input.delete, +input.cog, +input.target, +input.search, +input.copy, +input.add, +input.graph, +input.percentile, +input.binary, +input.camera, +input.config, +input.cancel, +input.default, +input.filter, +input.pdf, +input.spinn { + padding-right: 30px; +} + +input.next { + background-image: url(../../images/input_go.png); +} +input.upd { + background-image: url(../../images/input_update.png); +} +input.wand { + background-image: url(../../images/input_wand.png); +} +input.wand:disabled { + background-image: url(../../images/input_wand.disabled.png); +} +input.search { + background-image: url(../../images/input_zoom.png); +} +input.search:disabled { + background-image: url(../../images/input_zoom.disabled.png); +} +input.ok { + background-image: url(../../images/input_tick.png); +} +input.ok:disabled { + background-image: url(../../images/input_tick.disabled.png); +} +input.add { + background-image: url(../../images/input_add.png); +} +input.add:disabled { + background-image: url(../../images/input_add.disabled.png); +} +input.cancel { + background-image: url(../../images/input_cross.png); +} +input.cancel:disabled { + background-image: url(../../images/input_cross.disabled.png); +} +input.delete { + background-image: url(../../images/input_delete.png); +} +input.delete:disabled { + background-image: url(../../images/input_delete.disabled.png); +} +input.cog { + background-image: url(../../images/input_cog.png); +} +input.cog:disabled { + background-image: url(../../images/input_cog.disabled.png); +} +input.config { + background-image: url(../../images/input_config.png); +} +input.config:disabled { + background-image: url(../../images/input_config.disabled.png); +} +input.filter { + background-image: url(../../images/input_filter.png); +} +input.filter:disabled { + background-image: url(../../images/input_filter.disabled.png); +} +input.pdf { + background-image: url(../../images/input_pdf.png); +} +input.pdf:disabled { + background-image: url(../../images/input_pdf.disabled.png); +} +input.camera { + background-image: url(../../images/input_camera.png); +} +input.spinn { + background-image: url(../../images/spinner_green.gif); +} + /*#table-add-item select, #table-add-sla select { width: 180px; }*/ @@ -1812,7 +1618,7 @@ div#main_pure { /* IE 7 Hack */ #editor { - *margin-top: 10px !important; + *margin-top: 10px; } /* big_data is used in tactical and logon_ok */ .big_data { @@ -1832,7 +1638,7 @@ div#main_pure { text-align: center; font-weight: bold; padding: 8px; - margin: 0px 0px 0px 0px !important; + margin: 0px 0px 0px 0px; z-index: -1; } @@ -1852,7 +1658,7 @@ span.actions { margin-left: 30px; } .actions { - min-width: 200px !important; + min-width: 200px; } select#template, select#action { @@ -1993,7 +1799,7 @@ ol.steps li.current { background-color: #e9f3d2; } ol.steps li.visited { - color: #999 !important; + color: #999; } fieldset .databox { @@ -2001,7 +1807,7 @@ fieldset .databox { } fieldset.databox { - padding: 14px !important; + padding: 14px; } fieldset legend span, @@ -2114,10 +1920,6 @@ div#pandora_logo_header { * --------------------------------------------------------------------- */ #header_table { - margin: 0px; - padding: 0px; - margin-top: 0px; - padding-left: 95px; /* This is overwritten by the classic menu */ padding-right: 35px; } @@ -2133,12 +1935,12 @@ div#pandora_logo_header { .header_title { font-weight: 600; font-size: 10.5pt; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; } .header_subtitle { font-size: 10pt; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; } #header_table_inner a, @@ -2204,7 +2006,7 @@ div#header_autorefresh_counter { } .autorefresh_disabled { - cursor: not-allowed !important; + cursor: not-allowed; } a.autorefresh_txt, @@ -2241,8 +2043,8 @@ div.warn { .submenu_not_selected, .submenu_selected, .submenu2 { - border: 0px !important; - min-height: 35px !important; + border: 0px; + min-height: 35px; } div#steps_clean { @@ -2274,8 +2076,8 @@ div#logo_text3 { padding-top: 0px; }*/ .pagination * { - margin-left: 0px !important; - margin-right: 0px !important; + margin-left: 0px; + margin-right: 0px; vertical-align: middle; } @@ -2338,25 +2140,25 @@ td.cellBig { .info_box { background: #f9faf9; - margin-top: 10px !important; - margin-bottom: 10px !important; + margin-top: 10px; + margin-bottom: 10px; padding: 0px 5px 5px 10px; border-color: #e2e2e2; border-style: solid; border-width: 1px; - width: 100% !important; + width: 100%; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .info_box .title * { - font-size: 10pt !important; + font-size: 10pt; font-weight: bolder; } .info_box .icon { - width: 30px !important; + width: 30px; text-align: center; } @@ -2389,7 +2191,7 @@ tr.group_view_ok, tr.group_view_not_init, .group_view_not_init { background-color: #5bb6e5; - color: #fff !important; + color: #fff; } tr.group_view_warn, @@ -2398,24 +2200,24 @@ tr.group_view_warn.a, a.group_view_warn, tr.a.group_view_warn { background-color: #fad403; - color: #fff !important; + color: #fff; } a.group_view_warn { - color: #fad403 !important; - color: #fff !important; + color: #fad403; + color: #fff; } tr.group_view_alrm, .group_view_alrm { background-color: #ffa631; - color: #fff !important; + color: #fff; } tr.group_view_unk, .group_view_unk { background-color: #b2b2b2; - color: #fff !important; + color: #fff; } /* classes for event priorities. Sits now in functions.php */ @@ -2433,7 +2235,7 @@ tr.group_view_unk, .datos_redf9 a, .datos_red * { background-color: #fc4444; - color: #fff !important; + color: #fff; } .datos_yellow, @@ -2448,7 +2250,7 @@ a.datos_blue, .datos_blue, .datos_blue * { background-color: #4ca8e0; - color: #fff !important; + color: #fff; } .datos_grey, @@ -2495,7 +2297,7 @@ input#text-id_parent.ac_input, input, textarea, select { - background-color: #ffffff !important; + background-color: #ffffff; border: 1px solid #cbcbcb; -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2527,7 +2329,7 @@ span#plugin_description { .visual_font_size_4pt > em > strong, .visual_font_size_4pt em span, .visual_font_size_4pt span em { - font-size: 4pt !important; + font-size: 4pt; line-height: 4pt; } .visual_font_size_6pt, @@ -2539,7 +2341,7 @@ span#plugin_description { .visual_font_size_6pt > em > strong, .visual_font_size_6pt em span, .visual_font_size_6pt span em { - font-size: 6pt !important; + font-size: 6pt; line-height: 6pt; } .visual_font_size_8pt, @@ -2551,7 +2353,7 @@ span#plugin_description { .visual_font_size_8pt > em > strong, .visual_font_size_8pt em span, .visual_font_size_8pt span em { - font-size: 8pt !important; + font-size: 8pt; line-height: 8pt; } .visual_font_size_10pt, @@ -2563,7 +2365,7 @@ span#plugin_description { .visual_font_size_10pt > em > strong, .visual_font_size_10pt em span, .visual_font_size_10pt span em { - font-size: 10pt !important; + font-size: 10pt; line-height: 10pt; } .visual_font_size_12pt, @@ -2575,7 +2377,7 @@ span#plugin_description { .visual_font_size_12pt > em > strong, .visual_font_size_12pt em span, .visual_font_size_12pt span em { - font-size: 12pt !important; + font-size: 12pt; line-height: 12pt; } .visual_font_size_14pt, @@ -2587,7 +2389,7 @@ span#plugin_description { .visual_font_size_14pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 14pt !important; + font-size: 14pt; line-height: 14pt; } .visual_font_size_18pt, @@ -2599,7 +2401,7 @@ span#plugin_description { .visual_font_size_18pt > em > strong, .visual_font_size_18pt em span, .visual_font_size_18pt span em { - font-size: 18pt !important; + font-size: 18pt; line-height: 18pt; } @@ -2612,7 +2414,7 @@ span#plugin_description { .visual_font_size_24pt > em > strong, .visual_font_size_24pt em span, .visual_font_size_24pt span em { - font-size: 24pt !important; + font-size: 24pt; line-height: 24pt; } .visual_font_size_28pt, @@ -2624,7 +2426,7 @@ span#plugin_description { .visual_font_size_28pt > em > strong, .visual_font_size_28pt em span, .visual_font_size_28pt span em { - font-size: 28pt !important; + font-size: 28pt; line-height: 28pt; } .visual_font_size_36pt, @@ -2636,7 +2438,7 @@ span#plugin_description { .visual_font_size_36pt > em > strong, .visual_font_size_36pt em span, .visual_font_size_36pt span em { - font-size: 36pt !important; + font-size: 36pt; line-height: 36pt; } .visual_font_size_48pt, @@ -2648,7 +2450,7 @@ span#plugin_description { .visual_font_size_48pt > em > strong, .visual_font_size_48pt em span, .visual_font_size_48pt span em { - font-size: 48pt !important; + font-size: 48pt; line-height: 48pt; } .visual_font_size_60pt, @@ -2660,7 +2462,7 @@ span#plugin_description { .visual_font_size_60pt > em > strong, .visual_font_size_60pt em span, .visual_font_size_60pt span em { - font-size: 60pt !important; + font-size: 60pt; line-height: 60pt; } .visual_font_size_72pt, @@ -2672,7 +2474,7 @@ span#plugin_description { .visual_font_size_72pt > em > strong, .visual_font_size_72pt em span, .visual_font_size_72pt span em { - font-size: 72pt !important; + font-size: 72pt; line-height: 72pt; } @@ -2685,7 +2487,7 @@ span#plugin_description { .visual_font_size_84pt > em > strong, .visual_font_size_84pt em span, .visual_font_size_84pt span em { - font-size: 84pt !important; + font-size: 84pt; line-height: 84pt; } @@ -2698,7 +2500,7 @@ span#plugin_description { .visual_font_size_96pt > em > strong, .visual_font_size_96pt em span, .visual_font_size_96pt span em { - font-size: 96pt !important; + font-size: 96pt; line-height: 96pt; } @@ -2711,7 +2513,7 @@ span#plugin_description { .visual_font_size_116pt > em > strong, .visual_font_size_116pt em span, .visual_font_size_116pt span em { - font-size: 116pt !important; + font-size: 116pt; line-height: 116pt; } @@ -2724,7 +2526,7 @@ span#plugin_description { .visual_font_size_128pt > em > strong, .visual_font_size_128pt em span, .visual_font_size_128pt span em { - font-size: 128pt !important; + font-size: 128pt; line-height: 128pt; } @@ -2737,7 +2539,7 @@ span#plugin_description { .visual_font_size_140pt > em > strong, .visual_font_size_140pt em span, .visual_font_size_140pt span em { - font-size: 140pt !important; + font-size: 140pt; line-height: 140pt; } @@ -2750,7 +2552,7 @@ span#plugin_description { .visual_font_size_154pt > em > strong, .visual_font_size_154pt em span, .visual_font_size_154pt span em { - font-size: 154pt !important; + font-size: 154pt; line-height: 154pt; } @@ -2763,7 +2565,7 @@ span#plugin_description { .visual_font_size_196pt > em > strong, .visual_font_size_196pt em span, .visual_font_size_196pt span em { - font-size: 196pt !important; + font-size: 196pt; line-height: 196pt; } @@ -2776,7 +2578,7 @@ span#plugin_description { .resize_visual_font_size_8pt > em > strong, .visual_font_size_8pt em span, .visual_font_size_8pt span em { - font-size: 4pt !important; + font-size: 4pt; line-height: 4pt; } .resize_visual_font_size_14pt, @@ -2788,7 +2590,7 @@ span#plugin_description { .resize_visual_font_size_14pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 7pt !important; + font-size: 7pt; line-height: 7pt; } .resize_visual_font_size_24pt, @@ -2800,7 +2602,7 @@ span#plugin_description { .resize_visual_font_size_24pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 12pt !important; + font-size: 12pt; line-height: 12pt; } .resize_visual_font_size_36pt, @@ -2812,7 +2614,7 @@ span#plugin_description { .resize_visual_font_size_36pt > em > strong, .visual_font_size_36pt em span, .visual_font_size_36pt span em { - font-size: 18pt !important; + font-size: 18pt; line-height: 18pt; } .resize_visual_font_size_72pt, @@ -2824,7 +2626,7 @@ span#plugin_description { .resize_visual_font_size_72pt > em > strong, .visual_font_size_72pt em span, .visual_font_size_72pt span em { - font-size: 36pt !important; + font-size: 36pt; line-height: 36pt; } @@ -2849,9 +2651,9 @@ span#plugin_description { width: 400px; height: 260px; - -moz-box-shadow: 0px 4px 4px #010e1b !important; - -webkit-box-shadow: 0px 4px 4px #010e1b !important; - box-shadow: 0px 4px 4px #010e1b !important; + -moz-box-shadow: 0px 4px 4px #010e1b; + -webkit-box-shadow: 0px 4px 4px #010e1b; + box-shadow: 0px 4px 4px #010e1b; filter: alpha(opacity=97); -moz-opacity: 0.97; @@ -2933,7 +2735,7 @@ span#plugin_description { * --------------------------------------------------------------------- */ a.tip { - display: inline !important; + display: inline; cursor: help; } @@ -2958,7 +2760,7 @@ input.search_input { background-position: center right 10px; background-repeat: no-repeat; background-size: 17px; - background-color: #f2f6f7 !important; + background-color: #f2f6f7; padding: 0px; margin: 0; width: 250px; @@ -2977,7 +2779,7 @@ input.search_input { } /*.vertical_fields td input, .vertical_fields td select { - margin-top: 8px !important; + margin-top: 8px; }*/ a[id^="tgl_ctrl_"] > img, @@ -3013,7 +2815,7 @@ div.forced_title_layer { div.legend > div { pointer-events: none; /* Allow to click the graphs below */ - opacity: 0.65 !important; + opacity: 0.65; } /* Recover the padding of the legend elements under a databox parent */ @@ -3160,7 +2962,7 @@ div.nodata_container { .menu_graph, .timestamp_graph { - position: absolute !important; + position: absolute; } .menu_graph { @@ -3181,13 +2983,13 @@ div.nodata_container { .legendColorBox * { font-size: 0px; padding: 0px 4px; - overflow: visible !important; + overflow: visible; } /* GIS CSS */ .olLayerDiv { - z-index: 102 !important; + z-index: 102; } /* Alert view */ @@ -3203,7 +3005,7 @@ table.alert_escalation th img { } td.used_field { - background: #6eb432 !important; + background: #6eb432; color: #ffffff; font-weight: bold; } @@ -3287,7 +3089,7 @@ table#policy_modules td * { width: 100%; margin-left: auto; margin-right: auto; - background-color: #fff !important; + background-color: #fff; padding: 10px; border: 1px solid #e2e2e2; margin-top: 5%; @@ -3344,7 +3146,7 @@ div.div_groups_status { } .databox.pies fieldset.tactical_set { - width: 70% !important; + width: 70%; height: 285px; } @@ -3363,12 +3165,12 @@ div.div_groups_status { letter-spacing: 0pt; font-size: 10pt; white-space: pre-wrap; - padding-top: 0 !important; + padding-top: 0; font-family: "Open Sans", sans-serif; } .no_hidden_menu { - background-position: 11% 50% !important; + background-position: 11% 50%; } #menu_tab li.nomn, @@ -3408,7 +3210,7 @@ div.div_groups_status { #menu_tab li.tab_operation a, #menu_tab a.tab_operation { - background: none !important ; + background: none; } .agents_modules_table { @@ -3460,12 +3262,12 @@ div.div_groups_status { } .databox.agente > tbody > tr > td > div > canvas { - width: 100% !important; - text-align: left !important; + width: 100%; + text-align: left; } .databox.agente > tbody > tr > td > div.graph { - width: 100% !important; - text-align: left !important; + width: 100%; + text-align: left; } .green_title { @@ -3479,7 +3281,7 @@ div.div_groups_status { } .dashboard li a { - width: 158px !important; + width: 158px; } .text_subDashboard { @@ -3566,8 +3368,8 @@ div.div_groups_status { width: 200px; height: 20px; position: relative; - background: transparent !important; - border: 0px !important; + background: transparent; + border: 0px; left: -92px; top: 93px; @@ -3703,7 +3505,7 @@ div.simple_value > span.text > p, div.simple_value > span.text > p > span > strong, div.simple_value > span.text > p > strong, div.simple_value > a > span.text p { - font-family: monospace !important; + font-family: monospace; white-space: pre; } @@ -3746,36 +3548,36 @@ table.table_modal_alternate tr td:first-child { } ul.events_tabs { - background: #ffffff !important; + background: #ffffff; border: 0px; display: flex; justify-content: space-between; - padding: 0px !important; + padding: 0px; } ul.events_tabs:before, ul.events_tabs:after { - content: none !important; + content: none; } ul.events_tabs > li { - margin: 0 !important; + margin: 0; width: 100%; text-align: center; - float: none !important; + float: none; outline-width: 0; } ul.events_tabs > li.ui-state-default { - background: #fff !important; - border: none !important; - border-bottom: 2px solid #cacaca !important; + background: #fff; + border: none; + border-bottom: 2px solid #cacaca; } ul.events_tabs > li a { text-align: center; - float: none !important; - padding: 8px !important; + float: none; + padding: 8px; display: block; } @@ -3787,8 +3589,8 @@ ul.events_tabs > li span { } ul.events_tabs > li.ui-tabs-active { - border-bottom: 2px solid #82b92e !important; - border-top: 2px solid #82b92e !important; + border-bottom: 2px solid #82b92e; + border-top: 2px solid #82b92e; } /* @@ -4097,7 +3899,7 @@ span.log_zone_line_error { } .readonly { - background-color: #dedede !important; + background-color: #dedede; } .input_error { @@ -4131,7 +3933,7 @@ span.log_zone_line_error { background-color: #eee; } .checkselected { - background-color: #eee !important; + background-color: #eee; } .tag-wrapper { padding: 0 10px 0 0; @@ -4231,15 +4033,15 @@ div#footer_help { * --------------------------------------------------------------------- */ .graph_conteiner_inside > .parent_graph { - width: 100% !important; + width: 100%; } .graph_conteiner_inside > .parent_graph > .menu_graph { - left: 90% !important; + left: 90%; } .graph_conteiner_inside > .parent_graph > .graph { - width: 90% !important; + width: 90%; } .graph_conteiner_inside > div > .nodata_container > .nodata_text { @@ -4247,7 +4049,7 @@ div#footer_help { } .graph_conteiner_inside > div > .nodata_container { - background-size: 120px 80px !important; + background-size: 120px 80px; } /* @@ -4473,8 +4275,8 @@ form ul.form_flex li ul li { /* library for graphs */ .yAxis.y1Axis > .tickLabel { white-space: nowrap; - line-height: 1.05em !important; - width: auto !important; + line-height: 1.05em; + width: auto; } /* dialog */ @@ -4482,7 +4284,7 @@ form ul.form_flex li ul li { display: flex; width: 100%; margin-left: 10px; - float: none !important; + float: none; } .pandora_confirm_dialog .ui-dialog-buttonset button { @@ -4512,11 +4314,11 @@ form ul.form_flex li ul li { } .dialog-grayed { - background: #373737 !important; + background: #373737; } .dialog-grayed .ui-dialog-buttonpane { - background: #373737 !important; + background: #373737; } /* GIS MAP */ @@ -4560,7 +4362,7 @@ tr:first-child > td > a.up_arrow { /* extensions -> module groups */ .tooltip_counters h3 { font-size: 12pt; - padding-bottom: 10px !important; + padding-bottom: 10px; text-align: center; } @@ -4579,9 +4381,9 @@ tr:first-child > td > a.up_arrow { .button-as-link { text-decoration: underline; - background: none !important; + background: none; border: none; - padding: 0 !important; + padding: 0; } /* @@ -4968,7 +4770,7 @@ input:checked + .p-slider:before { } #edit_user_profiles table { - margin-bottom: 0 !important; + margin-bottom: 0; } .user_edit_first_row { @@ -5006,9 +4808,9 @@ input:checked + .p-slider:before { } .edit_user_info_right input { - background-color: transparent !important; + background-color: transparent; border: none; - border-radius: 0 !important; + border-radius: 0; border-bottom: 1px solid #343434; padding: 10px 0px 2px 35px; box-sizing: border-box; @@ -5049,9 +4851,9 @@ input:checked + .p-slider:before { } .edit_user_options #text-block_size { - background-color: transparent !important; + background-color: transparent; border: none; - border-radius: 0 !important; + border-radius: 0; border-bottom: 1px solid #343434; padding: 0px 0px 0px 10px; } @@ -5070,12 +4872,12 @@ input:checked + .p-slider:before { } .edit_user_comments #textarea_comments { - background-color: #fbfbfb !important; + background-color: #fbfbfb; padding-left: 10px; } .edit_user_labels { - color: #343434 !important; + color: #343434; font-weight: bold; padding-right: 10px; margin: 0px 0px 5px 0px; @@ -5105,7 +4907,7 @@ input:checked + .p-slider:before { .user_edit_first_row .edit_user_info_left > div:last-child, .user_edit_first_row .edit_user_info_right > div:last-child, .user_edit_second_row .edit_user_options > div:last-child { - margin-bottom: 0px !important; + margin-bottom: 0px; } .user_avatar { @@ -5278,7 +5080,7 @@ table.info_table > tbody > tr > td > form > a > img { } table.info_table > tbody > tr:hover { - background-color: #eee !important; + background-color: #eee; } .info_table.profile_list > thead > tr > th > a.tip { @@ -5290,11 +5092,11 @@ table.info_table > tbody > tr:hover { .action_buttons input[type="image"], .action_button_img { border-radius: 4px; - border: 1px solid #dcdcdc !important; + border: 1px solid #dcdcdc; padding: 1px; box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); max-width: 21px; - background-color: transparent !important; /*BORRAR*/ + background-color: transparent; /*BORRAR*/ } /* This class is for only one icon to be a button type. */ @@ -5319,7 +5121,7 @@ table.info_table > tbody > tr:hover { } .action_buttons input[type="image"]:hover { - background-color: #fff !important; + background-color: #fff; } /* Tables to upload files */ @@ -5358,7 +5160,7 @@ table.info_table > tbody > tr:hover { .file_table_buttons a:last-child img, #file_table_modal .upload_file { - margin-right: 0px !important; + margin-right: 0px; } #file_table_modal li a { @@ -5404,7 +5206,7 @@ table.info_table > tbody > tr:hover { } .file_table_modal_active { - background-color: #fff !important; + background-color: #fff; border: 1px solid #e6e6e6; border-bottom: none; } @@ -5451,7 +5253,7 @@ table.info_table.agent_info_table { margin-bottom: 20px; } table.agent_info_table tr { - background-color: #fff !important; + background-color: #fff; } table.agent_info_table > tbody > tr > td { @@ -5491,20 +5293,20 @@ table.info_table.agent_info_table table.info_table { } .agent_info_table_opened { - background-color: #82b92e !important; - color: #fff !important; - border-color: #82b92e !important; + background-color: #82b92e; + color: #fff; + border-color: #82b92e; } .agent_info_table_closed { - background-color: #fff !important; - color: #000 !important; + background-color: #fff; + color: #000; border-radius: 4px; } /* Tag view */ table.info_table.policy_table tr { - background-color: #fff !important; + background-color: #fff; } table.info_table.policy_sub_table thead > tr:first-child th { @@ -5522,7 +5324,7 @@ table.info_table.policy_sub_table { vertical-align: middle; } .sort_arrow a { - padding: 0 0 0 5px !important; + padding: 0 0 0 5px; } .sort_arrow img { width: 0.8em; @@ -5566,7 +5368,7 @@ table.info_table.policy_sub_table { .pagination .total_number > *:last-child { border-top-right-radius: 2px; border-bottom-right-radius: 2px; - border-right: 1px solid #cacaca !important; + border-right: 1px solid #cacaca; } .pagination .page_number_active { @@ -5586,7 +5388,7 @@ table.info_table.policy_sub_table { } .pagination a { - margin: 0 !important; + margin: 0; } .pagination .pagination-arrows { @@ -5626,7 +5428,7 @@ table.info_table.policy_sub_table { } .input_label { - color: #343434 !important; + color: #343434; font-weight: bold; padding-right: 10px; margin: 0px 0px 5px 0px; @@ -5664,11 +5466,11 @@ table.info_table.policy_sub_table { /* Inputs type text shown as a black line */ .agent_options input[type="text"] { - background-color: transparent !important; + background-color: transparent; border: none; - border-radius: 0 !important; + border-radius: 0; border-bottom: 1px solid #ccc; - font-family: "lato-bolder", "Open Sans", sans-serif !important; + font-family: "lato-bolder", "Open Sans", sans-serif; font-size: 10pt; padding: 2px 5px; box-sizing: border-box; @@ -5712,7 +5514,7 @@ table.info_table.policy_sub_table { } .switch_radio_button input { - position: absolute !important; + position: absolute; clip: rect(0, 0, 0, 0); height: 1px; width: 1px; @@ -5905,7 +5707,7 @@ div#bullets_modules div { /* Agent details in agent view */ div#status_pie path { - stroke-width: 8px !important; + stroke-width: 8px; } div#status_pie { margin-bottom: 2em; @@ -6021,7 +5823,7 @@ div#status_pie { } .white_table_graph_content.no-padding-imp .info_box { - margin: 0 !important; + margin: 0; } .white_table_graph_content.min-height-100 { @@ -6092,5 +5894,5 @@ div#status_pie { } .white_table_no_border { - border: none !important; + border: none; } diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 169f078cea..c84824ccae 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -72,7 +72,7 @@ input { } input[type="checkbox"] { - display: inline !important; + display: inline; } select { @@ -149,7 +149,7 @@ p.center { h1#log_title { font-size: 18px; margin-bottom: 0px; - color: #fff !important; + color: #fff; width: 300px; } div#log_msg { @@ -350,7 +350,7 @@ div#head { } div#foot { - font-size: 6pt !important; + font-size: 6pt; border-top: solid 2px #222; padding-top: 8px; padding-bottom: 5px; @@ -445,7 +445,7 @@ div#foot { } p.log_in { - color: #fff !important; + color: #fff; padding: 0px 10px; width: 300px; } @@ -458,7 +458,7 @@ div#login { border-width: 2px 2px 2px 2px; border-style: solid; border-color: #000; - font-size: 12px !important; + font-size: 12px; } div#login_in, #login_f { @@ -477,13 +477,13 @@ div#login_in, height: 100%; border-radius: 5px; /* Browser without multibackground support */ - background-color: #373737 !important; + background-color: #373737; } #login_outer { border-radius: 11px; background-color: #000; - width: 500px !important; - color: #fff !important; + width: 500px; + color: #fff; margin: 0px auto; } @@ -569,10 +569,10 @@ DIV.login_button{ } DIV.login_button>input{ - background-color: #373737 !important; + background-color: #373737; border: 0px none; - background-image: url("../../images/input_go.png") !important; - padding-right: 25px !important; + background-image: url("../../images/input_go.png"); + padding-right: 25px; } .login_page{ @@ -584,14 +584,14 @@ DIV.login_button>input{ } input.next_login { - padding-right: 12px !important; - padding-left: 12px !important; + padding-right: 12px; + padding-left: 12px; height: 23px; text-align: center; - font-weight: 600 !important; + font-weight: 600; letter-spacing: 0.5pt; - font-size: 12px !important; - border-radius: 3px !important; + font-size: 12px; + border-radius: 3px; } DIV.login_nick, DIV.login_pass { @@ -656,14 +656,14 @@ input.login { margin: 0px 0px; width: 135px; height: 18px; - font-weight: 100 !important; + font-weight: 100; letter-spacing: 0.3pt; } input.login_user { - color: #373737 !important; + color: #373737; padding-left: 8px; width: 179px; color: #222; @@ -680,9 +680,9 @@ input.login_password { */ .databox_error { - width: 657px !important; + width: 657px; height: 400px; - border: none !important; + border: none; background-color: #fafafa; background: url(../../images/splash_error.png) no-repeat; } @@ -727,19 +727,19 @@ input.sub { font-size: 8pt; - background-color: #333 !important; - background-repeat: no-repeat !important; - background-position: 92% 3px !important; + background-color: #333; + background-repeat: no-repeat; + background-position: 92% 3px; - color: white !important; + color: white; padding: 3px 3px 5px 12px; border-color: #333; } input.sub[disabled] { - color: #b4b4b4 !important; - background-color: #f3f3f3 !important; + color: #b4b4b4; + background-color: #f3f3f3; border-color: #b6b6b6; cursor: default; } @@ -768,73 +768,73 @@ input.pdf { } input.next { - background-image: url(../../images/input_go.png) !important; + background-image: url(../../images/input_go.png); } input.upd { - background-image: url(../../images/input_update.png) !important; + background-image: url(../../images/input_update.png); } input.wand { - background-image: url(../../images/input_wand.png) !important; + background-image: url(../../images/input_wand.png); } input.wand:disabled { - background-image: url(../../images/input_wand.disabled.png) !important; + background-image: url(../../images/input_wand.disabled.png); } input.search { - background-image: url(../../images/input_zoom.png) !important; + background-image: url(../../images/input_zoom.png); } input.search:disabled { - background-image: url(../../images/input_zoom.disabled.png) !important; + background-image: url(../../images/input_zoom.disabled.png); } input.ok { - background-image: url(../../images/input_tick.png) !important; + background-image: url(../../images/input_tick.png); } input.ok:disabled { - background-image: url(../../images/input_tick.disabled.png) !important; + background-image: url(../../images/input_tick.disabled.png); } input.add { - background-image: url(../../images/input_add.png) !important; + background-image: url(../../images/input_add.png); } input.add:disabled { - background-image: url(../../images/input_add.disabled.png) !important; + background-image: url(../../images/input_add.disabled.png); } input.cancel { - background-image: url(../../images/input_cross.png) !important; + background-image: url(../../images/input_cross.png); } input.cancel:disabled { - background-image: url(../../images/input_cross.disabled.png) !important; + background-image: url(../../images/input_cross.disabled.png); } input.delete { - background-image: url(../../images/input_delete.png) !important; + background-image: url(../../images/input_delete.png); } input.delete:disabled { - background-image: url(../../images/input_delete.disabled.png) !important; + background-image: url(../../images/input_delete.disabled.png); } input.cog { - background-image: url(../../images/input_cog.png) !important; + background-image: url(../../images/input_cog.png); } input.cog:disabled { - background-image: url(../../images/input_cog.disabled.png) !important; + background-image: url(../../images/input_cog.disabled.png); } input.config { - background-image: url(../../images/input_config.png) !important; + background-image: url(../../images/input_config.png); } input.config:disabled { - background-image: url(../../images/input_config.disabled.png) !important; + background-image: url(../../images/input_config.disabled.png); } input.filter { - background-image: url(../../images/input_filter.png) !important; + background-image: url(../../images/input_filter.png); } input.filter:disabled { - background-image: url(../../images/input_filter.disabled.png) !important; + background-image: url(../../images/input_filter.disabled.png); } input.pdf { - background-image: url(../../images/input_pdf.png) !important; + background-image: url(../../images/input_pdf.png); } input.pdf:disabled { - background-image: url(../../images/input_pdf.disabled.png) !important; + background-image: url(../../images/input_pdf.disabled.png); } input.camera { - background-image: url(../../images/input_camera.png) !important; + background-image: url(../../images/input_camera.png); } #toolbox #auto_save { @@ -850,105 +850,105 @@ input.visual_editor_button_toolbox { margin-top: 5px; } input.delete_min { - background: #fefefe url(../../images/cross.png) no-repeat center !important; + background: #fefefe url(../../images/cross.png) no-repeat center; } input.delete_min[disabled] { - background: #fefefe url(../../images/cross.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/cross.disabled.png) no-repeat center; } input.graph_min { - background: #fefefe url(../../images/chart_curve.png) no-repeat center !important; + background: #fefefe url(../../images/chart_curve.png) no-repeat center; } input.graph_min[disabled] { background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat - center !important; + center; } input.percentile_min { - background: #fefefe url(../../images/chart_bar.png) no-repeat center !important; + background: #fefefe url(../../images/chart_bar.png) no-repeat center; } input.percentile_min[disabled] { - background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center; } input.percentile_item_min { - background: #fefefe url(../../images/percentile_item.png) no-repeat center !important; + background: #fefefe url(../../images/percentile_item.png) no-repeat center; } input.percentile_item_min[disabled] { background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat - center !important; + center; } input.binary_min { - background: #fefefe url(../../images/binary.png) no-repeat center !important; + background: #fefefe url(../../images/binary.png) no-repeat center; } input.binary_min[disabled] { - background: #fefefe url(../../images/binary.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/binary.disabled.png) no-repeat center; } input.camera_min { - background: #fefefe url(../../images/camera.png) no-repeat center !important; + background: #fefefe url(../../images/camera.png) no-repeat center; } input.camera_min[disabled] { - background: #fefefe url(../../images/camera.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/camera.disabled.png) no-repeat center; } input.config_min { - background: #fefefe url(../../images/config.png) no-repeat center !important; + background: #fefefe url(../../images/config.png) no-repeat center; } input.config_min[disabled] { - background: #fefefe url(../../images/config.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/config.disabled.png) no-repeat center; } input.label_min { - background: #fefefe url(../../images/tag_red.png) no-repeat center !important; + background: #fefefe url(../../images/tag_red.png) no-repeat center; } input.label_min[disabled] { - background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center; } input.icon_min { - background: #fefefe url(../../images/photo.png) no-repeat center !important; + background: #fefefe url(../../images/photo.png) no-repeat center; } input.icon_min[disabled] { - background: #fefefe url(../../images/photo.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/photo.disabled.png) no-repeat center; } input.box_item { - background: #fefefe url(../../images/box_item.png) no-repeat center !important; + background: #fefefe url(../../images/box_item.png) no-repeat center; } input.box_item[disabled] { - background: #fefefe url(../../images/box_item.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/box_item.disabled.png) no-repeat center; } input.line_item { - background: #fefefe url(../../images/line_item.png) no-repeat center !important; + background: #fefefe url(../../images/line_item.png) no-repeat center; } input.line_item[disabled] { - background: #fefefe url(../../images/line_item.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/line_item.disabled.png) no-repeat center; } input.copy_item { - background: #fefefe url(../../images/copy_visualmap.png) no-repeat center !important; + background: #fefefe url(../../images/copy_visualmap.png) no-repeat center; } input.copy_item[disabled] { background: #fefefe url(../../images/copy_visualmap.disabled.png) no-repeat - center !important; + center; } input.grid_min { - background: #fefefe url(../../images/grid.png) no-repeat center !important; + background: #fefefe url(../../images/grid.png) no-repeat center; } input.grid_min[disabled] { - background: #fefefe url(../../images/grid.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/grid.disabled.png) no-repeat center; } input.save_min { - background: #fefefe url(../../images/file.png) no-repeat center !important; + background: #fefefe url(../../images/file.png) no-repeat center; } input.save_min[disabled] { - background: #fefefe url(../../images/file.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/file.disabled.png) no-repeat center; } input.service_min { - background: #fefefe url(../../images/box.png) no-repeat center !important; + background: #fefefe url(../../images/box.png) no-repeat center; } input.service_min[disabled] { - background: #fefefe url(../../images/box.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/box.disabled.png) no-repeat center; } input.group_item_min { - background: #fefefe url(../../images/group_green.png) no-repeat center !important; + background: #fefefe url(../../images/group_green.png) no-repeat center; } input.group_item_min[disabled] { background: #fefefe url(../../images/group_green.disabled.png) no-repeat - center !important; + center; } div#cont { @@ -959,7 +959,7 @@ div#cont { } .termframe { - background-color: #82b92e !important; + background-color: #82b92e; } table, @@ -1021,15 +1021,15 @@ td input[type="checkbox"] { td.datos3, td.datos3 * { background-color: #666; - color: white !important; + color: white; } td.datos4, td.datos4 * { - /*Add !important because in php the function html_print_table write style in cell and this is style head.*/ - text-align: center !important; + /*Add because in php the function html_print_table write style in cell and this is style head.*/ + text-align: center; background-color: #666; - color: white !important; + color: white; } td.datos_id { @@ -1239,10 +1239,10 @@ div.title_line { #menu_tab_frame, #menu_tab_frame_view { - display: block !important; + display: block; border-bottom: 1px solid #82b92e; /* float:left; */ - margin-left: 0px !important; + margin-left: 0px; max-height: 31px; min-height: 31px; padding-right: 28px; @@ -1250,7 +1250,7 @@ div.title_line { } #menu_tab { - margin: 0px 0px 0px 0px !important; + margin: 0px 0px 0px 0px; } #menu_tab .mn, @@ -1327,7 +1327,7 @@ div.title_line { } /* TAB TITLE */ #menu_tab_left { - margin-left: 0px !important; + margin-left: 0px; } #menu_tab_left .mn, @@ -1380,7 +1380,7 @@ div.title_line { -moz-border-top-left-radius: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; - margin-left: 0px !important; + margin-left: 0px; overflow-y: hidden; } @@ -1391,7 +1391,7 @@ div.title_line { #menu_tab_frame *, #menu_tab_frame_view * { - #margin: 0px 0px 0px 0px !important; + #margin: 0px 0px 0px 0px; } span.users { @@ -1510,9 +1510,9 @@ span.nrmess { table.databox { background-color: #5b5b5b; border-spacing: 0px; - -moz-box-shadow: 0px 0px 0px #ddd !important; - -webkit-box-shadow: 0px 0px 0px #ddd !important; - box-shadow: 0px 0px 0px #ddd !important; + -moz-box-shadow: 0px 0px 0px #ddd; + -webkit-box-shadow: 0px 0px 0px #ddd; + box-shadow: 0px 0px 0px #ddd; } .databox td { @@ -1539,7 +1539,7 @@ table.databox { .databox th textarea, .databox th select, .databox th select option { - color: #222 !important; + color: #222; } .tabletitle { @@ -1585,9 +1585,9 @@ table.alternate tr:nth-child(even) td { table.rounded_cells td { padding: 4px 4px 4px 10px; - -moz-border-radius: 6px !important; - -webkit-border-radius: 6px !important; - border-radius: 6px !important; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } .databox_color { @@ -1698,7 +1698,7 @@ div#main_pure { } /* IE 7 Hack */ #editor { - *margin-top: 10px !important; + *margin-top: 10px; } /* big_data is used in tactical and logon_ok */ .big_data { @@ -1716,7 +1716,7 @@ div#main_pure { text-align: center; font-weight: bold; padding: 8px; - margin: 0px 0px 0px 0px !important; + margin: 0px 0px 0px 0px; z-index: -1; } @@ -1741,7 +1741,7 @@ span.actions { margin-left: 30px; } .actions { - min-width: 200px !important; + min-width: 200px; } code, pre { @@ -1759,7 +1759,7 @@ select#action { } input[type="image"] { border: 0px; - background-color: transparent !important; + background-color: transparent; } table#simple select#id_module_type, table#alert_search select#id_agent, @@ -1887,7 +1887,7 @@ ol.steps li.current { background-color: #e9f3d2; } ol.steps li.visited { - color: #999 !important; + color: #999; } fieldset { @@ -1911,7 +1911,7 @@ fieldset .databox { } fieldset.databox { - padding: 14px !important; + padding: 14px; } fieldset legend span, @@ -2026,7 +2026,7 @@ div#pandora_logo_header { } .autorefresh_disabled { - cursor: not-allowed !important; + cursor: not-allowed; } a.autorefresh { @@ -2063,15 +2063,15 @@ div.warn { -o-transition-property: background-color; -o-transition-duration: 0.5s; -o-transition-timing-function: ease-out; - font-weight: normal !important; + font-weight: normal; } /* Submenus havent borders */ .submenu_not_selected, .submenu_selected, .submenu2 { - border: 0px !important; - min-height: 35px !important; + border: 0px; + min-height: 35px; } /* Pandora width style theme */ @@ -2098,7 +2098,7 @@ div#steps_clean { #menu_tab_frame_view { width: 100%; padding-right: 0px; - margin-left: 0px !important; + margin-left: 0px; margin-bottom: 20px; height: 31px; } @@ -2131,8 +2131,8 @@ div#logo_text3 { margin-bottom: 5px; } .pagination * { - margin-left: 0px !important; - margin-right: 0px !important; + margin-left: 0px; + margin-right: 0px; vertical-align: middle; } @@ -2141,7 +2141,7 @@ div#logo_text3 { /* Calendar background */ table.scw { background-color: #82b92e; - border: 0 !important; + border: 0; border-radius: 4px; } @@ -2151,7 +2151,7 @@ td.scwWeekNumberHead { } td.scwWeek { - color: #111 !important; + color: #111; } Today selector td.scwFoot { @@ -2169,39 +2169,39 @@ tfoot.scwFoot { } .scwFoot :hover { - color: #3f3f3f !important; + color: #3f3f3f; } table.scwCells { - background-color: #5b5b5b !important; - color: #3c3c3c !important; + background-color: #5b5b5b; + color: #3c3c3c; } table.scwCells:hover { - background-color: #5b5b5b !important; + background-color: #5b5b5b; } td.scwCellsExMonth { - background-color: #eee !important; - color: #3c3c3c !important; + background-color: #eee; + color: #3c3c3c; } td.scwCellsWeekend { - background-color: #3c3c3c !important; - color: #fff !important; - border: 0 !important; + background-color: #3c3c3c; + color: #fff; + border: 0; } td.scwInputDate { - background-color: #777 !important; - color: #ffffff !important; - border: 0 !important; + background-color: #777; + color: #ffffff; + border: 0; } td.scwFoot { - background-color: #5b5b5b !important; - color: #3c3c3c !important; - border: 0 !important; + background-color: #5b5b5b; + color: #3c3c3c; + border: 0; } /* Cells divs to set individual styles with the table objects */ @@ -2286,25 +2286,25 @@ div.cellBig { .info_box { background: #5b5b5b; - margin-top: 10px !important; - margin-bottom: 10px !important; + margin-top: 10px; + margin-bottom: 10px; padding: 0px 5px 5px 10px; border-color: #e2e2e2; border-style: solid; border-width: 1px; - width: 100% !important; + width: 100%; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .info_box .title * { - font-size: 10pt !important; + font-size: 10pt; font-weight: bolder; } .info_box .icon { - width: 30px !important; + width: 30px; text-align: center; } @@ -2345,7 +2345,7 @@ tr.group_view_not_init, tr.group_view_not_init, .group_view_not_init { background-color: #5bb6e5; - color: #fff !important; + color: #fff; } tr.group_view_warn, @@ -2354,11 +2354,11 @@ tr.group_view_warn.a, a.group_view_warn, tr.a.group_view_warn { background-color: #fad403; - color: #3f3f3f !important; + color: #3f3f3f; } a.group_view_warn { - color: #fad403 !important; + color: #fad403; } tr.group_view_alrm, @@ -2388,7 +2388,7 @@ tr.group_view_unk, .datos_redf9 a, .datos_red * { background-color: #fc4444; - color: #fff !important; + color: #fff; } .datos_yellow, @@ -2403,7 +2403,7 @@ a.datos_blue, .datos_blue, .datos_blue * { background-color: #4ca8e0; - color: #fff !important; + color: #fff; } .datos_grey, @@ -2481,7 +2481,7 @@ ul.operation li a:hover { -o-transition-property: background-color; -o-transition-duration: 0.5s; -o-transition-timing-function: ease-out; - background-color: #b1b1b1 !important; + background-color: #b1b1b1; } .submenu_not_selected:hover { transition-property: background-color; @@ -2496,11 +2496,11 @@ ul.operation li a:hover { -o-transition-property: background-color; -o-transition-duration: 0.5s; -o-transition-timing-function: ease-out; - background-color: #b1b1b1 !important; + background-color: #b1b1b1; } .submenu_selected:hover { - background-color: #b1b1b1 !important; + background-color: #b1b1b1; } .sub_subMenu { @@ -2528,7 +2528,7 @@ ul.operation li a:hover { -moz-transition-timing-function: ease-out; -o-transition-property: background-color; -o-transition-duration: 0.5s; - background-color: #b1b1b1 !important; + background-color: #b1b1b1; } .submenu_text { @@ -2548,15 +2548,15 @@ li.links a:hover { } .is_submenu2 { - background-color: #222222 !important; + background-color: #222222; } .operation { - background-color: #333 !important; + background-color: #333; } .operation .selected { - background-color: #b1b1b1 !important; + background-color: #b1b1b1; } .menu li, @@ -2582,7 +2582,7 @@ input#text-id_parent.ac_input, input, textarea, select { - background-color: #5b5b5b !important; + background-color: #5b5b5b; border: 1px solid #cbcbcb; -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2606,7 +2606,7 @@ span#plugin_description { .visual_font_size_4pt > em > strong, .visual_font_size_4pt em span, .visual_font_size_4pt span em { - font-size: 4pt !important; + font-size: 4pt; line-height: 4pt; } .visual_font_size_6pt, @@ -2618,7 +2618,7 @@ span#plugin_description { .visual_font_size_6pt > em > strong, .visual_font_size_6pt em span, .visual_font_size_6pt span em { - font-size: 6pt !important; + font-size: 6pt; line-height: 6pt; } .visual_font_size_8pt, @@ -2630,7 +2630,7 @@ span#plugin_description { .visual_font_size_8pt > em > strong, .visual_font_size_8pt em span, .visual_font_size_8pt span em { - font-size: 8pt !important; + font-size: 8pt; line-height: 8pt; } .visual_font_size_10pt, @@ -2640,7 +2640,7 @@ span#plugin_description { .visual_font_size_10pt > em > strong, .visual_font_size_10pt em span, .visual_font_size_10pt span em { - font-size: 10pt !important; + font-size: 10pt; line-height: 10pt; } .visual_font_size_12pt, @@ -2650,7 +2650,7 @@ span#plugin_description { .visual_font_size_12pt > em > strong, .visual_font_size_12pt em span, .visual_font_size_12pt span em { - font-size: 12pt !important; + font-size: 12pt; line-height: 12pt; } .visual_font_size_14pt, @@ -2662,7 +2662,7 @@ span#plugin_description { .visual_font_size_14pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 14pt !important; + font-size: 14pt; line-height: 14pt; } .visual_font_size_18pt, @@ -2674,7 +2674,7 @@ span#plugin_description { .visual_font_size_18pt > em > strong, .visual_font_size_18pt em span, .visual_font_size_18pt span em { - font-size: 18pt !important; + font-size: 18pt; line-height: 18pt; } .visual_font_size_24pt, @@ -2686,7 +2686,7 @@ span#plugin_description { .visual_font_size_24pt > em > strong, .visual_font_size_24pt em span, .visual_font_size_24pt span em { - font-size: 24pt !important; + font-size: 24pt; line-height: 24pt; } .visual_font_size_28pt, @@ -2698,7 +2698,7 @@ span#plugin_description { .visual_font_size_28pt > em > strong, .visual_font_size_28pt em span, .visual_font_size_28pt span em { - font-size: 28pt !important; + font-size: 28pt; line-height: 28pt; } .visual_font_size_36pt, @@ -2710,7 +2710,7 @@ span#plugin_description { .visual_font_size_36pt > em > strong, .visual_font_size_36pt em span, .visual_font_size_36pt span em { - font-size: 36pt !important; + font-size: 36pt; line-height: 36pt; } .visual_font_size_48pt, @@ -2722,7 +2722,7 @@ span#plugin_description { .visual_font_size_48pt > em > strong, .visual_font_size_48pt em span, .visual_font_size_48pt span em { - font-size: 48pt !important; + font-size: 48pt; line-height: 48pt; } .visual_font_size_60pt, @@ -2734,7 +2734,7 @@ span#plugin_description { .visual_font_size_60pt > em > strong, .visual_font_size_60pt em span, .visual_font_size_60pt span em { - font-size: 60pt !important; + font-size: 60pt; line-height: 60pt; } .visual_font_size_72pt, @@ -2746,7 +2746,7 @@ span#plugin_description { .visual_font_size_72pt > em > strong, .visual_font_size_72pt em span, .visual_font_size_72pt span em { - font-size: 72pt !important; + font-size: 72pt; line-height: 72pt; } .visual_font_size_84pt, @@ -2758,7 +2758,7 @@ span#plugin_description { .visual_font_size_84pt > em > strong, .visual_font_size_84pt em span, .visual_font_size_84pt span em { - font-size: 84pt !important; + font-size: 84pt; line-height: 84pt; } @@ -2771,7 +2771,7 @@ span#plugin_description { .visual_font_size_96pt > em > strong, .visual_font_size_96pt em span, .visual_font_size_96pt span em { - font-size: 96pt !important; + font-size: 96pt; line-height: 96pt; } @@ -2784,7 +2784,7 @@ span#plugin_description { .visual_font_size_116pt > em > strong, .visual_font_size_116pt em span, .visual_font_size_116pt span em { - font-size: 116pt !important; + font-size: 116pt; line-height: 116pt; } @@ -2797,7 +2797,7 @@ span#plugin_description { .visual_font_size_128pt > em > strong, .visual_font_size_128pt em span, .visual_font_size_128pt span em { - font-size: 128pt !important; + font-size: 128pt; line-height: 128pt; } @@ -2810,7 +2810,7 @@ span#plugin_description { .visual_font_size_140pt > em > strong, .visual_font_size_140pt em span, .visual_font_size_140pt span em { - font-size: 140pt !important; + font-size: 140pt; line-height: 140pt; } @@ -2823,7 +2823,7 @@ span#plugin_description { .visual_font_size_154pt > em > strong, .visual_font_size_154pt em span, .visual_font_size_154pt span em { - font-size: 154pt !important; + font-size: 154pt; line-height: 154pt; } @@ -2836,7 +2836,7 @@ span#plugin_description { .visual_font_size_196pt > em > strong, .visual_font_size_196pt em span, .visual_font_size_196pt span em { - font-size: 196pt !important; + font-size: 196pt; line-height: 196pt; } @@ -2849,7 +2849,7 @@ span#plugin_description { .resize_visual_font_size_8pt > em > strong, .visual_font_size_8pt em span, .visual_font_size_8pt span em { - font-size: 4pt !important; + font-size: 4pt; line-height: 4pt; } .resize_visual_font_size_14pt, @@ -2861,7 +2861,7 @@ span#plugin_description { .resize_visual_font_size_14pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 7pt !important; + font-size: 7pt; line-height: 7pt; } .resize_visual_font_size_24pt, @@ -2873,7 +2873,7 @@ span#plugin_description { .resize_visual_font_size_24pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 12pt !important; + font-size: 12pt; line-height: 12pt; } .resize_visual_font_size_36pt, @@ -2885,7 +2885,7 @@ span#plugin_description { .resize_visual_font_size_36pt > em > strong, .visual_font_size_36pt em span, .visual_font_size_36pt span em { - font-size: 18pt !important; + font-size: 18pt; line-height: 18pt; } .resize_visual_font_size_72pt, @@ -2897,7 +2897,7 @@ span#plugin_description { .resize_visual_font_size_72pt > em > strong, .visual_font_size_72pt em span, .visual_font_size_72pt span em { - font-size: 36pt !important; + font-size: 36pt; line-height: 36pt; } @@ -2919,9 +2919,9 @@ span#plugin_description { width: 400px; height: 260px; - -moz-box-shadow: 0px 4px 4px #010e1b !important; - -webkit-box-shadow: 0px 4px 4px #010e1b !important; - box-shadow: 0px 4px 4px #010e1b !important; + -moz-box-shadow: 0px 4px 4px #010e1b; + -webkit-box-shadow: 0px 4px 4px #010e1b; + box-shadow: 0px 4px 4px #010e1b; filter: alpha(opacity=97); -moz-opacity: 0.97; @@ -2997,7 +2997,7 @@ span#plugin_description { } a.tip { - display: inline !important; + display: inline; cursor: help; } @@ -3021,7 +3021,7 @@ input.search_input { .vertical_fields td input, .vertical_fields td select { - margin-top: 8px !important; + margin-top: 8px; } a[id^="tgl_ctrl_"] > img, @@ -3030,9 +3030,9 @@ a[id^="tgl_ctrl_"] > b > img { } .noshadow { - -moz-box-shadow: 0px !important; - -webkit-box-shadow: 0px !important; - box-shadow: 0px !important; + -moz-box-shadow: 0px; + -webkit-box-shadow: 0px; + box-shadow: 0px; } /* Images forced title */ @@ -3063,7 +3063,7 @@ div.forced_title_layer { div.legend > div { pointer-events: none; /* Allow to click the graphs below */ - opacity: 0.65 !important; + opacity: 0.65; } div.nodata_text { @@ -3117,7 +3117,7 @@ ul.subsubmenu { -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px; - background: #ececec !important; + background: #ececec; } ul.subsubmenu li { @@ -3241,7 +3241,7 @@ div#agent_wizard_subtabs { .menu_graph, .timestamp_graph { - position: absolute !important; + position: absolute; } .menu_graph { @@ -3262,13 +3262,13 @@ div#agent_wizard_subtabs { .legendColorBox * { font-size: 0px; padding: 0px 4px; - overflow: visible !important; + overflow: visible; } /* GIS CSS */ .olLayerDiv { - z-index: 102 !important; + z-index: 102; } /* Alert view */ @@ -3285,7 +3285,7 @@ table.alert_escalation th img { td.used_field { #border: solid #6eb432; - background: #6eb432 !important; + background: #6eb432; color: #ffffff; font-weight: bold; } @@ -3370,7 +3370,7 @@ table#policy_modules td * { width: 100%; margin-left: auto; margin-right: auto; - background-color: #5b5b5b !important; + background-color: #5b5b5b; padding: 10px; border: 1px solid #e2e2e2; margin-top: 5%; @@ -3413,7 +3413,7 @@ table#policy_modules td * { padding-bottom: 7px; } .databox.pies fieldset.tactical_set { - width: 70% !important; + width: 70%; height: 285px; } @@ -3435,7 +3435,7 @@ table#policy_modules td * { } .no_hidden_menu { - background-position: 11% 50% !important; + background-position: 11% 50%; } #menu_tab li.nomn, @@ -3466,7 +3466,7 @@ table#policy_modules td * { #menu_tab li.tab_operation a, #menu_tab a.tab_operation { - background: none !important ; + background: none; } .subsubmenu { @@ -3474,11 +3474,11 @@ table#policy_modules td * { float: right; z-index: 9999; display: none; - margin-top: 6px !important ; - left: 0px !important; + margin-top: 6px; + left: 0px; } .subsubmenu li { - margin-top: 0px !important ; + margin-top: 0px; } .agents_modules_table { @@ -3542,12 +3542,12 @@ table#policy_modules td * { } .databox.agente td > div > canvas { - width: 100% !important; - text-align: left !important; + width: 100%; + text-align: left; } .databox.agente td > div.graph { - width: 100% !important; - text-align: left !important; + width: 100%; + text-align: left; } .godmode, @@ -3559,8 +3559,8 @@ table#policy_modules td * { } .godmode { - border-top: 4px solid !important; - padding-bottom: 4px !important; + border-top: 4px solid; + padding-bottom: 4px; border-bottom-right-radius: 5px; border-right-style: solid; border-right-width: 0px; @@ -3577,7 +3577,7 @@ table#policy_modules td * { } .dashboard li a { - width: 158px !important; + width: 158px; } .text_subDashboard { @@ -4003,7 +4003,7 @@ div.form_message_alert ul li { div.form_message_alert ul li input { border: none; - background-color: #dadada !important; + background-color: #dadada; border-radius: 0px; height: 17px; width: 145px; @@ -4032,7 +4032,7 @@ div.button_message_alert_form input { } .ui-dialog .ui-dialog-titlebar { - background-color: #82b92e !important; + background-color: #82b92e; } /* @@ -4111,7 +4111,7 @@ div.login_pass { margin: 0 auto; width: 70%; height: 40px; - background-color: rgba(255, 255, 255, 0.2) !important; + background-color: rgba(255, 255, 255, 0.2); margin-bottom: 25px; min-width: 260px; } @@ -4124,14 +4124,14 @@ div.login_pass img { div.login_nick input, div.login_pass input { - background-color: rgba(255, 255, 255, 0) !important; - border: 0px !important; - color: white !important; + background-color: rgba(255, 255, 255, 0); + border: 0px; + color: white; border-radius: 0px; width: 89%; height: 40px; font-size: 9pt; - padding: 0px !important; + padding: 0px; } div.login_nick input:focus, @@ -4148,8 +4148,8 @@ div.login_pass input:-webkit-autofill:hover, div.login_pass input:-webkit-autofill:focus, div.login_pass input:-webkit-autofill:active { transition: background-color 10000s ease-in-out 0s; - -webkit-box-shadow: 0 0 0px 0px transparent inset !important; - -webkit-text-fill-color: white !important; + -webkit-box-shadow: 0 0 0px 0px transparent inset; + -webkit-text-fill-color: white; border: 0px; width: 89%; } @@ -4181,7 +4181,7 @@ div.login_button { div.login_button input { width: 100%; - background-color: rgb(25, 25, 25) !important; + background-color: rgb(25, 25, 25); text-align: center; border: 0px; border-radius: 0px; diff --git a/pandora_console/include/styles/pandora_forms.css b/pandora_console/include/styles/pandora_forms.css index e104a22fca..845f0a954a 100644 --- a/pandora_console/include/styles/pandora_forms.css +++ b/pandora_console/include/styles/pandora_forms.css @@ -71,7 +71,7 @@ td.scwWeekNumberHead { } td.scwWeek { - color: #000 !important; + color: #000; } /* Today selector */ @@ -90,5 +90,5 @@ tfoot.scwFoot { } .scwFoot :hover { - color: #ffa500 !important; + color: #ffa500; } diff --git a/pandora_console/include/styles/pandora_green_old.css b/pandora_console/include/styles/pandora_green_old.css index c27229aeb2..069cbbe9c0 100644 --- a/pandora_console/include/styles/pandora_green_old.css +++ b/pandora_console/include/styles/pandora_green_old.css @@ -72,7 +72,7 @@ input { } input[type="checkbox"] { - display: inline !important; + display: inline; } select { @@ -149,7 +149,7 @@ p.center { h1#log_title { font-size: 18px; margin-bottom: 0px; - color: #fff !important; + color: #fff; width: 300px; } div#log_msg { @@ -350,7 +350,7 @@ div#head { } div#foot { - font-size: 6pt !important; + font-size: 6pt; border-top: solid 2px #222; padding-top: 8px; padding-bottom: 5px; @@ -445,7 +445,7 @@ div#foot { } p.log_in { - color: #fff !important; + color: #fff; padding: 0px 10px; width: 300px; } @@ -458,7 +458,7 @@ div#login { border-width: 2px 2px 2px 2px; border-style: solid; border-color: #000; - font-size: 12px !important; + font-size: 12px; } div#login_in, #login_f { @@ -477,13 +477,13 @@ div#login_in, height: 100%; border-radius: 5px; /* Browser without multibackground support */ - background-color: #373737 !important; + background-color: #373737; } #login_outer { border-radius: 11px; background-color: #000; - width: 500px !important; - color: #fff !important; + width: 500px; + color: #fff; margin: 0px auto; } @@ -569,10 +569,10 @@ div.login_button { } div.login_button > input { - background-color: #373737 !important; + background-color: #373737; border: 0px none; - background-image: url("../../images/input_go.png") !important; - padding-right: 25px !important; + background-image: url("../../images/input_go.png"); + padding-right: 25px; } .login_page { @@ -584,14 +584,14 @@ div.login_button > input { } input.next_login { - padding-right: 12px !important; - padding-left: 12px !important; + padding-right: 12px; + padding-left: 12px; height: 23px; text-align: center; - font-weight: 600 !important; + font-weight: 600; letter-spacing: 0.5pt; - font-size: 12px !important; - border-radius: 3px !important; + font-size: 12px; + border-radius: 3px; } div.login_nick, @@ -660,14 +660,14 @@ input.login { margin: 0px 0px; width: 135px; height: 18px; - font-weight: 100 !important; + font-weight: 100; letter-spacing: 0.3pt; } input.login_user { /* Browser without multibackground support */ - color: #373737 !important; + color: #373737; padding-left: 8px; width: 179px; color: #222; @@ -682,9 +682,9 @@ input.login_password { height: 20px; } .databox_error { - width: 657px !important; + width: 657px; height: 400px; - border: none !important; + border: none; background-color: #fafafa; background: url(../../images/splash_error.png) no-repeat; } @@ -729,19 +729,19 @@ input.sub { font-size: 8pt; - background-color: #333 !important; - background-repeat: no-repeat !important; - background-position: 92% 3px !important; + background-color: #333; + background-repeat: no-repeat; + background-position: 92% 3px; - color: white !important; + color: white; padding: 3px 3px 5px 12px; border-color: #333; } input.sub[disabled] { - color: #b4b4b4 !important; - background-color: #f3f3f3 !important; + color: #b4b4b4; + background-color: #f3f3f3; border-color: #b6b6b6; cursor: default; } @@ -770,73 +770,73 @@ input.pdf { } input.next { - background-image: url(../../images/input_go.png) !important; + background-image: url(../../images/input_go.png); } input.upd { - background-image: url(../../images/input_update.png) !important; + background-image: url(../../images/input_update.png); } input.wand { - background-image: url(../../images/input_wand.png) !important; + background-image: url(../../images/input_wand.png); } input.wand:disabled { - background-image: url(../../images/input_wand.disabled.png) !important; + background-image: url(../../images/input_wand.disabled.png); } input.search { - background-image: url(../../images/input_zoom.png) !important; + background-image: url(../../images/input_zoom.png); } input.search:disabled { - background-image: url(../../images/input_zoom.disabled.png) !important; + background-image: url(../../images/input_zoom.disabled.png); } input.ok { - background-image: url(../../images/input_tick.png) !important; + background-image: url(../../images/input_tick.png); } input.ok:disabled { - background-image: url(../../images/input_tick.disabled.png) !important; + background-image: url(../../images/input_tick.disabled.png); } input.add { - background-image: url(../../images/input_add.png) !important; + background-image: url(../../images/input_add.png); } input.add:disabled { - background-image: url(../../images/input_add.disabled.png) !important; + background-image: url(../../images/input_add.disabled.png); } input.cancel { - background-image: url(../../images/input_cross.png) !important; + background-image: url(../../images/input_cross.png); } input.cancel:disabled { - background-image: url(../../images/input_cross.disabled.png) !important; + background-image: url(../../images/input_cross.disabled.png); } input.delete { - background-image: url(../../images/input_delete.png) !important; + background-image: url(../../images/input_delete.png); } input.delete:disabled { - background-image: url(../../images/input_delete.disabled.png) !important; + background-image: url(../../images/input_delete.disabled.png); } input.cog { - background-image: url(../../images/input_cog.png) !important; + background-image: url(../../images/input_cog.png); } input.cog:disabled { - background-image: url(../../images/input_cog.disabled.png) !important; + background-image: url(../../images/input_cog.disabled.png); } input.config { - background-image: url(../../images/input_config.png) !important; + background-image: url(../../images/input_config.png); } input.config:disabled { - background-image: url(../../images/input_config.disabled.png) !important; + background-image: url(../../images/input_config.disabled.png); } input.filter { - background-image: url(../../images/input_filter.png) !important; + background-image: url(../../images/input_filter.png); } input.filter:disabled { - background-image: url(../../images/input_filter.disabled.png) !important; + background-image: url(../../images/input_filter.disabled.png); } input.pdf { - background-image: url(../../images/input_pdf.png) !important; + background-image: url(../../images/input_pdf.png); } input.pdf:disabled { - background-image: url(../../images/input_pdf.disabled.png) !important; + background-image: url(../../images/input_pdf.disabled.png); } input.camera { - background-image: url(../../images/input_camera.png) !important; + background-image: url(../../images/input_camera.png); } #toolbox #auto_save { @@ -852,105 +852,105 @@ input.visual_editor_button_toolbox { margin-top: 5px; } input.delete_min { - background: #fefefe url(../../images/cross.png) no-repeat center !important; + background: #fefefe url(../../images/cross.png) no-repeat center; } input.delete_min[disabled] { - background: #fefefe url(../../images/cross.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/cross.disabled.png) no-repeat center; } input.graph_min { - background: #fefefe url(../../images/chart_curve.png) no-repeat center !important; + background: #fefefe url(../../images/chart_curve.png) no-repeat center; } input.graph_min[disabled] { background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat - center !important; + center; } input.percentile_min { - background: #fefefe url(../../images/chart_bar.png) no-repeat center !important; + background: #fefefe url(../../images/chart_bar.png) no-repeat center; } input.percentile_min[disabled] { - background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center; } input.percentile_item_min { - background: #fefefe url(../../images/percentile_item.png) no-repeat center !important; + background: #fefefe url(../../images/percentile_item.png) no-repeat center; } input.percentile_item_min[disabled] { background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat - center !important; + center; } input.binary_min { - background: #fefefe url(../../images/binary.png) no-repeat center !important; + background: #fefefe url(../../images/binary.png) no-repeat center; } input.binary_min[disabled] { - background: #fefefe url(../../images/binary.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/binary.disabled.png) no-repeat center; } input.camera_min { - background: #fefefe url(../../images/camera.png) no-repeat center !important; + background: #fefefe url(../../images/camera.png) no-repeat center; } input.camera_min[disabled] { - background: #fefefe url(../../images/camera.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/camera.disabled.png) no-repeat center; } input.config_min { - background: #fefefe url(../../images/config.png) no-repeat center !important; + background: #fefefe url(../../images/config.png) no-repeat center; } input.config_min[disabled] { - background: #fefefe url(../../images/config.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/config.disabled.png) no-repeat center; } input.label_min { - background: #fefefe url(../../images/tag_red.png) no-repeat center !important; + background: #fefefe url(../../images/tag_red.png) no-repeat center; } input.label_min[disabled] { - background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center; } input.icon_min { - background: #fefefe url(../../images/photo.png) no-repeat center !important; + background: #fefefe url(../../images/photo.png) no-repeat center; } input.icon_min[disabled] { - background: #fefefe url(../../images/photo.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/photo.disabled.png) no-repeat center; } input.box_item { - background: #fefefe url(../../images/box_item.png) no-repeat center !important; + background: #fefefe url(../../images/box_item.png) no-repeat center; } input.box_item[disabled] { - background: #fefefe url(../../images/box_item.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/box_item.disabled.png) no-repeat center; } input.line_item { - background: #fefefe url(../../images/line_item.png) no-repeat center !important; + background: #fefefe url(../../images/line_item.png) no-repeat center; } input.line_item[disabled] { - background: #fefefe url(../../images/line_item.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/line_item.disabled.png) no-repeat center; } input.copy_item { - background: #fefefe url(../../images/copy_visualmap.png) no-repeat center !important; + background: #fefefe url(../../images/copy_visualmap.png) no-repeat center; } input.copy_item[disabled] { background: #fefefe url(../../images/copy_visualmap.disabled.png) no-repeat - center !important; + center; } input.grid_min { - background: #fefefe url(../../images/grid.png) no-repeat center !important; + background: #fefefe url(../../images/grid.png) no-repeat center; } input.grid_min[disabled] { - background: #fefefe url(../../images/grid.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/grid.disabled.png) no-repeat center; } input.save_min { - background: #fefefe url(../../images/file.png) no-repeat center !important; + background: #fefefe url(../../images/file.png) no-repeat center; } input.save_min[disabled] { - background: #fefefe url(../../images/file.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/file.disabled.png) no-repeat center; } input.service_min { - background: #fefefe url(../../images/box.png) no-repeat center !important; + background: #fefefe url(../../images/box.png) no-repeat center; } input.service_min[disabled] { - background: #fefefe url(../../images/box.disabled.png) no-repeat center !important; + background: #fefefe url(../../images/box.disabled.png) no-repeat center; } input.group_item_min { - background: #fefefe url(../../images/group_green.png) no-repeat center !important; + background: #fefefe url(../../images/group_green.png) no-repeat center; } input.group_item_min[disabled] { background: #fefefe url(../../images/group_green.disabled.png) no-repeat - center !important; + center; } div#cont { @@ -961,7 +961,7 @@ div#cont { } .termframe { - background-color: #80ba27 !important; + background-color: #80ba27; } table, @@ -1023,15 +1023,15 @@ td input[type="checkbox"] { td.datos3, td.datos3 * { background-color: #666; - color: white !important; + color: white; } td.datos4, td.datos4 * { - /*Add !important because in php the function html_print_table write style in cell and this is style head.*/ - text-align: center !important; + /*Add because in php the function html_print_table write style in cell and this is style head.*/ + text-align: center; background-color: #666; - color: white !important; + color: white; } td.datos_id { @@ -1241,10 +1241,10 @@ div.title_line { #menu_tab_frame, #menu_tab_frame_view { - display: block !important; + display: block; border-bottom: 1px solid #80ba27; /* float:left; */ - margin-left: 0px !important; + margin-left: 0px; max-height: 42px; min-height: 42px; padding-right: 28px; @@ -1252,7 +1252,7 @@ div.title_line { } #menu_tab { - margin: 0px 0px 0px 0px !important; + margin: 0px 0px 0px 0px; position: absolute; right: 0px; top: 10px; @@ -1332,7 +1332,7 @@ div.title_line { } /* TAB TITLE */ #menu_tab_left { - margin-left: 0px !important; + margin-left: 0px; } #menu_tab_left .mn, @@ -1385,7 +1385,7 @@ div.title_line { -moz-border-top-left-radius: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; - margin-left: 0px !important; + margin-left: 0px; overflow-y: hidden; } @@ -1396,7 +1396,7 @@ div.title_line { #menu_tab_frame *, #menu_tab_frame_view * { - #margin: 0px 0px 0px 0px !important; + #margin: 0px 0px 0px 0px; } span.users { @@ -1515,9 +1515,9 @@ span.nrmess { table.databox { background-color: #f9faf9; border-spacing: 0px; - -moz-box-shadow: 0px 0px 0px #ddd !important; - -webkit-box-shadow: 0px 0px 0px #ddd !important; - box-shadow: 0px 0px 0px #ddd !important; + -moz-box-shadow: 0px 0px 0px #ddd; + -webkit-box-shadow: 0px 0px 0px #ddd; + box-shadow: 0px 0px 0px #ddd; } .databox td { @@ -1544,7 +1544,7 @@ table.databox { .databox th textarea, .databox th select, .databox th select option { - color: #222 !important; + color: #222; } .tabletitle { @@ -1590,9 +1590,9 @@ table.alternate tr:nth-child(even) td { table.rounded_cells td { padding: 4px 4px 4px 10px; - -moz-border-radius: 6px !important; - -webkit-border-radius: 6px !important; - border-radius: 6px !important; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } .databox_color { @@ -1703,7 +1703,7 @@ div#main_pure { } /* IE 7 Hack */ #editor { - *margin-top: 10px !important; + *margin-top: 10px; } /* big_data is used in tactical and logon_ok */ .big_data { @@ -1721,7 +1721,7 @@ div#main_pure { text-align: center; font-weight: bold; padding: 8px; - margin: 0px 0px 0px 0px !important; + margin: 0px 0px 0px 0px; z-index: -1; } @@ -1746,7 +1746,7 @@ span.actions { margin-left: 30px; } .actions { - min-width: 200px !important; + min-width: 200px; } code, pre { @@ -1764,7 +1764,7 @@ select#action { } input[type="image"] { border: 0px; - background-color: transparent !important; + background-color: transparent; } table#simple select#id_module_type, table#alert_search select#id_agent, @@ -1892,7 +1892,7 @@ ol.steps li.current { background-color: #e9f3d2; } ol.steps li.visited { - color: #999 !important; + color: #999; } fieldset { @@ -1916,7 +1916,7 @@ fieldset .databox { } fieldset.databox { - padding: 14px !important; + padding: 14px; } fieldset legend span, @@ -2031,7 +2031,7 @@ div#pandora_logo_header { } .autorefresh_disabled { - cursor: not-allowed !important; + cursor: not-allowed; } a.autorefresh { @@ -2056,15 +2056,15 @@ div.warn { } .submenu_not_selected { - font-weight: normal !important; + font-weight: normal; } /* Submenus havent borders */ .submenu_not_selected, .submenu_selected, .submenu2 { - border: 0px !important; - min-height: 35px !important; + border: 0px; + min-height: 35px; } /* Pandora width style theme */ @@ -2091,7 +2091,7 @@ div#steps_clean { #menu_tab_frame_view { width: 100%; padding-right: 0px; - margin-left: 0px !important; + margin-left: 0px; margin-bottom: 20px; height: 31px; } @@ -2124,8 +2124,8 @@ div#logo_text3 { margin-bottom: 5px; } .pagination * { - margin-left: 0px !important; - margin-right: 0px !important; + margin-left: 0px; + margin-right: 0px; vertical-align: middle; } @@ -2134,7 +2134,7 @@ div#logo_text3 { /* Calendar background */ table.scw { background-color: #80ab51; - border: 0 !important; + border: 0; border-radius: 4px; } @@ -2144,7 +2144,7 @@ td.scwWeekNumberHead { } td.scwWeek { - color: #111 !important; + color: #111; } Today selector td.scwFoot { @@ -2162,39 +2162,39 @@ tfoot.scwFoot { } .scwFoot :hover { - color: #3f3f3f !important; + color: #3f3f3f; } table.scwCells { - background-color: #fff !important; - color: #3c3c3c !important; + background-color: #fff; + color: #3c3c3c; } table.scwCells:hover { - background-color: #fff !important; + background-color: #fff; } td.scwCellsExMonth { - background-color: #eee !important; - color: #3c3c3c !important; + background-color: #eee; + color: #3c3c3c; } td.scwCellsWeekend { - background-color: #3c3c3c !important; - color: #fff !important; - border: 0 !important; + background-color: #3c3c3c; + color: #fff; + border: 0; } td.scwInputDate { - background-color: #777 !important; - color: #ffffff !important; - border: 0 !important; + background-color: #777; + color: #ffffff; + border: 0; } td.scwFoot { - background-color: #fff !important; - color: #3c3c3c !important; - border: 0 !important; + background-color: #fff; + color: #3c3c3c; + border: 0; } /* Cells divs to set individual styles with the table objects */ @@ -2279,25 +2279,25 @@ div.cellBig { .info_box { background: #f9faf9; - margin-top: 10px !important; - margin-bottom: 10px !important; + margin-top: 10px; + margin-bottom: 10px; padding: 0px 5px 5px 10px; border-color: #e2e2e2; border-style: solid; border-width: 1px; - width: 100% !important; + width: 100%; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .info_box .title * { - font-size: 10pt !important; + font-size: 10pt; font-weight: bolder; } .info_box .icon { - width: 30px !important; + width: 30px; text-align: center; } @@ -2338,7 +2338,7 @@ tr.group_view_not_init, tr.group_view_not_init, .group_view_not_init { background-color: #5bb6e5; - color: #fff !important; + color: #fff; } tr.group_view_warn, @@ -2347,11 +2347,11 @@ tr.group_view_warn.a, a.group_view_warn, tr.a.group_view_warn { background-color: #fad403; - color: #3f3f3f !important; + color: #3f3f3f; } a.group_view_warn { - color: #fad403 !important; + color: #fad403; } tr.group_view_alrm, @@ -2381,7 +2381,7 @@ tr.group_view_unk, .datos_redf9 a, .datos_red * { background-color: #fc4444; - color: #fff !important; + color: #fff; } .datos_yellow, @@ -2396,7 +2396,7 @@ a.datos_blue, .datos_blue, .datos_blue * { background-color: #4ca8e0; - color: #fff !important; + color: #fff; } .datos_grey, @@ -2451,39 +2451,39 @@ ul.operation li a:hover { } .submenu_not_selected { - color: #fff !important; + color: #fff; } .operation .menu_icon:hover { - background-color: #d9fb86 !important; + background-color: #d9fb86; } .operation .submenu_text:hover { - color: #585858 !important; + color: #585858; } .operation .submenu_not_selected:hover { - background-color: #d9fb86 !important; - color: #585858 !important; + background-color: #d9fb86; + color: #585858; } .operation .submenu_selected:hover { - background-color: #d9fb86 !important; - color: #585858 !important; + background-color: #d9fb86; + color: #585858; } .operation .sub_subMenu:hover { - background-color: #d9fb86 !important; - color: #585858 !important; + background-color: #d9fb86; + color: #585858; } .operation .selected .submenu_not_selected * { - color: #fff !important; + color: #fff; } .operation .selected .submenu_not_selected *:hover { - color: #585858 !important; + color: #585858; } .operation { - background-color: #80ab51 !important; + background-color: #80ab51; } .operation .selected { - background-color: #d9fb86 !important; + background-color: #d9fb86; } .operation li.selected { box-shadow: inset 4px 0 #80ab51; @@ -2499,35 +2499,35 @@ ul.operation li a:hover { } .godmode .menu_icon:hover { - background-color: #a77853 !important; + background-color: #a77853; } .godmode .submenu_text:hover { - color: #3f3f3f !important; + color: #3f3f3f; } .godmode .submenu_not_selected:hover { - background-color: #a77853 !important; - color: #2f2f2f !important; + background-color: #a77853; + color: #2f2f2f; } .godmode .submenu_selected:hover { - background-color: #a77853 !important; - color: #2f2f2f !important; + background-color: #a77853; + color: #2f2f2f; } .godmode .sub_subMenu:hover { - background-color: #a77853 !important; - color: #2f2f2f !important; + background-color: #a77853; + color: #2f2f2f; } .godmode .selected .submenu_not_selected * { - color: #fff !important; + color: #fff; } .godmode .selected .submenu_not_selected *:hover { - color: #2f2f2f !important; + color: #2f2f2f; } .godmode { - background-color: #e79b5d !important; + background-color: #e79b5d; } .godmode .selected { - background-color: #a77853 !important; + background-color: #a77853; } .godmode li.selected { box-shadow: inset 4px 0 #e79b5d; @@ -2551,7 +2551,7 @@ li.links a:hover { } .is_submenu2 { - background-color: #222222 !important; + background-color: #222222; } .menu li, @@ -2577,7 +2577,7 @@ input#text-id_parent.ac_input, input, textarea, select { - background-color: #ffffff !important; + background-color: #ffffff; border: 1px solid #cbcbcb; -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2602,7 +2602,7 @@ span#plugin_description { .visual_font_size_4pt > em > strong, .visual_font_size_4pt em span, .visual_font_size_4pt span em { - font-size: 4pt !important; + font-size: 4pt; line-height: 4pt; } @@ -2615,7 +2615,7 @@ span#plugin_description { .visual_font_size_6pt > em > strong, .visual_font_size_6pt em span, .visual_font_size_6pt span em { - font-size: 6pt !important; + font-size: 6pt; line-height: 6pt; } @@ -2628,7 +2628,7 @@ span#plugin_description { .visual_font_size_8pt > em > strong, .visual_font_size_8pt em span, .visual_font_size_8pt span em { - font-size: 8pt !important; + font-size: 8pt; line-height: 8pt; } @@ -2639,7 +2639,7 @@ span#plugin_description { .visual_font_size_10pt > em > strong, .visual_font_size_10pt em span, .visual_font_size_10pt span em { - font-size: 10pt !important; + font-size: 10pt; line-height: 10pt; } @@ -2650,7 +2650,7 @@ span#plugin_description { .visual_font_size_12pt > em > strong, .visual_font_size_12pt em span, .visual_font_size_12pt span em { - font-size: 12pt !important; + font-size: 12pt; line-height: 12pt; } @@ -2663,7 +2663,7 @@ span#plugin_description { .visual_font_size_14pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 14pt !important; + font-size: 14pt; line-height: 14pt; } @@ -2676,7 +2676,7 @@ span#plugin_description { .visual_font_size_18pt > em > strong, .visual_font_size_18pt em span, .visual_font_size_18pt span em { - font-size: 18pt !important; + font-size: 18pt; line-height: 18pt; } @@ -2689,7 +2689,7 @@ span#plugin_description { .visual_font_size_24pt > em > strong, .visual_font_size_24pt em span, .visual_font_size_24pt span em { - font-size: 24pt !important; + font-size: 24pt; line-height: 24pt; } @@ -2702,7 +2702,7 @@ span#plugin_description { .visual_font_size_28pt > em > strong, .visual_font_size_28pt em span, .visual_font_size_28pt span em { - font-size: 28pt !important; + font-size: 28pt; line-height: 28pt; } @@ -2715,7 +2715,7 @@ span#plugin_description { .visual_font_size_36pt > em > strong, .visual_font_size_36pt em span, .visual_font_size_36pt span em { - font-size: 36pt !important; + font-size: 36pt; line-height: 36pt; } @@ -2728,7 +2728,7 @@ span#plugin_description { .visual_font_size_48pt > em > strong, .visual_font_size_48pt em span, .visual_font_size_48pt span em { - font-size: 48pt !important; + font-size: 48pt; line-height: 48pt; } @@ -2741,7 +2741,7 @@ span#plugin_description { .visual_font_size_60pt > em > strong, .visual_font_size_60pt em span, .visual_font_size_60pt span em { - font-size: 60pt !important; + font-size: 60pt; line-height: 60pt; } @@ -2754,7 +2754,7 @@ span#plugin_description { .visual_font_size_72pt > em > strong, .visual_font_size_72pt em span, .visual_font_size_72pt span em { - font-size: 72pt !important; + font-size: 72pt; line-height: 72pt; } @@ -2767,7 +2767,7 @@ span#plugin_description { .visual_font_size_84pt > em > strong, .visual_font_size_84pt em span, .visual_font_size_84pt span em { - font-size: 84pt !important; + font-size: 84pt; line-height: 84pt; } @@ -2780,7 +2780,7 @@ span#plugin_description { .visual_font_size_96pt > em > strong, .visual_font_size_96pt em span, .visual_font_size_96pt span em { - font-size: 96pt !important; + font-size: 96pt; line-height: 96pt; } @@ -2793,7 +2793,7 @@ span#plugin_description { .visual_font_size_116pt > em > strong, .visual_font_size_116pt em span, .visual_font_size_116pt span em { - font-size: 116pt !important; + font-size: 116pt; line-height: 116pt; } @@ -2806,7 +2806,7 @@ span#plugin_description { .visual_font_size_128pt > em > strong, .visual_font_size_128pt em span, .visual_font_size_128pt span em { - font-size: 128pt !important; + font-size: 128pt; line-height: 128pt; } @@ -2819,7 +2819,7 @@ span#plugin_description { .visual_font_size_140pt > em > strong, .visual_font_size_140pt em span, .visual_font_size_140pt span em { - font-size: 140pt !important; + font-size: 140pt; line-height: 140pt; } @@ -2832,7 +2832,7 @@ span#plugin_description { .visual_font_size_154pt > em > strong, .visual_font_size_154pt em span, .visual_font_size_154pt span em { - font-size: 154pt !important; + font-size: 154pt; line-height: 154pt; } @@ -2845,7 +2845,7 @@ span#plugin_description { .visual_font_size_196pt > em > strong, .visual_font_size_196pt em span, .visual_font_size_196pt span em { - font-size: 196pt !important; + font-size: 196pt; line-height: 196pt; } @@ -2858,7 +2858,7 @@ span#plugin_description { .resize_visual_font_size_8pt > em > strong, .visual_font_size_8pt em span, .visual_font_size_8pt span em { - font-size: 4pt !important; + font-size: 4pt; line-height: 4pt; } .resize_visual_font_size_14pt, @@ -2870,7 +2870,7 @@ span#plugin_description { .resize_visual_font_size_14pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 7pt !important; + font-size: 7pt; line-height: 7pt; } .resize_visual_font_size_24pt, @@ -2882,7 +2882,7 @@ span#plugin_description { .resize_visual_font_size_24pt > em > strong, .visual_font_size_14pt em span, .visual_font_size_14pt span em { - font-size: 12pt !important; + font-size: 12pt; line-height: 12pt; } .resize_visual_font_size_36pt, @@ -2894,7 +2894,7 @@ span#plugin_description { .resize_visual_font_size_36pt > em > strong, .visual_font_size_36pt em span, .visual_font_size_36pt span em { - font-size: 18pt !important; + font-size: 18pt; line-height: 18pt; } .resize_visual_font_size_72pt, @@ -2906,7 +2906,7 @@ span#plugin_description { .resize_visual_font_size_72pt > em > strong, .visual_font_size_72pt em span, .visual_font_size_72pt span em { - font-size: 36pt !important; + font-size: 36pt; line-height: 36pt; } /*SIDEBAR*/ @@ -2927,9 +2927,9 @@ span#plugin_description { width: 400px; height: 260px; - -moz-box-shadow: 0px 4px 4px #010e1b !important; - -webkit-box-shadow: 0px 4px 4px #010e1b !important; - box-shadow: 0px 4px 4px #010e1b !important; + -moz-box-shadow: 0px 4px 4px #010e1b; + -webkit-box-shadow: 0px 4px 4px #010e1b; + box-shadow: 0px 4px 4px #010e1b; filter: alpha(opacity=97); -moz-opacity: 0.97; @@ -3005,7 +3005,7 @@ span#plugin_description { } a.tip { - display: inline !important; + display: inline; cursor: help; } @@ -3029,7 +3029,7 @@ input.search_input { .vertical_fields td input, .vertical_fields td select { - margin-top: 8px !important; + margin-top: 8px; } a[id^="tgl_ctrl_"] > img, @@ -3038,9 +3038,9 @@ a[id^="tgl_ctrl_"] > b > img { } .noshadow { - -moz-box-shadow: 0px !important; - -webkit-box-shadow: 0px !important; - box-shadow: 0px !important; + -moz-box-shadow: 0px; + -webkit-box-shadow: 0px; + box-shadow: 0px; } /* Images forced title */ @@ -3071,7 +3071,7 @@ div.forced_title_layer { div.legend > div { pointer-events: none; /* Allow to click the graphs below */ - opacity: 0.65 !important; + opacity: 0.65; } div.nodata_text { @@ -3125,7 +3125,7 @@ ul.subsubmenu { -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px; - background: #ececec !important; + background: #ececec; } ul.subsubmenu li { @@ -3249,7 +3249,7 @@ div#agent_wizard_subtabs { .menu_graph, .timestamp_graph { - position: absolute !important; + position: absolute; } .menu_graph { @@ -3270,13 +3270,13 @@ div#agent_wizard_subtabs { .legendColorBox * { font-size: 0px; padding: 0px 4px; - overflow: visible !important; + overflow: visible; } /* GIS CSS */ .olLayerDiv { - z-index: 102 !important; + z-index: 102; } /* Alert view */ @@ -3293,7 +3293,7 @@ table.alert_escalation th img { td.used_field { #border: solid #6eb432; - background: #6eb432 !important; + background: #6eb432; color: #ffffff; font-weight: bold; } @@ -3374,7 +3374,7 @@ table#policy_modules td * { width: 100%; margin-left: auto; margin-right: auto; - background-color: #fff !important; + background-color: #fff; padding: 10px; border: 1px solid #e2e2e2; margin-top: 5%; @@ -3417,7 +3417,7 @@ table#policy_modules td * { padding-bottom: 7px; } .databox.pies fieldset.tactical_set { - width: 70% !important; + width: 70%; height: 285px; } @@ -3439,7 +3439,7 @@ table#policy_modules td * { } .no_hidden_menu { - background-position: 11% 50% !important; + background-position: 11% 50%; } #menu_tab li.nomn, @@ -3470,7 +3470,7 @@ table#policy_modules td * { #menu_tab li.tab_operation a, #menu_tab a.tab_operation { - background: none !important ; + background: none; } .subsubmenu { @@ -3478,11 +3478,11 @@ table#policy_modules td * { float: right; z-index: 9999; display: none; - margin-top: 6px !important ; - left: 0px !important; + margin-top: 6px; + left: 0px; } .subsubmenu li { - margin-top: 0px !important ; + margin-top: 0px; } .agents_modules_table { @@ -3546,12 +3546,12 @@ table#policy_modules td * { } .databox.agente td > div > canvas { - width: 100% !important; - text-align: left !important; + width: 100%; + text-align: left; } .databox.agente td > div.graph { - width: 100% !important; - text-align: left !important; + width: 100%; + text-align: left; } .godmode, @@ -3563,8 +3563,8 @@ table#policy_modules td * { } .godmode { - border-top: 4px solid !important; - padding-bottom: 4px !important; + border-top: 4px solid; + padding-bottom: 4px; border-bottom-right-radius: 5px; border-right-style: solid; border-right-width: 0px; @@ -3581,7 +3581,7 @@ table#policy_modules td * { } .dashboard li a { - width: 158px !important; + width: 158px; } .text_subDashboard { diff --git a/pandora_console/include/styles/pandora_minimal.css b/pandora_console/include/styles/pandora_minimal.css index 8c9649888d..d9d6bbdc60 100644 --- a/pandora_console/include/styles/pandora_minimal.css +++ b/pandora_console/include/styles/pandora_minimal.css @@ -129,7 +129,7 @@ td.scwWeekNumberHead { } td.scwWeek { - color: #000 !important; + color: #000; } /* Today selector */ @@ -148,7 +148,7 @@ tfoot.scwFoot { } .scwFoot :hover { - color: #ffa500 !important; + color: #ffa500; } input.next { @@ -164,18 +164,18 @@ input.next { margin: 10px auto; padding: 5px; border: 1px solid #a8a8a8; - width: 85% !important; - -moz-box-shadow: 0px 2px 2px #010e1b !important; - -webkit-box-shadow: 0px 2px 2px #010e1b !important; - box-shadow: 0px 2px 2px #010e1b !important; + width: 85%; + -moz-box-shadow: 0px 2px 2px #010e1b; + -webkit-box-shadow: 0px 2px 2px #010e1b; + box-shadow: 0px 2px 2px #010e1b; } .info_box .title * { - font-size: 10pt !important; + font-size: 10pt; font-weight: bolder; } .info_box .icon { - width: 30px !important; + width: 30px; text-align: center; } diff --git a/pandora_console/include/styles/register.css b/pandora_console/include/styles/register.css index d2589a3f01..798ef5e66e 100644 --- a/pandora_console/include/styles/register.css +++ b/pandora_console/include/styles/register.css @@ -1,42 +1,42 @@ input[type="submit"].submit-cancel, button.submit-cancel { - color: #fb4444 !important; - border: 1px solid #fb4444 !important; - background: #fff !important; + color: #fb4444; + border: 1px solid #fb4444; + background: #fff; padding: 5px; font-size: 1.3em; - margin: 0.5em 1em 0.5em 0 !important; - cursor: pointer !important; - text-align: center !important; - height: 30px !important; - width: 90px !important; + margin: 0.5em 1em 0.5em 0; + cursor: pointer; + text-align: center; + height: 30px; + width: 90px; } input[type="submit"].submit-cancel:hover, button.submit-cancel:hover { - color: #fff !important; - background: #fb4444 !important; + color: #fff; + background: #fb4444; } input[type="submit"].submit-next, button.submit-next, input[type="button"].submit-next { - color: #82b92e !important; - border: 1px solid #82b92e !important; - background: #fff !important; + color: #82b92e; + border: 1px solid #82b92e; + background: #fff; padding: 5px; font-size: 1.3em; - margin: 0.5em 1em 0.5em 0 !important; - cursor: pointer !important; - text-align: center !important; - height: 30px !important; + margin: 0.5em 1em 0.5em 0; + cursor: pointer; + text-align: center; + height: 30px; } input[type="submit"].submit-next:hover, button.submit-next:hover, input[type="button"].submit-next:hover { - color: #fff !important; - background: #82b92e !important; + color: #fff; + background: #82b92e; } div.submit_buttons_container { diff --git a/pandora_console/include/styles/visual_maps.css b/pandora_console/include/styles/visual_maps.css new file mode 100644 index 0000000000..4dfd06354d --- /dev/null +++ b/pandora_console/include/styles/visual_maps.css @@ -0,0 +1,172 @@ +/* + * --------------------------------------------------------------------- + * - VISUAL MAPS - + * --------------------------------------------------------------------- + */ +input.vs_button_ghost { + background-color: transparent; + border: 1px solid #82b92e; + color: #82b92e; + text-align: center; + padding: 4px 12px; + font-weight: bold; +} + +#toolbox #auto_save { + padding-top: 5px; +} + +#toolbox { + margin-top: 13px; +} +input.visual_editor_button_toolbox { + padding-right: 15px; + padding-top: 10px; + margin-top: 5px; +} +input.delete_min { + background: #fefefe url(../../images/cross.png) no-repeat center; +} +input.delete_min[disabled] { + background: #fefefe url(../../images/cross.disabled.png) no-repeat center; +} +input.graph_min { + background: #fefefe url(../../images/chart_curve.png) no-repeat center; +} +input.graph_min[disabled] { + background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat + center; +} +input.bars_graph_min { + background: #fefefe url(../../images/icono-barras-arriba.png) no-repeat center; +} +input.bars_graph_min[disabled] { + background: #fefefe url(../../images/icono-barras-arriba.disabled.png) + no-repeat center; +} +input.percentile_min { + background: #fefefe url(../../images/chart_bar.png) no-repeat center; +} +input.percentile_min[disabled] { + background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center; +} +input.percentile_item_min { + background: #fefefe url(../../images/percentile_item.png) no-repeat center; +} +input.percentile_item_min[disabled] { + background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat + center; +} +input.auto_sla_graph_min { + background: #fefefe url(../../images/auto_sla_graph.png) no-repeat center; +} +input.auto_sla_graph_min[disabled] { + background: #fefefe url(../../images/auto_sla_graph.disabled.png) no-repeat + center; +} +input.donut_graph_min { + background: #fefefe url(../../images/icono-quesito.png) no-repeat center; +} +input.donut_graph_min[disabled] { + background: #fefefe url(../../images/icono-quesito.disabled.png) no-repeat + center; +} +input.binary_min { + background: #fefefe url(../../images/binary.png) no-repeat center; +} +input.binary_min[disabled] { + background: #fefefe url(../../images/binary.disabled.png) no-repeat center; +} +input.camera_min { + background: #fefefe url(../../images/camera.png) no-repeat center; +} +input.camera_min[disabled] { + background: #fefefe url(../../images/camera.disabled.png) no-repeat center; +} +input.config_min { + background: #fefefe url(../../images/config.png) no-repeat center; +} +input.config_min[disabled] { + background: #fefefe url(../../images/config.disabled.png) no-repeat center; +} +input.label_min { + background: #fefefe url(../../images/tag_red.png) no-repeat center; +} +input.label_min[disabled] { + background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center; +} +input.icon_min { + background: #fefefe url(../../images/photo.png) no-repeat center; +} +input.icon_min[disabled] { + background: #fefefe url(../../images/photo.disabled.png) no-repeat center; +} +input.clock_min { + background: #fefefe url(../../images/clock-tab.png) no-repeat center; +} +input.clock_min[disabled] { + background: #fefefe url(../../images/clock-tab.disabled.png) no-repeat center; +} +input.box_item { + background: #fefefe url(../../images/box_item.png) no-repeat center; +} +input.box_item[disabled] { + background: #fefefe url(../../images/box_item.disabled.png) no-repeat center; +} +input.line_item { + background: #fefefe url(../../images/line_item.png) no-repeat center; +} +input.line_item[disabled] { + background: #fefefe url(../../images/line_item.disabled.png) no-repeat center; +} +input.copy_item { + background: #fefefe url(../../images/copy_visualmap.png) no-repeat center; +} +input.copy_item[disabled] { + background: #fefefe url(../../images/copy_visualmap.disabled.png) no-repeat + center; +} +input.grid_min { + background: #fefefe url(../../images/grid.png) no-repeat center; +} +input.grid_min[disabled] { + background: #fefefe url(../../images/grid.disabled.png) no-repeat center; +} +input.save_min { + background: #fefefe url(../../images/file.png) no-repeat center; +} +input.save_min[disabled] { + background: #fefefe url(../../images/file.disabled.png) no-repeat center; +} +input.service_min { + background: #fefefe url(../../images/box.png) no-repeat center; +} +input.service_min[disabled] { + background: #fefefe url(../../images/box.disabled.png) no-repeat center; +} + +input.group_item_min { + background: #fefefe url(../../images/group_green.png) no-repeat center; +} +input.group_item_min[disabled] { + background: #fefefe url(../../images/group_green.disabled.png) no-repeat + center; +} +input.color_cloud_min { + background: #fefefe url(../../images/color_cloud_item.png) no-repeat center; +} +input.color_cloud_min[disabled] { + background: #fefefe url(../../images/color_cloud_item.disabled.png) no-repeat + center; +} + +div#cont { + position: fixed; + max-height: 320px; + overflow-y: auto; + overflow-x: hidden; +} + +/*.termframe{ + background-color: #80BA27; +}*/ diff --git a/pandora_console/index.php b/pandora_console/index.php index 730e404a20..d013336139 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1200,11 +1200,12 @@ echo ''; if ($config['pure'] == 0) { echo ''; - // container div + // Container div. + echo ''; echo '
'; + echo ''; } // Clippy function diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index b3e066c893..1ee656e43e 100755 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -1,5 +1,5 @@ * { - text-decoration: none !important; + text-decoration: none; font-size: 12px; } @@ -15,11 +15,11 @@ body { } .small { - font-size: 10px !important; + font-size: 10px; } .ui-header .ui-title { - font-size: 14px !important; + font-size: 14px; } .ui-btn-inner { @@ -57,8 +57,8 @@ legend { } .ui-btn-up-c { - font-weight: normal !important; - text-shadow: none !important; + font-weight: normal; + text-shadow: none; } /* For mobiles */ @@ -76,7 +76,7 @@ legend { @media screen and (min-width: 750px) { #tactical1 a, #tactical2 a { - font-size: 25px !important; + font-size: 25px; } } /*END-----------Tactical styles-----------------------------------------*/ @@ -93,16 +93,16 @@ legend { /*INIT----------Groups styles-----------------------------------------*/ .group_view tr { - border-bottom: 3px solid white !important; + border-bottom: 3px solid white; } tr.group_view_crit, .group_view_crit { background-color: #fa3030; - color: #000000 !important; + color: #000000; } .group_view_crit * { - color: #000000 !important; + color: #000000; } .ui-btn-up-group_view_crit, .ui-btn-hover-group_view_crit { @@ -118,16 +118,16 @@ tr.group_view_crit, .group_view_norm, .group_view_norm * { background-color: #ffffff; - color: #000000 !important; + color: #000000; } .group_view_norm * { - color: #000000 !important; + color: #000000; } .group_view_not_init, .group_view_not_init * { background-color: #5ab7e5; - color: #fff !important; + color: #fff; } .ui-btn-up-group_view_normal, @@ -144,10 +144,10 @@ tr.group_view_crit, .group_view_ok, .group_view_ok * { background-color: #00c000; - color: #000000 !important; + color: #000000; } .group_view_ok * { - color: #000000 !important; + color: #000000; } .ui-btn-up-group_view_ok, .ui-btn-hover-group_view_ok { @@ -166,7 +166,7 @@ tr.a.group_view_warn { background-color: #f5e535; } a.group_view_warn { - color: #000000 !important; + color: #000000; } .ui-btn-up-group_view_warn, .ui-btn-hover-group_view_warn { @@ -182,7 +182,7 @@ tr.group_view_alrm, background-color: #ed8701; } .group_view_alrm * { - color: #000000 !important; + color: #000000; } .ui-btn-up-group_view_alrm, .ui-btn-hover-group_view_alrm { @@ -198,7 +198,7 @@ tr.group_view_unk, background-color: #c4c4c4; } .group_view_unk * { - color: #000000 !important; + color: #000000; } .ui-btn-up-group_view_unk, .ui-btn-hover-group_view_unk { @@ -212,37 +212,37 @@ tr.group_view_unk, .ui-btn-active:visited, .ui-btn-active:hover, .ui-btn-active a.ui-link-inherit { - color: #888 !important; - text-shadow: none !important; + color: #888; + text-shadow: none; } tr.group_view_data, .group_view_data { - color: #000000 !important; + color: #000000; } .group_view_data_unk * { - color: #303030 !important; + color: #303030; } .group_view_data_ok * { - color: #00c000 !important; + color: #00c000; } .group_view_data_crit * { - color: #5c0000 !important; + color: #5c0000; } .group_view_data_alrm * { - color: #5c1d00 !important; + color: #5c1d00; } .group_view_data_warn * { - color: #5c5900 !important; + color: #5c5900; } .group_view * { - text-shadow: none !important; - font-size: 12px !important; + text-shadow: none; + font-size: 12px; } .list_groups .link_count { - display: inline !important; + display: inline; } .list_groups .number_count, @@ -285,16 +285,16 @@ tr.group_view_data, .datos_green a, .datos_greenf9 a { background-color: #52a000; - color: #ffffff !important; - text-shadow: none !important; + color: #ffffff; + text-shadow: none; } .datos_red, .datos_redf9, .datos_red a, .datos_redf9 a { background-color: #ff3e41; - color: #ffffff !important; - text-shadow: none !important; + color: #ffffff; + text-shadow: none; } .datos_yellow, @@ -302,50 +302,50 @@ tr.group_view_data, .datos_yellow a, .datos_yellowf9 a { background-color: #f5e535; - color: #000000 !important; - text-shadow: none !important; + color: #000000; + text-shadow: none; } .datos_blue, .datos_bluef9, .datos_blue a, .datos_bluef9 a { background-color: #77e2f2; - color: #000000 !important; - text-shadow: none !important; + color: #000000; + text-shadow: none; } .datos_grey, .datos_greyf9, .datos_grey a, .datos_greyf9 a { background-color: #e4e4e4; - color: #000000 !important; - text-shadow: none !important; + color: #000000; + text-shadow: none; } .datos_pink, .datos_pinkf9, .datos_pink a, .datos_pinkf9 a { background-color: #ff92e9; - color: #000000 !important; - text-shadow: none !important; + color: #000000; + text-shadow: none; } .datos_brown, .datos_brownf9, .datos_brown a, .datos_brownf9 a { background-color: #c97a4a; - color: #000000 !important; - text-shadow: none !important; + color: #000000; + text-shadow: none; } tr.events { - border-bottom: 6px solid #f7f7f7 !important; - font-size: 12px !important; + border-bottom: 6px solid #f7f7f7; + font-size: 12px; } table#list_events th { - font-size: 12px !important; - font-weight: bolder !important; + font-size: 12px; + font-weight: bolder; border: 0px; } @@ -527,23 +527,23 @@ table.event_details td.cell_event_name { .redb, .redi, .error { - background: #f85858 !important; + background: #f85858; } .green { - background: #6eb432 !important; + background: #6eb432; } .orange { - background: #ff8800 !important; + background: #ff8800; } .yellow { - background: #ffea59 !important; + background: #ffea59; } .grey { - background: #aaaaaa !important; + background: #aaaaaa; font-weight: bold; } @@ -554,7 +554,7 @@ table.event_details td.cell_event_name { .grey, .agents_tiny_stats span { text-shadow: none; - color: white !important; + color: white; padding: 1px 3px; border-radius: 2px; } @@ -630,9 +630,9 @@ table.event_details td.cell_event_name { display: table-cell; clear: none; float: none; - padding-left: 0px !important; - padding-right: 0px !important; - width: auto !important; + padding-left: 0px; + padding-right: 0px; + width: auto; } #list_agents td.cell_0 { @@ -651,7 +651,7 @@ table.event_details td.cell_event_name { #list_agents .cell_4 .ui-table-cell-label, #list_agents .cell_5 .ui-table-cell-label, #list_agents .cell_8 .ui-table-cell-label { - min-width: auto !important; + min-width: auto; } #list_agents .cell_3 .ui-table-cell-label, @@ -663,19 +663,19 @@ table.event_details td.cell_event_name { #list_agents .cell_2, #list_agents .cell_3, #list_agents .cell_7 { - display: inline !important; - float: none !important; + display: inline; + float: none; } #list_agents .cell_4, #list_agents .cell_8 { - display: inline !important; - float: none !important; + display: inline; + float: none; } #list_agents .cell_8 { - display: inline !important; - float: none !important; + display: inline; + float: none; } #list_agents b.ui-table-cell-label { @@ -683,14 +683,14 @@ table.event_details td.cell_event_name { } #list_agents .show_collapside { - display: none !important; + display: none; } #list_agents .cell_1, #list_agents .cell_2, #list_agents .cell_3, #list_agents .cell_4 { - display: none !important; + display: none; } #list_agents .cell_0 .ui-link { @@ -698,15 +698,15 @@ table.event_details td.cell_event_name { } #list_agents .cell_6 .show_collapside { - display: none !important; + display: none; } .agents_tiny_stats * { - font-size: 12px !important; + font-size: 12px; } #list_agent_Modules td { - padding-top: 7px !important; + padding-top: 7px; } .agents_tiny_stats { @@ -717,13 +717,13 @@ table.event_details td.cell_event_name { /* For mobiles */ @media screen and (max-width: 750px) { .agents_tiny_stats * { - font-size: 12px !important; + font-size: 12px; } } /* For tablets */ @media screen and (min-width: 750px) { .agents_tiny_stats * { - font-size: 17px !important; + font-size: 17px; } } /*END-----------Agents styles-----------------------------------------*/ @@ -755,7 +755,7 @@ table.event_details td.cell_event_name { #rendered_visual_map div { color: #003a3a; - text-shadow: none !important; + text-shadow: none; } #rendered_visual_map { @@ -765,62 +765,62 @@ table.event_details td.cell_event_name { /* For mobiles */ @media screen and (max-width: 750px) { #rendered_visual_map div { - font-size: 6pt !important; + font-size: 6pt; } } /* For tablets */ @media screen and (min-width: 750px) { #rendered_visual_map div { - font-size: 8pt !important; + font-size: 8pt; } } /* For mobiles */ @media screen and (max-width: 750px) { .resize_visual_font_size_4pt * { - font-size: 2pt !important; + font-size: 2pt; } .resize_visual_font_size_6pt * { - font-size: 3pt !important; + font-size: 3pt; } .resize_visual_font_size_8pt * { - font-size: 4pt !important; + font-size: 4pt; } .resize_visual_font_size_14pt * { - font-size: 6pt !important; + font-size: 6pt; } .resize_visual_font_size_24pt * { - font-size: 10pt !important; + font-size: 10pt; } .resize_visual_font_size_36pt * { - font-size: 14pt !important; + font-size: 14pt; } .resize_visual_font_size_72pt * { - font-size: 27pt !important; + font-size: 27pt; } } /* For tablets */ @media screen and (min-width: 750px) { .resize_visual_font_size_4pt * { - font-size: 2pt !important; + font-size: 2pt; } .resize_visual_font_size_6pt * { - font-size: 3pt !important; + font-size: 3pt; } .resize_visual_font_size_8pt * { - font-size: 4pt !important; + font-size: 4pt; } .resize_visual_font_size_14pt * { - font-size: 7pt !important; + font-size: 7pt; } .resize_visual_font_size_24pt * { - font-size: 12pt !important; + font-size: 12pt; } .resize_visual_font_size_36pt * { - font-size: 18pt !important; + font-size: 18pt; } .resize_visual_font_size_72pt * { - font-size: 36pt !important; + font-size: 36pt; } } @@ -831,7 +831,7 @@ table.event_details td.cell_event_name { #list_Modules .cell_1 .ui-table-cell-label, #list_Modules .cell_5 .ui-table-cell-label, #list_Modules .cell_6 .ui-table-cell-label { - min-width: auto !important; + min-width: auto; } #list_Modules .cell_5 .ui-table-cell-label, @@ -844,7 +844,7 @@ table.event_details td.cell_event_name { #list_Modules .cell_3 .ui-table-cell-label, #list_Modules .cell_4 .ui-table-cell-label, #list_Modules .cell_5 .ui-table-cell-label { - display: none !important; + display: none; } #list_Modules td { @@ -853,12 +853,12 @@ table.event_details td.cell_event_name { display: table-cell; clear: none; float: none; - padding-left: 0px !important; - padding-right: 0px !important; + padding-left: 0px; + padding-right: 0px; } #list_Modules .show_collapside { - display: inline !important; + display: inline; } #list_Modules .data { @@ -868,14 +868,14 @@ table.event_details td.cell_event_name { #list_Modules .cell_1, #list_Modules .cell_2, #list_Modules .cell_3 { - display: none !important; + display: none; } #list_Modules .cell_0 .show_collapside, #list_Modules .cell_1 .show_collapside, #list_Modules .cell_4 .show_collapside, #list_Modules .cell_5 .show_collapside { - display: none !important; + display: none; } #list_Modules .cell_0 .ui-link { @@ -901,12 +901,12 @@ table.event_details td.cell_event_name { float: left; } #list_Modules .module_name { - font-size: 12px !important; + font-size: 12px; } } #list_Modules .cell_5 a { - color: #000000 !important; + color: #000000; } #list_Modules .module_name { @@ -930,7 +930,7 @@ table.event_details td.cell_event_name { #user_logged { position: absolute; - font-size: 11px !important; + font-size: 11px; right: 10px; top: 8px; background: url(../../../images/header_user.png) no-repeat right; @@ -950,11 +950,11 @@ table.event_details td.cell_event_name { /*INIT---------Fix the square border in search input------------------*/ .ui-input-search { - border-radius: 0.6em 0.6em 0.6em 0.6em !important; + border-radius: 0.6em 0.6em 0.6em 0.6em; } .ui-select { - width: 100% !important; + width: 100%; } /*END----------Fix the square border in search input------------------*/ @@ -964,26 +964,26 @@ ul.ui-listview li.ui-btn div.ui-btn-inner div.ui-btn-text a { } .ui-btn-inner { - border: 0px solid #000 !important; + border: 0px solid #000; } li.ui-btn { - margin-bottom: 4px !important; - margin-top: 4px !important; + margin-bottom: 4px; + margin-top: 4px; } /*INIT---------Fix the tons of air between the rows in small table----*/ .head_vertical { - margin-top: 0px !important; + margin-top: 0px; border-top: 1px solid grey; } .head_horizontal { - border-bottom: 1px solid grey !important; + border-bottom: 1px solid grey; } #list_events .head_horizontal { - border-bottom: 0px solid white !important; + border-bottom: 0px solid white; } .cell_0 { @@ -1003,30 +1003,30 @@ li.ui-btn { @media screen and (max-width: 34.99em) { .ui-table th, .ui-table td { - padding: 8px !important; + padding: 8px; padding-left: 3px; } .head_vertical { - display: none !important; + display: none; } } /*END----------Fix the tons of air between the rows in small table----*/ /*INIT---------Fix to avoid clicks under loading message--------------*/ .ui-loader-background { - width: 100% !important; - height: 100% !important; - top: 0 !important; - margin: 0 !important; - background: rgba(0, 0, 0, 0.3) !important; - display: none !important; - position: fixed !important; - z-index: 100 !important; + width: 100%; + height: 100%; + top: 0; + margin: 0; + background: rgba(0, 0, 0, 0.3); + display: none; + position: fixed; + z-index: 100; } .ui-loading .ui-loader-background { - display: block !important; + display: block; } /*END----------Fix to avoid clicks under loading message--------------*/ @@ -1038,8 +1038,8 @@ li.ui-btn { } .ui-icon-big { - width: 28px !important; - height: 28px !important; + width: 28px; + height: 28px; } @media screen and (max-width: 35em) { @@ -1097,12 +1097,12 @@ li.ui-btn { label, input, .ui-btn-inner { - font-size: 12px !important; + font-size: 12px; } .list_groups .ui-btn-inner { - padding-top: 15px !important; - height: 20px !important; + padding-top: 15px; + height: 20px; } .login_logo img { @@ -1128,25 +1128,25 @@ li.ui-btn { label, input, .ui-btn-inner { - font-size: 16px !important; - padding-top: 6px !important; + font-size: 16px; + padding-top: 6px; } .list_groups .ui-btn-inner { - padding-top: 20px !important; - height: 35px !important; + padding-top: 20px; + height: 35px; } .ui-header .ui-title { - font-size: 18px !important; + font-size: 18px; } * { - font-size: 18px !important; + font-size: 18px; } .event_name { - font-size: 15px !important; + font-size: 15px; } .login_logo img { @@ -1178,7 +1178,7 @@ li.ui-btn { #login_container input, #login_container .ui-btn-text { - font-size: 16px !important; + font-size: 16px; } table.tactical_bars { @@ -1211,39 +1211,39 @@ table.tactical_bars { /*INIT-----------Icons styles---------------------------------------*/ .ui-icon-tactical_view { - background-image: url(../../../images/op_monitoring.menu.png) !important; + background-image: url(../../../images/op_monitoring.menu.png); } .ui-icon-events { - background-image: url(../../../images/op_events.menu.png) !important; + background-image: url(../../../images/op_events.menu.png); } .ui-icon-groups { - background-image: url(../../../images/group.menu.png) !important; + background-image: url(../../../images/group.menu.png); } .ui-icon-alerts { - background-image: url(../../../images/op_alerts.menu.png) !important; + background-image: url(../../../images/op_alerts.menu.png); } .ui-icon-agents { - background-image: url(../../../images/agent_mc.menu.png) !important; + background-image: url(../../../images/agent_mc.menu.png); } .ui-icon-modules { - background-image: url(../../../images/brick.menu.png) !important; + background-image: url(../../../images/brick.menu.png); } .ui-icon-network_maps { - background-image: url(../../../images/op_network.menu.png) !important; + background-image: url(../../../images/op_network.menu.png); } .ui-icon-visual_console { - background-image: url(../../../images/visual_console.menu.png) !important; + background-image: url(../../../images/visual_console.menu.png); } .ui-icon-dashboard { - background-image: url(../../../images/dashboard.menu.png) !important; + background-image: url(../../../images/dashboard.menu.png); } .ui-icon-tactical_view, @@ -1255,16 +1255,16 @@ table.tactical_bars { .ui-icon-network_maps, .ui-icon-visual_console, .ui-icon-dashboard { - background-color: #333 !important; + background-color: #333; background-position: center; - border-radius: 15px !important; - -webkit-border-radius: 15px !important; + border-radius: 15px; + -webkit-border-radius: 15px; } #login_btn-container .ui-icon { - background-color: #333 !important; - border-radius: 15px !important; - -webkit-border-radius: 15px !important; + background-color: #333; + border-radius: 15px; + -webkit-border-radius: 15px; } /* For mobiles */ @@ -1278,9 +1278,9 @@ table.tactical_bars { .ui-icon-network_maps, .ui-icon-visual_console, .ui-icon-dashboard { - width: 22px !important; - height: 22px !important; - margin-top: -13px !important; + width: 22px; + height: 22px; + margin-top: -13px; background-size: 16px 16px; } } @@ -1295,9 +1295,9 @@ table.tactical_bars { .ui-icon-network_maps, .ui-icon-visual_console, .ui-icon-dashboard { - width: 32px !important; - height: 32px !important; - margin-top: -17px !important; + width: 32px; + height: 32px; + margin-top: -17px; } } @@ -1310,11 +1310,11 @@ table.tactical_bars { } .ui-btn-active * { - color: #fff !important; + color: #fff; } .ui-btn-active { - background: #82b92e !important; + background: #82b92e; } span.nobold * { @@ -1338,7 +1338,7 @@ span.nobold * { } .events_agent b.ui-table-cell-label { - display: block !important; + display: block; } #list_Modules *, @@ -1351,8 +1351,8 @@ span.nobold * { } div.legend > div { - width: 100% !important; - opacity: 0.65 !important; + width: 100%; + opacity: 0.65; } div.nodata_text { @@ -1363,7 +1363,7 @@ div.nodata_text { display: table-cell; vertical-align: middle; text-align: left; - font-size: 14px !important; + font-size: 14px; } div.nodata_container { @@ -1385,17 +1385,17 @@ div.nodata_container { } .ui-icon-delete { - margin-top: -3px !important; + margin-top: -3px; } .empty_advice { color: #ff0000; - margin-top: 5px !important; + margin-top: 5px; } /* JQuery Mobile responsive hack to tables with */ .ui-table-reflow.ui-responsive { - display: table !important; + display: table; } .widget_agent_module > th { @@ -1411,10 +1411,10 @@ div.nodata_container { } .legend_graph td.legendLabel > div { - font-size: 12px !important; + font-size: 12px; } .legend_graph td.legendLabel { - font-size: 12px !important; + font-size: 12px; } .ui-popup-hidden { From 69054571ab2590edd77b2496fce174b67c80a02d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 31 May 2019 09:50:59 +0200 Subject: [PATCH 018/206] Style review --- .../godmode/agentes/agent_manager.php | 30 +++++++---- pandora_console/include/graphs/pandora.d3.js | 1 - pandora_console/include/styles/discovery.css | 1 - pandora_console/include/styles/footer.css | 2 +- pandora_console/include/styles/pandora.css | 52 ++++++++++++------- .../operation/agentes/tactical.php | 19 +++++-- 6 files changed, 68 insertions(+), 37 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index dfdd7390c3..f19d2b0e60 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -245,7 +245,7 @@ if (!$new_agent && $alias != '') { $table_agent_name .= ''; // QR code div. - $table_qr_code = '
'; + $table_qr_code = '
'; $table_qr_code .= '

'.__('QR Code Agent view').':

'; $table_qr_code .= '
'; if ($id_agente) { @@ -401,7 +401,7 @@ $table_description .= html_print_textarea( // QR code. echo '
-
+
'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'
'.$table_interval.$table_os.$table_server.$table_description.'
'; @@ -777,7 +777,15 @@ $table_adv_options .= $table_adv_gis.'
'; echo '
'; - ui_toggle($table_adv_options, __('Advanced options'), '', true, false, 'white_box white_box_opened'); +ui_toggle( + $table_adv_options, + __('Advanced options'), + '', + true, + false, + '', + 'padding-4' +); echo '
'; @@ -895,14 +903,14 @@ foreach ($fields as $field) { if (!empty($fields)) { echo '
'; - ui_toggle( - html_print_table($table, true), - __('Custom fields'), - '', - true, - false, - 'white_box white_box_opened' - ); + ui_toggle( + html_print_table($table, true), + __('Custom fields'), + '', + true, + false, + 'white_box white_box_opened' + ); echo '
'; } diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index 427de827e3..375c4d328f 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -2849,7 +2849,6 @@ function donutNarrowGraph(colores, width, height, total) { }) .attr("d", arc) .attr("stroke", "white") - .style("stroke-width", 2) .style("fill", function(d) { return color(d.data.key); }); diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index e935657d42..7eb14460ce 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -6,7 +6,6 @@ li.discovery { display: inline-block; float: left; width: 250px; - height: 120px; margin: 15px; padding-bottom: 50px; } diff --git a/pandora_console/include/styles/footer.css b/pandora_console/include/styles/footer.css index 84dff3e551..b215497f35 100644 --- a/pandora_console/include/styles/footer.css +++ b/pandora_console/include/styles/footer.css @@ -16,7 +16,7 @@ div#foot { background: #343434; clear: both; width: auto; - height: 38px; + height: 4em; margin-top: auto; box-sizing: border-box; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index d47ab1c9a4..f8cb6dcdd8 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -119,6 +119,7 @@ font-family: verdana, sans-serif; letter-spacing: 0.03pt; font-size: 8pt; + box-sizing: border-box; } svg * { font-size: 11pt; @@ -459,6 +460,16 @@ select:-internal-list-box { max-width: 100%; } +.padding-2 { + padding: 2em; +} +.padding-4 { + padding: 4em; +} +.padding-6 { + padding: 6em; +} + .no-padding { padding: 0; } @@ -480,6 +491,9 @@ select:-internal-list-box { .no-td-padding td { padding: 0; } +.td-bg-white td { + background: #fff; +} div#page { background: #fbfbfb; @@ -1186,9 +1200,12 @@ div#agent_wizard_subtabs { margin-right: 20px; } +#menu_tab_left span { + padding-left: 1em; +} + #menu_tab_left .mn, -#menu_tab_left ul, -#menu_tab_left .mn ul { +#menu_tab_left ul { color: #343434; padding: 0px 0px 0px 0px; list-style: none; @@ -1943,15 +1960,6 @@ div#pandora_logo_header { font-family: "lato-bolder", "Open Sans", sans-serif; } -#header_table_inner a, -#header_table_inner span { - font-family: "Open Sans", sans-serif; -} - -#header_table_inner a:hover { - text-decoration: none; -} - .header_left { display: flex; flex-direction: column; @@ -3146,8 +3154,8 @@ div.div_groups_status { } .databox.pies fieldset.tactical_set { - width: 70%; - height: 285px; + width: 100%; + min-height: 285px; } .difference { @@ -5045,13 +5053,11 @@ table.info_table > tbody > tr:last-child > td:last-child { table.info_table > thead > tr > th, table.info_table > tbody > tr > th, table.info_table > thead > tr > th a { - padding-left: 9px; - padding-right: 9px; - padding-top: 9px; - padding-bottom: 9px; + padding: 0.1em; font-weight: normal; color: #000; - font-size: 8.6pt; + font-size: 1.2em; + margin-left: 0.5em; } table.info_table > tbody > tr { @@ -5806,6 +5812,8 @@ div#status_pie { width: 100%; height: 100%; background-color: #fff; + box-sizing: border-box; + border: 1px solid #e2e2e2; display: flex; align-items: center; flex-wrap: wrap; @@ -5815,7 +5823,7 @@ div#status_pie { border: 1px solid #e2e2e2; border-top: none; background-color: #fff; - padding: 20px; + padding: 5px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; align-items: center; @@ -5846,6 +5854,12 @@ div#status_pie { padding: 10px; } +.white-box-content form { + width: 100%; + margin-bottom: 2em; + padding: 2em; +} + /* White tables */ .white_table, .white_table tr:first-child > th { diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 10e4ff5736..40fc911352 100755 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -122,7 +122,7 @@ echo '
'; // Left column @@ -210,7 +214,14 @@ $out = '
"."".html_print_image( + echo "".html_print_image( 'images/arrow_left.png', true, ['title' => __('Previous modules')] - ).''.'"."".html_print_image( + echo "".html_print_image( 'images/arrow.png', true, ['title' => __('More modules')] - ).''.'
".$alias['alias'].''; foreach ($stats as $stat) { @@ -166,7 +165,12 @@ if ($is_admin) { $table->rowclass[] = ''; } -html_print_table($table); +ui_toggle( + html_print_table($table, true), + __('Report of State'), + true, + false +); echo '
'.__('Event graph by agent').''.html_print_image('images/spinner.gif', true, ['id' => 'spinner_graphic_event_group']).''; $out .= '
'; -echo $out; + + +ui_toggle( + $out, + __('Event graphs'), + true, + false +); echo ''; echo ''; From 1aa6d8c298e189fe6a60dfc14b288721f5c7cb54 Mon Sep 17 00:00:00 2001 From: "ismael.moreno" Date: Fri, 31 May 2019 10:39:48 +0200 Subject: [PATCH 019/206] Change module type ifOperStatus on Interface Wizard --- .../agent_wizard.snmp_interfaces_explorer.php | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php index 5730fea501..b08dc62c4f 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -322,7 +322,7 @@ if ($create_modules) { } else if (preg_match('/ifAdminStatus/', $name_array[1])) { $module_type = 2; } else if (preg_match('/ifOperStatus/', $name_array[1])) { - $module_type = 18; + $module_type = 2; } else { $module_type = 4; } @@ -608,11 +608,11 @@ ui_require_jquery_file('bgiframe'); $(document).ready (function () { var inputActive = true; - + $(document).data('text_for_module', $("#none_text").html()); - + $("#id_snmp").change(snmp_changed_by_multiple_snmp); - + $("#snmp_version").change(function () { if (this.value == "3") { $("#snmp3_options").css("display", ""); @@ -621,7 +621,7 @@ $(document).ready (function () { $("#snmp3_options").css("display", "none"); } }); - + $("#walk_form").submit(function() { $("#submit-snmp_walk").disable (); $("#oid_loading").show (); @@ -632,15 +632,15 @@ $(document).ready (function () { function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { var idSNMP = Array(); - + jQuery.each ($("#id_snmp option:selected"), function (i, val) { idSNMP.push($(val).val()); }); $('#module').attr ('disabled', 1); $('#module').empty (); $('#module').append ($('').html ("Loading...").attr ("value", 0)); - - jQuery.post ('ajax.php', + + jQuery.post ('ajax.php', {"page" : "godmode/agentes/agent_manager", "get_modules_json_for_multiple_snmp": 1, "id_snmp[]": idSNMP, @@ -655,7 +655,7 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { $('#module').fadeIn ('normal'); c++; }); - + if (c == 0) { if (typeof($(document).data('text_for_module')) != 'undefined') { $('#module').append ($('').html ($(document).data('text_for_module')).attr("value", 0).prop('selected', true)); @@ -666,11 +666,11 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { } else { var anyText = $("#any_text").html(); //Trick for catch the translate text. - + if (anyText == null) { anyText = 'Any'; } - + $('#module').append ($('').html (anyText).attr ("value", 0).prop('selected', true)); } } @@ -684,4 +684,3 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) { /* ]]> */ - From 88b0802472b198c04384f00730c61c4d057dd6ed Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 3 Jun 2019 10:46:52 +0200 Subject: [PATCH 020/206] style review --- .../godmode/alerts/alert_list.builder.php | 24 ++- .../godmode/alerts/alert_list.list.php | 25 ++- .../godmode/reporting/reporting_builder.php | 29 ++-- pandora_console/include/functions_events.php | 8 +- pandora_console/include/functions_ui.php | 1 + pandora_console/include/styles/discovery.css | 7 +- pandora_console/include/styles/pandora.css | 155 +----------------- pandora_console/include/styles/tables.css | 150 +++++++++++++++++ .../operation/agentes/alerts_status.php | 2 +- .../operation/reporting/custom_reporting.php | 2 +- pandora_console/operation/search_reports.php | 2 +- 11 files changed, 200 insertions(+), 205 deletions(-) create mode 100644 pandora_console/include/styles/tables.css diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index ca3a099bf3..c97fe2feff 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -37,14 +37,10 @@ $table->head = []; $table->data = []; $table->size = []; $table->size = []; -$table->size[0] = '5%'; -$table->size[1] = '25%'; -$table->size[2] = '5%'; -$table->size[3] = '20%'; -$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[0] = 'font-weight: bold;'; +$table->style[1] = 'font-weight: bold;display: flex;align-items: baseline;'; +$table->style[2] = 'font-weight: bold;'; +$table->style[3] = 'font-weight: bold;'; // This is because if this view is reused after list alert view then // styles in the previous view can affect this table. @@ -89,7 +85,7 @@ $table->data[0][1] = html_print_select( true, '', ($id_agente == 0), - 'width: 250px;' + 'min-width: 250px;margin-right: 0.5em;' ); $table->data[0][1] .= ' '; @@ -117,7 +113,7 @@ $table->data[1][1] = html_print_select( true, '', false, - 'width: 250px;' + 'min-width: 250px;' ); $table->data[1][1] .= ''; if (check_acl($config['id_user'], 0, 'LM')) { - $table->data[1][1] .= ''; + $table->data[1][1] .= ''; $table->data[1][1] .= html_print_image('images/add.png', true); - $table->data[1][1] .= ''.__('Create Action').''; + $table->data[1][1] .= ''.__('Create Action').''; $table->data[1][1] .= ''; } @@ -162,13 +158,13 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { if (check_acl($config['id_user'], 0, 'LM')) { $table->data[2][1] .= ''; $table->data[2][1] .= html_print_image('images/add.png', true); - $table->data[2][1] .= ''.__('Create Template').''; + $table->data[2][1] .= ''.__('Create Template').''; $table->data[2][1] .= ''; } $table->data[3][0] = __('Threshold'); $table->data[3][1] = html_print_input_text('module_action_threshold', '0', '', 5, 7, true); - $table->data[3][1] .= ' '.__('seconds'); + $table->data[3][1] .= ''.__('seconds').''; if (!isset($step)) { echo '
'; diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 4b3a3395cf..f830f47dbd 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -438,11 +438,11 @@ if (! $id_agente) { $table->style = []; $table->style[0] = 'font-weight: bold;'; $table->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown); - $table->size[0] = '4%'; - $table->size[1] = '8%'; - $table->size[2] = '8%'; - $table->size[3] = '4%'; - $table->size[4] = '4%'; + $table->headstyle[0] = 'width: 100%; min-width: 12em;'; + $table->headstyle[1] = 'min-width: 15em;'; + $table->headstyle[2] = 'min-width: 20em;'; + $table->headstyle[3] = 'min-width: 1em;'; + $table->headstyle[4] = 'min-width: 15em;'; /* if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { @@ -450,16 +450,11 @@ if (! $id_agente) { }*/ } else { $table->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); - // Different sizes or the layout screws up - $table->size[0] = '0%'; - $table->size[1] = '10%'; - $table->size[2] = '30%'; - /* - if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - $table->size[4] = '25%'; - } */ - $table->size[3] = '1%'; - $table->size[4] = '1%'; + $table->headstyle[0] = 'width: 100%; min-width: 15em;'; + $table->headstyle[1] = 'min-width: 15em;'; + $table->headstyle[2] = 'min-width: 20em;'; + $table->headstyle[3] = 'min-width: 1em;'; + $table->headstyle[4] = 'min-width: 15em;'; } $table->head[1] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 44e616977d..f872b6357e 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -771,31 +771,28 @@ switch ($action) { $table->head[1] = __('Description'); $table->head[2] = __('HTML'); $table->head[3] = __('XML'); - $table->size[0] = '20%'; - $table->size[1] = '30%'; + $table->size[0] = '60%'; + $table->size[1] = '20%'; $table->size[2] = '2%'; - $table->headstyle[2] = 'min-width: 35px;'; + $table->headstyle[2] = 'min-width: 35px;text-align: center;'; $table->size[3] = '2%'; - $table->headstyle[3] = 'min-width: 35px;'; + $table->headstyle[3] = 'min-width: 35px;text-align: center;'; $table->size[4] = '2%'; - $table->headstyle[4] = 'min-width: 35px;'; - $table->size[5] = '2%'; - $table->headstyle[5] = 'min-width: 35px;'; - $table->size[6] = '2%'; - $table->headstyle[6] = 'min-width: 35px;'; - $table->size[7] = '5%'; - $table->headstyle['csv'] = 'min-width: 65px;'; - $table->style[7] = 'text-align: center;'; - - $table->headstyle[9] = 'min-width: 100px;'; - $table->style[9] = 'text-align: center;'; + $table->headstyle[4] = 'min-width: 35px;text-align: center;'; $next = 4; // Calculate dinamically the number of the column. - if (enterprise_hook('load_custom_reporting_1') !== ENTERPRISE_NOT_HOOK) { + if (enterprise_hook('load_custom_reporting_1', [$table]) !== ENTERPRISE_NOT_HOOK) { $next = 7; } + $table->size[$next] = '2%'; + $table->style[$next] = 'text-align: center;'; + + $table->headstyle[($next + 2)] = 'min-width: 100px;'; + $table->style[($next + 2)] = 'text-align: center;'; + + // Admin options only for RM flag. if (check_acl($config['id_user'], 0, 'RM')) { $table->head[$next] = __('Private'); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7f1118ce3f..a282efa300 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1130,10 +1130,10 @@ function events_print_event_table( } $events_table = html_print_table($table, true); - $out = '
'; - $out .= $events_table; + $out = $events_table; if (!$tactical_view) { + $out .= '
'; if ($agent_id != 0) { $out .= ''; $out .= '
'; @@ -1149,9 +1149,9 @@ function events_print_event_table( '.__('Event graph by agent').''.grafico_eventos_grupo(180, 60).''; $out .= '
'; } - } - $out .= '
'; + $out .= '
'; + } unset($table); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 2ecc7bc96d..e2d5450759 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1756,6 +1756,7 @@ function ui_process_page_head($string, $bitfield) [ 'common' => 'include/styles/common.css', 'menu' => 'include/styles/menu.css', + 'tables' => 'include/styles/tables.css', $config['style'] => 'include/styles/'.$config['style'].'.css', ], $config['css'] diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index 7eb14460ce..b8da30aede 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -131,9 +131,9 @@ div.arrow_box:before { } .breadcrumbs_container { - padding-left: 10px; padding-top: 4px; text-indent: 0.25em; + padding-left: 2.5em; } .breadcrumb_link { @@ -167,6 +167,11 @@ form.discovery * { font-size: 10pt; } +form.discovery .label_select b { + font-family: "lato", "Open Sans", sans-serif; + font-weight: bolder; +} + .edit_discovery_info { display: flex; align-items: flex-start; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index f8cb6dcdd8..cc1f3c48f4 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -814,38 +814,6 @@ input.datos { border: #ccc outset 3px; } -td.datos3, -td.datos4 { - background-color: #fff; - color: #000; - border-bottom: 2px solid #82b92e; - border-left: none; - border-right: none; - height: 30px; - font-size: 8.6pt; - font-weight: normal; -} - -td.datos4 { - /*Add because in php the function html_print_table write style in cell and this is style head.*/ - text-align: center; -} - -td.datos3 *, -td.datos4 * { - font-size: 8.6pt; - font-weight: normal; -} - -/*td.datos_id { - color: #1a313a; -}*/ - -/* user list php */ -tr.disabled_row_user * { - color: grey; -} - /* global syles */ .bg { /* op menu */ @@ -1085,7 +1053,7 @@ div.title_line { } .breadcrumbs_container { - padding-left: 10px; + padding-left: 2.5em; padding-top: 4px; text-indent: 0.25em; color: #848484; @@ -4893,6 +4861,7 @@ input:checked + .p-slider:before { .label_select, .label_select_simple { + font-family: "lato-bolder", "Open Sans", sans-serif; margin-bottom: 15px; } @@ -4974,125 +4943,6 @@ input:checked + .p-slider:before { color: #4d4d4d; } -/* This is to use divs like tables */ -.table_div { - display: table; -} -.table_thead, -.table_tbody { - display: table-row; -} -.table_th { - font-weight: bold; -} -.table_th, -.table_td { - display: table-cell; - vertical-align: middle; - padding: 10px; -} -/* Tables with 3 columns */ -.table_three_columns .table_th, -.table_three_columns .table_td { - width: 33%; -} - -/* - * --------------------------------------------------------------------- - * - TABLES TO SHOW INFORMATION - * --------------------------------------------------------------------- - */ - -table.info_table { - background-color: #fff; - margin-bottom: 10px; - border-spacing: 0; - border-collapse: collapse; - overflow: hidden; - border-radius: 5px; -} - -table.info_table > tbody > tr:nth-child(even) { - background-color: #f5f5f5; -} - -table.info_table tr:first-child > th { - background-color: #fff; - color: #000; - text-align: left; - vertical-align: middle; -} - -table.info_table th { - font-size: 7.5pt; - letter-spacing: 0.3pt; - color: #000; - background-color: #fff; -} - -table.info_table tr th { - border-bottom: 1px solid #e2e2e2; -} - -/* Radius top */ -table.info_table > thead > tr:first-child > th:first-child { - border-top-left-radius: 4px; -} -table.info_table > thead > tr:first-child > th:last-child { - border-top-right-radius: 4px; -} - -/* Radius bottom */ -table.info_table > tbody > tr:last-child > td:first-child { - border-top-left-radius: 4px; -} -table.info_table > tbody > tr:last-child > td:last-child { - border-top-right-radius: 4px; -} - -table.info_table > thead > tr > th, -table.info_table > tbody > tr > th, -table.info_table > thead > tr > th a { - padding: 0.1em; - font-weight: normal; - color: #000; - font-size: 1.2em; - margin-left: 0.5em; -} - -table.info_table > tbody > tr { - border-bottom: 1px solid #e2e2e2; -} - -table.info_table > tbody > tr > td { - -moz-border-radius: 0px; - -webkit-border-radius: 0px; - border-radius: 0px; - border: none; - padding-left: 9px; - padding-right: 9px; - padding-top: 7px; - padding-bottom: 7px; -} - -table.info_table > tbody > tr > td > img, -table.info_table > thead > tr > th > img, -table.info_table > tbody > tr > td > div > a > img, -table.info_table > tbody > tr > td > span > img, -table.info_table > tbody > tr > td > span > a > img, -table.info_table > tbody > tr > td > a > img, -table.info_table > tbody > tr > td > form > a > img { - vertical-align: middle; -} - -table.info_table > tbody > tr:hover { - background-color: #eee; -} - -.info_table.profile_list > thead > tr > th > a.tip { - padding: 0px; -} - /* This class is for the icons of actions and operations in the tables. */ .action_buttons a[href] img, .action_buttons input[type="image"], @@ -5817,6 +5667,7 @@ div#status_pie { display: flex; align-items: center; flex-wrap: wrap; + padding: 0 1em 0; } .white_table_graph_content { diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css new file mode 100644 index 0000000000..ac2cdcc951 --- /dev/null +++ b/pandora_console/include/styles/tables.css @@ -0,0 +1,150 @@ +/* + * --------------------------------------------------------------------- + * - TABLES + * --------------------------------------------------------------------- + */ +/* This is to use divs like tables */ +.table_div { + display: table; +} +.table_thead, +.table_tbody { + display: table-row; +} +.table_th { + font-weight: bold; +} +.table_th, +.table_td { + display: table-cell; + vertical-align: middle; + padding: 10px; +} +/* Tables with 3 columns */ +.table_three_columns .table_th, +.table_three_columns .table_td { + width: 33%; +} + +table.info_table { + background-color: #fff; + margin-bottom: 10px; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + border-radius: 5px; +} + +table.info_table > tbody > tr:nth-child(even) { + background-color: #f5f5f5; +} + +table.info_table tr:first-child > th { + background-color: #fff; + color: #000; + text-align: left; + vertical-align: middle; +} + +table.info_table th { + font-size: 7.5pt; + letter-spacing: 0.3pt; + color: #000; + background-color: #fff; +} + +table.info_table tr th { + border-bottom: 1px solid #e2e2e2; +} + +/* Radius top */ +table.info_table > thead > tr:first-child > th:first-child { + border-top-left-radius: 4px; +} +table.info_table > thead > tr:first-child > th:last-child { + border-top-right-radius: 4px; +} + +/* Radius bottom */ +table.info_table > tbody > tr:last-child > td:first-child { + border-top-left-radius: 4px; +} +table.info_table > tbody > tr:last-child > td:last-child { + border-top-right-radius: 4px; +} + +table.info_table > thead > tr > th, +table.info_table > tbody > tr > th, +table.info_table > thead > tr > th a, +table.info_table > thead > tr > th > span { + padding: 0.1em; + font-weight: normal; + color: #000; + font-size: 1.2em; + margin-left: 0.5em; +} + +table.info_table > tbody > tr { + border-bottom: 1px solid #e2e2e2; +} + +table.info_table > tbody > tr > td { + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border: none; + padding-left: 9px; + padding-right: 9px; + padding-top: 7px; + padding-bottom: 7px; +} + +table.info_table > tbody > tr > td > img, +table.info_table > thead > tr > th > img, +table.info_table > tbody > tr > td > div > a > img, +table.info_table > tbody > tr > td > span > img, +table.info_table > tbody > tr > td > span > a > img, +table.info_table > tbody > tr > td > a > img, +table.info_table > tbody > tr > td > form > a > img { + vertical-align: middle; +} + +table.info_table > tbody > tr:hover { + background-color: #eee; +} + +.info_table.profile_list > thead > tr > th > a.tip { + padding: 0px; +} + +td.datos3, +td.datos4 { + background-color: #fff; + color: #000; + border-bottom: 2px solid #82b92e; + border-left: none; + border-right: none; + height: 30px; + font-size: 8.6pt; + font-weight: normal; +} + +td.datos4 { + /*Add because in php the function html_print_table write style in cell and this is style head.*/ + text-align: center; +} + +td.datos3 *, +td.datos4 * { + font-size: 8.6pt; + font-weight: normal; +} + +/*td.datos_id { + color: #1a313a; +}*/ + +/* user list php */ +tr.disabled_row_user * { + color: grey; +} diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index e231266667..92937a22e3 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -614,7 +614,7 @@ foreach ($alerts['alerts_simple'] as $alert) { if (!empty($table->data)) { $class = ''; if ($agent_view_page === true) { - $class = 'white_table_graph_content w100p no-padding-imp'; + $class = 'w100p no-padding-imp'; } echo ''; diff --git a/pandora_console/operation/reporting/custom_reporting.php b/pandora_console/operation/reporting/custom_reporting.php index a5267a21bd..68ff8c80c0 100644 --- a/pandora_console/operation/reporting/custom_reporting.php +++ b/pandora_console/operation/reporting/custom_reporting.php @@ -36,7 +36,7 @@ $table->head[1] = __('Description'); $table->head[2] = __('HTML'); $table->head[3] = __('XML'); -enterprise_hook('load_custom_reporting_1'); +enterprise_hook('load_custom_reporting_1', [$table]); $table->align = []; $table->align[2] = 'center'; diff --git a/pandora_console/operation/search_reports.php b/pandora_console/operation/search_reports.php index 668f6f717b..a3b95357a3 100755 --- a/pandora_console/operation/search_reports.php +++ b/pandora_console/operation/search_reports.php @@ -35,7 +35,7 @@ if ($reports === false || !$searchReports) { $table->head[1] = __('Description'); $table->head[2] = __('HTML'); $table->head[3] = __('XML'); - enterprise_hook('load_custom_reporting_1'); + enterprise_hook('load_custom_reporting_1', [$table]); $table->align = []; $table->align[2] = 'center'; From 419b3f4fb1e2a5aa274c49e66a604ac681e2dd22 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 3 Jun 2019 10:47:54 +0200 Subject: [PATCH 021/206] Fixed module_manager with Agent limit surpassed or license expired --- pandora_console/include/functions.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index f299153da6..a680ad9cba 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1392,6 +1392,11 @@ function enterprise_installed() { $return = false; + // Load enterprise extensions. + if (defined('DESTDIR')) { + return $return; + } + if (defined('PANDORA_ENTERPRISE')) { if (PANDORA_ENTERPRISE) { $return = true; @@ -1444,7 +1449,7 @@ function enterprise_include($filename) { global $config; - // Load enterprise extensions + // Load enterprise extensions. if (defined('DESTDIR')) { $destdir = DESTDIR; } else { @@ -1474,7 +1479,13 @@ function enterprise_include_once($filename) { global $config; - // Load enterprise extensions + // Load enterprise extensions. + if (defined('DESTDIR')) { + $destdir = DESTDIR; + } else { + $destdir = ''; + } + $filepath = realpath($config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename); if ($filepath === false) { From 9de5dadbf22999bc3e1f0662761e85029313bc8e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 3 Jun 2019 11:16:51 +0200 Subject: [PATCH 022/206] style review --- pandora_console/general/logon_ok.php | 5 ++++- .../godmode/servers/servers.build_table.php | 4 ++-- pandora_console/godmode/snmpconsole/snmp_alert.php | 2 +- .../operation/reporting/reporting_viewer.php | 12 ++++++------ pandora_console/operation/snmpconsole/snmp_view.php | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 649a2d2f68..a84bd263af 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -235,9 +235,12 @@ if (!empty($all_data)) { // Don't specify px. $table->data = []; $table->size = []; + $table->headstyle = []; $table->size[0] = '5%'; $table->size[1] = '15%'; - $table->size[2] = '15%'; + $table->headstyle[1] = 'min-width: 12em;'; + $table->size[2] = '5%'; + $table->headstyle[2] = 'min-width: 65px;'; $table->size[3] = '10%'; $table->size[4] = '25%'; $table->head = []; diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 1b5486b570..581cb2541f 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -51,11 +51,11 @@ $table->style[0] = 'font-weight: bold'; $table->align = []; $table->align[1] = 'center'; $table->align[3] = 'center'; -$table->align[8] = 'center'; +$table->align[8] = 'right'; $table->headstyle[1] = 'text-align:center'; $table->headstyle[3] = 'text-align:center'; -$table->headstyle[8] = 'text-align:center'; +$table->headstyle[8] = 'text-align:right'; // $table->title = __('Tactical server information'); $table->titleclass = 'tabletitle'; diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index a2a1b8b811..66651d6522 100755 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -1275,7 +1275,7 @@ if ($create_alert || $update_alert) { $table->align[7] = 'left'; $table->head[8] = __('Action'); - $table->size[8] = '90px'; + $table->size[8] = '120px'; $table->align[8] = 'left'; $table->head[9] = html_print_checkbox('all_delete_box', '1', false, true); diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 5e9dda1e57..e8431ddeb2 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -169,12 +169,12 @@ $table->rowspan[0][0] = 2; // Set initial conditions for these controls, later will be modified by javascript if (!$enable_init_date) { $table->style[1] = 'display: none'; - $table->style[2] = 'display: ""'; + $table->style[2] = 'display: flex;align-items: baseline;'; $display_to = 'none'; $display_item = ''; } else { - $table->style[1] = 'display: ""'; - $table->style[2] = 'display: ""'; + $table->style[1] = 'display: "block"'; + $table->style[2] = 'display: flex;align-items: baseline;'; $display_to = ''; $display_item = 'none'; } @@ -210,11 +210,11 @@ if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { $table->data[0][1] .= ''; -$table->data[1][1] = '
'.__('From').':
'; +$table->data[1][1] = '
'.__('From').':
'; $table->data[1][1] .= html_print_input_text('date_init', $date_init, '', 12, 10, true).' '; $table->data[1][1] .= html_print_input_text('time_init', $time_init, '', 10, 7, true).' '; -$table->data[1][2] = '
'.__('Items period before').':
'; -$table->data[1][2] .= '
'.__('to').':
'; +$table->data[1][2] = '
'.__('Items period before').':
'; +$table->data[1][2] .= '
'.__('to').':
'; $table->data[1][2] .= html_print_input_text('date', $date, '', 12, 10, true).' '; $table->data[1][2] .= html_print_input_text('time', $time, '', 10, 7, true).' '; $table->data[1][2] .= html_print_submit_button(__('Update'), 'date_submit', false, 'class="sub next"', true); diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index cb72a91ecd..c7f69b4109 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -778,7 +778,7 @@ $table->headstyle[7] = 'text-align: center'; $table->head[8] = __('Action'); $table->align[8] = 'center'; $table->size[8] = '10%'; -$table->headstyle[8] = 'text-align: center'; +$table->headstyle[8] = 'min-width: 125px;text-align: center'; $table->head[9] = html_print_checkbox_extended( 'allbox', From ddf3b7a2588459f6a796d1490f4e7b362cd15a2a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 3 Jun 2019 11:21:44 +0200 Subject: [PATCH 023/206] Review 1 --- pandora_console/godmode/servers/servers.build_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 581cb2541f..77f6da7315 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -55,7 +55,7 @@ $table->align[8] = 'right'; $table->headstyle[1] = 'text-align:center'; $table->headstyle[3] = 'text-align:center'; -$table->headstyle[8] = 'text-align:right'; +$table->headstyle[8] = 'text-align:right;width: 120px;'; // $table->title = __('Tactical server information'); $table->titleclass = 'tabletitle'; From b4dcf4a6f118165e3a1d1b236b09608796c9921c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 3 Jun 2019 11:55:56 +0200 Subject: [PATCH 024/206] style review --- pandora_console/general/login_page.php | 1 + .../reporting/visual_console_builder.editor.php | 1 + .../godmode/update_manager/update_manager.css | 17 ----------------- pandora_console/include/chart_generator.php | 1 + pandora_console/include/functions_ui.php | 1 + .../include/functions_update_manager.php | 2 +- .../include/styles/js/jquery-ui_custom.css | 12 +++++++++++- pandora_console/include/styles/register.css | 6 ++++-- pandora_console/operation/agentes/stat_win.php | 1 + 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 880f1531a1..541efa96f4 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -518,6 +518,7 @@ if ($login_screen == 'error_authconfig' || $login_screen == 'error_emptyconfig' ui_require_css_file('dialog'); ui_require_css_file('jquery-ui.min', 'include/styles/js/'); ui_require_jquery_file('jquery-ui.min'); +ui_require_jquery_file('jquery-ui_custom'); ?> button.ui-button.ui-corner-all.ui-widget { - background-color: #cecece; - border: none; - border-radius: 2px; - text-transform: uppercase; - font-weight: bold; -} - -.ui-dialog-buttonset > button.success_button.ui-button.ui-corner-all.ui-widget, -.update_manager_button { - background-color: #82b92e; - color: #fff; - border-radius: 2px; - text-transform: uppercase; - font-weight: bold; -} - a.update_manager_button { padding: 10px 12px; margin-top: 10px; diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index e7133fd79e..2ae768d4fe 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -62,6 +62,7 @@ if (file_exists('languages/'.$user_language.'.mo')) { + diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index e2d5450759..066c9f947b 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1738,6 +1738,7 @@ function ui_process_page_head($string, $bitfield) // Add the jquery UI styles CSS. $config['css']['jquery-UI'] = 'include/styles/js/jquery-ui.min.css'; + $config['css']['jquery-UI-custom'] = 'include/styles/js/jquery-ui_custom.css'; // Add the dialog styles CSS. $config['css']['dialog'] = 'include/styles/dialog.css'; // Add the dialog styles CSS. diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php index cc148be7b9..73a654a50d 100755 --- a/pandora_console/include/functions_update_manager.php +++ b/pandora_console/include/functions_update_manager.php @@ -468,7 +468,7 @@ function registration_wiz_modal( __('Cancel'), 'cancel_registration', false, - 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel" style="color: red; width:100px;"', + 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel"', true ); $output .= ''; diff --git a/pandora_console/include/styles/js/jquery-ui_custom.css b/pandora_console/include/styles/js/jquery-ui_custom.css index 0dde42f6a8..a01f721aca 100644 --- a/pandora_console/include/styles/js/jquery-ui_custom.css +++ b/pandora_console/include/styles/js/jquery-ui_custom.css @@ -1,8 +1,19 @@ @import url(calendar.css); /* --- JQUERY-UI --- */ + +.ui-dialog .ui-corner-all .ui-widget { + border-radius: 0; + margin: 0; + padding: 0; + border: none; +} + .ui-dialog .ui-dialog-titlebar { background-color: #82b92e; + border-radius: 0; + margin: 0; + padding: 0; } /*center ui dialog center*/ @@ -38,7 +49,6 @@ text-overflow: ellipsis; font-size: 11pt; position: relative; - top: 5px; float: none; } .ui-dialog .ui-dialog-titlebar-close { diff --git a/pandora_console/include/styles/register.css b/pandora_console/include/styles/register.css index 798ef5e66e..ef0fdc6e1b 100644 --- a/pandora_console/include/styles/register.css +++ b/pandora_console/include/styles/register.css @@ -1,4 +1,5 @@ input[type="submit"].submit-cancel, +button.submit-cancel.ui-button.ui-corner-all.ui-widget, button.submit-cancel { color: #fb4444; border: 1px solid #fb4444; @@ -13,13 +14,14 @@ button.submit-cancel { } input[type="submit"].submit-cancel:hover, +button.submit-cancel.ui-button.ui-corner-all.ui-widget:hover, button.submit-cancel:hover { color: #fff; background: #fb4444; } input[type="submit"].submit-next, -button.submit-next, +button.submit-next.ui-button.ui-corner-all.ui-widget, input[type="button"].submit-next { color: #82b92e; border: 1px solid #82b92e; @@ -33,7 +35,7 @@ input[type="button"].submit-next { } input[type="submit"].submit-next:hover, -button.submit-next:hover, +button.submit-next.ui-button.ui-corner-all.ui-widget:hover, input[type="button"].submit-next:hover { color: #fff; background: #82b92e; diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 70af429f6d..8a063f940c 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -72,6 +72,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); <?php echo __('%s Graph', get_product_name()).' ('.$alias.' - '.$label; ?>) + From 13086b596ce345d33400bff04e8ac710380882fe Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 3 Jun 2019 13:04:49 +0200 Subject: [PATCH 025/206] Next contact --- .../agentes/estado_generalagente.php | 35 +++++++++++++++++++ .../operation/agentes/ver_agente.php | 25 +++++++++++++ 2 files changed, 60 insertions(+) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 360a7fd332..3632b6d2d7 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -739,6 +739,41 @@ if (!empty($network_interfaces)) { ?> '."\n\t"; - } - - /* - * End load JS - */ - /* * Load jQuery */ @@ -1883,6 +1842,47 @@ function ui_process_page_head($string, $bitfield) * End load JQuery */ + /* + * Load JS + */ + + if (empty($config['js'])) { + $config['js'] = []; + // If it's empty, false or not init set array to empty just in case. + } + + // Pandora specific JavaScript should go first. + $config['js'] = array_merge(['pandora' => 'include/javascript/pandora.js'], $config['js']); + // Load base64 javascript library. + $config['js']['base64'] = 'include/javascript/encode_decode_base64.js'; + // Load webchat javascript library. + $config['js']['webchat'] = 'include/javascript/webchat.js'; + // Load qrcode library. + $config['js']['qrcode'] = 'include/javascript/qrcode.js'; + // Load intro.js library (for bubbles and clippy). + $config['js']['intro'] = 'include/javascript/intro.js'; + $config['js']['clippy'] = 'include/javascript/clippy.js'; + // Load Underscore.js library. + $config['js']['underscore'] = 'include/javascript/underscore-min.js'; + + // Load other javascript. + // We can't load empty. + $loaded = ['']; + foreach ($config['js'] as $name => $filename) { + if (in_array($name, $loaded)) { + continue; + } + + array_push($loaded, $name); + + $url_js = ui_get_full_url($filename); + $output .= ''."\n\t"; + } + + /* + * End load JS + */ + include_once __DIR__.'/graphs/functions_flot.php'; $output .= include_javascript_dependencies_flot_graph(true); @@ -2760,6 +2760,346 @@ function ui_progress( } +/** + * Generate needed code to print a datatables jquery plugin. + * + * @param array $parameters All desired data using following format: + * [ + * 'print' => true (by default printed) + * 'id' => datatable id. + * 'class' => datatable class. + * 'style' => datatable style. + * 'order' => '9, "desc"'. Column index (starting by 1) and sort direction. + * 'ajax_url' => 'include/ajax.php' ajax_url. + * 'ajax_postprocess' => a javscript function to postprocess data received + * by ajax call. It is applied foreach row and must + * use following format: + * * [code] + * * function (item) { + * * // Process received item, for instance, name: + * * tmp = '' + item.name + ''; + * * item.name = tmp; + * * } + * * [/code] + * 'columns' => [ + * 'column1' :: Used as th text. Direct text entry. It could be array: + * OR + * [ + * 'id' => th id. + * 'class' => th class. + * 'style' => th style. + * 'text' => 'column1'. + * ] + * ], + * 'datacolumns' => [ + * 'column1', + * 'column2', + * ... + * ], + * 'form' => [ + * 'html' => 'html code' a directly defined inputs in HTML. + * 'search_button_class' => search button class. + * 'class' => form class. + * 'id' => form id. + * 'style' => form style. + * 'js' => optional extra actions onsubmit. + * 'inputs' => [ + * 'label' => Input label. + * 'type' => Input type. + * 'value' => Input value. + * 'name' => Input name. + * 'id' => Input id. + * 'options' => [ + * 'option1' + * 'option2' + * ... + * ] + * ] + * ], + * ] + * End. + * + * @return string HTML code with datatable. + * @throws Exception On error. + */ +function ui_print_datatable(array $parameters) +{ + if (isset($parameters['id'])) { + $table_id = $parameters['id']; + } else { + $table_id = uniqid('datatable_'); + } + + if (!isset($parameters['order'])) { + $parameters['order'] = '0, "asc"'; + } + + if (!isset($parameters['ajax_url'])) { + throw new Exception('Parameter ajax_url is required'); + } + + if (!isset($parameters['ajax_data'])) { + $parameters['ajax_data'] = ''; + } + + $search_button_class = 'sub search'; + if (isset($parameters['search_button_class'])) { + $search_button_class = $parameters['search_button_class']; + } + + if (isset($parameters['pagination_options'])) { + $pagination_options = $parameters['pagination_options']; + } else { + $pagination_options = [ + [ + 10, + 25, + 100, + 200, + 500, + 1000, + -1, + ], + [ + 10, + 25, + 100, + 200, + 500, + 1000, + 'All', + ], + ]; + } + + if (!is_array($parameters['datacolumns'])) { + $parameters['datacolumns'] = $parameters['columns']; + } + + // Datatable filter. + if (isset($parameters['form']) && is_array($parameters['form'])) { + if (isset($parameters['form']['id'])) { + $form_id = $parameters['form']['id']; + } else { + $form_id = uniqid('datatable_filter_'); + } + + if (isset($parameters['form']['class'])) { + $form_class = $parameters['form']['class']; + } else { + $form_class = ''; + } + + if (isset($parameters['form']['style'])) { + $form_style = $parameters['form']['style']; + } else { + $form_style = ''; + } + + if (isset($parameters['form']['js'])) { + $form_js = $parameters['form']['js']; + } else { + $form_js = ''; + } + + $filter = ''; + + if (isset($parameters['form']['html'])) { + $filter .= $parameters['form']['html']; + } + + $filter .= '
    '; + + foreach ($parameters['form']['inputs'] as $input) { + $filter .= '
  • '; + $filter .= ''; + if ($input['type'] != 'select') { + $filter .= ''; + } else { + // Select. + $filter .= ''; + } + + $filter .= '
  • '; + } + + // Search button. + $filter .= '
  • '; + $filter .= ''; + $filter .= '
  • '; + + $filter .= '
'; + $filter = ui_toggle( + $filter, + __('Filter'), + '', + '', + true, + false, + 'white_box white_box_opened', + 'no-border' + ); + } else if (isset($parameters['form_html'])) { + $filter = ui_toggle( + $parameters['form_html'], + __('Filter'), + '', + '', + true, + false, + 'white_box white_box_opened', + 'no-border' + ); + } + + if (!isset($parameters['columns']) || !is_array($parameters['columns'])) { + throw new Exception('[ui_print_datatable]: You must define columns for datatable'); + } + + // Base table. + $table = ''; + $table .= ''; + if (!is_array($parameters['columns'])) { + throw new Exception('[ui_print_datatable]: Parameter columns is required.'); + } + + foreach ($parameters['columns'] as $column) { + if (is_array($column)) { + $table .= ''; + } else { + $table .= ''; + } + } + + $table .= ''; + $table .= '
'.__($column['text']); + $table .= ''.__($column).'
'; + + // Javascript controller. + $js = ''; + + $output = $filter.$table.$js; + + ui_require_css_file('datatables.min', 'include/styles/js/'); + ui_require_javascript_file('datatables.min'); + ui_require_javascript_file('buttons.dataTables.min'); + ui_require_javascript_file('dataTables.buttons.min'); + ui_require_javascript_file('buttons.html5.min'); + ui_require_javascript_file('buttons.print.min'); + + $output = $include.$output; + + // Print datatable if needed. + if (!(isset($parameters['print']) && $parameters['print'] === false)) { + echo $output; + } + + return $output; +} + + /** * Returns a div wich represents the type received. * diff --git a/pandora_console/include/javascript/buttons.dataTables.min.js b/pandora_console/include/javascript/buttons.dataTables.min.js new file mode 100644 index 0000000000..90389767ac --- /dev/null +++ b/pandora_console/include/javascript/buttons.dataTables.min.js @@ -0,0 +1,5 @@ +/*! + DataTables styling wrapper for Buttons + ©2018 SpryMedia Ltd - datatables.net/license +*/ +(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-dt","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-dt")(a,b).$);b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable}); diff --git a/pandora_console/include/javascript/buttons.html5.min.js b/pandora_console/include/javascript/buttons.html5.min.js new file mode 100644 index 0000000000..deee7fee68 --- /dev/null +++ b/pandora_console/include/javascript/buttons.html5.min.js @@ -0,0 +1,35 @@ +/*! + HTML5 export buttons for Buttons and DataTables. + 2016 SpryMedia Ltd - datatables.net/license + + FileSaver.js (1.3.3) - MIT license + Copyright © 2016 Eli Grey - http://eligrey.com +*/ +(function(f){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(g){return f(g,window,document)}):"object"===typeof exports?module.exports=function(g,p,z,t){g||(g=window);p&&p.fn.dataTable||(p=require("datatables.net")(g,p).$);p.fn.dataTable.Buttons||require("datatables.net-buttons")(g,p);return f(p,g,g.document,z,t)}:f(jQuery,window,document)})(function(f,g,p,z,t,w){function A(a){for(var b="";0<=a;)b=String.fromCharCode(a%26+65)+b,a=Math.floor(a/ +26)-1;return b}function E(a,b){y===w&&(y=-1===C.serializeToString(f.parseXML(F["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r"));f.each(b,function(b,c){if(f.isPlainObject(c))b=a.folder(b),E(b,c);else{if(y){var d=c.childNodes[0],e,h=[];for(e=d.attributes.length-1;0<=e;e--){var m=d.attributes[e].nodeName;var k=d.attributes[e].nodeValue;-1!==m.indexOf(":")&&(h.push({name:m,value:k}),d.removeAttribute(m))}e=0;for(m=h.length;e'+c),c=c.replace(/_dt_b_namespace_token_/g,":"),c=c.replace(/xmlns:NS[\d]+="" NS[\d]+:/g,""));c=c.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a.file(b,c)}})}function r(a,b,d){var c=a.createElement(b);d&&(d.attr&&f(c).attr(d.attr),d.children&&f.each(d.children,function(a,b){c.appendChild(b)}),null!==d.text&&d.text!==w&&c.appendChild(a.createTextNode(d.text))); +return c}function L(a,b){var d=a.header[b].length;a.footer&&a.footer[b].length>d&&(d=a.footer[b].length);for(var c=0,f=a.body.length;cd&&(d=e);if(401*a[1]?!0:!1};try{var C=new XMLSerializer,y}catch(a){}var F={"_rels/.rels":'', +"xl/_rels/workbook.xml.rels":'',"[Content_Types].xml":'', +"xl/workbook.xml":'', +"xl/worksheets/sheet1.xml":'',"xl/styles.xml":''}, +K=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(a){return a/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(a){return a/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63}, +{match:/^\-?[\d,]+\.\d{2}$/,style:64}];v.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,d,c){this.processing(!0);var g=this;a=I(b,c);var e=b.buttons.exportInfo(c),h=H(c),m=a.str;d=f("
").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});e.title&&(m=e.title+h+h+m);e.messageTop&&(m=e.messageTop+h+h+m);e.messageBottom&&(m=m+h+h+e.messageBottom);c.customize&&(m=c.customize(m,c,b));c=f("",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w(" '; - - echo ''; - - echo '
'; - // Floating menu - End. - ui_require_jquery_file('countdown'); } // Error div for ajax messages. @@ -627,570 +355,293 @@ echo "
"; echo '
'; -if (($section == 'validate') && ($ids[0] == -1)) { - $section = 'list'; - ui_print_error_message(__('No events selected')); +// Controls. +if (is_metaconsole() !== true) { + if (isset($config['event_replication']) + && $config['event_replication'] == 1 + ) { + if ($config['show_events_in_local'] == 0) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access event viewer. View disabled due event replication.' + ); + ui_print_info_message( + [ + 'message' => __( + 'Event viewer is disabled due event replication. For more information, please contact with the administrator' + ), + 'no_close' => true, + ] + ); + return; + } else { + $readonly = true; + } + } } -// Process validation (pass array or single value). -if ($validate) { - $ids = get_parameter('eventid', -1); - $comment = get_parameter('comment', ''); - $new_status = get_parameter('select_validate', 1); - $ids = explode(',', $ids); - $standby_alert = (bool) get_parameter('standby-alert'); +// Load filter form. +// Group. +$user_groups_array = users_get_groups_for_select( + $config['id_user'], + $access, + true, + true, + false +); +$data = html_print_select( + $user_groups_array, + 'id_group_filter', + $id_group_filter, + '', + '', + 0, + true, + false, + false, + 'w130' +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Event type. +$types = get_event_types(); +$types['not_normal'] = __('Not normal'); +$data = html_print_select( + $types, + 'event_type', + $event_type, + '', + __('All'), + '', + true +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Criticity - severity. +$severity_select .= html_print_select( + get_priorities(), + 'severity', + $severity, + '', + __('All'), + '-1', + true, + false, + false +); +$in = '
'; +$in .= $severity_select.'
'; +$inputs[] = $in; + +// Event status. +$data = html_print_select( + events_get_all_status(), + 'status', + $status, + '', + '', + '', + true +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Max hours old. +$data = html_print_input_text( + 'event_view_hr', + $event_view_hr, + '', + 5, + 255, + true +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Duplicates group { events | agents }. +$data = html_print_select( + [ + __('All events'), + __('Group events'), + __('Group agents'), + ], + 'group_rep', + $group_rep, + '', + '', + 0, + true +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Source. +$data = html_print_input_text('source', $source, '', 35, 255, true); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + + +// Extra ID. +$data = html_print_input_text('id_extra', $id_extra, '', 11, 255, true); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Comment. +$data = html_print_input_text( + 'user_comment', + $user_comment, + '', + 35, + 255, + true +); +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + + +// Advanced filter. +$adv_filter = ''; + +// Load view. +$filter = join('', $inputs); +$filter .= ui_toggle( + $adv_filter, + __('Advanced options'), + '', + '', + true, + true, + 'white_box white_box_opened', + 'no-border' +); + +try { + ui_print_datatable( + [ + 'id' => 'events', + 'class' => 'info_table', + 'style' => 'width: 100%;', + 'ajax_url' => 'operation/events/events', + 'ajax_data' => ['get_events' => 1], + 'pagination_options' => [ + [ + $config['block_size'], + 10, + 25, + 100, + 200, + 500, + 1000, + -1, + ], + [ + $config['block_size'], + 10, + 25, + 100, + 200, + 500, + 1000, + 'All', + ], + ], + 'form' => [ + 'class' => 'flex-row', + 'html' => $filter, + 'inputs' => [], + ], + 'columns' => [ + 'id_evento', + 'id_agente', + // 'id_usuario', + // 'id_grupo', + // 'estado', + 'evento', + 'agent_name', + 'timestamp', + // 'utimestamp', + // 'event_type', + // 'id_agentmodule', + // 'id_alert_am', + 'criticity', + 'user_comment', + 'tags', + // 'source', + // 'id_extra', + // 'critical_instructions', + // 'warning_instructions', + // 'unknown_instructions', + // 'owner_user', + // 'ack_utimestamp', + // 'custom_data', + // 'data', + // 'module_status', + // 'similar_ids', + // 'event_rep', + // 'timestamp_rep', + // 'timestamp_rep_min', + // 'module_name', + ], + 'ajax_postprocess' => ' + function (item) { + item.id_evento = "#"+item.id_evento; + var color = "'.COL_UNKNOWN.'"; + var text = "UNKNOWN"; + switch (item.criticity) { + case "'.EVENT_CRIT_CRITICAL.'": + text = "CRITICAL"; + color = "'.COL_CRITICAL.'"; + break; + + case "'.EVENT_CRIT_MAINTENANCE.'": + text = "MAINTENANCE"; + color = "'.COL_MAINTENANCE.'"; + break; + + case "'.EVENT_CRIT_INFORMATIONAL.'": + text = "INFORMATIONAL"; + color = "'.COL_INFORMATIONAL.'"; + break; + + case "'.EVENT_CRIT_MAJOR.'": + text = "MAJOR"; + color = "'.COL_MAJOR.'"; + break; + + case "'.EVENT_CRIT_MINOR.'": + text = "MINOR"; + color = "'.COL_MINOR.'"; + break; + + case "'.EVENT_CRIT_NORMAL.'": + text = "NORMAL"; + color = "'.COL_NORMAL.'"; + break; + + case "'.EVENT_CRIT_WARNING.'": + text = "WARNING"; + color = "'.COL_WARNING.'"; + break; - // Avoid to re-set inprocess events. - if ($new_status == 2) { - foreach ($ids as $key => $id) { - $event = events_get_event($id); - if ($event['estado'] == 2) { - unset($ids[$key]); } - } - } - - if (isset($ids[0]) && $ids[0] != -1) { - $return = events_change_status($ids, $new_status, $meta); - - if ($new_status == 1) { - ui_print_result_message( - $return, - __('Successfully validated'), - __('Could not be validated') - ); - } else if ($new_status == 2) { - ui_print_result_message( - $return, - __('Successfully set in process'), - __('Could not be set in process') - ); - } - } -} - -// Process deletion (pass array or single value). -if ($delete) { - $ids = (array) get_parameter('validate_ids', -1); - - // Discard deleting in progress events. - $in_process_status = db_get_all_rows_sql( - ' - SELECT id_evento - FROM tevento - WHERE estado=2' + item.criticity = \'
\' + text + "
"; + }', + ] ); - - foreach ($in_process_status as $val) { - if (($key = array_search($val['id_evento'], $ids)) !== false) { - unset($ids[$key]); - } - } - - if ($ids[0] != -1) { - $return = events_delete_event($ids, ($group_rep == 1), $meta); - ui_print_result_message( - $return, - __('Successfully deleted'), - __('Could not be deleted') - ); - } - - include_once $config['homedir'].'/operation/events/events_list.php'; -} else { - switch ($section) { - case 'list': - case 'history': - include_once $config['homedir'].'/operation/events/events_list.php'; - break; - } +} catch (Exception $e) { + ui_print_error_message($e->getMessage()); } -echo "
"; -echo "
"; -echo "
"; - -ui_require_jquery_file('bgiframe'); -ui_require_javascript_file('pandora_events'); +// Close viewer. enterprise_hook('close_meta_frame'); -ui_require_javascript_file('wz_jsgraphics'); -ui_require_javascript_file('pandora_visual_console'); - -$ignored_params['refresh'] = ''; -?> - \ No newline at end of file From 419a90d69c3f5615b70c11981968ab496a0e0b4d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 7 Jun 2019 17:35:13 +0200 Subject: [PATCH 046/206] wip event list --- pandora_console/include/functions.php | 41 ++ pandora_console/include/functions_events.php | 27 +- pandora_console/include/functions_html.php | 45 +- pandora_console/include/functions_ui.php | 63 +- pandora_console/include/styles/events.css | 104 +++- pandora_console/include/styles/pandora.css | 4 + pandora_console/operation/events/events.php | 610 +++++++++++++++++-- 7 files changed, 808 insertions(+), 86 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index f299153da6..991f5ccfcc 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -902,6 +902,47 @@ function set_cookie($name, $value) } +/** + * Returns database ORDER clause from datatables AJAX call. + * + * @param boolean $as_array Return as array or as string. + * + * @return string Order or empty. + */ +function get_datatable_order($as_array=false) +{ + $order = get_parameter('order'); + + if (is_array($order)) { + $column = $order[0]['column']; + $direction = $order[0]['dir']; + } + + if (!isset($column) || !isset($direction)) { + return ''; + } + + $columns = get_parameter('columns'); + + if (is_array($columns)) { + $column_name = $columns[$column]['data']; + } + + if (!isset($column_name)) { + return ''; + } + + if ($as_array) { + return [ + 'direction' => $direction, + 'field' => $column_name, + ]; + } + + return $column_name.' '.$direction; +} + + /** * Get a parameter from a request. * diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 411267aa2c..f082f8611a 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -69,6 +69,22 @@ function events_get_all_fields() } +/** + * Creates SQL from filter (array) options. + * + * @param array $filter Filters. + * + * @return string DB sql filter for where clause. + */ +function events_sql_db_filter($filter) +{ + if (!isset($filter) || is_array($filter)) { + return ''; + } + +} + + /** * Get all rows of events from the database, that * pass the filter, and can get only some fields. @@ -251,7 +267,8 @@ function events_get_events_grouped( (SELECT criticity FROM %s WHERE id_evento = MAX(te.id_evento)) AS criticity, (SELECT ack_utimestamp FROM %s WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, (SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name, - (SELECT alias FROM tagente WHERE id_agente = te.id_agente) agent_name + (SELECT alias FROM tagente WHERE id_agente = te.id_agente) agent_name, + te.id_agente FROM %s te %s WHERE 1=1 %s GROUP BY estado, evento, id_agente, id_agentmodule %s ', @@ -5321,11 +5338,15 @@ function events_get_sql_order($sort_field='timestamp', $sort='DESC', $group_rep= break; default: - // Ignore. + $sort_field_translated = $sort_field; break; } - $dir = ($sort == 'up') ? 'ASC' : 'DESC'; + if (strtolower($sort) != 'asc' && strtolower($sort) != 'desc') { + $dir = ($sort == 'up') ? 'ASC' : 'DESC'; + } else { + $dir = $sort; + } return 'ORDER BY '.$sort_field_translated.' '.$dir; } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index c63ce23d3a..6fe4e7a043 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1241,7 +1241,9 @@ function html_print_input_text_extended($name, $value, $id, $alt, $size, $maxlen $maxlength = 255; } - if ($size == 0) { + if ($size === false) { + $size = ''; + } else if ($size == 0) { $size = 10; } @@ -1441,7 +1443,9 @@ function html_print_input_password( $maxlength = 255; } - if ($size == 0) { + if ($size === false) { + $size = false; + } else if ($size == 0) { $size = 10; } @@ -1479,7 +1483,9 @@ function html_print_input_text($name, $value, $alt='', $size=50, $maxlength=255, $maxlength = 255; } - if ($size == 0) { + if ($size === false) { + $size = false; + } else if ($size == 0) { $size = 10; } @@ -2730,20 +2736,22 @@ function html_html2rgb($htmlcolor) /** * Print a magic-ajax control to select the module. * - * @param string $name The name of ajax control, by default is "module". - * @param string $default The default value to show in the ajax control. - * @param array $id_agents The array list of id agents as array(1,2,3), by default is false and the function use all agents (if the ACL desactive). - * @param boolean $ACL Filter the agents by the ACL list of user. - * @param string $scriptResult The source code of script to call, by default is - * empty. And the example is: - * function (e, data, formatted) { - * ... - * } + * @param string $name The name of ajax control, by default is "module". + * @param string $default The default value to show in the ajax control. + * @param array $id_agents The array list of id agents as array(1,2,3), by default is false and the function use all agents (if the ACL desactive). + * @param boolean $ACL Filter the agents by the ACL list of user. + * @param string $scriptResult The source code of script to call, by default is + * empty. And the example is: + * function (e, data, formatted) { + * ... + * } * - * And the formatted is the select item as string. + * And the formatted is the select item as string. * - * @param array $filter Other filter of modules. - * @param boolean $return If it is true return a string with the output instead to echo the output. + * @param array $filter Other filter of modules. + * @param boolean $return If it is true return a string with the output instead to echo the output. + * @param integer $id_agent_module Id agent module. + * @param string $size Size. * * @return mixed If the $return is true, return the output as string. */ @@ -2755,7 +2763,8 @@ function html_print_autocomplete_modules( $scriptResult='', $filter=[], $return=false, - $id_agent_module=0 + $id_agent_module=0, + $size='30' ) { global $config; @@ -2796,7 +2805,7 @@ function html_print_autocomplete_modules( $default, 'text-'.$name, '', - 30, + $size, 100, false, '', @@ -3055,4 +3064,4 @@ function html_print_link_with_params($text, $params=[], $type='text', $style='') $html .= ''; return $html; -} \ No newline at end of file +} diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 17519d8eed..827a432b1a 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2769,8 +2769,13 @@ function ui_progress( * 'id' => datatable id. * 'class' => datatable class. * 'style' => datatable style. - * 'order' => '9, "desc"'. Column index (starting by 1) and sort direction. + * 'order' => [ + * 'field' => column name + * 'direction' => asc or desc + * ], + * 'default_pagination' => integer, default pagination is set to block_size * 'ajax_url' => 'include/ajax.php' ajax_url. + * 'ajax_data' => [ operation => 1 ] extra info to be sent. * 'ajax_postprocess' => a javscript function to postprocess data received * by ajax call. It is applied foreach row and must * use following format: @@ -2781,7 +2786,7 @@ function ui_progress( * * item.name = tmp; * * } * * [/code] - * 'columns' => [ + * 'columns_names' => [ * 'column1' :: Used as th text. Direct text entry. It could be array: * OR * [ @@ -2791,7 +2796,7 @@ function ui_progress( * 'text' => 'column1'. * ] * ], - * 'datacolumns' => [ + * 'columns' => [ * 'column1', * 'column2', * ... @@ -2824,18 +2829,43 @@ function ui_progress( */ function ui_print_datatable(array $parameters) { + global $config; + if (isset($parameters['id'])) { $table_id = $parameters['id']; } else { $table_id = uniqid('datatable_'); } - if (!isset($parameters['order'])) { - $parameters['order'] = '0, "asc"'; + if (!isset($parameters['columns']) || !is_array($parameters['columns'])) { + throw new Exception('[ui_print_datatable]: You must define columns for datatable'); } if (!isset($parameters['ajax_url'])) { - throw new Exception('Parameter ajax_url is required'); + throw new Exception('[ui_print_datatable]: Parameter ajax_url is required'); + } + + if (!isset($parameters['default_pagination'])) { + $parameters['default_pagination'] = $config['block_size']; + } + + if (!is_array($parameters['order'])) { + $order = '0, "asc"'; + } else { + if (!isset($parameters['order']['direction'])) { + $direction = 'asc'; + } + + if (!isset($parameters['order']['field'])) { + $order = 1; + } else { + $order = array_search( + $parameters['order']['field'], + $parameters['columns'] + ); + } + + $order .= ', "'.$parameters['order']['direction'].'"'; } if (!isset($parameters['ajax_data'])) { @@ -2852,6 +2882,7 @@ function ui_print_datatable(array $parameters) } else { $pagination_options = [ [ + $parameters['default_pagination'], 10, 25, 100, @@ -2861,6 +2892,7 @@ function ui_print_datatable(array $parameters) -1, ], [ + $parameters['default_pagination'], 10, 25, 100, @@ -2970,20 +3002,21 @@ function ui_print_datatable(array $parameters) ); } - if (!isset($parameters['columns']) || !is_array($parameters['columns'])) { - throw new Exception('[ui_print_datatable]: You must define columns for datatable'); - } - // Base table. $table = ''; $table .= ''; - if (!is_array($parameters['columns'])) { - throw new Exception('[ui_print_datatable]: Parameter columns is required.'); + + if (isset($parameters['column_names']) + && is_array($parameters['column_names']) + ) { + $names = $parameters['column_names']; + } else { + $names = $parameters['columns']; } - foreach ($parameters['columns'] as $column) { + foreach ($names as $column) { if (is_array($column)) { $table .= ''; $table .= '
'.__($column['text']); @@ -3004,7 +3037,7 @@ function ui_print_datatable(array $parameters) processing: true, serverSide: true, paging: true, - pageLength: 10, + pageLength: '.$parameters['default_pagination'].', searching: false, responsive: true, dom: "lBfrtip", @@ -3071,7 +3104,7 @@ function ui_print_datatable(array $parameters) $js .= ' ], - order: [[ '.$parameters['order'].' ]] + order: [[ '.$order.' ]] }); $("#'.$form_id.'_search_bt").click(function (){ diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 61379d2641..648f8a706e 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -19,8 +19,16 @@ div.mini-criticity { display: inline-block; } -form.flex-row > div.filter_input, -form.flex-row > ul { +div.mini-criticity.h100p { + height: 100%; +} + +.flex-row.event { + align-items: center; +} + +form.flex-row div.filter_input, +form.flex-row ul { width: 30%; min-width: 300px; display: flex; @@ -28,16 +36,40 @@ form.flex-row > ul { align-items: baseline; flex-wrap: wrap; align-content: center; + justify-content: space-between; flex: 1; - - margin: 1em 0.3em; + margin: 0.5em 3em 0.5em 0; } + +div.filter_input_little { + flex: 1; + display: flex; + flex-direction: row; + align-items: baseline; + flex-wrap: nowrap; + margin: 0.5em 0 0.5em 1em; +} + +form.flex-row div.filter_input.large { + flex: 1; + min-width: 650px; +} + +div.filter_input > label, +div.filter_input_little > label { + width: 10em; +} + form.flex-row > ul, form.flex-row > ul > li, form.flex-row > .box-shadow.white_table_graph { width: 100%; } +form.flex-row > .box-shadow.white_table_graph { + margin-top: 2em; +} + form.flex-row > ul input[type="submit"] { float: right; } @@ -45,3 +77,67 @@ form.flex-row > ul input[type="submit"] { form.flex-row > div > label { margin-right: 1em; } + +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} + +.info_table.events tr > th { + padding-left: 1em; + font-size: 1.3em; + font-weight: 400; + border-bottom: 2px solid #878787; + cursor: pointer; +} + +.info_table.events tr > td { + height: 2.5em; +} + +.sorting_desc { + background: url(http://localhost/pandora_console/images/sort_down_green.png) + no-repeat; + background-position-x: left; + background-position-y: center; +} +.sorting_asc { + background: url(http://localhost/pandora_console/images/sort_up_green.png) + no-repeat; + background-position-x: left; + background-position-y: center; +} + +.info_table.events > tbody > tr > td { + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border: none; + padding-left: 0px; + padding-right: 9px; + padding-top: 7px; + padding-bottom: 7px; + border-bottom: 2px solid #dedede; +} + +.info_table.events tr > td:first-child { + padding-left: 5px; + padding-top: 0; + vertical-align: middle; + padding-bottom: 0; +} + +.filter_input { + align-items: center; +} + +.filter_input_little > select, +.filter_input_little > input, +.filter_input > select, +.filter_input > input { + flex: 1; +} + +fieldset { + margin: 0 auto; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 88122fbe94..5034d60069 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -504,6 +504,10 @@ select:-internal-list-box { align-content: center; } +.nowrap { + flex-wrap: nowrap; +} + .padding-2 { padding: 2em; } diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 59f5c0bebb..606eab7804 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -80,10 +80,7 @@ $event_view_hr = get_parameter('filter[event_view_hr]', 8); $id_user_ack = get_parameter('filter[id_user_ack]'); $group_rep = get_parameter('filter[group_rep]'); $tag_with = get_parameter('filter[tag_with]', io_json_mb_encode([])); -$tag_without = get_parameter( - 'filter[tag_without]', - io_json_mb_encode([]) -); +$tag_without = get_parameter('filter[tag_without]', io_json_mb_encode([])); $filter_only_alert = get_parameter('filter[filter_only_alert]'); $id_group_filter = get_parameter('filter[id_group_filter]'); $date_from = get_parameter('filter[date_from]'); @@ -92,6 +89,182 @@ $source = get_parameter('filter[source]'); $id_extra = get_parameter('filter[id_extra]'); $user_comment = get_parameter('filter[user_comment]'); + +// TAGS. +$tags_select_with = []; +$tags_select_without = []; +$tag_with_temp = []; +$tag_without_temp = []; +foreach ($tags as $id_tag => $tag) { + if ((array_search($id_tag, $tag_with) === false) + || (array_search($id_tag, $tag_with) === null) + ) { + $tags_select_with[$id_tag] = ui_print_truncate_text($tag, 50, true); + } else { + $tag_with_temp[$id_tag] = ui_print_truncate_text($tag, 50, true); + } + + if ((array_search($id_tag, $tag_without) === false) + || (array_search($id_tag, $tag_without) === null) + ) { + $tags_select_without[$id_tag] = ui_print_truncate_text($tag, 50, true); + } else { + $tag_without_temp[$id_tag] = ui_print_truncate_text($tag, 50, true); + } +} + +$add_with_tag_disabled = empty($tags_select_with); +$remove_with_tag_disabled = empty($tag_with_temp); +$add_without_tag_disabled = empty($tags_select_without); +$remove_without_tag_disabled = empty($tag_without_temp); + +$tabletags_with = html_get_predefined_table('transparent', 2); +$tabletags_with->id = 'filter_events_tags_with'; +$tabletags_with->width = '100%'; +$tabletags_with->cellspacing = 4; +$tabletags_with->cellpadding = 4; +$tabletags_with->class = 'noshadow'; +$tabletags_with->styleTable = 'border: 0px;'; +if (defined('METACONSOLE')) { + $tabletags_with->class = 'nobady'; + $tabletags_with->cellspacing = 0; + $tabletags_with->cellpadding = 0; +} + + +$data = []; + +$data[0] = html_print_select( + $tags_select_with, + 'select_with', + '', + '', + '', + 0, + true, + true, + true, + '', + false, + 'width: 200px;' +); + +$data[1] = html_print_image( + 'images/darrowright.png', + true, + [ + '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, + [ + 'id' => 'button-remove_with', + 'style' => 'cursor: pointer;', + 'title' => __('Remove'), + ] +); + +$data[2] = html_print_select( + $tag_with_temp, + 'tag_with_temp', + [], + '', + '', + 0, + true, + true, + true, + '', + false, + 'width: 200px;' +); + +$tabletags_with->data[] = $data; +$tabletags_with->rowclass[] = ''; + + +$tabletags_without = html_get_predefined_table('transparent', 2); +$tabletags_without->id = 'filter_events_tags_without'; +$tabletags_without->width = '100%'; +$tabletags_without->cellspacing = 4; +$tabletags_without->cellpadding = 4; +$tabletags_without->class = 'noshadow'; +if (defined('METACONSOLE')) { + $tabletags_without->class = 'nobady'; + $tabletags_without->cellspacing = 0; + $tabletags_without->cellpadding = 0; +} + +$tabletags_without->styleTable = 'border: 0px;'; + +$data = []; +$data[0] = html_print_select( + $tags_select_without, + 'select_without', + '', + '', + '', + 0, + true, + true, + true, + '', + false, + 'width: 200px;' +); +$data[1] = html_print_image( + 'images/darrowright.png', + true, + [ + '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, + [ + 'id' => 'button-remove_without', + 'style' => 'cursor: pointer;', + 'title' => __('Remove'), + ] +); +$data[2] = html_print_select( + $tag_without_temp, + 'tag_without_temp', + [], + '', + '', + 0, + true, + true, + true, + '', + false, + 'width: 200px;' +); +$tabletags_without->data[] = $data; +$tabletags_without->rowclass[] = ''; + + +// END OF TAGS. // Datatables offset, limit. $start = get_parameter('start', 0); $length = get_parameter('length', $config['block_size']); @@ -111,8 +284,11 @@ if (is_ajax()) { $update_event_filter = get_parameter('update_event_filter', 0); $get_event_filters = get_parameter('get_event_filters', 0); $get_events = get_parameter('get_events', 0); + $filter = get_parameter('filter', []); if ($get_events) { + $order = get_datatable_order(true); + $sql_post = ' AND te.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL '.$event_view_hr.' hour)'; $events = events_get_events_grouped( // Sql_post. @@ -126,7 +302,13 @@ if (is_ajax()) { // History. false, // Total. - false + false, + // History db. + false, + // Order. + $order['direction'], + // Sort field. + $order['field'] ); if ($events) { @@ -380,7 +562,10 @@ if (is_metaconsole() !== true) { } } -// Load filter form. +/* + * Load filter form. + */ + // Group. $user_groups_array = users_get_groups_for_select( $config['id_user'], @@ -483,7 +668,7 @@ $in .= $data.''; $inputs[] = $in; // Source. -$data = html_print_input_text('source', $source, '', 35, 255, true); +$data = html_print_input_text('source', $source, '', '', 255, true); $in = '
'; $in .= $data.'
'; $inputs[] = $in; @@ -500,7 +685,7 @@ $data = html_print_input_text( 'user_comment', $user_comment, '', - 35, + '', 255, true ); @@ -509,10 +694,229 @@ $in .= $data.''; $inputs[] = $in; -// Advanced filter. -$adv_filter = ''; +/* + * Advanced filter. + */ + +$adv_inputs = []; + +// Free search. +$data = html_print_input_text('search', $search, '', '', 255, true); +$in = '
'; +$in .= $data.'
'; +$adv_inputs[] = $in; + +// Agent search. +$params = []; +$params['show_helptip'] = true; +$params['input_name'] = 'text_agent'; +$params['value'] = $text_agent; +$params['return'] = true; + +if ($meta) { + $params['javascript_page'] = 'enterprise/meta/include/ajax/events.ajax'; +} + +$params['print_hidden_input_idagent'] = true; +$params['hidden_input_idagent_name'] = 'id_agent'; +$params['hidden_input_idagent_value'] = $id_agent; +$params['size'] = ''; + +$data = ui_print_agent_autocomplete_input($params); +$in = '
'; +$in .= $data.'
'; +$adv_inputs[] = $in; + +// Mixed. Metaconsole => server, Console => module. +if (is_metaconsole()) { + $title = __('Server'); + $data = html_print_select_from_sql( + 'SELECT id, server_name FROM tmetaconsole_setup', + 'server_id', + $server_id, + 'script', + __('All'), + '0', + true + ); +} else { + $title = __('Module search'); + $data = html_print_autocomplete_modules( + 'module_search', + $text_module, + false, + true, + '', + [], + true, + $id_agent_module, + '' + ); +} + +$in = '
'; +$in .= $data.'
'; +$adv_inputs[] = $in; + +// User ack. +$user_users = users_get_user_users( + $config['id_user'], + $access, + users_can_manage_group_all() +); + +$data = html_print_select( + $user_users, + 'id_user_ack', + $id_user_ack, + '', + __('Any'), + 0, + true +); +$in = '
'; +$in .= $data.'
'; +$adv_inputs[] = $in; + +// Only alert events. +$data = html_print_select( + [ + '-1' => __('All'), + '0' => __('Filter alert events'), + '1' => __('Only alert events'), + ], + 'filter_only_alert', + $filter_only_alert, + '', + '', + '', + true +); +$in = '
'; +$in .= $data.'
'; +$adv_inputs[] = $in; + +// Gap. +$adv_inputs[] = '
'; + +// Date from. +$data = html_print_input_text( + 'date_from', + $date_from, + '', + false, + 10, + true, + // Disabled. + false, + // Required. + false, + // Function. + '', + // Class. + '', + // OnChange. + '', + // Autocomplete. + 'off' +); +$in = '
'; +$in .= '
'; +$in .= $data.'
'; + +// Time from. +$data = html_print_input_text( + 'time_from', + $time_from, + '', + false, + 10, + true, + // Disabled. + false, + // Required. + false, + // Function. + '', + // Class. + '', + // OnChange. + '', + // Autocomplete. + 'off' +); +$in .= '
'; +$in .= $data.'
'; +$in .= '
'; +$adv_inputs[] = $in; + +// Date to. +$data = html_print_input_text( + 'date_to', + $date_to, + '', + false, + 10, + true, + // Disabled. + false, + // Required. + false, + // Function. + '', + // Class. + '', + // OnChange. + '', + // Autocomplete. + 'off' +); +$in = '
'; +$in .= '
'; +$in .= $data.'
'; + +// Time to. +$data = html_print_input_text( + 'time_to', + $time_to, + '', + false, + 10, + true, + // Disabled. + false, + // Required. + false, + // Function. + '', + // Class. + '', + // OnChange. + '', + // Autocomplete. + 'off' +); +$in .= '
'; +$in .= $data.'
'; +$in .= '
'; +$adv_inputs[] = $in; + + +// Tags. +if (is_metaconsole()) { + $data = '
'.__('Events with following tags').''.html_print_table($tabletags_with, true).'
'; + $data .= '
'.__('Events without following tags').''.html_print_table($tabletags_without, true).'
'; +} else { + $data = '
'.__('Events with following tags').''.html_print_table($tabletags_with, true).'
'; + $data .= '
'.__('Events without following tags').''.html_print_table($tabletags_without, true).'
'; +} + +$in = '
'; +$in .= $data.'
'; +$adv_inputs[] = $in; // Load view. +$adv_filter = join('', $adv_inputs); $filter = join('', $inputs); $filter .= ui_toggle( $adv_filter, @@ -522,14 +926,55 @@ $filter .= ui_toggle( true, true, 'white_box white_box_opened', - 'no-border' + 'no-border flex-row' ); try { + $column_names = [ + __('Event'), + __('Event ID'), + __('Agent name'), + __('Timestamp'), + __('Severity'), + __('Options'), + ]; + $fields = [ + 'evento', + 'id_evento', + // 'id_agente', + // 'id_usuario', + // 'id_grupo', + // 'estado', + 'agent_name', + 'timestamp', + // 'utimestamp', + // 'event_type', + // 'id_agentmodule', + // 'id_alert_am', + 'event_type', + // 'user_comment', + // 'tags', + // 'source', + // 'id_extra', + // 'critical_instructions', + // 'warning_instructions', + // 'unknown_instructions', + // 'owner_user', + // 'ack_utimestamp', + // 'custom_data', + // 'data', + // 'module_status', + // 'similar_ids', + // 'event_rep', + // 'timestamp_rep', + // 'timestamp_rep_min', + // 'module_name', + 'options', + ]; ui_print_datatable( [ 'id' => 'events', - 'class' => 'info_table', + 'class' => 'info_table events', 'style' => 'width: 100%;', 'ajax_url' => 'operation/events/events', 'ajax_data' => ['get_events' => 1], @@ -560,38 +1005,12 @@ try { 'html' => $filter, 'inputs' => [], ], - 'columns' => [ - 'id_evento', - 'id_agente', - // 'id_usuario', - // 'id_grupo', - // 'estado', - 'evento', - 'agent_name', - 'timestamp', - // 'utimestamp', - // 'event_type', - // 'id_agentmodule', - // 'id_alert_am', - 'criticity', - 'user_comment', - 'tags', - // 'source', - // 'id_extra', - // 'critical_instructions', - // 'warning_instructions', - // 'unknown_instructions', - // 'owner_user', - // 'ack_utimestamp', - // 'custom_data', - // 'data', - // 'module_status', - // 'similar_ids', - // 'event_rep', - // 'timestamp_rep', - // 'timestamp_rep_min', - // 'module_name', + 'order' => [ + 'field' => 'timestamp', + 'direction' => 'desc', ], + 'column_names' => $column_names, + 'columns' => $fields, 'ajax_postprocess' => ' function (item) { item.id_evento = "#"+item.id_evento; @@ -632,10 +1051,78 @@ try { text = "WARNING"; color = "'.COL_WARNING.'"; break; - } - item.criticity = \'
\' + text + "
"; + output = \'
\'; + output += \'
\'; + + evn = \'
\'; + evn += \'
\'+item.evento+\'
\'; + evn += output; + evn += \'
\' + + item.evento = evn; + + + // Event type. + switch (item.event_type) { + case "'.EVENTS_ALERT_FIRED.'": + case "'.EVENTS_ALERT_RECOVERED.'": + case "'.EVENTS_ALERT_CEASED.'": + case "'.EVENTS_ALERT_MANUAL_VALIDATION.'": + text = "'.__('ALERT').'"; + color = "'.COL_ALERTFIRED.'"; + break; + + case "'.EVENTS_RECON_HOST_DETECTED.'": + case "'.EVENTS_SYSTEM.'": + case "'.EVENTS_ERROR.'": + case "'.EVENTS_NEW_AGENT.'": + case "'.EVENTS_CONFIGURATION_CHANGE.'": + text = "'.__('SYSTEM').'"; + color = "'.COL_MAINTENANCE.'"; + break; + + case "'.EVENTS_GOING_UP_WARNING.'": + case "'.EVENTS_GOING_DOWN_WARNING.'": + $tex = "'.__('WARNING').'"; + color = "'.COL_WARNING.'"; + break; + + case "'.EVENTS_GOING_DOWN_NORMAL.'": + case "'.EVENTS_GOING_UP_NORMAL.'": + text = "'.__('NORMAL').'"; + color = "'.COL_NORMAL.'"; + break; + + case "'.EVENTS_GOING_DOWN_CRITICAL.'": + case "'.EVENTS_GOING_UP_CRITICAL.'": + text = "'.__('CRITICAL').'"; + color = "'.COL_CRITICAL.'"; + break; + + case "'.EVENTS_UNKNOWN.'": + case "'.EVENTS_GOING_UNKNOWN.'": + default: + text = "'.__('UNKNOWN').'"; + color = "'.COL_UNKNOWN.'"; + break; + } + + item.event_type = \'
\' + text + "
"; + + console.log(item); + + if (item.id_agente > 0) { + item.agent_name = \'\' + item.agent_name + \'\'; + } + + + item.options = \'button\'; }', ] ); @@ -645,3 +1132,34 @@ try { // Close viewer. enterprise_hook('close_meta_frame'); + +// Datepicker requirements. +ui_require_css_file('datepicker'); +ui_include_time_picker(); +ui_require_jquery_file( + 'ui.datepicker-'.get_user_language(), + 'include/javascript/i18n/' +); +?> + From d4d450926697d83a406a84cdd576979d26074720 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 7 Jun 2019 21:22:07 +0200 Subject: [PATCH 047/206] wip event view --- pandora_console/include/functions_events.php | 192 ++++- pandora_console/include/styles/events.css | 2 +- pandora_console/include/styles/tables.css | 5 + pandora_console/operation/events/events.php | 804 ++++++++++++++++++- 4 files changed, 923 insertions(+), 80 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index f082f8611a..41a2d76bc4 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -85,6 +85,145 @@ function events_sql_db_filter($filter) } +/** + * Retrieve all events filtered. + * + * @param array $fields Fields to retrieve. + * @param array $filter Filters to be applied. + * @param integer $limit Limit (pagination). + * @param integer $offset Offset (pagination). + * + * @return array Events. + * @throws Exception On error. + */ +function events_get_all( + $fields, + array $filter, + $offset=null, + $limit=null, + $order=null, + $sort_field=null +) { + global $config; + + if (!is_array($filter)) { + throw new Exception('[events_get_all] Filter must be an array.'); + } + + $count = false; + if (!is_array($fields) && $fields == 'count') { + $fields = ['te.*']; + $count = true; + } else if (!is_array($fields)) { + throw new Exception('[events_get_all] Fields must be an array or "count".'); + } + + $hour_filter = ''; + if (isset($filter['event_view_hr'])) { + $hour_filter = sprintf( + ' AND utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d HOUR) ', + $filter['event_view_hr'] + ); + } + + $agent_id_filter = ''; + if (isset($filter['id_agent']) && $filter['id_agent'] > 0) { + $agent_id_filter = sprintf( + ' AND id_agente = %d ', + $filter['id_agent'] + ); + } + + $table = events_get_events_table($meta, $history); + + $tevento = sprintf( + '(SELECT * + FROM %s + WHERE 1=1 %s %s) te', + $table, + $hour_filter, + $agent_id_filter + ); + + $agent_name_filter = ''; + if (!empty($filter['agent_alias'])) { + $agent_name_filter = sprintf( + ' AND ta.alias = "%s" ', + $filter['agent_alias'] + ); + } + + $order_by = ''; + if (isset($order, $sort_field)) { + $order_by = events_get_sql_order($sort_field, $order); + } + + $pagination = ''; + if (isset($limit, $offset)) { + $pagination = sprintf(' LIMIT %d OFFSET %d', $limit, $offset); + } + + $extra = ''; + if (is_metaconsole()) { + $extra = ', server_id'; + } + + $group_by = 'GROUP BY '; + $tagente_join = 'LEFT'; + switch ($filter['group_rep']) { + case '0': + default: + // All events. + $group_by = ''; + break; + + case '1': + // Group by events. + $group_by .= 'estado, evento, id_agente, id_agentmodule'; + $group_by .= $extra; + break; + + case '2': + // Group by agents. + $tagente_join = 'INNER'; + $group_by .= 'te.id_agente, te.event_type'; + $group_by .= $extra; + break; + } + + // Secondary groups. + db_process_sql('SET group_concat_max_len = 9999999'); + $event_lj = events_get_secondary_groups_left_join($table); + + $sql = sprintf( + 'SELECT %s + FROM %s + %s JOIN tagente ta + ON ta.id_agente = te.id_agente + %s + %s + WHERE 1=1 + %s + %s + %s + ', + join(',', $fields), + $tevento, + $tagente_join, + $event_lj, + $filter_extra_agents, + $group_by, + $order_by, + $pagination + ); + if ($count) { + $sql = 'SELECT count(*) as nitems FROM ('.$sql.') tt'; + } + + return db_get_all_rows_sql($sql); +} + + /** * Get all rows of events from the database, that * pass the filter, and can get only some fields. @@ -244,49 +383,30 @@ function events_get_events_grouped( db_process_sql('SET group_concat_max_len = 9999999'); $event_lj = events_get_secondary_groups_left_join($table); if ($total) { - $sql = sprintf( - 'SELECT COUNT(*) FROM (SELECT id_evento - FROM %s te %s - WHERE 1=1 %s - GROUP BY estado, evento, id_agente, id_agentmodule %s) AS t ', - $table, - $event_lj, - $sql_post, - $groupby_extra - ); + $sql = "SELECT COUNT(*) FROM (SELECT id_evento + FROM $table te $event_lj + WHERE 1=1 ".$sql_post.' + GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t'; } else { - $sql = sprintf( - 'SELECT *, MAX(id_evento) AS id_evento, - GROUP_CONCAT(DISTINCT user_comment SEPARATOR "
") AS user_comment, - GROUP_CONCAT(DISTINCT id_evento SEPARATOR ",") AS similar_ids, + $sql = "SELECT *, MAX(id_evento) AS id_evento, + GROUP_CONCAT(DISTINCT user_comment SEPARATOR '
') AS user_comment, + GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids, COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep, MIN(utimestamp) AS timestamp_rep_min, - (SELECT owner_user FROM %s WHERE id_evento = MAX(te.id_evento)) owner_user, - (SELECT id_usuario FROM %s WHERE id_evento = MAX(te.id_evento)) id_usuario, - (SELECT id_agente FROM %s WHERE id_evento = MAX(te.id_evento)) id_agente, - (SELECT criticity FROM %s WHERE id_evento = MAX(te.id_evento)) AS criticity, - (SELECT ack_utimestamp FROM %s WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, - (SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name, - (SELECT alias FROM tagente WHERE id_agente = te.id_agente) agent_name, - te.id_agente - FROM %s te %s - WHERE 1=1 %s - GROUP BY estado, evento, id_agente, id_agentmodule %s ', - $table, - $table, - $table, - $table, - $table, - $table, - $event_lj, - $sql_post, - $groupby_extra - ); + (SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user, + (SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario, + (SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente, + (SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, + (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, + (SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name + FROM $table te $event_lj + WHERE 1=1 ".$sql_post.' + GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra; $sql .= ' '.events_get_sql_order($sort_field, $order, 2); $sql .= ' LIMIT '.$offset.','.$pagination; } - // Extract the events by filter (or not) from db. + // Extract the events by filter (or not) from db $events = db_get_all_rows_sql($sql, $history_db); if ($total) { diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 648f8a706e..17759213ce 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -52,7 +52,7 @@ div.filter_input_little { form.flex-row div.filter_input.large { flex: 1; - min-width: 650px; + min-width: 470px; } div.filter_input > label, diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 4cd6052873..5450465638 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -245,3 +245,8 @@ tr.disabled_row_user * { color: grey; } + +/* Disable datatables border */ +table.dataTable.info_table.no-footer { + border-bottom: none; +} diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 606eab7804..5751a5711e 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -79,8 +79,8 @@ $pagination = get_parameter('filter[pagination]'); $event_view_hr = get_parameter('filter[event_view_hr]', 8); $id_user_ack = get_parameter('filter[id_user_ack]'); $group_rep = get_parameter('filter[group_rep]'); -$tag_with = get_parameter('filter[tag_with]', io_json_mb_encode([])); -$tag_without = get_parameter('filter[tag_without]', io_json_mb_encode([])); +$tag_with = get_parameter('filter[tag_with]', []); +$tag_without = get_parameter('filter[tag_without]', []); $filter_only_alert = get_parameter('filter[filter_only_alert]'); $id_group_filter = get_parameter('filter[id_group_filter]'); $date_from = get_parameter('filter[date_from]'); @@ -91,6 +91,9 @@ $user_comment = get_parameter('filter[user_comment]'); // TAGS. +// Get the tags where the user have permissions in Events reading tasks. +$tags = tags_get_user_tags($config['id_user'], $access); + $tags_select_with = []; $tags_select_without = []; $tag_with_temp = []; @@ -125,7 +128,7 @@ $tabletags_with->cellspacing = 4; $tabletags_with->cellpadding = 4; $tabletags_with->class = 'noshadow'; $tabletags_with->styleTable = 'border: 0px;'; -if (defined('METACONSOLE')) { +if (is_metaconsole()) { $tabletags_with->class = 'nobady'; $tabletags_with->cellspacing = 0; $tabletags_with->cellpadding = 0; @@ -200,7 +203,7 @@ $tabletags_without->width = '100%'; $tabletags_without->cellspacing = 4; $tabletags_without->cellpadding = 4; $tabletags_without->class = 'noshadow'; -if (defined('METACONSOLE')) { +if (is_metaconsole()) { $tabletags_without->class = 'nobady'; $tabletags_without->cellspacing = 0; $tabletags_without->cellpadding = 0; @@ -263,12 +266,6 @@ $data[2] = html_print_select( $tabletags_without->data[] = $data; $tabletags_without->rowclass[] = ''; - -// END OF TAGS. -// Datatables offset, limit. -$start = get_parameter('start', 0); -$length = get_parameter('length', $config['block_size']); - if (io_safe_output($tag_with) == '["0"]') { $tag_with = '[]'; } @@ -277,6 +274,11 @@ if (io_safe_output($tag_without) == '["0"]') { $tag_without = '[]'; } +/* + * END OF TAGS. + */ + + // Ajax responses. if (is_ajax()) { $get_filter_values = get_parameter('get_filter_values', 0); @@ -285,31 +287,36 @@ if (is_ajax()) { $get_event_filters = get_parameter('get_event_filters', 0); $get_events = get_parameter('get_events', 0); $filter = get_parameter('filter', []); + // Datatables offset, limit. + $start = get_parameter('start', 0); + $length = get_parameter('length', $config['block_size']); if ($get_events) { $order = get_datatable_order(true); - $sql_post = ' AND te.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL '.$event_view_hr.' hour)'; - $events = events_get_events_grouped( - // Sql_post. - $sql_post, + $events = events_get_all( + [ + 'te.*', + 'ta.alias as agent_name', + ], + $filter, // Offset. $start, - // Pagination. + // Limit. $length, - // Meta. - false, - // History. - false, - // Total. - false, - // History db. - false, // Order. $order['direction'], // Sort field. $order['field'] ); + $count = events_get_all( + 'count', + $filter + ); + + if ($count !== false) { + $count = $count['0']['nitems']; + } if ($events) { $data = array_reduce( @@ -321,21 +328,6 @@ if (is_ajax()) { ); } - $count = events_get_events_grouped( - // Sql_post. - $sql_post, - // Offset. - $start, - // Pagination. - $length, - // Meta. - false, - // History. - false, - // Total. - true - ); - // RecordsTotal && recordsfiltered resultados totales. echo json_encode( [ @@ -652,9 +644,9 @@ $inputs[] = $in; // Duplicates group { events | agents }. $data = html_print_select( [ - __('All events'), - __('Group events'), - __('Group agents'), + 0 => __('All events'), + 1 => __('Group events'), + 2 => __('Group agents'), ], 'group_rep', $group_rep, @@ -1115,8 +1107,6 @@ try { item.event_type = \'
\' + text + "
"; - console.log(item); - if (item.id_agente > 0) { item.agent_name = \'\' + item.agent_name + \'\'; } @@ -1140,8 +1130,736 @@ ui_require_jquery_file( 'ui.datepicker-'.get_user_language(), 'include/javascript/i18n/' ); + +// End. Load required JS. ?> '; - $output = $filter.$table.$js; + // Order. + $output = $filter.$extra.$table.$js; ui_require_css_file('datatables.min', 'include/styles/js/'); ui_require_javascript_file('datatables.min'); diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index f98e3ff365..13bafabca3 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -146,3 +146,41 @@ fieldset { .event.flex-row.h100p.nowrap div { max-width: 98%; } + +.filter_summary { + margin-bottom: 3em; + height: 3em; +} + +.filter_summary div.label { + background: #878787; + color: #fff; + font-weight: bolder; + border-radius: 5px; + padding: 0.5em; +} +.filter_summary div.content { + padding: 0.5em; +} + +.filter_summary > div { + border: 1px solid #eee; + border-radius: 5px; +} + +.filter_summary div { + float: left; + margin-right: 2em; + text-align: center; + background: #fff; +} + +#events_processing { + background: #dedede; + font-size: 3em; + height: auto; + padding: 2em; + color: #777; + border: none; + margin-top: -2em; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 5450465638..6ded48262b 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -250,3 +250,14 @@ tr.disabled_row_user * { table.dataTable.info_table.no-footer { border-bottom: none; } + +/* Datatables pagination */ +.dataTables_paginate.paging_simple_numbers { +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.current, +.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + color: #fff; + background-color: #82b92e; + border-color: #82b92e; +} diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index c2e8f84a34..fdc4d4e4a1 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -66,17 +66,20 @@ $access = ($event_a == true) ? 'ER' : (($event_w == true) ? 'EW' : (($event_m == // Load specific stylesheet. ui_require_css_file('events'); +// Load extra javascript. +ui_require_javascript_file('pandora_events'); + // Get requests. $id_group = get_parameter('filter[id_group]'); $event_type = get_parameter('filter[event_type]'); $severity = get_parameter('filter[severity]'); -$status = get_parameter('filter[status]'); +$status = get_parameter('filter[status]', EVENT_NO_VALIDATED); $search = get_parameter('filter[search]'); $text_agent = get_parameter('filter[text_agent]'); $id_agent = get_parameter('filter[id_agent]'); $id_agent_module = get_parameter('filter[id_agent_module]'); $pagination = get_parameter('filter[pagination]'); -$event_view_hr = get_parameter('filter[event_view_hr]', 8); +$event_view_hr = get_parameter('filter[event_view_hr]', 1); $id_user_ack = get_parameter('filter[id_user_ack]'); $group_rep = get_parameter('filter[group_rep]'); $tag_with = get_parameter('filter[tag_with]', []); @@ -108,6 +111,7 @@ if (is_ajax()) { [ 'te.*', 'ta.alias as agent_name', + 'tg.nombre as group_name', ], $filter, // Offset. @@ -920,15 +924,7 @@ $filter .= ui_toggle( ); try { - $column_names = [ - __('Event'), - __('Event ID'), - __('Agent name'), - __('Timestamp'), - __('Severity'), - __('Options'), - ]; - $fields = [ + $default_fields = [ 'evento', 'id_evento', // 'id_agente', @@ -961,6 +957,86 @@ try { // 'module_name', 'options', ]; + $fields = explode(',', $config['event_fields']); + + // Always check something is shown. + if (empty($fields)) { + $fields = $default_fields; + } + + // Always add options column. + $fields = array_merge($fields, ['options']); + + // Get column names. + $column_names = events_get_column_names($fields); + + // Open current filter quick reference. + $active_filters_div = '
'; + // Event status. + $active_filters_div .= '
'; + $active_filters_div .= '
'.__('Event status').'
'; + $active_filters_div .= '
'; + switch ($status) { + case EVENT_ALL: + default: + $active_filters_div .= __('Any status.'); + break; + + case EVENT_NEW: + $active_filters_div .= __('New events.'); + break; + + case EVENT_VALIDATE: + $active_filters_div .= __('Validated.'); + break; + + case EVENT_PROCESS: + $active_filters_div .= __('In proccess.'); + break; + + case EVENT_NO_VALIDATED: + $active_filters_div .= __('Not validated.'); + break; + } + + $active_filters_div .= '
'; + $active_filters_div .= '
'; + + // Max. hours old. + $active_filters_div .= '
'; + $active_filters_div .= '
'.__('Max. hours old').'
'; + $active_filters_div .= '
'; + if ($event_view_hr == 0) { + $active_filters_div .= __('Any time.'); + } else if ($event_view_hr == 1) { + $active_filters_div .= __('Last hour.'); + } else if ($event_view_hr == 2) { + $active_filters_div .= __('Last %d hours.', $event_view_hr); + } + + $active_filters_div .= '
'; + $active_filters_div .= '
'; + + // Duplicates. + $active_filters_div .= '
'; + $active_filters_div .= '
'.__('Duplicated').'
'; + $active_filters_div .= '
'; + if ($group_rep == 0) { + $active_filters_div .= __('All events.'); + } else if ($group_rep == 1) { + $active_filters_div .= __('Group events'); + } else if ($group_rep == 2) { + $active_filters_div .= __('Group agents.'); + } + + $active_filters_div .= '
'; + $active_filters_div .= '
'; + + // Close. + $active_filters_div .= '
'; + + + // Print datatable. ui_print_datatable( [ 'id' => 'events', @@ -968,6 +1044,12 @@ try { 'style' => 'width: 100%;', 'ajax_url' => 'operation/events/events', 'ajax_data' => ['get_events' => 1], + 'form' => [ + 'class' => 'flex-row', + 'html' => $filter, + 'inputs' => [], + ], + 'extra_html' => $active_filters_div, 'pagination_options' => [ [ $config['block_size'], @@ -990,11 +1072,6 @@ try { 'All', ], ], - 'form' => [ - 'class' => 'flex-row', - 'html' => $filter, - 'inputs' => [], - ], 'order' => [ 'field' => 'timestamp', 'direction' => 'desc', @@ -1003,7 +1080,6 @@ try { 'columns' => $fields, 'ajax_postprocess' => ' function (item) { - item.id_evento = "#"+item.id_evento; var color = "'.COL_UNKNOWN.'"; var text = "UNKNOWN"; switch (item.criticity) { @@ -1050,11 +1126,15 @@ try { output += \'\'; evn = \'
\'; - evn += \'
\'+item.evento+\'
\'; + evn += \'\'; evn += output; evn += \'
\' item.evento = evn; + item.criticity = \'
\' + text + "
"; // Event type. @@ -1108,9 +1188,19 @@ try { if (item.id_agente > 0) { item.agent_name = \'\' + item.agent_name + \'\'; } - + + if (item.id_agente > 0) { + item.id_agente = \'\' + item.id_agente + \'\'; + } + + if (item.id_grupo == "0") { + item.id_grupo = "'.__('All').'"; + } else { + item.id_grupo = item.group_name; + } item.options = \'button\'; + item.id_evento = "#"+item.id_evento; }', ] ); @@ -1130,6 +1220,18 @@ ui_require_jquery_file( ); // End. Load required JS. +html_print_input_hidden('meta', (int) is_metaconsole()); +html_print_input_hidden('history', (int) $history); +html_print_input_hidden('filterid', $is_filter); +html_print_input_hidden( + 'ajax_file', + ui_get_full_url('ajax.php', false, false, false) +); + +// AJAX call options responses. +echo "
"; +echo "
"; +echo "
"; ?> + '; + if (check_acl($config['id_user'], 0, 'EW') + || check_acl($config['id_user'], 0, 'EM') + ) { + echo '
'; + $table = new StdClass; + $table->id = 'save_filter_form'; + $table->width = '100%'; + $table->cellspacing = 4; + $table->cellpadding = 4; + $table->class = 'databox'; + if (is_metaconsole()) { + $table->class = 'databox filters'; + $table->cellspacing = 0; + $table->cellpadding = 0; + } + + $table->styleTable = 'font-weight: bold; text-align:left;'; + if (!is_metaconsole()) { + $table->style[0] = 'width: 50%; width:50%;'; + } + + $data = []; + $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').''; + + $table->data[] = $data; + $table->rowclass[] = ''; + + $data = []; + $table->rowid[1] = 'save_filter_row1'; + $data[0] = __('Filter name').$jump; + $data[0] .= html_print_input_text('id_name', '', '', 15, 255, true); + if (is_metaconsole()) { + $data[1] = __('Save in Group').$jump; + } else { + $data[1] = __('Filter group').$jump; + } + + $data[1] .= html_print_select( + $user_groups_array, + 'id_group_filter', + $id_group_filter, + '', + '', + 0, + true, + false, + false, + 'w130' + ); + + $table->data[] = $data; + $table->rowclass[] = ''; + + $data = []; + $table->rowid[2] = 'save_filter_row2'; + + $table->data[] = $data; + $table->rowclass[] = ''; + + $data = []; + $table->rowid[3] = 'update_filter_row1'; + $data[0] = __('Overwrite filter').$jump; + // Fix : Only admin user can see filters of group ALL for update. + $_filters_update = events_get_event_filter_select(false); + + $data[0] .= html_print_select( + $_filters_update, + 'overwrite_filter', + '', + '', + '', + 0, + true + ); + $data[1] = html_print_submit_button( + __('Update filter'), + 'update_filter', + false, + 'class="sub upd" onclick="save_update_filter();"', + true + ); + + $table->data[] = $data; + $table->rowclass[] = ''; + + html_print_table($table); + echo '
'; + echo html_print_submit_button( + __('Save filter'), + 'save_filter', + false, + 'class="sub upd" style="float:right;" onclick="save_new_filter();"', + true + ); + echo '
'; + } else { + include 'general/noaccess.php'; + } + + echo ''; + ?> + + "; + $tabs = "'; diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index 29acf27c30..0011167308 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -2847,7 +2847,7 @@ class NetworkMap __('Node Details'), '', false, - false + true ); $output .= ''; diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index a534b9e715..db6a679941 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -393,6 +393,7 @@ function events_get_all( } $tgrupo_join = 'LEFT'; + $tgrupo_join_filters = []; if (isset($filter['id_group_filter']) && $filter['id_group_filter'] > 0) { $tgrupo_join = 'INNER'; $tgrupo_join_filters[] = sprintf( @@ -405,8 +406,21 @@ function events_get_all( db_process_sql('SET group_concat_max_len = 9999999'); $event_lj = events_get_secondary_groups_left_join($table); + $group_selects = ''; + if ($group_by != '') { + if ($fields['0'] != 'count') { + $group_selects = ',GROUP_CONCAT(DISTINCT user_comment SEPARATOR "
") AS user_comment, + GROUP_CONCAT(DISTINCT id_evento SEPARATOR ",") AS similar_ids, + COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep, + MIN(utimestamp) AS timestamp_rep_min'; + + unset($fields[array_search('te.user_comment', $fields)]); + } + } + $sql = sprintf( 'SELECT %s + %s FROM %s %s %s JOIN tagente ta @@ -422,6 +436,7 @@ function events_get_all( %s ', join(',', $fields), + $group_selects, $tevento, $event_lj, $tagente_join, diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 6200ab63e2..6f41f87f33 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2801,8 +2801,18 @@ function ui_progress( * 'column2', * ... * ], + * 'no_sortable_columns' => [ indexes ] 1,2... -1 etc. Avoid sorting. * 'form' => [ * 'html' => 'html code' a directly defined inputs in HTML. + * 'extra_buttons' => [ + * [ + * 'id' => button id, + * 'class' => button class, + * 'style' => button style, + * 'text' => button text, + * 'onclick' => button onclick, + * ] + * ], * 'search_button_class' => search button class. * 'class' => form class. * 'id' => form id. @@ -2850,6 +2860,11 @@ function ui_print_datatable(array $parameters) $parameters['default_pagination'] = $config['block_size']; } + $no_sortable_columns = []; + if (isset($parameters['no_sortable_columns'])) { + $no_sortable_columns = json_encode($parameters['no_sortable_columns']); + } + if (!is_array($parameters['order'])) { $order = '0, "asc"'; } else { @@ -2877,7 +2892,7 @@ function ui_print_datatable(array $parameters) $parameters['ajax_data'] = ''; } - $search_button_class = 'sub search'; + $search_button_class = 'sub filter'; if (isset($parameters['search_button_class'])) { $search_button_class = $parameters['search_button_class']; } @@ -2977,8 +2992,19 @@ function ui_print_datatable(array $parameters) $filter .= ''; } - // Search button. $filter .= '
  • '; + if (is_array($parameters['form']['extra_buttons'])) { + foreach ($parameters['form']['extra_buttons'] as $button) { + $filter .= ''; + } + } + + // Search button. $filter .= ''; $filter .= '
  • '; @@ -3078,7 +3104,9 @@ function ui_print_datatable(array $parameters) if (isset($parameters['ajax_postprocess'])) { $js .= ' if (json.data) { - json.data.forEach('.$parameters['ajax_postprocess'].'); + json.data.forEach(function(item) { + '.$parameters['ajax_postprocess'].' + }); } else { json.data = {}; }'; @@ -3110,7 +3138,8 @@ function ui_print_datatable(array $parameters) } }, "columnDefs": [ - { className: "no-class", targets: "_all" } + { className: "no-class", targets: "_all" }, + { bSortable: false, targets: '.$no_sortable_columns.' } ], columns: ['; diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 1f1ff42c3f..4182cb0476 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -56,8 +56,8 @@ function show_event_dialog(event_id, group_rep, dialog_page, result) { opacity: 0.5, background: "black" }, - width: 725, - height: 530 + width: 850, + height: 750 }) .show(); diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 13bafabca3..a6b747a5b7 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -12,7 +12,7 @@ div.criticity { } div.mini-criticity { - width: 5px; + width: 10px; height: 3em; padding: 0; margin: 0; @@ -184,3 +184,117 @@ fieldset { border: none; margin-top: -2em; } + +/* Image open dialog in group events by agents*/ +#open_agent_groups { + cursor: pointer; +} + +.table_modal_alternate { + border-spacing: 0px; + text-align: left; +} + +/* Modal window - Show More */ +table.table_modal_alternate tr:nth-child(odd) td { + background-color: #ffffff; +} + +table.table_modal_alternate tr:nth-child(even) td { + background-color: #f9f9f9; + border-top: 1px solid #e0e0e0; + border-bottom: 1px solid #e0e0e0; +} + +table.table_modal_alternate tr td { + height: 33px; + max-height: 33px; + min-height: 33px; +} + +table.table_modal_alternate tr td:first-child { + width: 35%; + font-weight: bold; + padding-left: 20px; +} + +ul.events_tabs { + background: #ffffff; + border: 0px; + display: flex; + justify-content: space-between; + padding: 0px; +} + +ul.events_tabs:before, +ul.events_tabs:after { + content: none; +} + +ul.events_tabs > li { + margin: 0; + width: 100%; + text-align: center; + float: none; + outline-width: 0; +} + +ul.events_tabs > li.ui-state-default { + background: #fff; + border: none; + border-bottom: 2px solid #cacaca; +} + +ul.events_tabs > li a { + text-align: center; + float: none; + padding: 8px; + display: block; +} + +ul.events_tabs > li span { + position: relative; + top: -6px; + left: 5px; + margin-right: 10px; +} + +ul.events_tabs > li.ui-tabs-active { + border: none; +} + +ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header { + background: none; + margin: 0; + margin-bottom: -1px; + border: none; +} + +ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header + li { + padding: 0.5em; +} + +ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header + li + > a { + display: flex; + align-items: center; + flex-direction: row; +} +ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header + li + > a + > img { + margin-right: 0.3em; +} + +li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab { + border-bottom: 1px solid #ccc; +} +li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab.ui-tabs-active.ui-state-active { + border-bottom: 1px solid #fff; +} +div.extended_event_pages.ui-tabs-panel.ui-corner-bottom.ui-widget-content { + border-top: 1px solid #a9a9a9; +} diff --git a/pandora_console/include/styles/js/jquery-ui_custom.css b/pandora_console/include/styles/js/jquery-ui_custom.css index ac19de900c..6f707d174e 100644 --- a/pandora_console/include/styles/js/jquery-ui_custom.css +++ b/pandora_console/include/styles/js/jquery-ui_custom.css @@ -88,8 +88,7 @@ background-image: url(../images/ui-icons_444444_256x240.png); } .ui-widget-content { - background: #ffffff url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% - repeat-x; + background: #fff; } .ui-state-default, .ui-widget-content .ui-state-default, @@ -97,8 +96,7 @@ margin-top: 3px; border: 1px solid #d3d3d3; border-bottom: 0; - background: #e6e6e6 url(../images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% - repeat-x; + background: #e6e6e6; font-weight: normal; color: #555555; } @@ -139,7 +137,7 @@ } .ui-dialog .ui-widget-header { background-color: #82b92e; - margin: -1px; + margin: -1px -1px 0px -1px; } .ui_tpicker_hour, .ui_tpicker_minute, @@ -213,8 +211,7 @@ a.ui-button:active, .ui-widget-header .ui-state-hover { border: 1px solid #999999; border-bottom: 0; - background: #dadada url(../images/ui-bg_glass_75_dadada_1x400.png) 50% 50% - repeat-x; + background: #dadada; } .ui-state-active, @@ -222,8 +219,7 @@ a.ui-button:active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; border-bottom: 0; - background: #ffffff url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% - repeat-x; + background: #ffffff; font-weight: normal; color: #212121; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 5034d60069..b6862db108 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -517,6 +517,9 @@ select:-internal-list-box { .padding-6 { padding: 6em; } +.margin-right-2 { + margin-right: 2em; +} .no-border { border: none; } @@ -544,6 +547,12 @@ select:-internal-list-box { .td-bg-white td { background: #fff; } +.float-left { + float: left; +} +.float-right { + float: right; +} div#page { background: #fbfbfb; @@ -632,6 +641,7 @@ p.center { } /* --- Botones --- */ +button.sub, input.sub { font-weight: normal; -moz-border-radius: 2px; @@ -645,10 +655,24 @@ input.sub { padding-bottom: 10px; padding-top: 10px; padding-left: 15px; - border-color: #888; + border: 1px solid #888; font-family: "lato", "Open Sans", sans-serif; + cursor: pointer; } +button.sub:hover, +input.sub:hover { + border: 1px solid #333; +} + +button.sub:active, +input.sub:active { + border: 1px solid #000; + color: #333; + background-color: #e1e1e1; +} + +button.sub[disabled], input.sub[disabled] { color: #b4b4b4; background-color: #f3f3f3; @@ -1519,6 +1543,24 @@ div#logo_text3 { text-align: right; } +button.next, +button.upd, +button.ok, +button.wand, +button.delete, +button.cog, +button.target, +button.search, +button.copy, +button.add, +button.graph, +button.percentile, +button.binary, +button.camera, +button.config, +button.filter, +button.cancel, +button.default, input.next, input.upd, input.ok, @@ -1534,6 +1576,7 @@ input.percentile, input.binary, input.camera, input.config, +input.filter, input.cancel, input.default, input.filter, @@ -1542,75 +1585,99 @@ input.spinn { padding-right: 30px; } +button.next, input.next { background-image: url(../../images/input_go.png); } +button.upd, input.upd { background-image: url(../../images/input_update.png); } +button.wand, input.wand { background-image: url(../../images/input_wand.png); } +button.wand:disabled, input.wand:disabled { background-image: url(../../images/input_wand.disabled.png); } +button.search, input.search { background-image: url(../../images/input_zoom.png); } +button.search:disabled, input.search:disabled { background-image: url(../../images/input_zoom.disabled.png); } +button.ok, input.ok { background-image: url(../../images/input_tick.png); } +button.ok:disabled, input.ok:disabled { background-image: url(../../images/input_tick.disabled.png); } +button.add, input.add { background-image: url(../../images/input_add.png); } +button.add:disabled, input.add:disabled { background-image: url(../../images/input_add.disabled.png); } +button.cancel, input.cancel { background-image: url(../../images/input_cross.png); } +button.cancel:disabled, input.cancel:disabled { background-image: url(../../images/input_cross.disabled.png); } +button.delete, input.delete { background-image: url(../../images/input_delete.png); } +button.delete:disabled, input.delete:disabled { background-image: url(../../images/input_delete.disabled.png); } +button.cog, input.cog { background-image: url(../../images/input_cog.png); } +button.cog:disabled, input.cog:disabled { background-image: url(../../images/input_cog.disabled.png); } +button.config, input.config { background-image: url(../../images/input_config.png); } +button.config:disabled, input.config:disabled { background-image: url(../../images/input_config.disabled.png); } +button.filter, input.filter { background-image: url(../../images/input_filter.png); } +button.filter:disabled, input.filter:disabled { background-image: url(../../images/input_filter.disabled.png); } +button.pdf, input.pdf { background-image: url(../../images/input_pdf.png); } +button.pdf:disabled, input.pdf:disabled { background-image: url(../../images/input_pdf.disabled.png); } +button.camera, input.camera { background-image: url(../../images/input_camera.png); } +button.spinn, input.spinn { background-image: url(../../images/spinner_green.gif); } @@ -3491,90 +3558,6 @@ div.simple_value > a > span.text p { white-space: pre; } -/* - * --------------------------------------------------------------------- - * - EVENTS - - * --------------------------------------------------------------------- - */ -/* Image open dialog in group events by agents*/ -#open_agent_groups { - cursor: pointer; -} - -.table_modal_alternate { - border-spacing: 0px; - text-align: left; -} - -/* Modal window - Show More */ -table.table_modal_alternate tr:nth-child(odd) td { - background-color: #ffffff; -} - -table.table_modal_alternate tr:nth-child(even) td { - background-color: #f9f9f9; - border-top: 1px solid #e0e0e0; - border-bottom: 1px solid #e0e0e0; -} - -table.table_modal_alternate tr td { - height: 33px; - max-height: 33px; - min-height: 33px; -} - -table.table_modal_alternate tr td:first-child { - width: 35%; - font-weight: bold; - padding-left: 20px; -} - -ul.events_tabs { - background: #ffffff; - border: 0px; - display: flex; - justify-content: space-between; - padding: 0px; -} - -ul.events_tabs:before, -ul.events_tabs:after { - content: none; -} - -ul.events_tabs > li { - margin: 0; - width: 100%; - text-align: center; - float: none; - outline-width: 0; -} - -ul.events_tabs > li.ui-state-default { - background: #fff; - border: none; - border-bottom: 2px solid #cacaca; -} - -ul.events_tabs > li a { - text-align: center; - float: none; - padding: 8px; - display: block; -} - -ul.events_tabs > li span { - position: relative; - top: -6px; - left: 5px; - margin-right: 10px; -} - -ul.events_tabs > li.ui-tabs-active { - border-bottom: 2px solid #82b92e; - border-top: 2px solid #82b92e; -} - /* * --------------------------------------------------------------------- * - modal window and edit user - diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index fdc4d4e4a1..705c2ea7f0 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -109,7 +109,30 @@ if (is_ajax()) { $events = events_get_all( [ - 'te.*', + 'te.id_evento', + 'te.id_agente', + 'te.id_usuario', + 'te.id_grupo', + 'te.estado', + 'te.timestamp', + 'te.evento', + 'te.utimestamp', + 'te.event_type', + 'te.id_agentmodule', + 'te.id_alert_am', + 'te.criticity', + 'te.user_comment', + 'te.tags', + 'te.source', + 'te.id_extra', + 'te.critical_instructions', + 'te.warning_instructions', + 'te.unknown_instructions', + 'te.owner_user', + 'te.ack_utimestamp', + 'te.custom_data', + 'te.data', + 'te.module_status', 'ta.alias as agent_name', 'tg.nombre as group_name', ], @@ -687,6 +710,21 @@ $in = '
    '; $in .= $data.'
    '; $inputs[] = $in; +$buttons = []; + +$buttons[] = [ + 'id' => 'load-filter', + 'class' => 'float-left margin-right-2 sub config', + 'text' => __('Load filter'), + 'onclick' => '', +]; + +$buttons[] = [ + 'id' => 'save-filter', + 'class' => 'float-left margin-right-2 sub wand', + 'text' => __('Save filter'), + 'onclick' => '', +]; /* * Advanced filter. @@ -1010,7 +1048,7 @@ try { $active_filters_div .= __('Any time.'); } else if ($event_view_hr == 1) { $active_filters_div .= __('Last hour.'); - } else if ($event_view_hr == 2) { + } else if ($event_view_hr > 1) { $active_filters_div .= __('Last %d hours.', $event_view_hr); } @@ -1039,18 +1077,19 @@ try { // Print datatable. ui_print_datatable( [ - 'id' => 'events', - 'class' => 'info_table events', - 'style' => 'width: 100%;', - 'ajax_url' => 'operation/events/events', - 'ajax_data' => ['get_events' => 1], - 'form' => [ - 'class' => 'flex-row', - 'html' => $filter, - 'inputs' => [], + 'id' => 'events', + 'class' => 'info_table events', + 'style' => 'width: 100%;', + 'ajax_url' => 'operation/events/events', + 'ajax_data' => ['get_events' => 1], + 'form' => [ + 'class' => 'flex-row', + 'html' => $filter, + 'inputs' => [], + 'extra_buttons' => $buttons, ], - 'extra_html' => $active_filters_div, - 'pagination_options' => [ + 'extra_html' => $active_filters_div, + 'pagination_options' => [ [ $config['block_size'], 10, @@ -1072,136 +1111,14 @@ try { 'All', ], ], - 'order' => [ + 'order' => [ 'field' => 'timestamp', 'direction' => 'desc', ], - 'column_names' => $column_names, - 'columns' => $fields, - 'ajax_postprocess' => ' - function (item) { - var color = "'.COL_UNKNOWN.'"; - var text = "UNKNOWN"; - switch (item.criticity) { - case "'.EVENT_CRIT_CRITICAL.'": - text = "CRITICAL"; - color = "'.COL_CRITICAL.'"; - break; - - case "'.EVENT_CRIT_MAINTENANCE.'": - text = "MAINTENANCE"; - color = "'.COL_MAINTENANCE.'"; - break; - - case "'.EVENT_CRIT_INFORMATIONAL.'": - text = "INFORMATIONAL"; - color = "'.COL_INFORMATIONAL.'"; - break; - - case "'.EVENT_CRIT_MAJOR.'": - text = "MAJOR"; - color = "'.COL_MAJOR.'"; - break; - - case "'.EVENT_CRIT_MINOR.'": - text = "MINOR"; - color = "'.COL_MINOR.'"; - break; - - case "'.EVENT_CRIT_NORMAL.'": - text = "NORMAL"; - color = "'.COL_NORMAL.'"; - break; - - case "'.EVENT_CRIT_WARNING.'": - text = "WARNING"; - color = "'.COL_WARNING.'"; - break; - } - output = \'
    \'; - output += \'
    \'; - - evn = \'
    \'; - evn += \'\'; - evn += output; - evn += \'
    \' - - item.evento = evn; - item.criticity = \'
    \' + text + "
    "; - - - // Event type. - switch (item.event_type) { - case "'.EVENTS_ALERT_FIRED.'": - case "'.EVENTS_ALERT_RECOVERED.'": - case "'.EVENTS_ALERT_CEASED.'": - case "'.EVENTS_ALERT_MANUAL_VALIDATION.'": - text = "'.__('ALERT').'"; - color = "'.COL_ALERTFIRED.'"; - break; - - case "'.EVENTS_RECON_HOST_DETECTED.'": - case "'.EVENTS_SYSTEM.'": - case "'.EVENTS_ERROR.'": - case "'.EVENTS_NEW_AGENT.'": - case "'.EVENTS_CONFIGURATION_CHANGE.'": - text = "'.__('SYSTEM').'"; - color = "'.COL_MAINTENANCE.'"; - break; - - case "'.EVENTS_GOING_UP_WARNING.'": - case "'.EVENTS_GOING_DOWN_WARNING.'": - $tex = "'.__('WARNING').'"; - color = "'.COL_WARNING.'"; - break; - - case "'.EVENTS_GOING_DOWN_NORMAL.'": - case "'.EVENTS_GOING_UP_NORMAL.'": - text = "'.__('NORMAL').'"; - color = "'.COL_NORMAL.'"; - break; - - case "'.EVENTS_GOING_DOWN_CRITICAL.'": - case "'.EVENTS_GOING_UP_CRITICAL.'": - text = "'.__('CRITICAL').'"; - color = "'.COL_CRITICAL.'"; - break; - - case "'.EVENTS_UNKNOWN.'": - case "'.EVENTS_GOING_UNKNOWN.'": - default: - text = "'.__('UNKNOWN').'"; - color = "'.COL_UNKNOWN.'"; - break; - } - - item.event_type = \'
    \' + text + "
    "; - - if (item.id_agente > 0) { - item.agent_name = \'\' + item.agent_name + \'\'; - } - - if (item.id_agente > 0) { - item.id_agente = \'\' + item.id_agente + \'\'; - } - - if (item.id_grupo == "0") { - item.id_grupo = "'.__('All').'"; - } else { - item.id_grupo = item.group_name; - } - - item.options = \'button\'; - item.id_evento = "#"+item.id_evento; - }', + 'column_names' => $column_names, + 'columns' => $fields, + 'no_sortable_columns' => [-1], + 'ajax_postprocess' => 'process_datatables_item(item)', ] ); } catch (Exception $e) { @@ -1232,9 +1149,13 @@ html_print_input_hidden( echo "
    "; echo "
    "; echo "
    "; + +// Load filter div for dialog. +echo ''; +echo ''; ?> '; + } if (!$return) { echo $output; diff --git a/pandora_console/include/styles/progress.css b/pandora_console/include/styles/progress.css index ccd75f620a..f263e87fcf 100644 --- a/pandora_console/include/styles/progress.css +++ b/pandora_console/include/styles/progress.css @@ -1,18 +1,21 @@ -span.progress_text { - position: absolute; - font-family: "lato-bolder", "Open Sans", sans-serif; - font-size: 2em; - margin-left: -0.5em; -} - -div.progress_main { - display: inline-block; - text-align: center; +.progress_main { height: 2.5em; border: 1px solid #82b92e; + position: relative; + width: 100%; + display: inline-block; +} +.progress_main:before { + content: attr(data-label); + position: absolute; + text-align: center; + left: 0; + right: 0; + margin-top: 0.2em; + font-family: "lato-bolder", "Open Sans", sans-serif; } -div.progress { +.progress { width: 0%; background: #82b92e; height: 100%; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index cdf207e455..b7c472e176 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -314,7 +314,16 @@ $data[1] = ui_progress( 1.8, '#BBB', true, - floor(($agent['intervalo'] * (100 - $progress) / 100)).' s' + floor(($agent['intervalo'] * (100 - $progress) / 100)).' s', + [ + 'page' => 'operation/agentes/ver_agente', + 'interval' => (100 / $agent['intervalo']), + 'data' => [ + 'id_agente' => $id_agente, + 'refresh_contact' => 1, + ], + + ] ); if ($progress > 100) { @@ -739,40 +748,6 @@ if (!empty($network_interfaces)) { ?> '; // Order. - $output = $filter.$extra.$table.$js; + $err_msg = '
    '; + $output = $err_msg.$filter.$extra.$table.$js; ui_require_css_file('datatables.min', 'include/styles/js/'); ui_require_javascript_file('datatables.min'); diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 4798927536..dee5498015 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -668,7 +668,7 @@ function show_event_response_command_dialog(id, response, total_checked) { }); } -var processing = 0; +var processed = 0; function update_event(table, id_evento, type, row) { var inputs = $("#events_form :input"); var values = {}; @@ -678,7 +678,6 @@ function update_event(table, id_evento, type, row) { }); var t1 = new Date(); - processing += 1; // Update events matching current filters and id_evento selected. $.ajax({ type: "POST", @@ -691,24 +690,23 @@ function update_event(table, id_evento, type, row) { id_evento: id_evento, filter: values }, - success: function() { + success: function(d) { + processed += 1; var t2 = new Date(); var diff_g = t2.getTime() - t1.getTime(); var diff_s = diff_g / 1000; - - // If operation takes less than 2 seconds, redraw. - processing -= 1; - if (diff_s < 2) { - redraw = true; - } - if (redraw) { - if (processing == 0) { - table.draw(false); + if (processed >= $(".chk_val:checked").length) { + // If operation takes less than 2 seconds, redraw. + if (diff_s < 2) { + redraw = true; + } + if (redraw) { + table.draw(false); + } else { + $(row) + .closest("tr") + .remove(); } - } else { - $(row) - .closest("tr") - .remove(); } } }); @@ -731,14 +729,22 @@ function delete_event(table, id_evento, row) { // Imported from old files. function execute_event_response(event_list_btn) { + processed = 0; $("#max_custom_event_resp_msg").hide(); $("#max_custom_selected").hide(); var response_id = $("select[name=response_id]").val(); + var total_checked = $(".chk_val:checked").length; + + // Check select an event. + if (total_checked == 0) { + $("#max_custom_selected").show(); + return; + } + if (!isNaN(response_id)) { // It is a custom response - var response = get_response(response_id); // If cannot get response abort it @@ -746,16 +752,8 @@ function execute_event_response(event_list_btn) { return; } - var total_checked = $(".chk_val:checked").length; - - // Check select an event. - if (total_checked == 0) { - $("#max_custom_selected").show(); - return; - } - // Limit number of events to apply custom responses - // to for performance reasons. + // due performance reasons. if (total_checked > $("#max_execution_event_response").val()) { $("#max_custom_event_resp_msg").show(); return; @@ -801,30 +799,32 @@ function execute_event_response(event_list_btn) { } } else { // It is not a custom response + var delay = 5000; + var $i = 0; switch (response_id) { case "in_progress_selected": - $(".chk_val").each(function() { - if ($(this).is(":checked")) { - in_process_event(dt_events, $(this).val(), this.parentElement); - } + $(".chk_val:checked").each(function() { + setTimeout( + in_process_event(dt_events, $(this).val(), this.parentElement), + total_checked * delay * $i++ + ); }); - dt_events.draw(false); break; case "validate_selected": - $(".chk_val").each(function() { - if ($(this).is(":checked")) { - validate_event(dt_events, $(this).val(), this.parentElement); - } + $(".chk_val:checked").each(function() { + setTimeout( + validate_event(dt_events, $(this).val(), this.parentElement), + total_checked * delay * $i++ + ); }); - dt_events.draw(false); break; case "delete_selected": - $(".chk_val").each(function() { - if ($(this).is(":checked")) { - delete_event(dt_events, $(this).val(), this.parentElement); - } + $(".chk_val:checked").each(function() { + setTimeout( + delete_event(dt_events, $(this).val(), this.parentElement), + total_checked * delay * $i++ + ); }); - dt_events.draw(false); break; } } @@ -839,28 +839,20 @@ function check_massive_response_event( var counter = 0; var end = 0; - $(".chk_val").each(function() { - if ($(this).is(":checked")) { - var event_id = $(this).val(); - var server_id = $("#hidden-server_id_" + event_id).val(); - response["target"] = get_response_target( - event_id, - response_id, - server_id, - response_command - ); + $(".chk_val:checked").each(function() { + var event_id = $(this).val(); + var server_id = $("#hidden-server_id_" + event_id).val(); + response["target"] = get_response_target( + event_id, + response_id, + server_id, + response_command + ); - if (total_checked - 1 === counter) end = 1; + if (total_checked - 1 === counter) end = 1; - show_massive_response_dialog( - event_id, - response_id, - response, - counter, - end - ); + show_massive_response_dialog(event_id, response_id, response, counter, end); - counter++; - } + counter++; }); } diff --git a/pandora_console/operation/events/event_statistics.php b/pandora_console/operation/events/event_statistics.php index 437ec0f47c..a4a5b1632a 100644 --- a/pandora_console/operation/events/event_statistics.php +++ b/pandora_console/operation/events/event_statistics.php @@ -1,30 +1,48 @@ '; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 8fa3963d6a..f8e53ab7d1 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -93,7 +93,7 @@ $text_agent = get_parameter('filter[text_agent]'); $id_agent = get_parameter('filter[id_agent]'); $id_agent_module = get_parameter('filter[id_agent_module]'); $pagination = get_parameter('filter[pagination]'); -$event_view_hr = get_parameter('filter[event_view_hr]', 8); +$event_view_hr = get_parameter('filter[event_view_hr]', $config['event_view_hr']); $id_user_ack = get_parameter('filter[id_user_ack]'); $group_rep = get_parameter('filter[group_rep]', 1); $tag_with = get_parameter('filter[tag_with]', []); @@ -1034,6 +1034,13 @@ $filter .= ui_toggle( ); try { + $checkbox_all = html_print_checkbox( + 'all_validate_box', + 1, + false, + true + ); + $default_fields = [ 'evento', 'id_evento', @@ -1070,7 +1077,7 @@ try { 'class' => 'action_buttons w120px', ],[ 'text' => 'm', - 'extra' => "", + 'extra' => $checkbox_all, 'class' => 'w20px', ], ]; @@ -1090,7 +1097,7 @@ try { 'class' => 'action_buttons w120px', ],[ 'text' => 'm', - 'extra' => "", + 'extra' => $checkbox_all, 'class' => 'w20px no-text-imp', ], ] @@ -1298,7 +1305,6 @@ html_print_input_hidden( echo "
    "; echo "
    "; echo "
    "; -echo "
    "; // Load filter div for dialog. echo ''; From dc81d168e0d15cc4943f7d78d348a3048581f3eb Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 18 Jun 2019 11:00:48 +0200 Subject: [PATCH 101/206] event filters group selectors --- pandora_console/include/ajax/events.php | 7 +++++++ pandora_console/include/functions_events.php | 2 +- .../include/javascript/pandora_events.js | 19 +++++-------------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 6d99e8b22e..1c9a4a6c7b 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -420,6 +420,13 @@ if ($save_filter_modal) { $data[1] = __('Filter group').$jump; } + $user_groups_array = users_get_groups_for_select( + $config['id_user'], + 'EW', + users_can_manage_group_all(), + true + ); + $data[1] .= html_print_select( $user_groups_array, 'id_group_filter', diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 368e02c028..acc36a8f09 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2901,7 +2901,7 @@ function events_get_event_filter_select($manage=true) $sql = ' SELECT id_filter, id_name FROM tevent_filter - WHERE id_group_filter IN ('.implode(',', array_keys($user_groups)).')'; + WHERE id_group_filter IN (0, '.implode(',', array_keys($user_groups)).')'; $event_filters = db_get_all_rows_sql($sql); diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index dee5498015..ff596aacb7 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -680,6 +680,8 @@ function update_event(table, id_evento, type, row) { // Update events matching current filters and id_evento selected. $.ajax({ + async: true, + timeout: 10000, type: "POST", url: $("#hidden-ajax_file").val(), data: { @@ -799,31 +801,20 @@ function execute_event_response(event_list_btn) { } } else { // It is not a custom response - var delay = 5000; - var $i = 0; switch (response_id) { case "in_progress_selected": $(".chk_val:checked").each(function() { - setTimeout( - in_process_event(dt_events, $(this).val(), this.parentElement), - total_checked * delay * $i++ - ); + in_process_event(dt_events, $(this).val(), this.parentElement); }); break; case "validate_selected": $(".chk_val:checked").each(function() { - setTimeout( - validate_event(dt_events, $(this).val(), this.parentElement), - total_checked * delay * $i++ - ); + validate_event(dt_events, $(this).val(), this.parentElement); }); break; case "delete_selected": $(".chk_val:checked").each(function() { - setTimeout( - delete_event(dt_events, $(this).val(), this.parentElement), - total_checked * delay * $i++ - ); + delete_event(dt_events, $(this).val(), this.parentElement); }); break; } From 8f2feac676c92c2ffed76494d2849e0bc71f6d48 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 18 Jun 2019 11:35:59 +0200 Subject: [PATCH 102/206] Added DESTDIR in license.php --- pandora_console/godmode/setup/license.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index f03d32ef0a..06d7d2e7e3 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -135,7 +135,9 @@ $table->data[9][0] = ''.__('Licensed to').''; $table->data[9][1] = html_print_input_text('licensed_to', $license['licensed_to'], '', 64, 255, true, true); html_print_table($table); -if (enterprise_installed()) { + +// If DESTDIR is defined the enterprise license is expired. +if (enterprise_installed() || defined('DESTDIR')) { echo '
    '; html_print_input_hidden('update_settings', 1); html_print_submit_button(__('Validate'), 'update_button', false, 'class="sub upd"'); From d8a331bf77e1defc54c2975ca8d55bf290b41388 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 18 Jun 2019 12:48:28 +0200 Subject: [PATCH 103/206] event filters tags, date, module name --- pandora_console/include/functions_events.php | 102 ++++++++++++++----- pandora_console/include/functions_ui.php | 8 +- pandora_console/include/styles/events.css | 36 ------- pandora_console/include/styles/tables.css | 60 ++++++++++- 4 files changed, 138 insertions(+), 68 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index acc36a8f09..0f46f00da9 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -482,14 +482,55 @@ function events_get_all( throw new Exception('[events_get_all] Fields must be an array or "count".'); } - $sql_filters = []; - if (isset($filter['event_view_hr']) && ($filter['event_view_hr'] > 0)) { + if (isset($filter['date_from']) && $filter['date_from'] != '0000-00-00') { + $date_from = $filter['date_from']; + } + + if (isset($filter['time_from'])) { + $time_from = $filter['time_from']; + } + + if (isset($date_from)) { + if (!isset($time_from)) { + $time_from = '00:00:00'; + } + + $from = $date_from.' '.$time_from; $sql_filters[] = sprintf( - ' AND utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d HOUR) ', - $filter['event_view_hr'] + ' AND te.utimestamp >= %d', + strtotime($from) ); } + if (isset($filter['date_to']) && $filter['date_to'] != '0000-00-00') { + $date_to = $filter['date_to']; + } + + if (isset($filter['time_to'])) { + $time_to = $filter['time_to']; + } + + if (isset($date_to)) { + if (!isset($time_to)) { + $time_to = '23:59:59'; + } + + $to = $date_to.' '.$time_to; + $sql_filters[] = sprintf( + ' AND te.utimestamp <= %d', + strtotime($to) + ); + } + + if (!isset($from)) { + if (isset($filter['event_view_hr']) && ($filter['event_view_hr'] > 0)) { + $sql_filters[] = sprintf( + ' AND utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d HOUR) ', + $filter['event_view_hr'] + ); + } + } + if (isset($filter['id_agent']) && $filter['id_agent'] > 0) { $sql_filters[] = sprintf( ' AND te.id_agente = %d ', @@ -728,43 +769,36 @@ function events_get_all( } } - $_tmp = ' AND ('; foreach ($tags as $id_tag) { if (!isset($tags_names[$id_tag])) { $tags_names[$id_tag] = tags_get_name($id_tag); } - if ($first) { - $_tmp .= ' ( '; - $first = false; - } else { - $_tmp .= ' AND ( '; - } - + $_tmp .= ' AND ( '; $_tmp .= sprintf( - 'tags LIKE "%s"', - $tag_names[$id_tag] + ' tags LIKE "%s" OR', + $tags_names[$id_tag] ); $_tmp .= sprintf( - 'tags LIKE "%s,%%"', - $tag_names[$id_tag] + ' tags LIKE "%s,%%" OR', + $tags_names[$id_tag] ); $_tmp .= sprintf( - 'tags LIKE "%%,%s"', - $tag_names[$id_tag] + ' tags LIKE "%%,%s" OR', + $tags_names[$id_tag] ); $_tmp .= sprintf( - 'tags LIKE "%%,%s,%%"', - $tag_names[$id_tag] + ' tags LIKE "%%,%s,%%" ', + $tags_names[$id_tag] ); $_tmp .= ') '; } - $sql_filters[] = $_tmp.') '; + $sql_filters[] = $_tmp; } } @@ -773,7 +807,6 @@ function events_get_all( $tag_without = base64_decode($filter['tag_without']); $tags = json_decode($tag_without, true); if (is_array($tags) && !in_array('0', $tags)) { - $_tmp = ' AND ('; foreach ($tags as $id_tag) { if (!isset($tags_names[$id_tag])) { $tags_names[$id_tag] = tags_get_name($id_tag); @@ -781,23 +814,23 @@ function events_get_all( $_tmp .= sprintf( ' AND tags NOT LIKE "%s" ', - $tag_names[$id_tag] + $tags_names[$id_tag] ); $_tmp .= sprintf( ' AND tags NOT LIKE "%s,%%" ', - $tag_names[$id_tag] + $tags_names[$id_tag] ); $_tmp .= sprintf( ' AND tags NOT LIKE "%%,%s" ', - $tag_names[$id_tag] + $tags_names[$id_tag] ); $_tmp .= sprintf( ' AND tags NOT LIKE "%%,%s,%%" ', - $tag_names[$id_tag] + $tags_names[$id_tag] ); } - $sql_filters[] = $_tmp.') '; + $sql_filters[] = $_tmp; } } @@ -891,6 +924,17 @@ function events_get_all( $sql_filters[] = $tags_acls_condition; } + // Module search. + $agentmodule_join = ''; + if (!empty($filter['module_search'])) { + $agentmodule_join = 'INNER JOIN tagente_modulo am + ON te.id_agentmodule = am.id_agente_modulo'; + $sql_filters[] = sprintf( + ' AND am.nombre = "%s" ', + $filter['module_search'] + ); + } + // Order. $order_by = ''; if (isset($order, $sort_field)) { @@ -899,7 +943,7 @@ function events_get_all( // Pagination. $pagination = ''; - if (isset($limit, $offset)) { + if (isset($limit, $offset) && $limit > 0) { $pagination = sprintf(' LIMIT %d OFFSET %d', $limit, $offset); } @@ -977,6 +1021,7 @@ function events_get_all( %s FROM %s %s + %s %s JOIN %s ta ON ta.%s = te.id_agente %s @@ -994,6 +1039,7 @@ function events_get_all( $group_selects, $tevento, $event_lj, + $agentmodule_join, $tagente_join, $tagente_table, $tagente_field, diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 9803666c08..ac77ae6771 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3127,10 +3127,16 @@ function ui_print_datatable(array $parameters) $table .= '
    '; + $pagination_class = 'pandora_pagination'; + if (!empty($parameters['pagination_class'])) { + $pagination_class = $parameters['pagination_class']; + } + // Javascript controller. $js = ' diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index ee61cdaf79..8cb3c106c1 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -1,20 +1,36 @@ $v) { $agents[$keys_prefix.$k] = $v; unset($agents[$k]); if ($all_agents) { - // Unserialize to get the status + // Unserialize to get the status. if ($serialized && is_metaconsole()) { $agent_info = explode($serialized_separator, $k); $agent_disabled = db_get_value_filter( @@ -174,7 +193,8 @@ if (is_ajax()) { ['id_agente' => $agent_info[1]] ); } else if (!$serialized && is_metaconsole()) { - // Cannot retrieve the disabled status. Mark all as not disabled + // Cannot retrieve the disabled status. + // Mark all as not disabled. $agent_disabled = 0; } else { $agent_disabled = db_get_value_filter( @@ -226,11 +246,13 @@ if (! check_acl($config['id_user'], 0, 'PM')) { } $sec = defined('METACONSOLE') ? 'advanced' : 'gagente'; -$url_tree = "index.php?sec=$sec&sec2=godmode/groups/group_list&tab=tree"; -$url_groups = "index.php?sec=$sec&sec2=godmode/groups/group_list&tab=groups"; +$url_credbox = 'index.php?sec='.$sec.'&sec2=godmode/groups/group_list&tab=credbox'; +$url_tree = 'index.php?sec='.$sec.'&sec2=godmode/groups/group_list&tab=tree'; +$url_groups = 'index.php?sec='.$sec.'&sec2=godmode/groups/group_list&tab=groups'; + $buttons['tree'] = [ 'active' => false, - 'text' => "".html_print_image( + 'text' => ''.html_print_image( 'images/gm_massive_operations.png', true, [ @@ -241,7 +263,7 @@ $buttons['tree'] = [ $buttons['groups'] = [ 'active' => false, - 'text' => "".html_print_image( + 'text' => ''.html_print_image( 'images/group.png', true, [ @@ -250,21 +272,38 @@ $buttons['groups'] = [ ).'', ]; +$buttons['credbox'] = [ + 'active' => false, + 'text' => ''.html_print_image( + 'images/key.png', + true, + [ + 'title' => __('Credential Store'), + ] + ).'', +]; + $tab = (string) get_parameter('tab', 'groups'); -// Marks correct tab +$title = __('Groups defined in %s', get_product_name()); +// Marks correct tab. switch ($tab) { case 'tree': $buttons['tree']['active'] = true; break; + case 'credbox': + $buttons['credbox']['active'] = true; + $title = __('Credential store'); + break; + case 'groups': default: $buttons['groups']['active'] = true; break; } -// Header +// Header. if (defined('METACONSOLE')) { agents_meta_print_header(); echo '
    '; @@ -272,7 +311,7 @@ if (defined('METACONSOLE')) { echo '
    '; } else { ui_print_page_header( - __('Groups defined in %s', get_product_name()), + $title, 'images/group.png', false, 'group_list_tab', @@ -281,12 +320,19 @@ if (defined('METACONSOLE')) { ); } +// Load credential store view before parse list-tree forms. +if ($tab == 'credbox') { + include_once __DIR__.'/credential_store.php'; + // Stop script. + return; +} + $create_group = (bool) get_parameter('create_group'); $update_group = (bool) get_parameter('update_group'); $delete_group = (bool) get_parameter('delete_group'); $pure = get_parameter('pure', 0); -// Create group +// Create group. if (($create_group) && (check_acl($config['id_user'], 0, 'PM'))) { $name = (string) get_parameter('name'); $icon = (string) get_parameter('icon'); @@ -301,7 +347,7 @@ if (($create_group) && (check_acl($config['id_user'], 0, 'PM'))) { $check = db_get_value('nombre', 'tgrupo', 'nombre', $name); $propagate = (bool) get_parameter('propagate'); - // Check if name field is empty + // Check if name field is empty. if ($name != '') { if (!$check) { $values = [ @@ -328,12 +374,11 @@ if (($create_group) && (check_acl($config['id_user'], 0, 'PM'))) { ui_print_error_message(__('Each group must have a different name')); } } else { - // $result = false; ui_print_error_message(__('Group must have a name')); } } -// Update group +// Update group. if ($update_group) { $id_group = (int) get_parameter('id_group'); $name = (string) get_parameter('name'); @@ -349,49 +394,35 @@ if ($update_group) { $contact = (string) get_parameter('contact'); $other = (string) get_parameter('other'); - // Check if name field is empty + // Check if name field is empty. if ($name != '') { - switch ($config['dbtype']) { - case 'mysql': - $sql = sprintf( - 'UPDATE tgrupo SET nombre = "%s", - icon = "%s", disabled = %d, parent = %d, custom_id = "%s", propagate = %d, id_skin = %d, description = "%s", contact = "%s", other = "%s", password = "%s" - WHERE id_grupo = %d', - $name, - empty($icon) ? '' : substr($icon, 0, -4), - !$alerts_enabled, - $id_parent, - $custom_id, - $propagate, - $skin, - $description, - $contact, - $other, - $group_pass, - $id_group - ); - break; - - case 'postgresql': - case 'oracle': - $sql = sprintf( - 'UPDATE tgrupo SET nombre = \'%s\', - icon = \'%s\', disabled = %d, parent = %d, custom_id = \'%s\', propagate = %d, id_skin = %d, description = \'%s\', contact = \'%s\', other = \'%s\' - WHERE id_grupo = %d', - $name, - substr($icon, 0, -4), - !$alerts_enabled, - $id_parent, - $custom_id, - $propagate, - $skin, - $description, - $contact, - $other, - $id_group - ); - break; - } + $sql = sprintf( + 'UPDATE tgrupo + SET nombre = "%s", + icon = "%s", + disabled = %d, + parent = %d, + custom_id = "%s", + propagate = %d, + id_skin = %d, + description = "%s", + contact = "%s", + other = "%s", + password = "%s" + WHERE id_grupo = %d', + $name, + empty($icon) ? '' : substr($icon, 0, -4), + !$alerts_enabled, + $id_parent, + $custom_id, + $propagate, + $skin, + $description, + $contact, + $other, + $group_pass, + $id_group + ); $result = db_process_sql($sql); } else { @@ -405,7 +436,7 @@ if ($update_group) { } } -// Delete group +// Delete group. if (($delete_group) && (check_acl($config['id_user'], 0, 'PM'))) { $id_group = (int) get_parameter('id_group'); @@ -445,7 +476,14 @@ if (($delete_group) && (check_acl($config['id_user'], 0, 'PM'))) { } } + +// Credential store is loaded previously in this document to avoid +// process group tree - list forms. if ($tab == 'tree') { + /* + * Group tree view. + */ + echo html_print_image( 'images/spinner.gif', true, @@ -456,6 +494,10 @@ if ($tab == 'tree') { ); echo "
    "; } else { + /* + * Group list view. + */ + $acl = ''; $search_name = ''; $offset = (int) get_parameter('offset', 0); @@ -463,17 +505,22 @@ if ($tab == 'tree') { $block_size = $config['block_size']; if (!empty($search)) { - $search_name = "AND t.nombre LIKE '%$search%'"; + $search_name = 'AND t.nombre LIKE "%'.$search.'%"'; } if (!users_can_manage_group_all('AR')) { $user_groups_acl = users_get_groups(false, 'AR'); $groups_acl = implode(',', $user_groups_ACL); if (empty($groups_acl)) { - return ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups') ]); + return ui_print_info_message( + [ + 'no_close' => true, + 'message' => __('There are no defined groups'), + ] + ); } - $acl = "AND t.id_grupo IN ($groups_acl)"; + $acl = 'AND t.id_grupo IN ('.$groups_acl.')'; } $form = "
    "; @@ -488,29 +535,37 @@ if ($tab == 'tree') { echo $form; - $groups_sql = "SELECT t.*, + $groups_sql = sprintf( + 'SELECT t.*, p.nombre AS parent_name, IF(t.parent=p.id_grupo, 1, 0) AS has_child - FROM tgrupo t - LEFT JOIN tgrupo p + FROM tgrupo t + LEFT JOIN tgrupo p ON t.parent=p.id_grupo - WHERE 1=1 - $acl - $search_name + WHERE 1=1 + %s + %s ORDER BY nombre - LIMIT $offset, $block_size - "; + LIMIT %d, %d', + $acl, + $search_name, + $offset, + $block_size + ); $groups = db_get_all_rows_sql($groups_sql); if (!empty($groups)) { - // Count all groups for pagination only saw user and filters - $groups_sql_count = "SELECT count(*) + // Count all groups for pagination only saw user and filters. + $groups_sql_count = sprintf( + 'SELECT count(*) FROM tgrupo t WHERE 1=1 - $acl - $search_name - "; + %s + %s', + $acl, + $search_name + ); $groups_count = db_get_value_sql($groups_sql_count); $table = new StdClass(); @@ -545,7 +600,7 @@ if ($tab == 'tree') { $url = 'index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo']; $url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo']; $table->data[$key][0] = $group['id_grupo']; - $table->data[$key][1] = "".$group['nombre'].''; + $table->data[$key][1] = ''.$group['nombre'].''; if ($group['icon'] != '') { $table->data[$key][2] = html_print_image( 'images/groups_small/'.$group['icon'].'.png', @@ -553,22 +608,25 @@ if ($tab == 'tree') { [ 'style' => '', 'class' => 'bot', - 'alt' => $group['nombre'], + 'alt' => $group['nombre'], 'title' => $group['nombre'], - false, false, false, true - ] + ], + false, + false, + false, + true ); } else { $table->data[$key][2] = ''; } - // reporting_get_group_stats - $table->data[$key][3] = $group['disabled'] ? __('Disabled') : __('Enabled'); + // Reporting_get_group_stats. + $table->data[$key][3] = ($group['disabled']) ? __('Disabled') : __('Enabled'); $table->data[$key][4] = $group['parent_name']; $table->data[$key][5] = $group['description']; $table->cellclass[$key][6] = 'action_buttons'; - $table->data[$key][6] = "".html_print_image( + $table->data[$key][6] = ''.html_print_image( 'images/config.png', true, [ diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php new file mode 100644 index 0000000000..acf15bb6be --- /dev/null +++ b/pandora_console/include/functions_credential_store.php @@ -0,0 +1,97 @@ + $v) { - $js .= $k.':'.json_encode($v).",\n"; + if (is_array($parameters['ajax_data'])) { + foreach ($parameters['ajax_data'] as $k => $v) { + $js .= $k.':'.json_encode($v).",\n"; + } } $js .= 'page: "'.$parameters['ajax_url'].'" diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index b30295bba6..bdd1bca841 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -693,6 +693,20 @@ CREATE TABLE IF NOT EXISTS `tgrupo` ( KEY `parent_index` (`parent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- --------------------------------------------------------------------- +-- Table `tcredential_store` +-- --------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tcredential_store` ( + `identifier` varchar(100) NOT NULL, + `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0, + `product` text, + `username` text, + `password` text, + `extra_1` text, + `extra_2` text, + PRIMARY KEY (`identifier`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tincidencia` -- --------------------------------------------------------------------- From 379a0039aed08e7d82c526f2555bc1c8cbd3b598 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 21 Jun 2019 12:41:05 +0200 Subject: [PATCH 144/206] Fixed vc-control --- pandora_console/include/styles/pandora.css | 3 +-- pandora_console/operation/visual_console/view.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 0596f5bf41..4b2a761e4c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -1390,7 +1390,6 @@ div.title_line { #menu_tab { margin-right: 10px; - min-width: 510px; } #menu_tab .mn, @@ -3711,7 +3710,7 @@ div#vc-controls { div#vc-controls div.vc-title, div#vc-controls div.vc-refr { - margin-top: 6px; + margin-top: 15px; margin-left: 3px; margin-right: 3px; } diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php index 61633b1fc6..3b0707036b 100644 --- a/pandora_console/operation/visual_console/view.php +++ b/pandora_console/operation/visual_console/view.php @@ -172,7 +172,7 @@ if ($pure === true) { echo '
    '; echo ''; text: '', click: function(e) { $(this).dialog('close'); + $(this).remove(); } }, { @@ -552,6 +555,7 @@ echo '
    '; text: "", click: function(e) { $(this).dialog('close'); + $(this).remove(); } }, { diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index acc6a2c09f..accc9348fd 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -277,7 +277,7 @@ function print_inputs($values=null) 'id' => 'id_group', 'input_class' => 'flex-row', 'type' => 'select_groups', - 'selected' => $values['id_grupo'], + 'selected' => $values['id_group'], 'return' => true, 'class' => 'w50p', ] @@ -288,6 +288,7 @@ function print_inputs($values=null) 'name' => 'product', 'input_class' => 'flex-row', 'type' => 'select', + 'script' => 'calculate_inputs()', 'fields' => [ 'CUSTOM' => __('Custom'), 'AWS' => __('Aws'), From 8f914b69a601538b76954c61d4644e3c16e2fe19 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 25 Jun 2019 17:24:16 +0200 Subject: [PATCH 190/206] Minor fixes --- pandora_console/include/javascript/pandora_events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index afd9fbe573..94dadb6fbb 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -688,7 +688,7 @@ function update_event(table, id_evento, type, event_rep, row) { var diff_s = diff_g / 1000; if (processed >= $(".chk_val:checked").length) { // If operation takes less than 2 seconds, redraw. - if (diff_s < 2) { + if (diff_s < 2 || $(".chk_val:checked").length > 1) { redraw = true; } if (redraw) { From e1bf12a1fb9c8fc8c1bb2166063c1be902d4c421 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 25 Jun 2019 18:21:23 +0200 Subject: [PATCH 191/206] Credential store --- .../godmode/groups/credential_store.php | 157 +++++++++++------- .../include/functions_credential_store.php | 7 +- 2 files changed, 99 insertions(+), 65 deletions(-) diff --git a/pandora_console/godmode/groups/credential_store.php b/pandora_console/godmode/groups/credential_store.php index 01e7f11bfa..9a822dc986 100644 --- a/pandora_console/godmode/groups/credential_store.php +++ b/pandora_console/godmode/groups/credential_store.php @@ -49,16 +49,21 @@ if (! check_acl($config['id_user'], 0, 'PM')) { // Required files. ui_require_css_file('credential_store'); require_once $config['homedir'].'/include/functions_credential_store.php'; - +require_once $config['homedir'].'/include/functions_io.php'; if (is_ajax()) { $draw = get_parameter('draw', 0); $filter = get_parameter('filter', []); $get_key = get_parameter('get_key', 0); + $new_form = get_parameter('new_form', 0); $new_key = get_parameter('new_key', 0); $update_key = get_parameter('update_key', 0); $delete_key = get_parameter('delete_key', 0); + if ($new_form) { + echo print_inputs(); + exit; + } if ($delete_key) { $identifier = get_parameter('identifier', null); @@ -130,6 +135,9 @@ if (is_ajax()) { $values = []; foreach ($data as $key => $value) { $values[$key] = base64_decode($value); + if ($key == 'identifier') { + $values[$key] = preg_replace('/\s+/', '-', trim($values[$key])); + } } $identifier = $values['identifier']; @@ -318,8 +326,7 @@ try { // Auxiliar div. $new = ''; +$new .= ''; $details = ''; $aux = ''; @@ -386,7 +393,7 @@ echo ''; if (!failed) { dt_.draw(0); $(".ui-dialog-content").dialog("close"); - $('.ui-dialog-content').remove(); + cleanupDOM(); } else { $(this).dialog('close'); } @@ -407,7 +414,8 @@ echo ''; text: '', click: function(e) { $(this).dialog('close'); - $(this).remove(); + cleanupDOM(); + } }, { @@ -464,7 +472,7 @@ echo ''; text: '', click: function(e) { $(this).dialog('close'); - $(this).remove(); + cleanupDOM(); } }, { @@ -503,6 +511,15 @@ echo ''; }) } + function cleanupDOM() { + $('#div-identifier').empty(); + $('#div-product').empty(); + $('#div-username').empty(); + $('#div-password').empty(); + $('#div-extra_1').empty(); + $('#div-extra_2').empty(); + } + function calculate_inputs() { if ($('#product :selected').val() == "CUSTOM") { $('#div-username label').text(''); @@ -528,66 +545,82 @@ echo ''; function add_key() { // Clear form. - $('#form_new :input').each(function() { - $(this).val('') - }); - $('#id_group').val(0); - $('#product').val('CUSTOM'); - - $('#product').on('change', function() { - calculate_inputs() - }); - - // Show form. - $('#new_key').dialog({ - width: 580, - height: 400, - position: { - my: 'center', - at: 'center', - of: window, - collision: 'fit' + $('#form_update').empty(); + $('#form_update').html('Loading...'); + $.ajax({ + method: 'post', + url: '', + data: { + page: 'godmode/groups/credential_store', + new_form: 1 }, - title: "", - buttons: [ - { - class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel', - text: "", - click: function(e) { - $(this).dialog('close'); - $(this).remove(); - } - }, - { - class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next', - text: 'OK', - click: function(e) { - var values = {}; + success: function(data) { + $('#form_new').html(data); + $('#id_group').val(0); + // By default AWS. + $('#product').val('AWS'); + calculate_inputs(); - $('#form_new :input').each(function() { - values[this.name] = btoa($(this).val()); - }); + $('#product').on('change', function() { + calculate_inputs() + }); - $.ajax({ - method: 'post', - url: '', - data: { - page: 'godmode/groups/credential_store', - new_key: 1, - values: values - }, - datatype: "json", - success: function (data) { - handle_response(data); - }, - error: function(e) { - handle_response(e); + // Show form. + $('#new_key').dialog({ + width: 580, + height: 400, + position: { + my: 'center', + at: 'center', + of: window, + collision: 'fit' + }, + title: "", + buttons: [ + { + class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel', + text: "", + click: function(e) { + $(this).dialog('close'); + cleanupDOM(); } - }); - } - }, - ] - }); + }, + { + class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next', + text: 'OK', + click: function(e) { + var values = {}; + + console.log($('#form_new')); + + $('#form_new :input').each(function() { + values[this.name] = btoa($(this).val()); + }); + + $.ajax({ + method: 'post', + url: '', + data: { + page: 'godmode/groups/credential_store', + new_key: 1, + values: values + }, + datatype: "json", + success: function (data) { + handle_response(data); + }, + error: function(e) { + handle_response(e); + } + }); + } + }, + ] + }); + } + }) + + } $(document).ready(function(){ diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index accc9348fd..e49bd71399 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -268,6 +268,7 @@ function print_inputs($values=null) 'value' => $values['identifier'], 'disabled' => (bool) $values['identifier'], 'return' => true, + 'script' => 'alert(\'puta\')', ] ); $return .= html_print_input( @@ -290,9 +291,9 @@ function print_inputs($values=null) 'type' => 'select', 'script' => 'calculate_inputs()', 'fields' => [ - 'CUSTOM' => __('Custom'), - 'AWS' => __('Aws'), - 'AZURE' => __('Azure'), + // 'CUSTOM' => __('Custom'), + 'AWS' => __('Aws'), + // 'AZURE' => __('Azure'), // 'GOOGLE' => __('Google'), ], 'selected' => $values['product'], From 9a65d8188a2cc67375a46a8e552e859524d0aad5 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 26 Jun 2019 00:01:09 +0200 Subject: [PATCH 192/206] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 6771606f50..2faf21c47a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.735-190625 +Version: 7.0NG.735-190626 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index fe7628e999..7521094eba 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.735-190625" +pandora_version="7.0NG.735-190626" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 6bbb463b49..3cf1d22126 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.735'; -use constant AGENT_BUILD => '190625'; +use constant AGENT_BUILD => '190626'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 8f580504eb..725d5abaa2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.735 -%define release 190625 +%define release 190626 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 28023a28f3..970291a4c3 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.735 -%define release 190625 +%define release 190626 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 879ff79eac..2b9cf3b68c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.735" -PI_BUILD="190625" +PI_BUILD="190626" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 21e38fb13b..7aecb7cff2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190625} +{190626} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2194b622ac..f655faabc6 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.735(Build 190625)") +#define PANDORA_VERSION ("7.0NG.735(Build 190626)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f328ab299c..3d3a2ebf4a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.735(Build 190625))" + VALUE "ProductVersion", "(7.0NG.735(Build 190626))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8a166990ab..5fc2731073 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.735-190625 +Version: 7.0NG.735-190626 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 2d45e0aa49..44d78e12ac 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.735-190625" +pandora_version="7.0NG.735-190626" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 60a348e138..95f6595032 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190625'; +$build_version = 'PC190626'; $pandora_version = 'v7.0NG.735'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 2e3074241c..00a940965b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d6b4578521..14abd0603d 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.735 -%define release 190625 +%define release 190626 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f3758822ff..3e53f83626 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.735 -%define release 190625 +%define release 190626 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b63386d7df..97459cff2f 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.735" -PI_BUILD="190625" +PI_BUILD="190626" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 875f8f51dd..b9f0bfa2d2 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.735 PS190625"; +my $version = "7.0NG.735 PS190626"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index e00e964276..c6c88c7139 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.735 PS190625"; +my $version = "7.0NG.735 PS190626"; # save program name for logging my $progname = basename($0); From fdf2a983d291ca0e49d374da458f2797b712566a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 26 Jun 2019 10:39:18 +0200 Subject: [PATCH 193/206] general review credential store --- pandora_console/include/functions_credential_store.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index e49bd71399..cf09e6d67b 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -403,7 +403,7 @@ function credentials_list_accounts($product) if (!isset($user_groups)) { $user_groups = users_get_groups( $config['id_user'], - 'AW' + 'AR' ); // Always add group 'ALL' because 'ALL' group credentials From f66e5b5ef8434cf55989c8bfc6d3776363de823b Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 26 Jun 2019 11:11:21 +0200 Subject: [PATCH 194/206] Fix class names to avoid addblock hide them --- pandora_console/godmode/agentes/agent_manager.php | 4 ++-- pandora_console/include/styles/agent_manager.css | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 7c6a3ab03b..3ea3a7f0c2 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -777,7 +777,7 @@ $table_adv_options = ' '.$adv_secondary_groups_right.'
    -
    +
    '.$table_adv_parent.$table_adv_module_mode.$table_adv_cascade; if ($new_agent) { @@ -788,7 +788,7 @@ if ($new_agent) { $table_adv_options .= '
    '; $table_adv_options .= ' -
    +
    '.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
    '; diff --git a/pandora_console/include/styles/agent_manager.css b/pandora_console/include/styles/agent_manager.css index a5e80a64ee..8b3e0db4f7 100644 --- a/pandora_console/include/styles/agent_manager.css +++ b/pandora_console/include/styles/agent_manager.css @@ -119,8 +119,8 @@ a#qr_code_agent_view { border-bottom-right-radius: 0px; } -.adv_right, -.adv_left, +.agent_av_opt_right, +.agent_av_opt_left, .secondary_groups_list { flex: 1; } @@ -150,8 +150,8 @@ a#qr_code_agent_view { margin: 1em; } -.adv_left input, -.adv_left select { +.agent_av_opt_left input, +.agent_av_opt_left select { width: 100%; } From 29932781781789d4200b06473c51028772e98b16 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 26 Jun 2019 11:33:45 +0200 Subject: [PATCH 195/206] Removed the resize functionality of the module graph vc item --- .../include/visual-console-client/vc.main.min.js | 2 +- .../include/visual-console-client/vc.main.min.js.map | 2 +- visual_console_client/src/Item.ts | 2 +- visual_console_client/src/items/ModuleGraph.ts | 9 +++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/visual-console-client/vc.main.min.js b/pandora_console/include/visual-console-client/vc.main.min.js index 29b551979c..915f2deaaf 100644 --- a/pandora_console/include/visual-console-client/vc.main.min.js +++ b/pandora_console/include/visual-console-client/vc.main.min.js @@ -1,2 +1,2 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){"use strict";n.d(e,"m",function(){return r}),n.d(e,"l",function(){return s}),n.d(e,"r",function(){return o}),n.d(e,"j",function(){return a}),n.d(e,"k",function(){return c}),n.d(e,"n",function(){return u}),n.d(e,"q",function(){return h}),n.d(e,"i",function(){return p}),n.d(e,"h",function(){return _}),n.d(e,"g",function(){return f}),n.d(e,"o",function(){return d}),n.d(e,"d",function(){return m}),n.d(e,"e",function(){return y}),n.d(e,"f",function(){return b}),n.d(e,"p",function(){return v}),n.d(e,"c",function(){return x}),n.d(e,"a",function(){return w}),n.d(e,"b",function(){return O});var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&!isNaN(parseInt(t))?parseInt(t):e}function s(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!isNaN(parseFloat(t))?parseFloat(t):e}function o(t){return null==t||0===t.length}function a(t,e){return"string"==typeof t&&t.length>0?t:e}function c(t){return"boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&("1"===t||"true"===t)}function l(t,e,n){void 0===n&&(n=" "),"number"==typeof t&&(t=""+t),"number"==typeof n&&(n=""+n);var i=e-t.length;if(0===i)return t;if(i<0)return t.substr(Math.abs(i));if(i===n.length)return""+n+t;if(i0&&id||y+r+m.width-b>u.width||r===x&&y<0&&i>f+x+c,A=h0&&h_||g+s+m.height-b>u.height||s===E&&g<0&&h>p+E+l;(e=O?0:T?x:y+r)<0&&(e=0),(n=A?0:k?E:g+s)<0&&(n=0),o=i,a=h,e===r&&n===s||(w(e,n),v(e,n),r=e,s=n)},T=function(){r=0,s=0,o=0,a=0,document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",T),t.draggable=i,document.body.style.userSelect="auto"},A=function(e){e.stopPropagation(),t.draggable=!1,r=t.offsetLeft,s=t.offsetTop,o=e.pageX,a=e.pageY,c=e.offsetX,l=e.offsetY,u=n.getBoundingClientRect(),h=E(n),p=h.top,_=p+u.height,f=h.left,d=f+u.width,m=t.getBoundingClientRect(),y=window.getComputedStyle(t).borderWidth||"0",b=2*Number.parseInt(y),document.addEventListener("mousemove",O),document.addEventListener("mouseup",T),document.body.style.userSelect="none"};return t.addEventListener("mousedown",A),function(){t.removeEventListener("mousedown",A),T()}}function O(t,e){var n=document.createElement("div");n.className="resize-draggable",t.appendChild(n);var i=t.parentElement,r=t.draggable,s=0,o=0,a=0,c=0,l=0,u=i.getBoundingClientRect(),h=E(i),p=h.top,_=p+u.height,f=h.left,d=f+u.width,m=E(t),y=m.top,b=m.left,v=window.getComputedStyle(t).borderWidth||"0",w=Number.parseInt(v),O=x(32,function(t,n){return e(t,n)}),T=g(16,function(t,n){return e(t,n)}),A=function(t){var e=s+(t.pageX-a),n=o+(t.pageY-c);e===s&&n===o||eb+(s-l)||(e<15?e=15:e+b-w/2>=d&&(e=d-b),n<15?n=15:n+y-w/2>=_&&(n=_-y),T(e,n),O(e,n),s=e,o=n,a=t.pageX,c=t.pageY)},k=function(){s=0,o=0,a=0,c=0,l=0,0,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",k),t.draggable=r,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",function(e){e.stopPropagation(),t.draggable=!1;var n=t.getBoundingClientRect(),r=n.width,v=n.height;s=r,o=v,a=e.pageX,c=e.pageY,l=e.offsetX,e.offsetY,u=i.getBoundingClientRect(),h=E(i),p=h.top,_=p+u.height,f=h.left,d=f+u.width,m=E(t),y=m.top,b=m.left,document.addEventListener("mousemove",A),document.addEventListener("mouseup",k),document.body.style.userSelect="none"}),function(){n.remove(),k()}}},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var i=n(0),r=n(2),s=function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var i=e.labelElementRef.getBoundingClientRect(),r=i.width,s=i.height;switch(e.props.labelPosition){case"up":case"down":n-=s;break;case"left":case"right":t-=r}}e.resizeElement(t,n),e.debouncedResizementSave(t,n)})},t.prototype.stopResizementListener=function(){this.removeResizement&&(this.removeResizement(),this.removeResizement=null)},t.prototype.createContainerDomElement=function(){var t,e=this;return this.props.isLinkEnabled?(t=document.createElement("a"),this.props.link&&(t.href=this.props.link)):t=document.createElement("div"),t.className="visual-console-item",t.style.zIndex=this.props.isOnTop?"2":"1",t.style.left=this.props.x+"px",t.style.top=this.props.y+"px",t.addEventListener("click",function(t){e.meta.editMode?(t.preventDefault(),t.stopPropagation()):e.clickEventManager.emit({data:e.props,nativeEvent:t})}),this.meta.editMode&&(t.classList.add("is-editing"),this.initMovementListener(t),this.initResizementListener(t)),this.meta.isFetching&&t.classList.add("is-fetching"),this.meta.isUpdating&&t.classList.add("is-updating"),t},t.prototype.createLabelDomElement=function(){var t=document.createElement("div");t.className="visual-console-item-label";var e=this.getLabelWithMacrosReplaced();if(e.length>0){var n=document.createElement("table"),i=document.createElement("tr"),r=document.createElement("tr"),s=document.createElement("tr"),o=document.createElement("td");switch(o.innerHTML=e,i.append(o),n.append(r,i,s),n.style.textAlign="center",this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height=null);break;case"left":case"right":this.props.height>0&&(n.style.width=null,n.style.height=this.props.height+"px")}t.append(n)}return t},t.prototype.getLabelWithMacrosReplaced=function(){var t=this.props;return Object(i.p)([{macro:"_date_",value:Object(i.e)(new Date)},{macro:"_time_",value:Object(i.f)(new Date)},{macro:"_agent_",value:null!=t.agentAlias?t.agentAlias:""},{macro:"_agentdescription_",value:null!=t.agentDescription?t.agentDescription:""},{macro:"_address_",value:null!=t.agentAddress?t.agentAddress:""},{macro:"_module_",value:null!=t.moduleName?t.moduleName:""},{macro:"_moduledescription_",value:null!=t.moduleDescription?t.moduleDescription:""}],this.props.label||"")},t.prototype.updateDomElement=function(t){t.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(t.prototype,"props",{get:function(){return s({},this.itemProps)},set:function(t){var e=this.props;this.itemProps=t,this.shouldBeUpdated(e,t)&&this.render(e,this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"meta",{get:function(){return s({},this._metadata)},set:function(t){this.setMeta(t)},enumerable:!0,configurable:!0}),t.prototype.setMeta=function(t){var e=this._metadata;this._metadata=t,this.render(this.itemProps,e)},t.prototype.shouldBeUpdated=function(t,e){return t!==e},t.prototype.render=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.updateDomElement(this.childElementRef),t&&!this.positionChanged(t,this.props)||this.moveElement(this.props.x,this.props.y),t&&!this.sizeChanged(t,this.props)||this.resizeElement(this.props.width,this.props.height);var n=this.labelElementRef.innerHTML,i=this.createLabelDomElement().innerHTML;if(n!==i&&(this.labelElementRef.innerHTML=i),t&&t.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition),t&&(t.isLinkEnabled!==this.props.isLinkEnabled||this.props.isLinkEnabled&&t.link!==this.props.link)){var r=this.createContainerDomElement();r.innerHTML=this.elementRef.innerHTML;for(var s=this.elementRef.attributes,o=0;o0?e.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height=null);break;case"left":case"right":this.props.height>0&&(n.style.width=null,n.style.height=this.props.height+"px")}},t.prototype.moveElement=function(t,e){this.elementRef.style.left=t+"px",this.elementRef.style.top=e+"px"},t.prototype.move=function(t,e){this.moveElement(t,e),this.itemProps=s({},this.props,{x:t,y:e})},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){if(this.childElementRef.style.width=t>0?t+"px":null,this.childElementRef.style.height=e>0?e+"px":null,this.props.label&&this.props.label.length>0){var n=this.labelElementRef.getElementsByTagName("table"),i=n.length>0?n.item(0):null;if(i)switch(this.props.labelPosition){case"up":case"down":i.style.width=t>0?t+"px":null;break;case"left":case"right":i.style.height=e>0?e+"px":null}}},t.prototype.resize=function(t,e){this.resizeElement(t,e),this.itemProps=s({},this.props,{width:t,height:e})},t.prototype.onClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onRemove=function(t){var e=this.removeEventManager.on(t);return this.disposables.push(e),e},t}();e.a=c},function(t,e,n){"use strict";var i=function(){return function(){var t=this;this.listeners=[],this.listenersOncer=[],this.on=function(e){return t.listeners.push(e),{dispose:function(){return t.off(e)}}},this.once=function(e){t.listenersOncer.push(e)},this.off=function(e){var n=t.listeners.indexOf(e);n>-1&&t.listeners.splice(n,1)},this.emit=function(e){t.listeners.forEach(function(t){return t(e)}),t.listenersOncer.forEach(function(t){return t(e)}),t.listenersOncer=[]},this.pipe=function(e){return t.on(function(t){return e.emit(t)})}}}();e.a=i},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return eventsHistoryPropsDecoder});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var y=document.createElementNS(t,"text");y.setAttribute("text-anchor","middle"),y.setAttribute("font-size","8"),y.setAttribute("transform","translate(30 50) rotate(90)"),y.setAttribute("fill",i),y.textContent=m,f.append(y)}var b=document.createElementNS(t,"g");b.setAttribute("class","marks");var v=document.createElementNS(t,"g");v.setAttribute("class","mark"),v.setAttribute("transform","translate(50 50)");var g=document.createElementNS(t,"line");g.setAttribute("x1","36"),g.setAttribute("y1","0"),g.setAttribute("x2","46"),g.setAttribute("y2","0"),g.setAttribute("stroke",i),g.setAttribute("stroke-width","5");var x=document.createElementNS(t,"line");x.setAttribute("x1","36"),x.setAttribute("y1","0"),x.setAttribute("x2","46"),x.setAttribute("y2","0"),x.setAttribute("stroke",e),x.setAttribute("stroke-width","1"),v.append(g,x),b.append(v);for(var E=1;E<60;E++){var w=document.createElementNS(t,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",i),w.setAttribute("transform","translate(50 50) rotate("+6*E+")"),E%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",E%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),b.append(w)}var O=document.createElementNS(t,"g");O.setAttribute("class","hour-hand"),O.setAttribute("transform","translate(50 50)");var T=document.createElementNS(t,"line");T.setAttribute("class","hour-hand-a"),T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","30"),T.setAttribute("y2","0"),T.setAttribute("stroke",o),T.setAttribute("stroke-width","4"),T.setAttribute("stroke-linecap","round");var A=document.createElementNS(t,"line");A.setAttribute("class","hour-hand-b"),A.setAttribute("x1","0"),A.setAttribute("y1","0"),A.setAttribute("x2","29.9"),A.setAttribute("y2","0"),A.setAttribute("stroke",s),A.setAttribute("stroke-width","3.1"),A.setAttribute("stroke-linecap","round"),O.append(T,A);var k=document.createElementNS(t,"g");k.setAttribute("class","minute-hand"),k.setAttribute("transform","translate(50 50)");var M=document.createElementNS(t,"line");M.setAttribute("class","minute-hand-a"),M.setAttribute("x1","0"),M.setAttribute("y1","0"),M.setAttribute("x2","40"),M.setAttribute("y2","0"),M.setAttribute("stroke",o),M.setAttribute("stroke-width","2"),M.setAttribute("stroke-linecap","round");var j=document.createElementNS(t,"line");j.setAttribute("class","minute-hand-b"),j.setAttribute("x1","0"),j.setAttribute("y1","0"),j.setAttribute("x2","39.9"),j.setAttribute("y2","0"),j.setAttribute("stroke",s),j.setAttribute("stroke-width","1.5"),j.setAttribute("stroke-linecap","round");var P=document.createElementNS(t,"circle");P.setAttribute("r","3"),P.setAttribute("fill",s),k.append(M,j,P);var S=document.createElementNS(t,"g");S.setAttribute("class","second-hand"),S.setAttribute("transform","translate(50 50)");var L=document.createElementNS(t,"line");L.setAttribute("x1","0"),L.setAttribute("y1","0"),L.setAttribute("x2","46"),L.setAttribute("y2","0"),L.setAttribute("stroke",a),L.setAttribute("stroke-width","1"),L.setAttribute("stroke-linecap","round");var R=document.createElementNS(t,"circle");R.setAttribute("r","2"),R.setAttribute("fill",a),S.append(L,R);var N=document.createElementNS(t,"circle");N.setAttribute("cx","50"),N.setAttribute("cy","50"),N.setAttribute("r","0.3"),N.setAttribute("fill",s);var I=this.getOriginDate(),D=I.getSeconds(),C=I.getMinutes(),z=6*D,B=6*C+D/60*6,W=30*I.getHours()+C/60*30;if(O.setAttribute("transform","translate(50 50) rotate("+W+")"),k.setAttribute("transform","translate(50 50) rotate("+B+")"),S.setAttribute("transform","translate(50 50) rotate("+z+")"),_.append(f,b,O,k,S,N),_.setAttribute("transform","rotate(-90)"),p.innerHTML="\n \n ",p.append(_),"datetime"===this.props.clockFormat){var H=document.createElement("span");H.className="date",H.textContent=Object(r.e)(I,"default"),H.style.fontSize=h+"px",this.props.color&&(H.style.color=this.props.color),p.append(H)}return p},e.prototype.createDigitalClock=function(){var t=document.createElement("div");t.className="digital-clock";var e=this.getElementSize().width,n=6/this.props.clockTimezone.length,i=20*e/100,s=10*e/100,o=Math.min(20*n*e/100,e/100*10),a=this.getOriginDate();if("datetime"===this.props.clockFormat){var c=document.createElement("span");c.className="date",c.textContent=Object(r.e)(a,"default"),c.style.fontSize=s+"px",this.props.color&&(c.style.color=this.props.color),t.append(c)}var l=document.createElement("span");l.className="time",l.textContent=Object(r.f)(a),l.style.fontSize=i+"px",this.props.color&&(l.style.color=this.props.color),t.append(l);var u=this.getHumanTimezone();if(u.length>0){var h=document.createElement("span");h.className="timezone",h.textContent=u,h.style.fontSize=o+"px",this.props.color&&(h.style.color=this.props.color),t.append(h)}return t},e.prototype.getOriginDate=function(t){void 0===t&&(t=null);var e=t||new Date,n=1e3*this.props.clockTimezoneOffset,i=60*e.getTimezoneOffset()*1e3,r=e.getTime()+n+i;return new Date(r)},e.prototype.getHumanTimezone=function(t){void 0===t&&(t=this.props.clockTimezone);var e=t.split("/")[1];return(void 0===e?"":e).replace("_"," ")},e.prototype.getElementSize=function(t,e){switch(void 0===t&&(t=this.props.width),void 0===e&&(e=this.props.height),this.props.clockType){case"analogic":var n=100;return t>0&&e>0?n=Math.min(t,e):t>0?n=t:e>0&&(n=e),{width:n,height:n};case"digital":return t>0&&e>0?e=t/20?e=t/2:e>0?t=2*e:(t=100,e=50),{width:t,height:e};default:throw new Error("invalid clock type.")}},e.TICK_INTERVAL=1e3,e}(s.a),P=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),S=function(){return(S=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){t.style.borderStyle="solid";var e=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,e);t.style.borderWidth=n+"px",this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}return t},e}(s.a),N=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),I=function(){return(I=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&(n=Object(r.p)([{macro:/\(?_VALUE_\)?/i,value:n}],i)),t.innerHTML=n}return t},e.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},e}(s.a),Y=n(3),Z=Math.PI,Q=2*Z,J=Q-1e-6;function $(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function tt(){return new $}$.prototype=tt.prototype={constructor:$,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var s=this._x1,o=this._y1,a=n-t,c=i-e,l=s-t,u=o-e,h=l*l+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*a-c*l)>1e-6&&r){var p=n-s,_=i-o,f=a*a+c*c,d=p*p+_*_,m=Math.sqrt(f),y=Math.sqrt(h),b=r*Math.tan((Z-Math.acos((f+h-d)/(2*m*y)))/2),v=b/y,g=b/m;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*l)+","+(e+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*p>l*_)+","+(this._x1=t+g*a)+","+(this._y1=e+g*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,r,s){t=+t,e=+e;var o=(n=+n)*Math.cos(i),a=n*Math.sin(i),c=t+o,l=e+a,u=1^s,h=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Q+Q),h>J?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Z)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var et=tt,nt=function(t){return function(){return t}},it=Math.abs,rt=Math.atan2,st=Math.cos,ot=Math.max,at=Math.min,ct=Math.sin,lt=Math.sqrt,ut=1e-12,ht=Math.PI,pt=ht/2,_t=2*ht;function ft(t){return t>=1?pt:t<=-1?-pt:Math.asin(t)}function dt(t){return t.innerRadius}function mt(t){return t.outerRadius}function yt(t){return t.startAngle}function bt(t){return t.endAngle}function vt(t){return t&&t.padAngle}function gt(t,e,n,i,r,s,o){var a=t-n,c=e-i,l=(o?s:-s)/lt(a*a+c*c),u=l*c,h=-l*a,p=t+u,_=e+h,f=n+u,d=i+h,m=(p+f)/2,y=(_+d)/2,b=f-p,v=d-_,g=b*b+v*v,x=r-s,E=p*d-f*_,w=(v<0?-1:1)*lt(ot(0,x*x*g-E*E)),O=(E*v-b*w)/g,T=(-E*b-v*w)/g,A=(E*v+b*w)/g,k=(-E*b+v*w)/g,M=O-m,j=T-y,P=A-m,S=k-y;return M*M+j*j>P*P+S*S&&(O=A,T=k),{cx:O,cy:T,x01:-u,y01:-h,x11:O*(r/x-1),y11:T*(r/x-1)}}var xt=function(){var t=dt,e=mt,n=nt(0),i=null,r=yt,s=bt,o=vt,a=null;function c(){var c,l,u,h=+t.apply(this,arguments),p=+e.apply(this,arguments),_=r.apply(this,arguments)-pt,f=s.apply(this,arguments)-pt,d=it(f-_),m=f>_;if(a||(a=c=et()),put)if(d>_t-ut)a.moveTo(p*st(_),p*ct(_)),a.arc(0,0,p,_,f,!m),h>ut&&(a.moveTo(h*st(f),h*ct(f)),a.arc(0,0,h,f,_,m));else{var y,b,v=_,g=f,x=_,E=f,w=d,O=d,T=o.apply(this,arguments)/2,A=T>ut&&(i?+i.apply(this,arguments):lt(h*h+p*p)),k=at(it(p-h)/2,+n.apply(this,arguments)),M=k,j=k;if(A>ut){var P=ft(A/h*ct(T)),S=ft(A/p*ct(T));(w-=2*P)>ut?(x+=P*=m?1:-1,E-=P):(w=0,x=E=(_+f)/2),(O-=2*S)>ut?(v+=S*=m?1:-1,g-=S):(O=0,v=g=(_+f)/2)}var L=p*st(v),R=p*ct(v),N=h*st(E),I=h*ct(E);if(k>ut){var D,C=p*st(g),z=p*ct(g),B=h*st(x),W=h*ct(x);if(d1?0:u<-1?ht:Math.acos(u))/2),F=lt(D[0]*D[0]+D[1]*D[1]);M=at(k,(h-F)/(q-1)),j=at(k,(p-F)/(q+1))}}O>ut?j>ut?(y=gt(B,W,L,R,p,j,m),b=gt(C,z,N,I,p,j,m),a.moveTo(y.cx+y.x01,y.cy+y.y01),jut&&w>ut?M>ut?(y=gt(N,I,C,z,h,-M,m),b=gt(L,R,B,W,h,-M,m),a.lineTo(y.cx+y.x01,y.cy+y.y01),M0)for(var i,r=t[0],s=e[0],o=t[n]-r,a=e[n]-s,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*o),this._beta*e[c]+(1-this._beta)*(s+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new jt(t):new Lt(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Rt(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Nt(t,e){this._context=t,this._k=(1-e)/6}Nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Rt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Rt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new Nt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function It(t,e){this._context=t,this._k=(1-e)/6}It.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Rt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new It(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Dt(t,e){this._context=t,this._k=(1-e)/6}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new Dt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Ct(t,e,n){var i=t._x1,r=t._y1,s=t._x2,o=t._y2;if(t._l01_a>ut){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>ut){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,s,o,t._x2,t._y2)}function zt(t,e){this._context=t,this._alpha=e}zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new zt(t,e):new Nt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Bt(t,e){this._context=t,this._alpha=e}Bt.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ct(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new Bt(t,e):new It(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Wt(t,e){this._context=t,this._alpha=e}Wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new Wt(t,e):new Dt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Ht(t){this._context=t}Ht.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Ut(t){return t<0?-1:1}function Kt(t,e,n){var i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),a=(s*r+o*i)/(i+r);return(Ut(s)+Ut(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Gt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function qt(t,e,n){var i=t._x0,r=t._y0,s=t._x1,o=t._y1,a=(s-i)/3;t._context.bezierCurveTo(i+a,r+a*e,s-a,o-a*n,s,o)}function Ft(t){this._context=t}function Vt(t){this._context=new Xt(t)}function Xt(t){this._context=t}function Yt(t){this._context=t}function Zt(t){var e,n,i=t.length-1,r=new Array(i),s=new Array(i),o=new Array(i);for(r[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(o[e]-r[e+1])/s[e];for(s[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Jt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$t=function(){return($t=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var p=document.createElementNS(ie,"tspan");p.setAttribute("x","0"),p.setAttribute("dy","1em"),p.textContent=""+t,p.style.fontSize="8pt";var _=document.createElementNS(ie,"tspan");_.setAttribute("x","0"),_.setAttribute("dy","1em"),_.textContent=""+this.props.unit,_.style.fontSize="8pt",h.append(p,_),h.setAttribute("transform","translate(50 33)")}else h.textContent=""+t,h.style.fontSize="8pt",h.setAttribute("transform","translate(50 50)");else h.textContent=n+"%",h.setAttribute("transform","translate(50 50)");r.append(h)}return i.append(r),i},e.prototype.getProgress=function(){var t=this.props.minValue||0,e=this.props.maxValue||100,n=null==this.props.value?0:this.props.value;return n<=t?0:n>=e?100:Math.trunc((n-t)/(e-t)*100)},e}(s.a),se=n(2),oe=n(4),ae=n(5),ce=n(6),le=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ue=function(){return(ue=Object.assign||function(t){for(var e,n=1,i=arguments.length;ne.id?1:-1})).forEach(function(t){try{var e=fe(t);i.elementsById[e.props.id]=e,i.elementIds.push(e.props.id),e.onClick(i.handleElementClick),e.onMoved(i.handleElementMovement),e.onResized(i.handleElementResizement),e.onRemove(i.handleElementRemove),i.containerRef.append(e.elementRef)}catch(t){console.log("Error creating a new element:",t.message)}}),this.buildRelations()}return Object.defineProperty(t.prototype,"elements",{get:function(){var t=this;return this.elementIds.map(function(e){return t.elementsById[e]}).filter(function(t){return null!=t})},enumerable:!0,configurable:!0}),t.prototype.updateElements=function(t){var e=this,n=t.map(function(t){return t.id||null}).filter(function(t){return null!=t});this.elementIds.filter(function(t){return n.indexOf(t)<0}).forEach(function(t){null!=e.elementsById[t]&&(e.elementsById[t].remove(),delete e.elementsById[t])}),this.elementIds=n,t.forEach(function(t){if(t.id)if(null==e.elementsById[t.id])try{var n=fe(t);e.elementsById[n.props.id]=n,n.onClick(e.handleElementClick),n.onRemove(e.handleElementRemove),e.containerRef.append(n.elementRef)}catch(t){console.log("Error creating a new element:",t.message)}else try{e.elementsById[t.id].props=function(t){var e=Object(r.m)(t.type,null);if(null==e)throw new TypeError("missing item type.");switch(e){case 0:return l(t);case 1:return Object(ce.b)(t);case 2:case 6:case 7:case 8:return V(t);case 3:case 9:case 15:case 16:return ne(t);case 4:return H(t);case 5:return _(t);case 10:return he(t);case 11:return E(t);case 12:return L(t);case 13:return D(t);case 14:return Object(Y.b)(t);case 17:return Object(oe.b)(t);case 18:return Object(ae.a)(t);case 19:return M(t);case 20:return y(t);default:throw new TypeError("decoder not found")}}(t)}catch(t){console.log("Error updating an element:",t.message)}}),this.buildRelations()},Object.defineProperty(t.prototype,"props",{get:function(){return _e({},this._props)},set:function(t){var e=this.props;this._props=t,this.render(e)},enumerable:!0,configurable:!0}),t.prototype.render=function(t){void 0===t&&(t=null),t?(t.backgroundURL!==this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":null),t.backgroundColor!==this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.sizeChanged(t,this.props)&&this.resizeElement(this.props.width,this.props.height)):(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":null,this.containerRef.style.backgroundColor=this.props.backgroundColor,this.resizeElement(this.props.width,this.props.height))},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){this.containerRef.style.width=t+"px",this.containerRef.style.height=e+"px"},t.prototype.resize=function(t,e){this.props=_e({},this.props,{width:t,height:e})},t.prototype.remove=function(){this.disposables.forEach(function(t){return t.dispose()}),this.elements.forEach(function(t){return t.remove()}),this.elementsById={},this.elementIds=[],this.clearRelations(),this.containerRef.innerHTML=""},t.prototype.buildRelations=function(){var t=this;this.clearRelations(),this.elements.forEach(function(e){if(null!==e.props.parentId){var n=t.elementsById[e.props.parentId],i=t.elementsById[e.props.id];n&&i&&t.addRelationLine(n,i)}})},t.prototype.clearRelations=function(t){if(null!=t)for(var e in this.relations){var n=e.split("|"),i=Number.parseInt(n[0]),r=Number.parseInt(n[1]);t!==i&&t!==r||(this.relations[e].remove(),delete this.relations[e])}else for(var e in this.relations)this.relations[e].remove(),delete this.relations[e]},t.prototype.getRelationLine=function(t,e){var n=t+"|"+e;return this.relations[n]||null},t.prototype.addRelationLine=function(t,e){var n=t.props.id+"|"+e.props.id;null!=this.relations[n]&&this.relations[n].remove();var i=t.props.x+t.elementRef.clientWidth/2,s=t.props.y+(t.elementRef.clientHeight-t.labelElementRef.clientHeight)/2,o=e.props.x+e.elementRef.clientWidth/2,a=e.props.y+(e.elementRef.clientHeight-e.labelElementRef.clientHeight)/2,c=new z(D({id:0,type:13,startX:i,startY:s,endX:o,endY:a,width:0,height:0,lineWidth:this.props.relationLineWidth,color:"#CCCCCC"}),Object(r.g)({receivedAt:new Date}));return this.relations[n]=c,c.elementRef.style.zIndex="0",this.containerRef.append(c.elementRef),c},t.prototype.onItemClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.enableEditMode=function(){this.elements.forEach(function(t){t.meta=_e({},t.meta,{editMode:!0})}),this.containerRef.classList.add("is-editing")},t.prototype.disableEditMode=function(){this.elements.forEach(function(t){t.meta=_e({},t.meta,{editMode:!1})}),this.containerRef.classList.remove("is-editing")},t}(),me=function(){function t(t){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new se.a,this.disposables=[],this.taskInitiator=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(t){this._status=t,this.statusChangeEventManager.emit(t)},enumerable:!0,configurable:!0}),t.prototype.init=function(){var t=this;this.cancellable=this.taskInitiator(function(){t.status="finished"}),this.status="started"},t.prototype.cancel=function(){this.cancellable.cancel(),this.status="cancelled"},t.prototype.onStatusChange=function(t){var e=this.statusChangeEventManager.on(t);return this.disposables.push(e),e},t}();var ye=function(){function t(){this.tasks={}}return t.prototype.add=function(t,e,n){void 0===n&&(n=0),this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel();var i=n>0?function(t,e){return new me(function(){var n=null;return t.onStatusChange(function(i){"finished"===i&&(n=window.setTimeout(function(){t.init()},e))}),t.init(),{cancel:function(){n&&clearTimeout(n),t.cancel()}}})}(new me(e),n):new me(e);return this.tasks[t]=i,this.tasks[t]},t.prototype.init=function(t){!this.tasks[t]||"waiting"!==this.tasks[t].status&&"cancelled"!==this.tasks[t].status&&"finished"!==this.tasks[t].status||this.tasks[t].init()},t.prototype.cancel=function(t){this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel()},t}();window.VisualConsole=de,window.AsyncTaskManager=ye}]); +!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){"use strict";n.d(e,"m",function(){return r}),n.d(e,"l",function(){return s}),n.d(e,"r",function(){return o}),n.d(e,"j",function(){return a}),n.d(e,"k",function(){return c}),n.d(e,"n",function(){return u}),n.d(e,"q",function(){return h}),n.d(e,"i",function(){return p}),n.d(e,"h",function(){return _}),n.d(e,"g",function(){return f}),n.d(e,"o",function(){return d}),n.d(e,"d",function(){return m}),n.d(e,"e",function(){return y}),n.d(e,"f",function(){return b}),n.d(e,"p",function(){return v}),n.d(e,"c",function(){return x}),n.d(e,"a",function(){return w}),n.d(e,"b",function(){return O});var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&!isNaN(parseInt(t))?parseInt(t):e}function s(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!isNaN(parseFloat(t))?parseFloat(t):e}function o(t){return null==t||0===t.length}function a(t,e){return"string"==typeof t&&t.length>0?t:e}function c(t){return"boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&("1"===t||"true"===t)}function l(t,e,n){void 0===n&&(n=" "),"number"==typeof t&&(t=""+t),"number"==typeof n&&(n=""+n);var i=e-t.length;if(0===i)return t;if(i<0)return t.substr(Math.abs(i));if(i===n.length)return""+n+t;if(i0&&id||y+r+m.width-b>u.width||r===x&&y<0&&i>f+x+c,A=h0&&h_||g+s+m.height-b>u.height||s===E&&g<0&&h>p+E+l;(e=O?0:T?x:y+r)<0&&(e=0),(n=A?0:k?E:g+s)<0&&(n=0),o=i,a=h,e===r&&n===s||(w(e,n),v(e,n),r=e,s=n)},T=function(){r=0,s=0,o=0,a=0,document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",T),t.draggable=i,document.body.style.userSelect="auto"},A=function(e){e.stopPropagation(),t.draggable=!1,r=t.offsetLeft,s=t.offsetTop,o=e.pageX,a=e.pageY,c=e.offsetX,l=e.offsetY,u=n.getBoundingClientRect(),h=E(n),p=h.top,_=p+u.height,f=h.left,d=f+u.width,m=t.getBoundingClientRect(),y=window.getComputedStyle(t).borderWidth||"0",b=2*Number.parseInt(y),document.addEventListener("mousemove",O),document.addEventListener("mouseup",T),document.body.style.userSelect="none"};return t.addEventListener("mousedown",A),function(){t.removeEventListener("mousedown",A),T()}}function O(t,e){var n=document.createElement("div");n.className="resize-draggable",t.appendChild(n);var i=t.parentElement,r=t.draggable,s=0,o=0,a=0,c=0,l=0,u=i.getBoundingClientRect(),h=E(i),p=h.top,_=p+u.height,f=h.left,d=f+u.width,m=E(t),y=m.top,b=m.left,v=window.getComputedStyle(t).borderWidth||"0",w=Number.parseInt(v),O=x(32,function(t,n){return e(t,n)}),T=g(16,function(t,n){return e(t,n)}),A=function(t){var e=s+(t.pageX-a),n=o+(t.pageY-c);e===s&&n===o||eb+(s-l)||(e<15?e=15:e+b-w/2>=d&&(e=d-b),n<15?n=15:n+y-w/2>=_&&(n=_-y),T(e,n),O(e,n),s=e,o=n,a=t.pageX,c=t.pageY)},k=function(){s=0,o=0,a=0,c=0,l=0,0,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",k),t.draggable=r,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",function(e){e.stopPropagation(),t.draggable=!1;var n=t.getBoundingClientRect(),r=n.width,v=n.height;s=r,o=v,a=e.pageX,c=e.pageY,l=e.offsetX,e.offsetY,u=i.getBoundingClientRect(),h=E(i),p=h.top,_=p+u.height,f=h.left,d=f+u.width,m=E(t),y=m.top,b=m.left,document.addEventListener("mousemove",A),document.addEventListener("mouseup",k),document.body.style.userSelect="none"}),function(){n.remove(),k()}}},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var i=n(0),r=n(2),s=function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var i=e.labelElementRef.getBoundingClientRect(),r=i.width,s=i.height;switch(e.props.labelPosition){case"up":case"down":n-=s;break;case"left":case"right":t-=r}}e.resizeElement(t,n),e.debouncedResizementSave(t,n)})},t.prototype.stopResizementListener=function(){this.removeResizement&&(this.removeResizement(),this.removeResizement=null)},t.prototype.createContainerDomElement=function(){var t,e=this;return this.props.isLinkEnabled?(t=document.createElement("a"),this.props.link&&(t.href=this.props.link)):t=document.createElement("div"),t.className="visual-console-item",t.style.zIndex=this.props.isOnTop?"2":"1",t.style.left=this.props.x+"px",t.style.top=this.props.y+"px",t.addEventListener("click",function(t){e.meta.editMode?(t.preventDefault(),t.stopPropagation()):e.clickEventManager.emit({data:e.props,nativeEvent:t})}),this.meta.editMode&&(t.classList.add("is-editing"),this.initMovementListener(t),this.initResizementListener(t)),this.meta.isFetching&&t.classList.add("is-fetching"),this.meta.isUpdating&&t.classList.add("is-updating"),t},t.prototype.createLabelDomElement=function(){var t=document.createElement("div");t.className="visual-console-item-label";var e=this.getLabelWithMacrosReplaced();if(e.length>0){var n=document.createElement("table"),i=document.createElement("tr"),r=document.createElement("tr"),s=document.createElement("tr"),o=document.createElement("td");switch(o.innerHTML=e,i.append(o),n.append(r,i,s),n.style.textAlign="center",this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height=null);break;case"left":case"right":this.props.height>0&&(n.style.width=null,n.style.height=this.props.height+"px")}t.append(n)}return t},t.prototype.getLabelWithMacrosReplaced=function(){var t=this.props;return Object(i.p)([{macro:"_date_",value:Object(i.e)(new Date)},{macro:"_time_",value:Object(i.f)(new Date)},{macro:"_agent_",value:null!=t.agentAlias?t.agentAlias:""},{macro:"_agentdescription_",value:null!=t.agentDescription?t.agentDescription:""},{macro:"_address_",value:null!=t.agentAddress?t.agentAddress:""},{macro:"_module_",value:null!=t.moduleName?t.moduleName:""},{macro:"_moduledescription_",value:null!=t.moduleDescription?t.moduleDescription:""}],this.props.label||"")},t.prototype.updateDomElement=function(t){t.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(t.prototype,"props",{get:function(){return s({},this.itemProps)},set:function(t){var e=this.props;this.itemProps=t,this.shouldBeUpdated(e,t)&&this.render(e,this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"meta",{get:function(){return s({},this._metadata)},set:function(t){this.setMeta(t)},enumerable:!0,configurable:!0}),t.prototype.setMeta=function(t){var e=this._metadata;this._metadata=t,this.render(this.itemProps,e)},t.prototype.shouldBeUpdated=function(t,e){return t!==e},t.prototype.render=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.updateDomElement(this.childElementRef),t&&!this.positionChanged(t,this.props)||this.moveElement(this.props.x,this.props.y),t&&!this.sizeChanged(t,this.props)||this.resizeElement(this.props.width,this.props.height);var n=this.labelElementRef.innerHTML,i=this.createLabelDomElement().innerHTML;if(n!==i&&(this.labelElementRef.innerHTML=i),t&&t.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition),t&&(t.isLinkEnabled!==this.props.isLinkEnabled||this.props.isLinkEnabled&&t.link!==this.props.link)){var r=this.createContainerDomElement();r.innerHTML=this.elementRef.innerHTML;for(var s=this.elementRef.attributes,o=0;o0?e.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height=null);break;case"left":case"right":this.props.height>0&&(n.style.width=null,n.style.height=this.props.height+"px")}},t.prototype.moveElement=function(t,e){this.elementRef.style.left=t+"px",this.elementRef.style.top=e+"px"},t.prototype.move=function(t,e){this.moveElement(t,e),this.itemProps=s({},this.props,{x:t,y:e})},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){if(this.childElementRef.style.width=t>0?t+"px":null,this.childElementRef.style.height=e>0?e+"px":null,this.props.label&&this.props.label.length>0){var n=this.labelElementRef.getElementsByTagName("table"),i=n.length>0?n.item(0):null;if(i)switch(this.props.labelPosition){case"up":case"down":i.style.width=t>0?t+"px":null;break;case"left":case"right":i.style.height=e>0?e+"px":null}}},t.prototype.resize=function(t,e){this.resizeElement(t,e),this.itemProps=s({},this.props,{width:t,height:e})},t.prototype.onClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onRemove=function(t){var e=this.removeEventManager.on(t);return this.disposables.push(e),e},t}();e.a=c},function(t,e,n){"use strict";var i=function(){return function(){var t=this;this.listeners=[],this.listenersOncer=[],this.on=function(e){return t.listeners.push(e),{dispose:function(){return t.off(e)}}},this.once=function(e){t.listenersOncer.push(e)},this.off=function(e){var n=t.listeners.indexOf(e);n>-1&&t.listeners.splice(n,1)},this.emit=function(e){t.listeners.forEach(function(t){return t(e)}),t.listenersOncer.forEach(function(t){return t(e)}),t.listenersOncer=[]},this.pipe=function(e){return t.on(function(t){return e.emit(t)})}}}();e.a=i},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return eventsHistoryPropsDecoder});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var y=document.createElementNS(t,"text");y.setAttribute("text-anchor","middle"),y.setAttribute("font-size","8"),y.setAttribute("transform","translate(30 50) rotate(90)"),y.setAttribute("fill",i),y.textContent=m,f.append(y)}var b=document.createElementNS(t,"g");b.setAttribute("class","marks");var v=document.createElementNS(t,"g");v.setAttribute("class","mark"),v.setAttribute("transform","translate(50 50)");var g=document.createElementNS(t,"line");g.setAttribute("x1","36"),g.setAttribute("y1","0"),g.setAttribute("x2","46"),g.setAttribute("y2","0"),g.setAttribute("stroke",i),g.setAttribute("stroke-width","5");var x=document.createElementNS(t,"line");x.setAttribute("x1","36"),x.setAttribute("y1","0"),x.setAttribute("x2","46"),x.setAttribute("y2","0"),x.setAttribute("stroke",e),x.setAttribute("stroke-width","1"),v.append(g,x),b.append(v);for(var E=1;E<60;E++){var w=document.createElementNS(t,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",i),w.setAttribute("transform","translate(50 50) rotate("+6*E+")"),E%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",E%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),b.append(w)}var O=document.createElementNS(t,"g");O.setAttribute("class","hour-hand"),O.setAttribute("transform","translate(50 50)");var T=document.createElementNS(t,"line");T.setAttribute("class","hour-hand-a"),T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","30"),T.setAttribute("y2","0"),T.setAttribute("stroke",o),T.setAttribute("stroke-width","4"),T.setAttribute("stroke-linecap","round");var A=document.createElementNS(t,"line");A.setAttribute("class","hour-hand-b"),A.setAttribute("x1","0"),A.setAttribute("y1","0"),A.setAttribute("x2","29.9"),A.setAttribute("y2","0"),A.setAttribute("stroke",s),A.setAttribute("stroke-width","3.1"),A.setAttribute("stroke-linecap","round"),O.append(T,A);var k=document.createElementNS(t,"g");k.setAttribute("class","minute-hand"),k.setAttribute("transform","translate(50 50)");var M=document.createElementNS(t,"line");M.setAttribute("class","minute-hand-a"),M.setAttribute("x1","0"),M.setAttribute("y1","0"),M.setAttribute("x2","40"),M.setAttribute("y2","0"),M.setAttribute("stroke",o),M.setAttribute("stroke-width","2"),M.setAttribute("stroke-linecap","round");var j=document.createElementNS(t,"line");j.setAttribute("class","minute-hand-b"),j.setAttribute("x1","0"),j.setAttribute("y1","0"),j.setAttribute("x2","39.9"),j.setAttribute("y2","0"),j.setAttribute("stroke",s),j.setAttribute("stroke-width","1.5"),j.setAttribute("stroke-linecap","round");var P=document.createElementNS(t,"circle");P.setAttribute("r","3"),P.setAttribute("fill",s),k.append(M,j,P);var S=document.createElementNS(t,"g");S.setAttribute("class","second-hand"),S.setAttribute("transform","translate(50 50)");var L=document.createElementNS(t,"line");L.setAttribute("x1","0"),L.setAttribute("y1","0"),L.setAttribute("x2","46"),L.setAttribute("y2","0"),L.setAttribute("stroke",a),L.setAttribute("stroke-width","1"),L.setAttribute("stroke-linecap","round");var R=document.createElementNS(t,"circle");R.setAttribute("r","2"),R.setAttribute("fill",a),S.append(L,R);var N=document.createElementNS(t,"circle");N.setAttribute("cx","50"),N.setAttribute("cy","50"),N.setAttribute("r","0.3"),N.setAttribute("fill",s);var I=this.getOriginDate(),D=I.getSeconds(),C=I.getMinutes(),z=6*D,B=6*C+D/60*6,W=30*I.getHours()+C/60*30;if(O.setAttribute("transform","translate(50 50) rotate("+W+")"),k.setAttribute("transform","translate(50 50) rotate("+B+")"),S.setAttribute("transform","translate(50 50) rotate("+z+")"),_.append(f,b,O,k,S,N),_.setAttribute("transform","rotate(-90)"),p.innerHTML="\n \n ",p.append(_),"datetime"===this.props.clockFormat){var H=document.createElement("span");H.className="date",H.textContent=Object(r.e)(I,"default"),H.style.fontSize=h+"px",this.props.color&&(H.style.color=this.props.color),p.append(H)}return p},e.prototype.createDigitalClock=function(){var t=document.createElement("div");t.className="digital-clock";var e=this.getElementSize().width,n=6/this.props.clockTimezone.length,i=20*e/100,s=10*e/100,o=Math.min(20*n*e/100,e/100*10),a=this.getOriginDate();if("datetime"===this.props.clockFormat){var c=document.createElement("span");c.className="date",c.textContent=Object(r.e)(a,"default"),c.style.fontSize=s+"px",this.props.color&&(c.style.color=this.props.color),t.append(c)}var l=document.createElement("span");l.className="time",l.textContent=Object(r.f)(a),l.style.fontSize=i+"px",this.props.color&&(l.style.color=this.props.color),t.append(l);var u=this.getHumanTimezone();if(u.length>0){var h=document.createElement("span");h.className="timezone",h.textContent=u,h.style.fontSize=o+"px",this.props.color&&(h.style.color=this.props.color),t.append(h)}return t},e.prototype.getOriginDate=function(t){void 0===t&&(t=null);var e=t||new Date,n=1e3*this.props.clockTimezoneOffset,i=60*e.getTimezoneOffset()*1e3,r=e.getTime()+n+i;return new Date(r)},e.prototype.getHumanTimezone=function(t){void 0===t&&(t=this.props.clockTimezone);var e=t.split("/")[1];return(void 0===e?"":e).replace("_"," ")},e.prototype.getElementSize=function(t,e){switch(void 0===t&&(t=this.props.width),void 0===e&&(e=this.props.height),this.props.clockType){case"analogic":var n=100;return t>0&&e>0?n=Math.min(t,e):t>0?n=t:e>0&&(n=e),{width:n,height:n};case"digital":return t>0&&e>0?e=t/20?e=t/2:e>0?t=2*e:(t=100,e=50),{width:t,height:e};default:throw new Error("invalid clock type.")}},e.TICK_INTERVAL=1e3,e}(s.a),P=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),S=function(){return(S=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){t.style.borderStyle="solid";var e=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,e);t.style.borderWidth=n+"px",this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}return t},e}(s.a),N=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),I=function(){return(I=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&(n=Object(r.p)([{macro:/\(?_VALUE_\)?/i,value:n}],i)),t.innerHTML=n}return t},e.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},e}(s.a),Y=n(3),Z=Math.PI,Q=2*Z,J=Q-1e-6;function $(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function tt(){return new $}$.prototype=tt.prototype={constructor:$,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var s=this._x1,o=this._y1,a=n-t,c=i-e,l=s-t,u=o-e,h=l*l+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*a-c*l)>1e-6&&r){var p=n-s,_=i-o,f=a*a+c*c,d=p*p+_*_,m=Math.sqrt(f),y=Math.sqrt(h),b=r*Math.tan((Z-Math.acos((f+h-d)/(2*m*y)))/2),v=b/y,g=b/m;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*l)+","+(e+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*p>l*_)+","+(this._x1=t+g*a)+","+(this._y1=e+g*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,r,s){t=+t,e=+e;var o=(n=+n)*Math.cos(i),a=n*Math.sin(i),c=t+o,l=e+a,u=1^s,h=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Q+Q),h>J?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Z)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var et=tt,nt=function(t){return function(){return t}},it=Math.abs,rt=Math.atan2,st=Math.cos,ot=Math.max,at=Math.min,ct=Math.sin,lt=Math.sqrt,ut=1e-12,ht=Math.PI,pt=ht/2,_t=2*ht;function ft(t){return t>=1?pt:t<=-1?-pt:Math.asin(t)}function dt(t){return t.innerRadius}function mt(t){return t.outerRadius}function yt(t){return t.startAngle}function bt(t){return t.endAngle}function vt(t){return t&&t.padAngle}function gt(t,e,n,i,r,s,o){var a=t-n,c=e-i,l=(o?s:-s)/lt(a*a+c*c),u=l*c,h=-l*a,p=t+u,_=e+h,f=n+u,d=i+h,m=(p+f)/2,y=(_+d)/2,b=f-p,v=d-_,g=b*b+v*v,x=r-s,E=p*d-f*_,w=(v<0?-1:1)*lt(ot(0,x*x*g-E*E)),O=(E*v-b*w)/g,T=(-E*b-v*w)/g,A=(E*v+b*w)/g,k=(-E*b+v*w)/g,M=O-m,j=T-y,P=A-m,S=k-y;return M*M+j*j>P*P+S*S&&(O=A,T=k),{cx:O,cy:T,x01:-u,y01:-h,x11:O*(r/x-1),y11:T*(r/x-1)}}var xt=function(){var t=dt,e=mt,n=nt(0),i=null,r=yt,s=bt,o=vt,a=null;function c(){var c,l,u,h=+t.apply(this,arguments),p=+e.apply(this,arguments),_=r.apply(this,arguments)-pt,f=s.apply(this,arguments)-pt,d=it(f-_),m=f>_;if(a||(a=c=et()),put)if(d>_t-ut)a.moveTo(p*st(_),p*ct(_)),a.arc(0,0,p,_,f,!m),h>ut&&(a.moveTo(h*st(f),h*ct(f)),a.arc(0,0,h,f,_,m));else{var y,b,v=_,g=f,x=_,E=f,w=d,O=d,T=o.apply(this,arguments)/2,A=T>ut&&(i?+i.apply(this,arguments):lt(h*h+p*p)),k=at(it(p-h)/2,+n.apply(this,arguments)),M=k,j=k;if(A>ut){var P=ft(A/h*ct(T)),S=ft(A/p*ct(T));(w-=2*P)>ut?(x+=P*=m?1:-1,E-=P):(w=0,x=E=(_+f)/2),(O-=2*S)>ut?(v+=S*=m?1:-1,g-=S):(O=0,v=g=(_+f)/2)}var L=p*st(v),R=p*ct(v),N=h*st(E),I=h*ct(E);if(k>ut){var D,C=p*st(g),z=p*ct(g),B=h*st(x),W=h*ct(x);if(d1?0:u<-1?ht:Math.acos(u))/2),F=lt(D[0]*D[0]+D[1]*D[1]);M=at(k,(h-F)/(q-1)),j=at(k,(p-F)/(q+1))}}O>ut?j>ut?(y=gt(B,W,L,R,p,j,m),b=gt(C,z,N,I,p,j,m),a.moveTo(y.cx+y.x01,y.cy+y.y01),jut&&w>ut?M>ut?(y=gt(N,I,C,z,h,-M,m),b=gt(L,R,B,W,h,-M,m),a.lineTo(y.cx+y.x01,y.cy+y.y01),M0)for(var i,r=t[0],s=e[0],o=t[n]-r,a=e[n]-s,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*o),this._beta*e[c]+(1-this._beta)*(s+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new jt(t):new Lt(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Rt(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Nt(t,e){this._context=t,this._k=(1-e)/6}Nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Rt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Rt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new Nt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function It(t,e){this._context=t,this._k=(1-e)/6}It.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Rt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new It(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Dt(t,e){this._context=t,this._k=(1-e)/6}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new Dt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Ct(t,e,n){var i=t._x1,r=t._y1,s=t._x2,o=t._y2;if(t._l01_a>ut){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>ut){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,s,o,t._x2,t._y2)}function zt(t,e){this._context=t,this._alpha=e}zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new zt(t,e):new Nt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Bt(t,e){this._context=t,this._alpha=e}Bt.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ct(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new Bt(t,e):new It(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Wt(t,e){this._context=t,this._alpha=e}Wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new Wt(t,e):new Dt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Ht(t){this._context=t}Ht.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Ut(t){return t<0?-1:1}function Kt(t,e,n){var i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),a=(s*r+o*i)/(i+r);return(Ut(s)+Ut(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Gt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function qt(t,e,n){var i=t._x0,r=t._y0,s=t._x1,o=t._y1,a=(s-i)/3;t._context.bezierCurveTo(i+a,r+a*e,s-a,o-a*n,s,o)}function Ft(t){this._context=t}function Vt(t){this._context=new Xt(t)}function Xt(t){this._context=t}function Yt(t){this._context=t}function Zt(t){var e,n,i=t.length-1,r=new Array(i),s=new Array(i),o=new Array(i);for(r[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(o[e]-r[e+1])/s[e];for(s[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Jt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$t=function(){return($t=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var p=document.createElementNS(ie,"tspan");p.setAttribute("x","0"),p.setAttribute("dy","1em"),p.textContent=""+t,p.style.fontSize="8pt";var _=document.createElementNS(ie,"tspan");_.setAttribute("x","0"),_.setAttribute("dy","1em"),_.textContent=""+this.props.unit,_.style.fontSize="8pt",h.append(p,_),h.setAttribute("transform","translate(50 33)")}else h.textContent=""+t,h.style.fontSize="8pt",h.setAttribute("transform","translate(50 50)");else h.textContent=n+"%",h.setAttribute("transform","translate(50 50)");r.append(h)}return i.append(r),i},e.prototype.getProgress=function(){var t=this.props.minValue||0,e=this.props.maxValue||100,n=null==this.props.value?0:this.props.value;return n<=t?0:n>=e?100:Math.trunc((n-t)/(e-t)*100)},e}(s.a),se=n(2),oe=n(4),ae=n(5),ce=n(6),le=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ue=function(){return(ue=Object.assign||function(t){for(var e,n=1,i=arguments.length;ne.id?1:-1})).forEach(function(t){try{var e=fe(t);i.elementsById[e.props.id]=e,i.elementIds.push(e.props.id),e.onClick(i.handleElementClick),e.onMoved(i.handleElementMovement),e.onResized(i.handleElementResizement),e.onRemove(i.handleElementRemove),i.containerRef.append(e.elementRef)}catch(t){console.log("Error creating a new element:",t.message)}}),this.buildRelations()}return Object.defineProperty(t.prototype,"elements",{get:function(){var t=this;return this.elementIds.map(function(e){return t.elementsById[e]}).filter(function(t){return null!=t})},enumerable:!0,configurable:!0}),t.prototype.updateElements=function(t){var e=this,n=t.map(function(t){return t.id||null}).filter(function(t){return null!=t});this.elementIds.filter(function(t){return n.indexOf(t)<0}).forEach(function(t){null!=e.elementsById[t]&&(e.elementsById[t].remove(),delete e.elementsById[t])}),this.elementIds=n,t.forEach(function(t){if(t.id)if(null==e.elementsById[t.id])try{var n=fe(t);e.elementsById[n.props.id]=n,n.onClick(e.handleElementClick),n.onRemove(e.handleElementRemove),e.containerRef.append(n.elementRef)}catch(t){console.log("Error creating a new element:",t.message)}else try{e.elementsById[t.id].props=function(t){var e=Object(r.m)(t.type,null);if(null==e)throw new TypeError("missing item type.");switch(e){case 0:return l(t);case 1:return Object(ce.b)(t);case 2:case 6:case 7:case 8:return V(t);case 3:case 9:case 15:case 16:return ne(t);case 4:return H(t);case 5:return _(t);case 10:return he(t);case 11:return E(t);case 12:return L(t);case 13:return D(t);case 14:return Object(Y.b)(t);case 17:return Object(oe.b)(t);case 18:return Object(ae.a)(t);case 19:return M(t);case 20:return y(t);default:throw new TypeError("decoder not found")}}(t)}catch(t){console.log("Error updating an element:",t.message)}}),this.buildRelations()},Object.defineProperty(t.prototype,"props",{get:function(){return _e({},this._props)},set:function(t){var e=this.props;this._props=t,this.render(e)},enumerable:!0,configurable:!0}),t.prototype.render=function(t){void 0===t&&(t=null),t?(t.backgroundURL!==this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":null),t.backgroundColor!==this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.sizeChanged(t,this.props)&&this.resizeElement(this.props.width,this.props.height)):(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":null,this.containerRef.style.backgroundColor=this.props.backgroundColor,this.resizeElement(this.props.width,this.props.height))},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){this.containerRef.style.width=t+"px",this.containerRef.style.height=e+"px"},t.prototype.resize=function(t,e){this.props=_e({},this.props,{width:t,height:e})},t.prototype.remove=function(){this.disposables.forEach(function(t){return t.dispose()}),this.elements.forEach(function(t){return t.remove()}),this.elementsById={},this.elementIds=[],this.clearRelations(),this.containerRef.innerHTML=""},t.prototype.buildRelations=function(){var t=this;this.clearRelations(),this.elements.forEach(function(e){if(null!==e.props.parentId){var n=t.elementsById[e.props.parentId],i=t.elementsById[e.props.id];n&&i&&t.addRelationLine(n,i)}})},t.prototype.clearRelations=function(t){if(null!=t)for(var e in this.relations){var n=e.split("|"),i=Number.parseInt(n[0]),r=Number.parseInt(n[1]);t!==i&&t!==r||(this.relations[e].remove(),delete this.relations[e])}else for(var e in this.relations)this.relations[e].remove(),delete this.relations[e]},t.prototype.getRelationLine=function(t,e){var n=t+"|"+e;return this.relations[n]||null},t.prototype.addRelationLine=function(t,e){var n=t.props.id+"|"+e.props.id;null!=this.relations[n]&&this.relations[n].remove();var i=t.props.x+t.elementRef.clientWidth/2,s=t.props.y+(t.elementRef.clientHeight-t.labelElementRef.clientHeight)/2,o=e.props.x+e.elementRef.clientWidth/2,a=e.props.y+(e.elementRef.clientHeight-e.labelElementRef.clientHeight)/2,c=new z(D({id:0,type:13,startX:i,startY:s,endX:o,endY:a,width:0,height:0,lineWidth:this.props.relationLineWidth,color:"#CCCCCC"}),Object(r.g)({receivedAt:new Date}));return this.relations[n]=c,c.elementRef.style.zIndex="0",this.containerRef.append(c.elementRef),c},t.prototype.onItemClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.enableEditMode=function(){this.elements.forEach(function(t){t.meta=_e({},t.meta,{editMode:!0})}),this.containerRef.classList.add("is-editing")},t.prototype.disableEditMode=function(){this.elements.forEach(function(t){t.meta=_e({},t.meta,{editMode:!1})}),this.containerRef.classList.remove("is-editing")},t}(),me=function(){function t(t){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new se.a,this.disposables=[],this.taskInitiator=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(t){this._status=t,this.statusChangeEventManager.emit(t)},enumerable:!0,configurable:!0}),t.prototype.init=function(){var t=this;this.cancellable=this.taskInitiator(function(){t.status="finished"}),this.status="started"},t.prototype.cancel=function(){this.cancellable.cancel(),this.status="cancelled"},t.prototype.onStatusChange=function(t){var e=this.statusChangeEventManager.on(t);return this.disposables.push(e),e},t}();var ye=function(){function t(){this.tasks={}}return t.prototype.add=function(t,e,n){void 0===n&&(n=0),this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel();var i=n>0?function(t,e){return new me(function(){var n=null;return t.onStatusChange(function(i){"finished"===i&&(n=window.setTimeout(function(){t.init()},e))}),t.init(),{cancel:function(){n&&clearTimeout(n),t.cancel()}}})}(new me(e),n):new me(e);return this.tasks[t]=i,this.tasks[t]},t.prototype.init=function(t){!this.tasks[t]||"waiting"!==this.tasks[t].status&&"cancelled"!==this.tasks[t].status&&"finished"!==this.tasks[t].status||this.tasks[t].init()},t.prototype.cancel=function(t){this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel()},t}();window.VisualConsole=de,window.AsyncTaskManager=ye}]); //# sourceMappingURL=vc.main.min.js.map \ No newline at end of file diff --git a/pandora_console/include/visual-console-client/vc.main.min.js.map b/pandora_console/include/visual-console-client/vc.main.min.js.map index 5fae8d74d0..10f1309b68 100644 --- a/pandora_console/include/visual-console-client/vc.main.min.js.map +++ b/pandora_console/include/visual-console-client/vc.main.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/lib/index.ts","webpack:///./src/Item.ts","webpack:///./src/lib/TypedEvent.ts","webpack:///./src/items/EventsHistory.ts","webpack:///./src/items/DonutGraph.ts","webpack:///./src/items/BarsGraph.ts","webpack:///./src/items/ModuleGraph.ts","webpack:///./src/items/StaticGraph.ts","webpack:///./src/items/Icon.ts","webpack:///./src/items/ColorCloud.ts","webpack:///./src/items/Group.ts","webpack:///./src/items/Clock/index.ts","webpack:///./src/items/Box.ts","webpack:///./src/items/Line.ts","webpack:///./src/items/Label.ts","webpack:///./src/items/SimpleValue.ts","webpack:///./node_modules/d3-path/src/path.js","webpack:///./node_modules/d3-shape/src/constant.js","webpack:///./node_modules/d3-shape/src/math.js","webpack:///./node_modules/d3-shape/src/arc.js","webpack:///./node_modules/d3-shape/src/curve/linear.js","webpack:///./node_modules/d3-shape/src/curve/radial.js","webpack:///./node_modules/d3-shape/src/array.js","webpack:///./node_modules/d3-shape/src/symbol/diamond.js","webpack:///./node_modules/d3-shape/src/symbol/circle.js","webpack:///./node_modules/d3-shape/src/symbol/star.js","webpack:///./node_modules/d3-shape/src/noop.js","webpack:///./node_modules/d3-shape/src/symbol/triangle.js","webpack:///./node_modules/d3-shape/src/symbol/wye.js","webpack:///./node_modules/d3-shape/src/curve/basis.js","webpack:///./node_modules/d3-shape/src/curve/basisClosed.js","webpack:///./node_modules/d3-shape/src/curve/basisOpen.js","webpack:///./node_modules/d3-shape/src/curve/bundle.js","webpack:///./node_modules/d3-shape/src/curve/cardinal.js","webpack:///./node_modules/d3-shape/src/curve/cardinalClosed.js","webpack:///./node_modules/d3-shape/src/curve/cardinalOpen.js","webpack:///./node_modules/d3-shape/src/curve/catmullRom.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack:///./node_modules/d3-shape/src/curve/linearClosed.js","webpack:///./node_modules/d3-shape/src/curve/monotone.js","webpack:///./node_modules/d3-shape/src/curve/natural.js","webpack:///./node_modules/d3-shape/src/curve/step.js","webpack:///./node_modules/d3-shape/src/order/descending.js","webpack:///./src/items/Percentile.ts","webpack:///./src/items/Service.ts","webpack:///./src/VisualConsole.ts","webpack:///./src/lib/AsyncTaskManager.ts","webpack:///./src/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","parseIntOr","defaultValue","length","isNaN","parseInt","parseFloatOr","parseFloat","stringIsEmpty","notEmptyStringOr","parseBoolean","leftPad","pad","diffLength","substr","Math","abs","substring","repeatTimes","floor","restLength","newPad","positionPropsDecoder","data","x","y","sizePropsDecoder","width","height","TypeError","modulePropsDecoder","__assign","moduleName","moduleDescription","agentProps","agentId","agent","agentName","agentAlias","agentDescription","agentAddress","metaconsoleId","agentPropsDecoder","linkedVCPropsDecoder","id","linkedLayoutId","linkedLayoutAgentId","linkedLayoutStatusProps","linkedLayoutStatusType","weight","linkedLayoutStatusTypeWeight","warningThreshold","linkedLayoutStatusTypeWarningThreshold","criticalThreshold","linkedLayoutStatusTypeCriticalThreshold","linkedLayoutBaseProps","itemMetaDecoder","receivedAt","Date","Number","getTime","error","Error","editMode","isFromCache","isFetching","isUpdating","prefixedCssRules","ruleName","ruleValue","rule","decodeBase64","input","decodeURIComponent","escape","window","atob","humanDate","date","locale","Intl","DateTimeFormat","day","month","year","format","getDate","getMonth","getFullYear","humanTime","getHours","getMinutes","getSeconds","replaceMacros","macros","text","reduce","acc","_a","macro","replace","throttle","delay","fn","last","args","_i","arguments","now","apply","debounce","timerRef","clearTimeout","setTimeout","getOffset","el","offsetLeft","offsetTop","scrollLeft","scrollTop","offsetParent","top","left","addMovementListener","element","onMoved","container","parentElement","isDraggable","draggable","lastX","lastY","lastMouseX","lastMouseY","mouseElementOffsetX","mouseElementOffsetY","containerBounds","getBoundingClientRect","containerOffset","containerTop","containerBottom","containerLeft","containerRight","elementBounds","borderWidth","getComputedStyle","borderFix","debouncedMovement","throttledMovement","handleMove","e","mouseX","pageX","mouseY","pageY","mouseDeltaX","mouseDeltaY","maxX","maxY","outOfBoundsLeft","outOfBoundsRight","outOfBoundsTop","outOfBoundsBottom","handleEnd","document","removeEventListener","body","style","userSelect","handleStart","stopPropagation","offsetX","offsetY","addEventListener","addResizementListener","onResized","resizeDraggable","createElement","className","appendChild","lastWidth","lastHeight","elementOffset","elementTop","elementLeft","debouncedResizement","throttledResizement","handleResize","remove","parseLabelPosition","labelPosition","itemBasePropsDecoder","type","label","_lib__WEBPACK_IMPORTED_MODULE_0__","isLinkEnabled","link","isOnTop","parentId","aclGroupId","VisualConsoleItem","props","metadata","_this","this","clickEventManager","_lib_TypedEvent__WEBPACK_IMPORTED_MODULE_1__","movedEventManager","resizedEventManager","removeEventManager","disposables","debouncedMovementSave","prevPosition","newPosition","positionChanged","move","emit","item","removeMovement","debouncedResizementSave","prevSize","newSize","sizeChanged","resize","removeResizement","itemProps","_metadata","elementRef","createContainerDomElement","labelElementRef","createLabelDomElement","childElementRef","createDomElement","append","resizeElement","changeLabelPosition","initMovementListener","moveElement","stopMovementListener","initResizementListener","labelWidth","labelHeight","stopResizementListener","box","href","zIndex","meta","preventDefault","nativeEvent","classList","add","getLabelWithMacrosReplaced","table","row","emptyRow1","emptyRow2","cell","innerHTML","textAlign","updateDomElement","newProps","prevProps","shouldBeUpdated","render","newMetadata","setMeta","prevMetadata","prevMeta","oldLabelHtml","newLabelHtml","attrs","attributes","nodeName","setAttributeNode","parentNode","replaceChild","forEach","disposable","dispose","ignored","position","flexDirection","tables","getElementsByTagName","onClick","listener","on","push","onRemove","__webpack_exports__","TypedEvent","listeners","listenersOncer","off","once","callbackIndex","indexOf","splice","event","pipe","te","eventsHistoryPropsDecoder","html","encodedHtml","_Item__WEBPACK_IMPORTED_MODULE_1__","maxTime","EventsHistory","_super","__extends","scripts","src","eval","trim","aux","donutGraphPropsDecoder","DonutGraph","barsGraphPropsDecoder","BarsGraph","moduleGraphPropsDecoder","ModuleGraph","legendP","margin","overviewGraphs","getElementsByClassName","parseShowLastValueTooltip","showLastValueTooltip","staticGraphPropsDecoder","imageSrc","Item","statusImageSrc","lib","lastValue","StaticGraph","imgSrc","background","backgroundSize","backgroundPosition","setAttribute","iconPropsDecoder","Icon_assign","Icon","Icon_extends","colorCloudPropsDecoder","color","ColorCloud_assign","ColorCloud_svgNS","ColorCloud","ColorCloud_extends","createSvgElement","gradientId","svg","createElementNS","defs","radialGradient","stop0","stop100","circle","groupPropsDecoder","groupId","showStatistics","extractHtml","Group_assign","Group","Group_extends","parseClockType","clockType","parseClockFormat","clockFormat","clockPropsDecoder","clockTimezone","Clock_assign","clockTimezoneOffset","showClockTimezone","items_Clock","Clock","intervalRef","startTick","createClock","TICK_INTERVAL","Clock_extends","stopTick","clearInterval","handler","interval","setInterval","getElementSize","newWidth","newHeight","createAnalogicClock","createDigitalClock","svgNS","colors","dateFontSize","baseTimeFontSize","div","clockFace","clockFaceBackground","city","getHumanTimezone","timezoneComplication","textContent","marksGroup","mainMarkGroup","mark1a","mark1b","mark","hourHand","hourHandA","hourHandB","minuteHand","minuteHandA","minuteHandB","minuteHandPin","secondHand","secondHandBar","secondHandPin","pin","getOriginDate","seconds","minutes","secAngle","minuteAngle","hourAngle","join","dateElem","fontSize","tzFontSizeMultiplier","timeFontSize","tzFontSize","min","timeElem","tzElem","initialDate","targetTZOffset","localTZOffset","getTimezoneOffset","utimestamp","timezone","_b","split","diameter","boxPropsDecoder","Box_assign","borderColor","fillColor","Box","Box_extends","boxSizing","backgroundColor","borderStyle","maxBorderWidth","linePropsDecoder","Line_assign","startPosition","startX","startY","endPosition","endX","endY","lineWidth","Line","extractBoxSizeAndPosition","Line_extends","toString","line","labelPropsDecoder","Label_assign","Label","Label_extends","parseValueType","valueType","parseProcessValue","processValue","simpleValuePropsDecoder","SimpleValue_assign","period","SimpleValue","SimpleValue_extends","img","pi","PI","tau","tauEpsilon","Path","_x0","_y0","_x1","_y1","_","path","constructor","moveTo","closePath","lineTo","quadraticCurveTo","x1","y1","bezierCurveTo","x2","y2","arcTo","x0","y0","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","sqrt","l01","tan","acos","t01","t21","arc","a0","a1","ccw","dx","cos","dy","sin","cw","da","rect","w","h","src_path","constant","atan2","max","math_epsilon","math_pi","halfPi","math_tau","asin","arcInnerRadius","innerRadius","arcOuterRadius","outerRadius","arcStartAngle","startAngle","arcEndAngle","endAngle","arcPadAngle","padAngle","cornerTangents","r1","rc","lo","ox","oy","x11","y11","x10","y10","x00","y00","d2","D","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cx","cy","src_arc","cornerRadius","padRadius","context","buffer","r0","t0","t1","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","p0","p1","oc","x3","y3","x32","y32","intersect","ax","ay","bx","by","kc","lc","centroid","a","Linear","_context","areaStart","_line","areaEnd","NaN","lineStart","_point","lineEnd","point","linear","curveRadial","Radial","curve","_curve","radial","Array","slice","kr","noop","that","Basis","BasisClosed","_x2","_x3","_x4","_y2","_y3","_y4","BasisOpen","Bundle","beta","_basis","_beta","_x","_y","j","custom","bundle","cardinal_point","_k","Cardinal","tension","cardinal","CardinalClosed","_x5","_y5","CardinalOpen","catmullRom_point","_l01_a","_l01_2a","_l12_a","_l12_2a","_l23_a","b","_l23_2a","CatmullRom","alpha","_alpha","x23","y23","pow","catmullRom","CatmullRomClosed","CatmullRomOpen","LinearClosed","sign","slope3","h0","h1","s0","s1","slope2","monotone_point","MonotoneX","MonotoneY","ReflectContext","Natural","controlPoints","_t0","px","py","i0","i1","Step","_t","extractPercentileType","extractValueType","percentilePropsDecoder","Percentile_assign","percentileType","minValue","maxValue","labelColor","unit","Percentile_svgNS","Percentile","Percentile_extends","formatValue","progress","getProgress","NumberFormat","backgroundRect","progressRect","backgroundCircle","progressCircle","arcProps","trunc","servicePropsDecoder","encodedTitle","serviceId","Service_assign","Service","Service_extends","itemInstanceFrom","items_StaticGraph","items_SimpleValue","items_Percentile","items_Label","items_Icon","items_Service","items_Group","items_Box","items_Line","items_ColorCloud","VisualConsole","items","elementsById","elementIds","relations","handleElementClick","handleElementMovement","handleElementResizement","handleElementRemove","filter","clearRelations","containerRef","_props","backgroundURL","isFavorite","relationLineWidth","VisualConsole_assign","visualConsolePropsDecoder","sort","itemInstance","console","log","message","buildRelations","map","updateElements","itemIds","decodeProps","backgroundImage","elements","parent_1","child","addRelationLine","itemId","ids","childId","getRelationLine","identifier","parent","clientWidth","clientHeight","onItemClick","onItemMoved","onItemResized","enableEditMode","disableEditMode","AsyncTaskManager_AsyncTask","AsyncTask","taskInitiator","cancellable","cancel","_status","statusChangeEventManager","status","init","onStatusChange","AsyncTaskManager","tasks","asyncTask","task","ref","asyncPeriod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A7CSD,EAAAzxB,UAAA6P,IAAP,SACEygB,EACAW,EACAnT,QAAA,IAAAA,MAAA,GAEI/Q,KAAK2kB,MAAMpB,IAAiD,YAAlCvjB,KAAK2kB,MAAMpB,GAAYgB,QACnDvkB,KAAK2kB,MAAMpB,GAAYa,SAGzB,IAAMQ,EACJ7T,EAAS,EA/Cf,SAAuB8T,EAAiB9T,GACtC,OAAO,IAAIiT,GAAU,WACnB,IAAIc,EAAqB,KAYzB,OAVAD,EAAKJ,eAAe,SAAAF,GACH,aAAXA,IACFO,EAAM/sB,OAAOsC,WAAW,WACtBwqB,EAAKL,QACJzT,MAIP8T,EAAKL,OAEE,CACLJ,OAAQ,WACFU,GAAK1qB,aAAa0qB,GACtBD,EAAKT,aA+BHW,CAAc,IAAIf,GAAUE,GAAgBnT,GAC5C,IAAIiT,GAAUE,GAIpB,OAFAlkB,KAAK2kB,MAAMpB,GAAcqB,EAElB5kB,KAAK2kB,MAAMpB,IAQbmB,EAAAzxB,UAAAuxB,KAAP,SAAYjB,IAERvjB,KAAK2kB,MAAMpB,IACwB,YAAlCvjB,KAAK2kB,MAAMpB,GAAYgB,QACY,cAAlCvkB,KAAK2kB,MAAMpB,GAAYgB,QACW,aAAlCvkB,KAAK2kB,MAAMpB,GAAYgB,QAEzBvkB,KAAK2kB,MAAMpB,GAAYiB,QASpBE,EAAAzxB,UAAAmxB,OAAP,SAAcb,GACRvjB,KAAK2kB,MAAMpB,IAAiD,YAAlCvjB,KAAK2kB,MAAMpB,GAAYgB,QACnDvkB,KAAK2kB,MAAMpB,GAAYa,UAG7BM,EAxDA,GCtGC3sB,OAAempB,cAAgB8D,GAI/BjtB,OAAe2sB,iBAAmBO","file":"vc.main.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","import {\n AnyObject,\n Position,\n Size,\n WithAgentProps,\n WithModuleProps,\n LinkedVisualConsoleProps,\n LinkedVisualConsolePropsStatus,\n UnknownObject,\n ItemMeta\n} from \"./types\";\n\n/**\n * Return a number or a default value from a raw value.\n * @param value Raw value from which we will try to extract a valid number.\n * @param defaultValue Default value to use if we cannot extract a valid number.\n * @return A valid number or the default value.\n */\nexport function parseIntOr(value: unknown, defaultValue: T): number | T {\n if (typeof value === \"number\") return value;\n if (typeof value === \"string\" && value.length > 0 && !isNaN(parseInt(value)))\n return parseInt(value);\n else return defaultValue;\n}\n\n/**\n * Return a number or a default value from a raw value.\n * @param value Raw value from which we will try to extract a valid number.\n * @param defaultValue Default value to use if we cannot extract a valid number.\n * @return A valid number or the default value.\n */\nexport function parseFloatOr(value: unknown, defaultValue: T): number | T {\n if (typeof value === \"number\") return value;\n if (\n typeof value === \"string\" &&\n value.length > 0 &&\n !isNaN(parseFloat(value))\n )\n return parseFloat(value);\n else return defaultValue;\n}\n\n/**\n * Check if a string exists and it's not empty.\n * @param value Value to check.\n * @return The check result.\n */\nexport function stringIsEmpty(value?: string | null): boolean {\n return value == null || value.length === 0;\n}\n\n/**\n * Return a not empty string or a default value from a raw value.\n * @param value Raw value from which we will try to extract a non empty string.\n * @param defaultValue Default value to use if we cannot extract a non empty string.\n * @return A non empty string or the default value.\n */\nexport function notEmptyStringOr(\n value: unknown,\n defaultValue: T\n): string | T {\n return typeof value === \"string\" && value.length > 0 ? value : defaultValue;\n}\n\n/**\n * Return a boolean from a raw value.\n * @param value Raw value from which we will try to extract the boolean.\n * @return A valid boolean value. false by default.\n */\nexport function parseBoolean(value: unknown): boolean {\n if (typeof value === \"boolean\") return value;\n else if (typeof value === \"number\") return value > 0;\n else if (typeof value === \"string\") return value === \"1\" || value === \"true\";\n else return false;\n}\n\n/**\n * Return a valid date or a default value from a raw value.\n * @param value Raw value from which we will try to extract a valid date.\n * @param defaultValue Default value to use if we cannot extract a valid date.\n * @return A valid date or the default value.\n */\nexport function parseDateOr(value: unknown, defaultValue: T): Date | T {\n if (value instanceof Date) return value;\n else if (typeof value === \"number\") return new Date(value * 1000);\n else if (\n typeof value === \"string\" &&\n !Number.isNaN(new Date(value).getTime())\n )\n return new Date(value);\n else return defaultValue;\n}\n\n/**\n * Pad the current string with another string (multiple times, if needed)\n * until the resulting string reaches the given length.\n * The padding is applied from the start (left) of the current string.\n * @param value Text that needs to be padded.\n * @param length Length of the returned text.\n * @param pad Text to add.\n * @return Padded text.\n */\nexport function leftPad(\n value: string | number,\n length: number,\n pad: string | number = \" \"\n): string {\n if (typeof value === \"number\") value = `${value}`;\n if (typeof pad === \"number\") pad = `${pad}`;\n\n const diffLength = length - value.length;\n if (diffLength === 0) return value;\n if (diffLength < 0) return value.substr(Math.abs(diffLength));\n\n if (diffLength === pad.length) return `${pad}${value}`;\n if (diffLength < pad.length) return `${pad.substring(0, diffLength)}${value}`;\n\n const repeatTimes = Math.floor(diffLength / pad.length);\n const restLength = diffLength - pad.length * repeatTimes;\n\n let newPad = \"\";\n for (let i = 0; i < repeatTimes; i++) newPad += pad;\n\n if (restLength === 0) return `${newPad}${value}`;\n return `${newPad}${pad.substring(0, restLength)}${value}`;\n}\n\n/* Decoders */\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the position.\n */\nexport function positionPropsDecoder(data: AnyObject): Position {\n return {\n x: parseIntOr(data.x, 0),\n y: parseIntOr(data.y, 0)\n };\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the size.\n * @throws Will throw a TypeError if the width and height are not valid numbers.\n */\nexport function sizePropsDecoder(data: AnyObject): Size | never {\n if (\n data.width == null ||\n isNaN(parseInt(data.width)) ||\n data.height == null ||\n isNaN(parseInt(data.height))\n ) {\n throw new TypeError(\"invalid size.\");\n }\n\n return {\n width: parseInt(data.width),\n height: parseInt(data.height)\n };\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the agent properties.\n */\nexport function agentPropsDecoder(data: AnyObject): WithAgentProps {\n const agentProps: WithAgentProps = {\n agentId: parseIntOr(data.agent, null),\n agentName: notEmptyStringOr(data.agentName, null),\n agentAlias: notEmptyStringOr(data.agentAlias, null),\n agentDescription: notEmptyStringOr(data.agentDescription, null),\n agentAddress: notEmptyStringOr(data.agentAddress, null)\n };\n\n return data.metaconsoleId != null\n ? {\n metaconsoleId: data.metaconsoleId,\n ...agentProps // Object spread: http://es6-features.org/#SpreadOperator\n }\n : agentProps;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the module and agent properties.\n */\nexport function modulePropsDecoder(data: AnyObject): WithModuleProps {\n return {\n moduleId: parseIntOr(data.moduleId, null),\n moduleName: notEmptyStringOr(data.moduleName, null),\n moduleDescription: notEmptyStringOr(data.moduleDescription, null),\n ...agentPropsDecoder(data) // Object spread: http://es6-features.org/#SpreadOperator\n };\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the linked visual console properties.\n * @throws Will throw a TypeError if the status calculation properties are invalid.\n */\nexport function linkedVCPropsDecoder(\n data: AnyObject\n): LinkedVisualConsoleProps | never {\n // Object destructuring: http://es6-features.org/#ObjectMatchingShorthandNotation\n const {\n metaconsoleId,\n linkedLayoutId: id,\n linkedLayoutAgentId: agentId\n } = data;\n\n let linkedLayoutStatusProps: LinkedVisualConsolePropsStatus = {\n linkedLayoutStatusType: \"default\"\n };\n switch (data.linkedLayoutStatusType) {\n case \"weight\": {\n const weight = parseIntOr(data.linkedLayoutStatusTypeWeight, null);\n if (weight == null)\n throw new TypeError(\"invalid status calculation properties.\");\n\n if (data.linkedLayoutStatusTypeWeight)\n linkedLayoutStatusProps = {\n linkedLayoutStatusType: \"weight\",\n linkedLayoutStatusTypeWeight: weight\n };\n break;\n }\n case \"service\": {\n const warningThreshold = parseIntOr(\n data.linkedLayoutStatusTypeWarningThreshold,\n null\n );\n const criticalThreshold = parseIntOr(\n data.linkedLayoutStatusTypeCriticalThreshold,\n null\n );\n if (warningThreshold == null || criticalThreshold == null) {\n throw new TypeError(\"invalid status calculation properties.\");\n }\n\n linkedLayoutStatusProps = {\n linkedLayoutStatusType: \"service\",\n linkedLayoutStatusTypeWarningThreshold: warningThreshold,\n linkedLayoutStatusTypeCriticalThreshold: criticalThreshold\n };\n break;\n }\n }\n\n const linkedLayoutBaseProps = {\n linkedLayoutId: parseIntOr(id, null),\n linkedLayoutAgentId: parseIntOr(agentId, null),\n ...linkedLayoutStatusProps // Object spread: http://es6-features.org/#SpreadOperator\n };\n\n return metaconsoleId != null\n ? {\n metaconsoleId,\n ...linkedLayoutBaseProps // Object spread: http://es6-features.org/#SpreadOperator\n }\n : linkedLayoutBaseProps;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the item's meta properties.\n */\nexport function itemMetaDecoder(data: UnknownObject): ItemMeta | never {\n const receivedAt = parseDateOr(data.receivedAt, null);\n if (receivedAt === null) throw new TypeError(\"invalid meta structure\");\n\n let error = null;\n if (data.error instanceof Error) error = data.error;\n else if (typeof data.error === \"string\") error = new Error(data.error);\n\n return {\n receivedAt,\n error,\n editMode: parseBoolean(data.editMode),\n isFromCache: parseBoolean(data.isFromCache),\n isFetching: false,\n isUpdating: false\n };\n}\n\n/**\n * To get a CSS rule with the most used prefixes.\n * @param ruleName Name of the CSS rule.\n * @param ruleValue Value of the CSS rule.\n * @return An array of rules with the prefixes applied.\n */\nexport function prefixedCssRules(\n ruleName: string,\n ruleValue: string\n): string[] {\n const rule = `${ruleName}: ${ruleValue};`;\n return [\n `-webkit-${rule}`,\n `-moz-${rule}`,\n `-ms-${rule}`,\n `-o-${rule}`,\n `${rule}`\n ];\n}\n\n/**\n * Decode a base64 string.\n * @param input Data encoded using base64.\n * @return Decoded data.\n */\nexport function decodeBase64(input: string): string {\n return decodeURIComponent(escape(window.atob(input)));\n}\n\n/**\n * Generate a date representation with the format 'd/m/Y'.\n * @param initialDate Date to be used instead of a generated one.\n * @param locale Locale to use if localization is required and available.\n * @example 24/02/2020.\n * @return Date representation.\n */\nexport function humanDate(date: Date, locale: string | null = null): string {\n if (locale && Intl && Intl.DateTimeFormat) {\n // Format using the user locale.\n const options: Intl.DateTimeFormatOptions = {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\"\n };\n return Intl.DateTimeFormat(locale, options).format(date);\n } else {\n // Use getDate, getDay returns the week day.\n const day = leftPad(date.getDate(), 2, 0);\n // The getMonth function returns the month starting by 0.\n const month = leftPad(date.getMonth() + 1, 2, 0);\n const year = leftPad(date.getFullYear(), 4, 0);\n\n // Format: 'd/m/Y'.\n return `${day}/${month}/${year}`;\n }\n}\n\n/**\n * Generate a time representation with the format 'hh:mm:ss'.\n * @param initialDate Date to be used instead of a generated one.\n * @example 01:34:09.\n * @return Time representation.\n */\nexport function humanTime(date: Date): string {\n const hours = leftPad(date.getHours(), 2, 0);\n const minutes = leftPad(date.getMinutes(), 2, 0);\n const seconds = leftPad(date.getSeconds(), 2, 0);\n\n return `${hours}:${minutes}:${seconds}`;\n}\n\ninterface Macro {\n macro: string | RegExp;\n value: string;\n}\n/**\n * Replace the macros of a text.\n * @param macros List of macros and their replacements.\n * @param text Text in which we need to replace the macros.\n */\nexport function replaceMacros(macros: Macro[], text: string): string {\n return macros.reduce(\n (acc, { macro, value }) => acc.replace(macro, value),\n text\n );\n}\n\n/**\n * Create a function which will limit the rate of execution of\n * the selected function to one time for the selected interval.\n * @param delay Interval.\n * @param fn Function to be executed at a limited rate.\n */\nexport function throttle(delay: number, fn: (...args: T[]) => R) {\n let last = 0;\n return (...args: T[]) => {\n const now = Date.now();\n if (now - last < delay) return;\n last = now;\n return fn(...args);\n };\n}\n\n/**\n * Create a function which will call the selected function only\n * after the interval time has passed after its last execution.\n * @param delay Interval.\n * @param fn Function to be executed after the last call.\n */\nexport function debounce(delay: number, fn: (...args: T[]) => void) {\n let timerRef: number | null = null;\n return (...args: T[]) => {\n if (timerRef !== null) window.clearTimeout(timerRef);\n timerRef = window.setTimeout(() => {\n fn(...args);\n timerRef = null;\n }, delay);\n };\n}\n\n/**\n * Retrieve the offset of an element relative to the page.\n * @param el Node used to calculate the offset.\n */\nfunction getOffset(el: HTMLElement | null) {\n let x = 0;\n let y = 0;\n while (el && !Number.isNaN(el.offsetLeft) && !Number.isNaN(el.offsetTop)) {\n x += el.offsetLeft - el.scrollLeft;\n y += el.offsetTop - el.scrollTop;\n el = el.offsetParent as HTMLElement | null;\n }\n return { top: y, left: x };\n}\n\n/**\n * Add the grab & move functionality to a certain element inside it's container.\n *\n * @param element Element to move.\n * @param onMoved Function to execute when the element moves.\n *\n * @return A function which will clean the event handlers when executed.\n */\nexport function addMovementListener(\n element: HTMLElement,\n onMoved: (x: Position[\"x\"], y: Position[\"y\"]) => void\n): Function {\n const container = element.parentElement as HTMLElement;\n // Store the initial draggable state.\n const isDraggable = element.draggable;\n // Init the coordinates.\n let lastX: Position[\"x\"] = 0;\n let lastY: Position[\"y\"] = 0;\n let lastMouseX: Position[\"x\"] = 0;\n let lastMouseY: Position[\"y\"] = 0;\n let mouseElementOffsetX: Position[\"x\"] = 0;\n let mouseElementOffsetY: Position[\"y\"] = 0;\n // Bounds.\n let containerBounds = container.getBoundingClientRect();\n let containerOffset = getOffset(container);\n let containerTop = containerOffset.top;\n let containerBottom = containerTop + containerBounds.height;\n let containerLeft = containerOffset.left;\n let containerRight = containerLeft + containerBounds.width;\n let elementBounds = element.getBoundingClientRect();\n let borderWidth = window.getComputedStyle(element).borderWidth || \"0\";\n let borderFix = Number.parseInt(borderWidth) * 2;\n\n // Will run onMoved 32ms after its last execution.\n const debouncedMovement = debounce(32, (x: Position[\"x\"], y: Position[\"y\"]) =>\n onMoved(x, y)\n );\n // Will run onMoved one time max every 16ms.\n const throttledMovement = throttle(16, (x: Position[\"x\"], y: Position[\"y\"]) =>\n onMoved(x, y)\n );\n\n const handleMove = (e: MouseEvent) => {\n // Calculate the new element coordinates.\n let x = 0;\n let y = 0;\n\n const mouseX = e.pageX;\n const mouseY = e.pageY;\n const mouseDeltaX = mouseX - lastMouseX;\n const mouseDeltaY = mouseY - lastMouseY;\n\n const minX = 0;\n const maxX = containerBounds.width - elementBounds.width + borderFix;\n const minY = 0;\n const maxY = containerBounds.height - elementBounds.height + borderFix;\n\n const outOfBoundsLeft =\n mouseX < containerLeft ||\n (lastX === 0 &&\n mouseDeltaX > 0 &&\n mouseX < containerLeft + mouseElementOffsetX);\n const outOfBoundsRight =\n mouseX > containerRight ||\n mouseDeltaX + lastX + elementBounds.width - borderFix >\n containerBounds.width ||\n (lastX === maxX &&\n mouseDeltaX < 0 &&\n mouseX > containerLeft + maxX + mouseElementOffsetX);\n const outOfBoundsTop =\n mouseY < containerTop ||\n (lastY === 0 &&\n mouseDeltaY > 0 &&\n mouseY < containerTop + mouseElementOffsetY);\n const outOfBoundsBottom =\n mouseY > containerBottom ||\n mouseDeltaY + lastY + elementBounds.height - borderFix >\n containerBounds.height ||\n (lastY === maxY &&\n mouseDeltaY < 0 &&\n mouseY > containerTop + maxY + mouseElementOffsetY);\n\n if (outOfBoundsLeft) x = minX;\n else if (outOfBoundsRight) x = maxX;\n else x = mouseDeltaX + lastX;\n\n if (outOfBoundsTop) y = minY;\n else if (outOfBoundsBottom) y = maxY;\n else y = mouseDeltaY + lastY;\n\n if (x < 0) x = minX;\n if (y < 0) y = minY;\n\n // Store the last mouse coordinates.\n lastMouseX = mouseX;\n lastMouseY = mouseY;\n\n if (x === lastX && y === lastY) return;\n\n // Run the movement events.\n throttledMovement(x, y);\n debouncedMovement(x, y);\n\n // Store the coordinates of the element.\n lastX = x;\n lastY = y;\n };\n const handleEnd = () => {\n // Reset the positions.\n lastX = 0;\n lastY = 0;\n lastMouseX = 0;\n lastMouseY = 0;\n // Remove the move event.\n document.removeEventListener(\"mousemove\", handleMove);\n // Clean itself.\n document.removeEventListener(\"mouseup\", handleEnd);\n // Reset the draggable property to its initial state.\n element.draggable = isDraggable;\n // Reset the body selection property to a default state.\n document.body.style.userSelect = \"auto\";\n };\n const handleStart = (e: MouseEvent) => {\n e.stopPropagation();\n\n // Disable the drag temporarily.\n element.draggable = false;\n\n // Store the difference between the cursor and\n // the initial coordinates of the element.\n lastX = element.offsetLeft;\n lastY = element.offsetTop;\n // Store the mouse position.\n lastMouseX = e.pageX;\n lastMouseY = e.pageY;\n // Store the relative position between the mouse and the element.\n mouseElementOffsetX = e.offsetX;\n mouseElementOffsetY = e.offsetY;\n\n // Initialize the bounds.\n containerBounds = container.getBoundingClientRect();\n containerOffset = getOffset(container);\n containerTop = containerOffset.top;\n containerBottom = containerTop + containerBounds.height;\n containerLeft = containerOffset.left;\n containerRight = containerLeft + containerBounds.width;\n elementBounds = element.getBoundingClientRect();\n borderWidth = window.getComputedStyle(element).borderWidth || \"0\";\n borderFix = Number.parseInt(borderWidth) * 2;\n\n // Listen to the mouse movement.\n document.addEventListener(\"mousemove\", handleMove);\n // Listen to the moment when the mouse click is not pressed anymore.\n document.addEventListener(\"mouseup\", handleEnd);\n // Limit the mouse selection of the body.\n document.body.style.userSelect = \"none\";\n };\n\n // Event to listen the init of the movement.\n element.addEventListener(\"mousedown\", handleStart);\n\n // Returns a function to clean the event listeners.\n return () => {\n element.removeEventListener(\"mousedown\", handleStart);\n handleEnd();\n };\n}\n\n/**\n * Add the grab & resize functionality to a certain element.\n *\n * @param element Element to move.\n * @param onResized Function to execute when the element is resized.\n *\n * @return A function which will clean the event handlers when executed.\n */\nexport function addResizementListener(\n element: HTMLElement,\n onResized: (x: Position[\"x\"], y: Position[\"y\"]) => void\n): Function {\n const minWidth = 15;\n const minHeight = 15;\n\n const resizeDraggable = document.createElement(\"div\");\n resizeDraggable.className = \"resize-draggable\";\n element.appendChild(resizeDraggable);\n\n // Container of the resizable element.\n const container = element.parentElement as HTMLElement;\n // Store the initial draggable state.\n const isDraggable = element.draggable;\n // Init the coordinates.\n let lastWidth: Size[\"width\"] = 0;\n let lastHeight: Size[\"height\"] = 0;\n let lastMouseX: Position[\"x\"] = 0;\n let lastMouseY: Position[\"y\"] = 0;\n let mouseElementOffsetX: Position[\"x\"] = 0;\n let mouseElementOffsetY: Position[\"y\"] = 0;\n // Init the bounds.\n let containerBounds = container.getBoundingClientRect();\n let containerOffset = getOffset(container);\n let containerTop = containerOffset.top;\n let containerBottom = containerTop + containerBounds.height;\n let containerLeft = containerOffset.left;\n let containerRight = containerLeft + containerBounds.width;\n let elementOffset = getOffset(element);\n let elementTop = elementOffset.top;\n let elementLeft = elementOffset.left;\n let borderWidth = window.getComputedStyle(element).borderWidth || \"0\";\n let borderFix = Number.parseInt(borderWidth);\n\n // Will run onResized 32ms after its last execution.\n const debouncedResizement = debounce(\n 32,\n (width: Size[\"width\"], height: Size[\"height\"]) => onResized(width, height)\n );\n // Will run onResized one time max every 16ms.\n const throttledResizement = throttle(\n 16,\n (width: Size[\"width\"], height: Size[\"height\"]) => onResized(width, height)\n );\n\n const handleResize = (e: MouseEvent) => {\n // Calculate the new element coordinates.\n let width = lastWidth + (e.pageX - lastMouseX);\n let height = lastHeight + (e.pageY - lastMouseY);\n\n if (width === lastWidth && height === lastHeight) return;\n\n if (\n width < lastWidth &&\n e.pageX > elementLeft + (lastWidth - mouseElementOffsetX)\n )\n return;\n\n if (width < minWidth) {\n // Minimum value.\n width = minWidth;\n } else if (width + elementLeft - borderFix / 2 >= containerRight) {\n // Limit the size to the container.\n width = containerRight - elementLeft;\n }\n if (height < minHeight) {\n // Minimum value.\n height = minHeight;\n } else if (height + elementTop - borderFix / 2 >= containerBottom) {\n // Limit the size to the container.\n height = containerBottom - elementTop;\n }\n\n // Run the movement events.\n throttledResizement(width, height);\n debouncedResizement(width, height);\n\n // Store the coordinates of the element.\n lastWidth = width;\n lastHeight = height;\n // Store the last mouse coordinates.\n lastMouseX = e.pageX;\n lastMouseY = e.pageY;\n };\n const handleEnd = () => {\n // Reset the positions.\n lastWidth = 0;\n lastHeight = 0;\n lastMouseX = 0;\n lastMouseY = 0;\n mouseElementOffsetX = 0;\n mouseElementOffsetY = 0;\n // Remove the move event.\n document.removeEventListener(\"mousemove\", handleResize);\n // Clean itself.\n document.removeEventListener(\"mouseup\", handleEnd);\n // Reset the draggable property to its initial state.\n element.draggable = isDraggable;\n // Reset the body selection property to a default state.\n document.body.style.userSelect = \"auto\";\n };\n const handleStart = (e: MouseEvent) => {\n e.stopPropagation();\n\n // Disable the drag temporarily.\n element.draggable = false;\n\n // Store the difference between the cursor and\n // the initial coordinates of the element.\n const { width, height } = element.getBoundingClientRect();\n lastWidth = width;\n lastHeight = height;\n // Store the mouse position.\n lastMouseX = e.pageX;\n lastMouseY = e.pageY;\n // Store the relative position between the mouse and the element.\n mouseElementOffsetX = e.offsetX;\n mouseElementOffsetY = e.offsetY;\n\n // Initialize the bounds.\n containerBounds = container.getBoundingClientRect();\n containerOffset = getOffset(container);\n containerTop = containerOffset.top;\n containerBottom = containerTop + containerBounds.height;\n containerLeft = containerOffset.left;\n containerRight = containerLeft + containerBounds.width;\n elementOffset = getOffset(element);\n elementTop = elementOffset.top;\n elementLeft = elementOffset.left;\n\n // Listen to the mouse movement.\n document.addEventListener(\"mousemove\", handleResize);\n // Listen to the moment when the mouse click is not pressed anymore.\n document.addEventListener(\"mouseup\", handleEnd);\n // Limit the mouse selection of the body.\n document.body.style.userSelect = \"none\";\n };\n\n // Event to listen the init of the movement.\n resizeDraggable.addEventListener(\"mousedown\", handleStart);\n\n // Returns a function to clean the event listeners.\n return () => {\n resizeDraggable.remove();\n handleEnd();\n };\n}\n","import {\n Position,\n Size,\n AnyObject,\n WithModuleProps,\n ItemMeta\n} from \"./lib/types\";\nimport {\n sizePropsDecoder,\n positionPropsDecoder,\n parseIntOr,\n parseBoolean,\n notEmptyStringOr,\n replaceMacros,\n humanDate,\n humanTime,\n addMovementListener,\n debounce,\n addResizementListener\n} from \"./lib\";\nimport TypedEvent, { Listener, Disposable } from \"./lib/TypedEvent\";\n\n// Enum: https://www.typescriptlang.org/docs/handbook/enums.html.\nexport const enum ItemType {\n STATIC_GRAPH = 0,\n MODULE_GRAPH = 1,\n SIMPLE_VALUE = 2,\n PERCENTILE_BAR = 3,\n LABEL = 4,\n ICON = 5,\n SIMPLE_VALUE_MAX = 6,\n SIMPLE_VALUE_MIN = 7,\n SIMPLE_VALUE_AVG = 8,\n PERCENTILE_BUBBLE = 9,\n SERVICE = 10,\n GROUP_ITEM = 11,\n BOX_ITEM = 12,\n LINE_ITEM = 13,\n AUTO_SLA_GRAPH = 14,\n CIRCULAR_PROGRESS_BAR = 15,\n CIRCULAR_INTERIOR_PROGRESS_BAR = 16,\n DONUT_GRAPH = 17,\n BARS_GRAPH = 18,\n CLOCK = 19,\n COLOR_CLOUD = 20\n}\n\n// Base item properties. This interface should be extended by the item implementations.\nexport interface ItemProps extends Position, Size {\n readonly id: number;\n readonly type: ItemType;\n label: string | null;\n labelPosition: \"up\" | \"right\" | \"down\" | \"left\";\n isLinkEnabled: boolean;\n link: string | null;\n isOnTop: boolean;\n parentId: number | null;\n aclGroupId: number | null;\n}\n\n// FIXME: Fix type compatibility.\nexport interface ItemClickEvent {\n // data: Props;\n data: AnyObject;\n nativeEvent: Event;\n}\n\n// FIXME: Fix type compatibility.\nexport interface ItemRemoveEvent {\n // data: Props;\n data: AnyObject;\n}\n\nexport interface ItemMovedEvent {\n item: VisualConsoleItem;\n prevPosition: Position;\n newPosition: Position;\n}\n\nexport interface ItemResizedEvent {\n item: VisualConsoleItem;\n prevSize: Size;\n newSize: Size;\n}\n\n/**\n * Extract a valid enum value from a raw label positi9on value.\n * @param labelPosition Raw value.\n */\nconst parseLabelPosition = (\n labelPosition: unknown\n): ItemProps[\"labelPosition\"] => {\n switch (labelPosition) {\n case \"up\":\n case \"right\":\n case \"down\":\n case \"left\":\n return labelPosition;\n default:\n return \"down\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the item props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function itemBasePropsDecoder(data: AnyObject): ItemProps | never {\n if (data.id == null || isNaN(parseInt(data.id))) {\n throw new TypeError(\"invalid id.\");\n }\n if (data.type == null || isNaN(parseInt(data.type))) {\n throw new TypeError(\"invalid type.\");\n }\n\n return {\n id: parseInt(data.id),\n type: parseInt(data.type),\n label: notEmptyStringOr(data.label, null),\n labelPosition: parseLabelPosition(data.labelPosition),\n isLinkEnabled: parseBoolean(data.isLinkEnabled),\n link: notEmptyStringOr(data.link, null),\n isOnTop: parseBoolean(data.isOnTop),\n parentId: parseIntOr(data.parentId, null),\n aclGroupId: parseIntOr(data.aclGroupId, null),\n ...sizePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...positionPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\n/**\n * Base class of the visual console items. Should be extended to use its capabilities.\n */\nabstract class VisualConsoleItem {\n // Properties of the item.\n private itemProps: Props;\n // Metadata of the item.\n private _metadata: ItemMeta;\n // Reference to the DOM element which will contain the item.\n public elementRef: HTMLElement;\n public readonly labelElementRef: HTMLElement;\n // Reference to the DOM element which will contain the view of the item which extends this class.\n protected readonly childElementRef: HTMLElement;\n // Event manager for click events.\n private readonly clickEventManager = new TypedEvent>();\n // Event manager for moved events.\n private readonly movedEventManager = new TypedEvent();\n // Event manager for resized events.\n private readonly resizedEventManager = new TypedEvent();\n // Event manager for remove events.\n private readonly removeEventManager = new TypedEvent<\n ItemRemoveEvent\n >();\n // List of references to clean the event listeners.\n private readonly disposables: Disposable[] = [];\n\n // This function will only run the 2nd arg function after the time\n // of the first arg have passed after its last execution.\n private debouncedMovementSave = debounce(\n 500, // ms.\n (x: Position[\"x\"], y: Position[\"y\"]) => {\n const prevPosition = {\n x: this.props.x,\n y: this.props.y\n };\n const newPosition = {\n x: x,\n y: y\n };\n\n if (!this.positionChanged(prevPosition, newPosition)) return;\n\n // Save the new position to the props.\n this.move(x, y);\n // Emit the movement event.\n this.movedEventManager.emit({\n item: this,\n prevPosition: prevPosition,\n newPosition: newPosition\n });\n }\n );\n // This property will store the function\n // to clean the movement listener.\n private removeMovement: Function | null = null;\n\n /**\n * Start the movement funtionality.\n * @param element Element to move inside its container.\n */\n private initMovementListener(element: HTMLElement): void {\n this.removeMovement = addMovementListener(\n element,\n (x: Position[\"x\"], y: Position[\"y\"]) => {\n // Move the DOM element.\n this.moveElement(x, y);\n // Run the save function.\n this.debouncedMovementSave(x, y);\n }\n );\n }\n /**\n * Stop the movement fun\n */\n private stopMovementListener(): void {\n if (this.removeMovement) {\n this.removeMovement();\n this.removeMovement = null;\n }\n }\n\n // This function will only run the 2nd arg function after the time\n // of the first arg have passed after its last execution.\n private debouncedResizementSave = debounce(\n 500, // ms.\n (width: Size[\"width\"], height: Size[\"height\"]) => {\n const prevSize = {\n width: this.props.width,\n height: this.props.height\n };\n const newSize = {\n width: width,\n height: height\n };\n\n if (!this.sizeChanged(prevSize, newSize)) return;\n\n // Save the new position to the props.\n this.resize(width, height);\n // Emit the resizement event.\n this.resizedEventManager.emit({\n item: this,\n prevSize: prevSize,\n newSize: newSize\n });\n }\n );\n // This property will store the function\n // to clean the resizement listener.\n private removeResizement: Function | null = null;\n\n /**\n * Start the resizement funtionality.\n * @param element Element to move inside its container.\n */\n private initResizementListener(element: HTMLElement): void {\n this.removeResizement = addResizementListener(\n element,\n (width: Size[\"width\"], height: Size[\"height\"]) => {\n // The label it's outside the item's size, so we need\n // to get rid of its size to get the real size of the\n // item's content.\n if (this.props.label && this.props.label.length > 0) {\n const {\n width: labelWidth,\n height: labelHeight\n } = this.labelElementRef.getBoundingClientRect();\n\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n height -= labelHeight;\n break;\n case \"left\":\n case \"right\":\n width -= labelWidth;\n break;\n }\n }\n\n // Move the DOM element.\n this.resizeElement(width, height);\n // Run the save function.\n this.debouncedResizementSave(width, height);\n }\n );\n }\n /**\n * Stop the resizement functionality.\n */\n private stopResizementListener(): void {\n if (this.removeResizement) {\n this.removeResizement();\n this.removeResizement = null;\n }\n }\n\n /**\n * To create a new element which will be inside the item box.\n * @return Item.\n */\n protected abstract createDomElement(): HTMLElement;\n\n public constructor(props: Props, metadata: ItemMeta) {\n this.itemProps = props;\n this._metadata = metadata;\n\n /*\n * Get a HTMLElement which represents the container box\n * of the Visual Console item. This element will manage\n * all the common things like click events, show a border\n * when hovered, etc.\n */\n this.elementRef = this.createContainerDomElement();\n this.labelElementRef = this.createLabelDomElement();\n\n /*\n * Get a HTMLElement which represents the custom view\n * of the Visual Console item. This element will be\n * different depending on the item implementation.\n */\n this.childElementRef = this.createDomElement();\n\n // Insert the elements into the container.\n this.elementRef.append(this.childElementRef, this.labelElementRef);\n\n // Resize element.\n this.resizeElement(props.width, props.height);\n // Set label position.\n this.changeLabelPosition(props.labelPosition);\n }\n\n /**\n * To create a new box for the visual console item.\n * @return Item box.\n */\n private createContainerDomElement(): HTMLElement {\n let box;\n if (this.props.isLinkEnabled) {\n box = document.createElement(\"a\") as HTMLAnchorElement;\n if (this.props.link) box.href = this.props.link;\n } else {\n box = document.createElement(\"div\") as HTMLDivElement;\n }\n\n box.className = \"visual-console-item\";\n box.style.zIndex = this.props.isOnTop ? \"2\" : \"1\";\n box.style.left = `${this.props.x}px`;\n box.style.top = `${this.props.y}px`;\n // Init the click listener.\n box.addEventListener(\"click\", e => {\n if (this.meta.editMode) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n this.clickEventManager.emit({ data: this.props, nativeEvent: e });\n }\n });\n\n // Metadata state.\n if (this.meta.editMode) {\n box.classList.add(\"is-editing\");\n // Init the movement listener.\n this.initMovementListener(box);\n // Init the resizement listener.\n this.initResizementListener(box);\n }\n if (this.meta.isFetching) {\n box.classList.add(\"is-fetching\");\n }\n if (this.meta.isUpdating) {\n box.classList.add(\"is-updating\");\n }\n\n return box;\n }\n\n /**\n * To create a new label for the visual console item.\n * @return Item label.\n */\n protected createLabelDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"visual-console-item-label\";\n // Add the label if it exists.\n const label = this.getLabelWithMacrosReplaced();\n if (label.length > 0) {\n // Ugly table we need to use to replicate the legacy style.\n const table = document.createElement(\"table\");\n const row = document.createElement(\"tr\");\n const emptyRow1 = document.createElement(\"tr\");\n const emptyRow2 = document.createElement(\"tr\");\n const cell = document.createElement(\"td\");\n\n cell.innerHTML = label;\n row.append(cell);\n table.append(emptyRow1, row, emptyRow2);\n table.style.textAlign = \"center\";\n\n // Change the table size depending on its position.\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n if (this.props.width > 0) {\n table.style.width = `${this.props.width}px`;\n table.style.height = null;\n }\n break;\n case \"left\":\n case \"right\":\n if (this.props.height > 0) {\n table.style.width = null;\n table.style.height = `${this.props.height}px`;\n }\n break;\n }\n\n // element.innerHTML = this.props.label;\n element.append(table);\n }\n\n return element;\n }\n\n /**\n * Return the label stored into the props with some macros replaced.\n */\n protected getLabelWithMacrosReplaced(): string {\n // We assert that the props may have some needed properties.\n const props = this.props as Partial;\n\n return replaceMacros(\n [\n {\n macro: \"_date_\",\n value: humanDate(new Date())\n },\n {\n macro: \"_time_\",\n value: humanTime(new Date())\n },\n {\n macro: \"_agent_\",\n value: props.agentAlias != null ? props.agentAlias : \"\"\n },\n {\n macro: \"_agentdescription_\",\n value: props.agentDescription != null ? props.agentDescription : \"\"\n },\n {\n macro: \"_address_\",\n value: props.agentAddress != null ? props.agentAddress : \"\"\n },\n {\n macro: \"_module_\",\n value: props.moduleName != null ? props.moduleName : \"\"\n },\n {\n macro: \"_moduledescription_\",\n value: props.moduleDescription != null ? props.moduleDescription : \"\"\n }\n ],\n this.props.label || \"\"\n );\n }\n\n /**\n * To update the content element.\n * @return Item.\n */\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.createDomElement().innerHTML;\n }\n\n /**\n * Public accessor of the `props` property.\n * @return Properties.\n */\n public get props(): Props {\n return { ...this.itemProps }; // Return a copy.\n }\n\n /**\n * Public setter of the `props` property.\n * If the new props are different enough than the\n * stored props, a render would be fired.\n * @param newProps\n */\n public set props(newProps: Props) {\n const prevProps = this.props;\n // Update the internal props.\n this.itemProps = newProps;\n\n // From this point, things which rely on this.props can access to the changes.\n\n // Check if we should re-render.\n if (this.shouldBeUpdated(prevProps, newProps))\n this.render(prevProps, this._metadata);\n }\n\n /**\n * Public accessor of the `meta` property.\n * @return Properties.\n */\n public get meta(): ItemMeta {\n return { ...this._metadata }; // Return a copy.\n }\n\n /**\n * Public setter of the `meta` property.\n * If the new meta are different enough than the\n * stored meta, a render would be fired.\n * @param newProps\n */\n public set meta(newMetadata: ItemMeta) {\n this.setMeta(newMetadata);\n }\n\n /**\n * Clasic and protected version of the setter of the `meta` property.\n * Useful to override it from children classes.\n * @param newProps\n */\n protected setMeta(newMetadata: ItemMeta) {\n const prevMetadata = this._metadata;\n // Update the internal meta.\n this._metadata = newMetadata;\n\n // From this point, things which rely on this.props can access to the changes.\n\n // Check if we should re-render.\n // if (this.shouldBeUpdated(prevMetadata, newMetadata))\n this.render(this.itemProps, prevMetadata);\n }\n\n /**\n * To compare the previous and the new props and returns a boolean value\n * in case the difference is meaningfull enough to perform DOM changes.\n *\n * Here, the only comparision is done by reference.\n *\n * Override this function to perform a different comparision depending on the item needs.\n *\n * @param prevProps\n * @param newProps\n * @return Whether the difference is meaningful enough to perform DOM changes or not.\n */\n protected shouldBeUpdated(prevProps: Props, newProps: Props): boolean {\n return prevProps !== newProps;\n }\n\n /**\n * To recreate or update the HTMLElement which represents the item into the DOM.\n * @param prevProps If exists it will be used to only perform DOM updates instead of a full replace.\n */\n public render(\n prevProps: Props | null = null,\n prevMeta: ItemMeta | null = null\n ): void {\n this.updateDomElement(this.childElementRef);\n\n // Move box.\n if (!prevProps || this.positionChanged(prevProps, this.props)) {\n this.moveElement(this.props.x, this.props.y);\n }\n // Resize box.\n if (!prevProps || this.sizeChanged(prevProps, this.props)) {\n this.resizeElement(this.props.width, this.props.height);\n }\n // Change label.\n const oldLabelHtml = this.labelElementRef.innerHTML;\n const newLabelHtml = this.createLabelDomElement().innerHTML;\n if (oldLabelHtml !== newLabelHtml) {\n this.labelElementRef.innerHTML = newLabelHtml;\n }\n // Change label position.\n if (!prevProps || prevProps.labelPosition !== this.props.labelPosition) {\n this.changeLabelPosition(this.props.labelPosition);\n }\n // Change link.\n if (\n prevProps &&\n (prevProps.isLinkEnabled !== this.props.isLinkEnabled ||\n (this.props.isLinkEnabled && prevProps.link !== this.props.link))\n ) {\n const container = this.createContainerDomElement();\n // Add the children of the old element.\n container.innerHTML = this.elementRef.innerHTML;\n // Copy the attributes.\n const attrs = this.elementRef.attributes;\n for (let i = 0; i < attrs.length; i++) {\n if (attrs[i].nodeName !== \"id\") {\n container.setAttributeNode(attrs[i]);\n }\n }\n // Replace the reference.\n if (this.elementRef.parentNode !== null) {\n this.elementRef.parentNode.replaceChild(container, this.elementRef);\n }\n\n // Changed the reference to the main element. It's ugly, but needed.\n this.elementRef = container;\n }\n\n // Change metadata related things.\n if (!prevMeta || prevMeta.editMode !== this.meta.editMode) {\n if (this.meta.editMode) {\n this.elementRef.classList.add(\"is-editing\");\n this.initMovementListener(this.elementRef);\n this.initResizementListener(this.elementRef);\n } else {\n this.elementRef.classList.remove(\"is-editing\");\n this.stopMovementListener();\n this.stopResizementListener();\n }\n }\n if (!prevMeta || prevMeta.isFetching !== this.meta.isFetching) {\n if (this.meta.isFetching) {\n this.elementRef.classList.add(\"is-fetching\");\n } else {\n this.elementRef.classList.remove(\"is-fetching\");\n }\n }\n if (!prevMeta || prevMeta.isUpdating !== this.meta.isUpdating) {\n if (this.meta.isUpdating) {\n this.elementRef.classList.add(\"is-updating\");\n } else {\n this.elementRef.classList.remove(\"is-updating\");\n }\n }\n }\n\n /**\n * To remove the event listeners and the elements from the DOM.\n */\n public remove(): void {\n // Call the remove event.\n this.removeEventManager.emit({ data: this.props });\n // Event listeners.\n this.disposables.forEach(disposable => {\n try {\n disposable.dispose();\n } catch (ignored) {} // eslint-disable-line no-empty\n });\n // VisualConsoleItem DOM element.\n this.elementRef.remove();\n }\n\n /**\n * Compare the previous and the new position and return\n * a boolean value in case the position changed.\n * @param prevPosition\n * @param newPosition\n * @return Whether the position changed or not.\n */\n protected positionChanged(\n prevPosition: Position,\n newPosition: Position\n ): boolean {\n return prevPosition.x !== newPosition.x || prevPosition.y !== newPosition.y;\n }\n\n /**\n * Move the label around the item content.\n * @param position Label position.\n */\n protected changeLabelPosition(position: Props[\"labelPosition\"]): void {\n switch (position) {\n case \"up\":\n this.elementRef.style.flexDirection = \"column-reverse\";\n break;\n case \"left\":\n this.elementRef.style.flexDirection = \"row-reverse\";\n break;\n case \"right\":\n this.elementRef.style.flexDirection = \"row\";\n break;\n case \"down\":\n default:\n this.elementRef.style.flexDirection = \"column\";\n break;\n }\n\n // Ugly table to show the label as its legacy counterpart.\n const tables = this.labelElementRef.getElementsByTagName(\"table\");\n const table = tables.length > 0 ? tables.item(0) : null;\n // Change the table size depending on its position.\n if (table) {\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n if (this.props.width > 0) {\n table.style.width = `${this.props.width}px`;\n table.style.height = null;\n }\n break;\n case \"left\":\n case \"right\":\n if (this.props.height > 0) {\n table.style.width = null;\n table.style.height = `${this.props.height}px`;\n }\n break;\n }\n }\n }\n\n /**\n * Move the DOM container.\n * @param x Horizontal axis position.\n * @param y Vertical axis position.\n */\n protected moveElement(x: number, y: number): void {\n this.elementRef.style.left = `${x}px`;\n this.elementRef.style.top = `${y}px`;\n }\n\n /**\n * Update the position into the properties and move the DOM container.\n * @param x Horizontal axis position.\n * @param y Vertical axis position.\n */\n public move(x: number, y: number): void {\n this.moveElement(x, y);\n this.itemProps = {\n ...this.props, // Object spread: http://es6-features.org/#SpreadOperator\n x,\n y\n };\n }\n\n /**\n * Compare the previous and the new size and return\n * a boolean value in case the size changed.\n * @param prevSize\n * @param newSize\n * @return Whether the size changed or not.\n */\n protected sizeChanged(prevSize: Size, newSize: Size): boolean {\n return (\n prevSize.width !== newSize.width || prevSize.height !== newSize.height\n );\n }\n\n /**\n * Resize the DOM content container.\n * @param width\n * @param height\n */\n protected resizeElement(width: number, height: number): void {\n // The most valuable size is the content size.\n this.childElementRef.style.width = width > 0 ? `${width}px` : null;\n this.childElementRef.style.height = height > 0 ? `${height}px` : null;\n\n if (this.props.label && this.props.label.length > 0) {\n // Ugly table to show the label as its legacy counterpart.\n const tables = this.labelElementRef.getElementsByTagName(\"table\");\n const table = tables.length > 0 ? tables.item(0) : null;\n\n if (table) {\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n table.style.width = width > 0 ? `${width}px` : null;\n break;\n case \"left\":\n case \"right\":\n table.style.height = height > 0 ? `${height}px` : null;\n break;\n }\n }\n }\n }\n\n /**\n * Update the size into the properties and resize the DOM container.\n * @param width\n * @param height\n */\n public resize(width: number, height: number): void {\n this.resizeElement(width, height);\n this.itemProps = {\n ...this.props, // Object spread: http://es6-features.org/#SpreadOperator\n width,\n height\n };\n }\n\n /**\n * To add an event handler to the click of the linked visual console elements.\n * @param listener Function which is going to be executed when a linked console is clicked.\n */\n public onClick(listener: Listener>): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.clickEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * To add an event handler to the movement of visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onMoved(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.movedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * To add an event handler to the resizement of visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onResized(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.resizedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * To add an event handler to the removal of the item.\n * @param listener Function which is going to be executed when a item is removed.\n */\n public onRemove(listener: Listener>): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.removeEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n}\n\nexport default VisualConsoleItem;\n","export interface Listener {\n (event: T): void;\n}\n\nexport interface Disposable {\n dispose: () => void;\n}\n\n/** passes through events as they happen. You will not get events from before you start listening */\nexport default class TypedEvent {\n private listeners: Listener[] = [];\n private listenersOncer: Listener[] = [];\n\n public on = (listener: Listener): Disposable => {\n this.listeners.push(listener);\n return {\n dispose: () => this.off(listener)\n };\n };\n\n public once = (listener: Listener): void => {\n this.listenersOncer.push(listener);\n };\n\n public off = (listener: Listener): void => {\n const callbackIndex = this.listeners.indexOf(listener);\n if (callbackIndex > -1) this.listeners.splice(callbackIndex, 1);\n };\n\n public emit = (event: T): void => {\n /** Update any general listeners */\n this.listeners.forEach(listener => listener(event));\n\n /** Clear the `once` queue */\n this.listenersOncer.forEach(listener => listener(event));\n this.listenersOncer = [];\n };\n\n public pipe = (te: TypedEvent): Disposable => this.on(e => te.emit(e));\n}\n","import { AnyObject, WithModuleProps } from \"../lib/types\";\nimport {\n modulePropsDecoder,\n parseIntOr,\n decodeBase64,\n stringIsEmpty\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type EventsHistoryProps = {\n type: ItemType.AUTO_SLA_GRAPH;\n maxTime: number | null;\n html: string;\n} & ItemProps &\n WithModuleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the events history props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function eventsHistoryPropsDecoder(\n data: AnyObject\n): EventsHistoryProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.AUTO_SLA_GRAPH,\n maxTime: parseIntOr(data.maxTime, null),\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class EventsHistory extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"events-history\";\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n setTimeout(() => {\n try {\n eval(scripts[i].innerHTML.trim());\n } catch (ignored) {} // eslint-disable-line no-empty\n }, 0);\n }\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n modulePropsDecoder,\n decodeBase64,\n stringIsEmpty\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type DonutGraphProps = {\n type: ItemType.DONUT_GRAPH;\n html: string;\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the donut graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function donutGraphPropsDecoder(\n data: AnyObject\n): DonutGraphProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.DONUT_GRAPH,\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class DonutGraph extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"donut-graph\";\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n setTimeout(() => {\n if (scripts[i].src.length === 0) eval(scripts[i].innerHTML.trim());\n }, 0);\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import { AnyObject, WithModuleProps } from \"../lib/types\";\nimport { modulePropsDecoder, decodeBase64, stringIsEmpty } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type BarsGraphProps = {\n type: ItemType.BARS_GRAPH;\n html: string;\n} & ItemProps &\n WithModuleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the bars graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function barsGraphPropsDecoder(data: AnyObject): BarsGraphProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.BARS_GRAPH,\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class BarsGraph extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"bars-graph\";\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n setTimeout(() => {\n if (scripts[i].src.length === 0) eval(scripts[i].innerHTML.trim());\n }, 0);\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n modulePropsDecoder,\n decodeBase64,\n stringIsEmpty\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type ModuleGraphProps = {\n type: ItemType.MODULE_GRAPH;\n html: string;\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the module graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function moduleGraphPropsDecoder(\n data: AnyObject\n): ModuleGraphProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.MODULE_GRAPH,\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class ModuleGraph extends Item {\n /**\n * @override Item.resizeElement.\n * Resize the DOM content container.\n * We need to override the resize function cause this item's height\n * is larger than the configured and the graph is over the label.\n * @param width\n * @param height\n */\n protected resizeElement(width: number): void {\n super.resizeElement(width, 0);\n }\n\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"module-graph\";\n element.innerHTML = this.props.html;\n\n // Remove the overview graph.\n const legendP = element.getElementsByTagName(\"p\");\n for (let i = 0; i < legendP.length; i++) {\n legendP[i].style.margin = \"0px\";\n }\n\n // Remove the overview graph.\n const overviewGraphs = element.getElementsByClassName(\"overview_graph\");\n for (let i = 0; i < overviewGraphs.length; i++) {\n overviewGraphs[i].remove();\n }\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n setTimeout(() => {\n try {\n eval(scripts[i].innerHTML.trim());\n } catch (ignored) {} // eslint-disable-line no-empty\n }, 0);\n }\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Remove the overview graph.\n const legendP = element.getElementsByTagName(\"p\");\n for (let i = 0; i < legendP.length; i++) {\n legendP[i].style.margin = \"0px\";\n }\n\n // Remove the overview graph.\n const overviewGraphs = element.getElementsByClassName(\"overview_graph\");\n for (let i = 0; i < overviewGraphs.length; i++) {\n overviewGraphs[i].remove();\n }\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import {\n WithModuleProps,\n LinkedVisualConsoleProps,\n AnyObject\n} from \"../lib/types\";\n\nimport {\n modulePropsDecoder,\n linkedVCPropsDecoder,\n notEmptyStringOr\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type StaticGraphProps = {\n type: ItemType.STATIC_GRAPH;\n imageSrc: string; // URL?\n showLastValueTooltip: \"default\" | \"enabled\" | \"disabled\";\n statusImageSrc: string | null; // URL?\n lastValue: string | null;\n} & ItemProps &\n (WithModuleProps | LinkedVisualConsoleProps);\n\n/**\n * Extract a valid enum value from a raw unknown value.\n * @param showLastValueTooltip Raw value.\n */\nconst parseShowLastValueTooltip = (\n showLastValueTooltip: unknown\n): StaticGraphProps[\"showLastValueTooltip\"] => {\n switch (showLastValueTooltip) {\n case \"default\":\n case \"enabled\":\n case \"disabled\":\n return showLastValueTooltip;\n default:\n return \"default\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the static graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function staticGraphPropsDecoder(\n data: AnyObject\n): StaticGraphProps | never {\n if (typeof data.imageSrc !== \"string\" || data.imageSrc.length === 0) {\n throw new TypeError(\"invalid image src.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.STATIC_GRAPH,\n imageSrc: data.imageSrc,\n showLastValueTooltip: parseShowLastValueTooltip(data.showLastValueTooltip),\n statusImageSrc: notEmptyStringOr(data.statusImageSrc, null),\n lastValue: notEmptyStringOr(data.lastValue, null),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class StaticGraph extends Item {\n protected createDomElement(): HTMLElement {\n const imgSrc = this.props.statusImageSrc || this.props.imageSrc;\n const element = document.createElement(\"div\");\n element.className = \"static-graph\";\n element.style.background = `url(${imgSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n\n // Show last value in a tooltip.\n if (\n this.props.lastValue !== null &&\n this.props.showLastValueTooltip !== \"disabled\"\n ) {\n element.className = \"static-graph image forced_title\";\n element.setAttribute(\"data-use_title_for_force_title\", \"1\");\n element.setAttribute(\"data-title\", this.props.lastValue);\n }\n\n return element;\n }\n}\n","import { LinkedVisualConsoleProps, AnyObject } from \"../lib/types\";\nimport { linkedVCPropsDecoder } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type IconProps = {\n type: ItemType.ICON;\n imageSrc: string; // URL?\n} & ItemProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the icon props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function iconPropsDecoder(data: AnyObject): IconProps | never {\n if (typeof data.imageSrc !== \"string\" || data.imageSrc.length === 0) {\n throw new TypeError(\"invalid image src.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.ICON,\n imageSrc: data.imageSrc,\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Icon extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"icon\";\n element.style.background = `url(${this.props.imageSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n\n return element;\n }\n}\n","import {\n WithModuleProps,\n LinkedVisualConsoleProps,\n AnyObject\n} from \"../lib/types\";\nimport { modulePropsDecoder, linkedVCPropsDecoder } from \"../lib\";\nimport Item, { itemBasePropsDecoder, ItemType, ItemProps } from \"../Item\";\n\nexport type ColorCloudProps = {\n type: ItemType.COLOR_CLOUD;\n color: string;\n // TODO: Add the rest of the color cloud values?\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the static graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function colorCloudPropsDecoder(\n data: AnyObject\n): ColorCloudProps | never {\n // TODO: Validate the color.\n if (typeof data.color !== \"string\" || data.color.length === 0) {\n throw new TypeError(\"invalid color.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.COLOR_CLOUD,\n color: data.color,\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nconst svgNS = \"http://www.w3.org/2000/svg\";\n\nexport default class ColorCloud extends Item {\n protected createDomElement(): HTMLElement {\n const container: HTMLDivElement = document.createElement(\"div\");\n container.className = \"color-cloud\";\n\n // Add the SVG.\n container.append(this.createSvgElement());\n\n return container;\n }\n\n protected resizeElement(width: number): void {\n super.resizeElement(width, width);\n }\n\n public createSvgElement(): SVGSVGElement {\n const gradientId = `grad_${this.props.id}`;\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 100\");\n\n // Defs.\n const defs = document.createElementNS(svgNS, \"defs\");\n // Radial gradient.\n const radialGradient = document.createElementNS(svgNS, \"radialGradient\");\n radialGradient.setAttribute(\"id\", gradientId);\n radialGradient.setAttribute(\"cx\", \"50%\");\n radialGradient.setAttribute(\"cy\", \"50%\");\n radialGradient.setAttribute(\"r\", \"50%\");\n radialGradient.setAttribute(\"fx\", \"50%\");\n radialGradient.setAttribute(\"fy\", \"50%\");\n // Stops.\n const stop0 = document.createElementNS(svgNS, \"stop\");\n stop0.setAttribute(\"offset\", \"0%\");\n stop0.setAttribute(\n \"style\",\n `stop-color:${this.props.color};stop-opacity:0.9`\n );\n const stop100 = document.createElementNS(svgNS, \"stop\");\n stop100.setAttribute(\"offset\", \"100%\");\n stop100.setAttribute(\n \"style\",\n `stop-color:${this.props.color};stop-opacity:0`\n );\n // Circle.\n const circle = document.createElementNS(svgNS, \"circle\");\n circle.setAttribute(\"fill\", `url(#${gradientId})`);\n circle.setAttribute(\"cx\", \"50%\");\n circle.setAttribute(\"cy\", \"50%\");\n circle.setAttribute(\"r\", \"50%\");\n\n // Append elements.\n radialGradient.append(stop0, stop100);\n defs.append(radialGradient);\n svg.append(defs, circle);\n\n return svg;\n }\n}\n","import { LinkedVisualConsoleProps, AnyObject } from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n parseIntOr,\n notEmptyStringOr,\n stringIsEmpty,\n decodeBase64,\n parseBoolean\n} from \"../lib\";\nimport Item, { ItemProps, itemBasePropsDecoder, ItemType } from \"../Item\";\n\nexport type GroupProps = {\n type: ItemType.GROUP_ITEM;\n groupId: number;\n imageSrc: string | null; // URL?\n statusImageSrc: string | null;\n showStatistics: boolean;\n html?: string | null;\n} & ItemProps &\n LinkedVisualConsoleProps;\n\nfunction extractHtml(data: AnyObject): string | null {\n if (!stringIsEmpty(data.html)) return data.html;\n if (!stringIsEmpty(data.encodedHtml)) return decodeBase64(data.encodedHtml);\n return null;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the group props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function groupPropsDecoder(data: AnyObject): GroupProps | never {\n if (\n (typeof data.imageSrc !== \"string\" || data.imageSrc.length === 0) &&\n data.encodedHtml === null\n ) {\n throw new TypeError(\"invalid image src.\");\n }\n if (parseIntOr(data.groupId, null) === null) {\n throw new TypeError(\"invalid group Id.\");\n }\n\n const showStatistics = parseBoolean(data.showStatistics);\n const html = showStatistics ? extractHtml(data) : null;\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.GROUP_ITEM,\n groupId: parseInt(data.groupId),\n imageSrc: notEmptyStringOr(data.imageSrc, null),\n statusImageSrc: notEmptyStringOr(data.statusImageSrc, null),\n showStatistics,\n html,\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Group extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"group\";\n\n if (!this.props.showStatistics && this.props.statusImageSrc !== null) {\n // Icon with status.\n element.style.background = `url(${this.props.statusImageSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n } else if (this.props.showStatistics && this.props.html != null) {\n // Stats table.\n element.innerHTML = this.props.html;\n }\n\n return element;\n }\n}\n","import \"./styles.css\";\n\nimport {\n LinkedVisualConsoleProps,\n AnyObject,\n Size,\n ItemMeta\n} from \"../../lib/types\";\nimport {\n linkedVCPropsDecoder,\n parseIntOr,\n parseBoolean,\n prefixedCssRules,\n notEmptyStringOr,\n humanDate,\n humanTime\n} from \"../../lib\";\nimport Item, { ItemProps, itemBasePropsDecoder, ItemType } from \"../../Item\";\n\nexport type ClockProps = {\n type: ItemType.CLOCK;\n clockType: \"analogic\" | \"digital\";\n clockFormat: \"datetime\" | \"time\";\n clockTimezone: string;\n clockTimezoneOffset: number; // Offset of the timezone to UTC in seconds.\n showClockTimezone: boolean;\n color?: string | null;\n} & ItemProps &\n LinkedVisualConsoleProps;\n\n/**\n * Extract a valid enum value from a raw unknown value.\n * @param clockType Raw value.\n */\nconst parseClockType = (clockType: unknown): ClockProps[\"clockType\"] => {\n switch (clockType) {\n case \"analogic\":\n case \"digital\":\n return clockType;\n default:\n return \"analogic\";\n }\n};\n\n/**\n * Extract a valid enum value from a raw unknown value.\n * @param clockFormat Raw value.\n */\nconst parseClockFormat = (clockFormat: unknown): ClockProps[\"clockFormat\"] => {\n switch (clockFormat) {\n case \"datetime\":\n case \"time\":\n return clockFormat;\n default:\n return \"datetime\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the clock props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function clockPropsDecoder(data: AnyObject): ClockProps | never {\n if (\n typeof data.clockTimezone !== \"string\" ||\n data.clockTimezone.length === 0\n ) {\n throw new TypeError(\"invalid timezone.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.CLOCK,\n clockType: parseClockType(data.clockType),\n clockFormat: parseClockFormat(data.clockFormat),\n clockTimezone: data.clockTimezone,\n clockTimezoneOffset: parseIntOr(data.clockTimezoneOffset, 0),\n showClockTimezone: parseBoolean(data.showClockTimezone),\n color: notEmptyStringOr(data.color, null),\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Clock extends Item {\n public static readonly TICK_INTERVAL = 1000; // In ms.\n private intervalRef: number | null = null;\n\n public constructor(props: ClockProps, meta: ItemMeta) {\n // Call the superclass constructor.\n super(props, meta);\n\n /* The item is already loaded and inserted into the DOM.\n * The class properties are now initialized.\n * Now you can modify the item, add event handlers, timers, etc.\n */\n\n /* The use of the arrow function is important here. startTick will\n * use the function passed as an argument to call the global setInterval\n * function. The interval, timeout or event functions, among other, are\n * called into another execution loop and using a different context.\n * The arrow functions, unlike the classic functions, doesn't create\n * their own context (this), so their context at execution time will be\n * use the current context at the declaration time.\n * http://es6-features.org/#Lexicalthis\n */\n this.startTick(\n () => {\n // Replace the old element with the updated date.\n this.childElementRef.innerHTML = this.createClock().innerHTML;\n },\n /* The analogic clock doesn't need to tick,\n * but it will be refreshed every 20 seconds\n * to avoid a desync caused by page freezes.\n */\n this.props.clockType === \"analogic\" ? 20000 : Clock.TICK_INTERVAL\n );\n }\n\n /**\n * Wrap a window.clearInterval call.\n */\n private stopTick(): void {\n if (this.intervalRef !== null) {\n window.clearInterval(this.intervalRef);\n this.intervalRef = null;\n }\n }\n\n /**\n * Wrap a window.setInterval call.\n * @param handler Function to be called every time the interval\n * timer is reached.\n * @param interval Number in milliseconds for the interval timer.\n */\n private startTick(\n handler: TimerHandler,\n interval: number = Clock.TICK_INTERVAL\n ): void {\n this.stopTick();\n this.intervalRef = window.setInterval(handler, interval);\n }\n\n /**\n * Create a element which contains the DOM representation of the item.\n * @return DOM Element.\n * @override\n */\n protected createDomElement(): HTMLElement | never {\n return this.createClock();\n }\n\n /**\n * To remove the event listeners and the elements from the DOM.\n * @override\n */\n public remove(): void {\n // Clear the interval.\n this.stopTick();\n // Call to the parent clean function.\n super.remove();\n }\n\n /**\n * @override Item.resizeElement\n * Resize the DOM content container.\n * @param width\n * @param height\n */\n protected resizeElement(width: number, height: number): void {\n const { width: newWidth, height: newHeight } = this.getElementSize(\n width,\n height\n ); // Destructuring assigment: http://es6-features.org/#ObjectMatchingShorthandNotation\n super.resizeElement(newWidth, newHeight);\n // Re-render the item to force it calculate a new font size.\n if (this.props.clockType === \"digital\") {\n // Replace the old element with the updated date.\n this.childElementRef.innerHTML = this.createClock().innerHTML;\n }\n }\n\n /**\n * Create a element which contains a representation of a clock.\n * It choose between the clock types.\n * @return DOM Element.\n * @throws Error.\n */\n private createClock(): HTMLElement | never {\n switch (this.props.clockType) {\n case \"analogic\":\n return this.createAnalogicClock();\n case \"digital\":\n return this.createDigitalClock();\n default:\n throw new Error(\"invalid clock type.\");\n }\n }\n\n /**\n * Create a element which contains a representation of an analogic clock.\n * @return DOM Element.\n */\n private createAnalogicClock(): HTMLElement {\n const svgNS = \"http://www.w3.org/2000/svg\";\n const colors = {\n watchFace: \"#FFFFF0\",\n watchFaceBorder: \"#242124\",\n mark: \"#242124\",\n handDark: \"#242124\",\n handLight: \"#525252\",\n secondHand: \"#DC143C\"\n };\n\n const { width, height } = this.getElementSize(); // Destructuring assigment: http://es6-features.org/#ObjectMatchingShorthandNotation\n\n // Calculate font size to adapt the font to the item size.\n const baseTimeFontSize = 20; // Per 100px of width.\n const dateFontSizeMultiplier = 0.5;\n const dateFontSize =\n (baseTimeFontSize * dateFontSizeMultiplier * width) / 100;\n\n const div = document.createElement(\"div\");\n div.className = \"analogic-clock\";\n div.style.width = `${width}px`;\n div.style.height = `${height}px`;\n\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 100\");\n\n // Clock face.\n const clockFace = document.createElementNS(svgNS, \"g\");\n clockFace.setAttribute(\"class\", \"clockface\");\n const clockFaceBackground = document.createElementNS(svgNS, \"circle\");\n clockFaceBackground.setAttribute(\"cx\", \"50\");\n clockFaceBackground.setAttribute(\"cy\", \"50\");\n clockFaceBackground.setAttribute(\"r\", \"48\");\n clockFaceBackground.setAttribute(\"fill\", colors.watchFace);\n clockFaceBackground.setAttribute(\"stroke\", colors.watchFaceBorder);\n clockFaceBackground.setAttribute(\"stroke-width\", \"2\");\n clockFaceBackground.setAttribute(\"stroke-linecap\", \"round\");\n // Insert the clockface background into the clockface group.\n clockFace.append(clockFaceBackground);\n\n // Timezone complication.\n const city = this.getHumanTimezone();\n if (city.length > 0) {\n const timezoneComplication = document.createElementNS(svgNS, \"text\");\n timezoneComplication.setAttribute(\"text-anchor\", \"middle\");\n timezoneComplication.setAttribute(\"font-size\", \"8\");\n timezoneComplication.setAttribute(\n \"transform\",\n \"translate(30 50) rotate(90)\" // Rotate to counter the clock rotation.\n );\n timezoneComplication.setAttribute(\"fill\", colors.mark);\n timezoneComplication.textContent = city;\n clockFace.append(timezoneComplication);\n }\n\n // Marks group.\n const marksGroup = document.createElementNS(svgNS, \"g\");\n marksGroup.setAttribute(\"class\", \"marks\");\n // Build the 12 hours mark.\n const mainMarkGroup = document.createElementNS(svgNS, \"g\");\n mainMarkGroup.setAttribute(\"class\", \"mark\");\n mainMarkGroup.setAttribute(\"transform\", \"translate(50 50)\");\n const mark1a = document.createElementNS(svgNS, \"line\");\n mark1a.setAttribute(\"x1\", \"36\");\n mark1a.setAttribute(\"y1\", \"0\");\n mark1a.setAttribute(\"x2\", \"46\");\n mark1a.setAttribute(\"y2\", \"0\");\n mark1a.setAttribute(\"stroke\", colors.mark);\n mark1a.setAttribute(\"stroke-width\", \"5\");\n const mark1b = document.createElementNS(svgNS, \"line\");\n mark1b.setAttribute(\"x1\", \"36\");\n mark1b.setAttribute(\"y1\", \"0\");\n mark1b.setAttribute(\"x2\", \"46\");\n mark1b.setAttribute(\"y2\", \"0\");\n mark1b.setAttribute(\"stroke\", colors.watchFace);\n mark1b.setAttribute(\"stroke-width\", \"1\");\n // Insert the 12 mark lines into their group.\n mainMarkGroup.append(mark1a, mark1b);\n // Insert the main mark into the marks group.\n marksGroup.append(mainMarkGroup);\n // Build the rest of the marks.\n for (let i = 1; i < 60; i++) {\n const mark = document.createElementNS(svgNS, \"line\");\n mark.setAttribute(\"y1\", \"0\");\n mark.setAttribute(\"y2\", \"0\");\n mark.setAttribute(\"stroke\", colors.mark);\n mark.setAttribute(\"transform\", `translate(50 50) rotate(${i * 6})`);\n\n if (i % 5 === 0) {\n mark.setAttribute(\"x1\", \"38\");\n mark.setAttribute(\"x2\", \"46\");\n mark.setAttribute(\"stroke-width\", i % 15 === 0 ? \"2\" : \"1\");\n } else {\n mark.setAttribute(\"x1\", \"42\");\n mark.setAttribute(\"x2\", \"46\");\n mark.setAttribute(\"stroke-width\", \"0.5\");\n }\n\n // Insert the mark into the marks group.\n marksGroup.append(mark);\n }\n\n /* Clock hands */\n\n // Hour hand.\n const hourHand = document.createElementNS(svgNS, \"g\");\n hourHand.setAttribute(\"class\", \"hour-hand\");\n hourHand.setAttribute(\"transform\", \"translate(50 50)\");\n // This will go back and will act like a border.\n const hourHandA = document.createElementNS(svgNS, \"line\");\n hourHandA.setAttribute(\"class\", \"hour-hand-a\");\n hourHandA.setAttribute(\"x1\", \"0\");\n hourHandA.setAttribute(\"y1\", \"0\");\n hourHandA.setAttribute(\"x2\", \"30\");\n hourHandA.setAttribute(\"y2\", \"0\");\n hourHandA.setAttribute(\"stroke\", colors.handLight);\n hourHandA.setAttribute(\"stroke-width\", \"4\");\n hourHandA.setAttribute(\"stroke-linecap\", \"round\");\n // This will go in front of the previous line.\n const hourHandB = document.createElementNS(svgNS, \"line\");\n hourHandB.setAttribute(\"class\", \"hour-hand-b\");\n hourHandB.setAttribute(\"x1\", \"0\");\n hourHandB.setAttribute(\"y1\", \"0\");\n hourHandB.setAttribute(\"x2\", \"29.9\");\n hourHandB.setAttribute(\"y2\", \"0\");\n hourHandB.setAttribute(\"stroke\", colors.handDark);\n hourHandB.setAttribute(\"stroke-width\", \"3.1\");\n hourHandB.setAttribute(\"stroke-linecap\", \"round\");\n // Append the elements to finish the hour hand.\n hourHand.append(hourHandA, hourHandB);\n\n // Minute hand.\n const minuteHand = document.createElementNS(svgNS, \"g\");\n minuteHand.setAttribute(\"class\", \"minute-hand\");\n minuteHand.setAttribute(\"transform\", \"translate(50 50)\");\n // This will go back and will act like a border.\n const minuteHandA = document.createElementNS(svgNS, \"line\");\n minuteHandA.setAttribute(\"class\", \"minute-hand-a\");\n minuteHandA.setAttribute(\"x1\", \"0\");\n minuteHandA.setAttribute(\"y1\", \"0\");\n minuteHandA.setAttribute(\"x2\", \"40\");\n minuteHandA.setAttribute(\"y2\", \"0\");\n minuteHandA.setAttribute(\"stroke\", colors.handLight);\n minuteHandA.setAttribute(\"stroke-width\", \"2\");\n minuteHandA.setAttribute(\"stroke-linecap\", \"round\");\n // This will go in front of the previous line.\n const minuteHandB = document.createElementNS(svgNS, \"line\");\n minuteHandB.setAttribute(\"class\", \"minute-hand-b\");\n minuteHandB.setAttribute(\"x1\", \"0\");\n minuteHandB.setAttribute(\"y1\", \"0\");\n minuteHandB.setAttribute(\"x2\", \"39.9\");\n minuteHandB.setAttribute(\"y2\", \"0\");\n minuteHandB.setAttribute(\"stroke\", colors.handDark);\n minuteHandB.setAttribute(\"stroke-width\", \"1.5\");\n minuteHandB.setAttribute(\"stroke-linecap\", \"round\");\n const minuteHandPin = document.createElementNS(svgNS, \"circle\");\n minuteHandPin.setAttribute(\"r\", \"3\");\n minuteHandPin.setAttribute(\"fill\", colors.handDark);\n // Append the elements to finish the minute hand.\n minuteHand.append(minuteHandA, minuteHandB, minuteHandPin);\n\n // Second hand.\n const secondHand = document.createElementNS(svgNS, \"g\");\n secondHand.setAttribute(\"class\", \"second-hand\");\n secondHand.setAttribute(\"transform\", \"translate(50 50)\");\n const secondHandBar = document.createElementNS(svgNS, \"line\");\n secondHandBar.setAttribute(\"x1\", \"0\");\n secondHandBar.setAttribute(\"y1\", \"0\");\n secondHandBar.setAttribute(\"x2\", \"46\");\n secondHandBar.setAttribute(\"y2\", \"0\");\n secondHandBar.setAttribute(\"stroke\", colors.secondHand);\n secondHandBar.setAttribute(\"stroke-width\", \"1\");\n secondHandBar.setAttribute(\"stroke-linecap\", \"round\");\n const secondHandPin = document.createElementNS(svgNS, \"circle\");\n secondHandPin.setAttribute(\"r\", \"2\");\n secondHandPin.setAttribute(\"fill\", colors.secondHand);\n // Append the elements to finish the second hand.\n secondHand.append(secondHandBar, secondHandPin);\n\n // Pin.\n const pin = document.createElementNS(svgNS, \"circle\");\n pin.setAttribute(\"cx\", \"50\");\n pin.setAttribute(\"cy\", \"50\");\n pin.setAttribute(\"r\", \"0.3\");\n pin.setAttribute(\"fill\", colors.handDark);\n\n // Get the hand angles.\n const date = this.getOriginDate();\n const seconds = date.getSeconds();\n const minutes = date.getMinutes();\n const hours = date.getHours();\n const secAngle = (360 / 60) * seconds;\n const minuteAngle = (360 / 60) * minutes + (360 / 60) * (seconds / 60);\n const hourAngle = (360 / 12) * hours + (360 / 12) * (minutes / 60);\n // Set the clock time by moving the hands.\n hourHand.setAttribute(\"transform\", `translate(50 50) rotate(${hourAngle})`);\n minuteHand.setAttribute(\n \"transform\",\n `translate(50 50) rotate(${minuteAngle})`\n );\n secondHand.setAttribute(\n \"transform\",\n `translate(50 50) rotate(${secAngle})`\n );\n\n // Build the clock\n svg.append(clockFace, marksGroup, hourHand, minuteHand, secondHand, pin);\n // Rotate the clock to its normal position.\n svg.setAttribute(\"transform\", \"rotate(-90)\");\n\n /* Add the animation declaration to the container.\n * Since the animation keyframes need to know the\n * start angle, this angle is dynamic (current time),\n * and we can't edit keyframes through javascript\n * safely and with backwards compatibility, we need\n * to inject it.\n */\n div.innerHTML = `\n \n `;\n // Add the clock to the container\n div.append(svg);\n\n // Date.\n if (this.props.clockFormat === \"datetime\") {\n const dateElem: HTMLSpanElement = document.createElement(\"span\");\n dateElem.className = \"date\";\n dateElem.textContent = humanDate(date, \"default\");\n dateElem.style.fontSize = `${dateFontSize}px`;\n if (this.props.color) dateElem.style.color = this.props.color;\n div.append(dateElem);\n }\n\n return div;\n }\n\n /**\n * Create a element which contains a representation of a digital clock.\n * @return DOM Element.\n */\n private createDigitalClock(): HTMLElement {\n const element: HTMLDivElement = document.createElement(\"div\");\n element.className = \"digital-clock\";\n\n const { width } = this.getElementSize(); // Destructuring assigment: http://es6-features.org/#ObjectMatchingShorthandNotation\n\n // Calculate font size to adapt the font to the item size.\n const baseTimeFontSize = 20; // Per 100px of width.\n const dateFontSizeMultiplier = 0.5;\n const tzFontSizeMultiplier = 6 / this.props.clockTimezone.length;\n const timeFontSize = (baseTimeFontSize * width) / 100;\n const dateFontSize =\n (baseTimeFontSize * dateFontSizeMultiplier * width) / 100;\n const tzFontSize = Math.min(\n (baseTimeFontSize * tzFontSizeMultiplier * width) / 100,\n (width / 100) * 10\n );\n\n // Date calculated using the original timezone.\n const date = this.getOriginDate();\n\n // Date.\n if (this.props.clockFormat === \"datetime\") {\n const dateElem: HTMLSpanElement = document.createElement(\"span\");\n dateElem.className = \"date\";\n dateElem.textContent = humanDate(date, \"default\");\n dateElem.style.fontSize = `${dateFontSize}px`;\n if (this.props.color) dateElem.style.color = this.props.color;\n element.append(dateElem);\n }\n\n // Time.\n const timeElem: HTMLSpanElement = document.createElement(\"span\");\n timeElem.className = \"time\";\n timeElem.textContent = humanTime(date);\n timeElem.style.fontSize = `${timeFontSize}px`;\n if (this.props.color) timeElem.style.color = this.props.color;\n element.append(timeElem);\n\n // City name.\n const city = this.getHumanTimezone();\n if (city.length > 0) {\n const tzElem: HTMLSpanElement = document.createElement(\"span\");\n tzElem.className = \"timezone\";\n tzElem.textContent = city;\n tzElem.style.fontSize = `${tzFontSize}px`;\n if (this.props.color) tzElem.style.color = this.props.color;\n element.append(tzElem);\n }\n\n return element;\n }\n\n /**\n * Generate the current date using the timezone offset stored into the properties.\n * @return The current date.\n */\n private getOriginDate(initialDate: Date | null = null): Date {\n const d = initialDate ? initialDate : new Date();\n const targetTZOffset = this.props.clockTimezoneOffset * 1000; // In ms.\n const localTZOffset = d.getTimezoneOffset() * 60 * 1000; // In ms.\n const utimestamp = d.getTime() + targetTZOffset + localTZOffset;\n\n return new Date(utimestamp);\n }\n\n /**\n * Extract a human readable city name from the timezone text.\n * @param timezone Timezone text.\n */\n public getHumanTimezone(timezone: string = this.props.clockTimezone): string {\n const [, city = \"\"] = timezone.split(\"/\");\n return city.replace(\"_\", \" \");\n }\n\n /**\n * Generate a element size using the current size and the default values.\n * @return The size.\n */\n private getElementSize(\n width: number = this.props.width,\n height: number = this.props.height\n ): Size {\n switch (this.props.clockType) {\n case \"analogic\": {\n let diameter = 100; // Default value.\n\n if (width > 0 && height > 0) {\n diameter = Math.min(width, height);\n } else if (width > 0) {\n diameter = width;\n } else if (height > 0) {\n diameter = height;\n }\n\n return {\n width: diameter,\n height: diameter\n };\n }\n case \"digital\": {\n if (width > 0 && height > 0) {\n // The proportion of the clock should be (width = height / 2) aproximately.\n height = width / 2 < height ? width / 2 : height;\n } else if (width > 0) {\n height = width / 2;\n } else if (height > 0) {\n // The proportion of the clock should be (height * 2 = width) aproximately.\n width = height * 2;\n } else {\n width = 100; // Default value.\n height = 50; // Default value.\n }\n\n return {\n width,\n height\n };\n }\n default:\n throw new Error(\"invalid clock type.\");\n }\n }\n}\n","import { AnyObject } from \"../lib/types\";\nimport { parseIntOr, notEmptyStringOr } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\ninterface BoxProps extends ItemProps {\n // Overrided properties.\n readonly type: ItemType.BOX_ITEM;\n label: null;\n isLinkEnabled: false;\n parentId: null;\n aclGroupId: null;\n // Custom properties.\n borderWidth: number;\n borderColor: string | null;\n fillColor: string | null;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the item props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function boxPropsDecoder(data: AnyObject): BoxProps | never {\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.BOX_ITEM,\n label: null,\n isLinkEnabled: false,\n parentId: null,\n aclGroupId: null,\n // Custom properties.\n borderWidth: parseIntOr(data.borderWidth, 0),\n borderColor: notEmptyStringOr(data.borderColor, null),\n fillColor: notEmptyStringOr(data.fillColor, null)\n };\n}\n\nexport default class Box extends Item {\n protected createDomElement(): HTMLElement {\n const box: HTMLDivElement = document.createElement(\"div\");\n box.className = \"box\";\n // To prevent this item to expand beyond its parent.\n box.style.boxSizing = \"border-box\";\n\n if (this.props.fillColor) {\n box.style.backgroundColor = this.props.fillColor;\n }\n\n // Border.\n if (this.props.borderWidth > 0) {\n box.style.borderStyle = \"solid\";\n // Control the max width to prevent this item to expand beyond its parent.\n const maxBorderWidth = Math.min(this.props.width, this.props.height) / 2;\n const borderWidth = Math.min(this.props.borderWidth, maxBorderWidth);\n box.style.borderWidth = `${borderWidth}px`;\n\n if (this.props.borderColor) {\n box.style.borderColor = this.props.borderColor;\n }\n }\n\n return box;\n }\n}\n","import { AnyObject, Position, Size, ItemMeta } from \"../lib/types\";\nimport { parseIntOr, notEmptyStringOr } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\ninterface LineProps extends ItemProps {\n // Overrided properties.\n readonly type: ItemType.LINE_ITEM;\n label: null;\n isLinkEnabled: false;\n parentId: null;\n aclGroupId: null;\n // Custom properties.\n startPosition: Position;\n endPosition: Position;\n lineWidth: number;\n color: string | null;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the item props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function linePropsDecoder(data: AnyObject): LineProps | never {\n const props: LineProps = {\n ...itemBasePropsDecoder({ ...data, width: 1, height: 1 }), // Object spread. It will merge the properties of the two objects.\n type: ItemType.LINE_ITEM,\n label: null,\n isLinkEnabled: false,\n parentId: null,\n aclGroupId: null,\n // Initialize Position & Size.\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n // Custom properties.\n startPosition: {\n x: parseIntOr(data.startX, 0),\n y: parseIntOr(data.startY, 0)\n },\n endPosition: {\n x: parseIntOr(data.endX, 0),\n y: parseIntOr(data.endY, 0)\n },\n lineWidth: parseIntOr(data.lineWidth || data.borderWidth, 1),\n color: notEmptyStringOr(data.borderColor || data.color, null)\n };\n\n /*\n * We need to enhance the props with the extracted size and position\n * of the box cause there are missing at the props update. A better\n * solution would be overriding the props setter to do it there, but\n * the language doesn't allow it while targetting ES5.\n * TODO: We need to figure out a more consistent solution.\n */\n\n return {\n ...props,\n // Enhance the props extracting the box size and position.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n ...Line.extractBoxSizeAndPosition(props)\n };\n}\n\nexport default class Line extends Item {\n /**\n * @override\n */\n public constructor(props: LineProps, meta: ItemMeta) {\n /*\n * We need to override the constructor cause we need to obtain\n * the\n * box size and position from the start and finish points\n * of the line.\n */\n super(\n {\n ...props,\n ...Line.extractBoxSizeAndPosition(props)\n },\n {\n ...meta,\n editMode: false\n }\n );\n }\n\n /**\n * Clasic and protected version of the setter of the `meta` property.\n * Useful to override it from children classes.\n * @param newProps\n * @override Item.setMeta\n */\n public setMeta(newMetadata: ItemMeta) {\n super.setMeta({\n ...newMetadata,\n editMode: false\n });\n }\n\n /**\n * @override\n * To create the item's DOM representation.\n * @return Item.\n */\n protected createDomElement(): HTMLElement {\n const element: HTMLDivElement = document.createElement(\"div\");\n element.className = \"line\";\n\n const svgNS = \"http://www.w3.org/2000/svg\";\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n // Set SVG size.\n svg.setAttribute(\n \"width\",\n (this.props.width + this.props.lineWidth).toString()\n );\n svg.setAttribute(\n \"height\",\n (this.props.height + this.props.lineWidth).toString()\n );\n const line = document.createElementNS(svgNS, \"line\");\n line.setAttribute(\n \"x1\",\n `${this.props.startPosition.x - this.props.x + this.props.lineWidth / 2}`\n );\n line.setAttribute(\n \"y1\",\n `${this.props.startPosition.y - this.props.y + this.props.lineWidth / 2}`\n );\n line.setAttribute(\n \"x2\",\n `${this.props.endPosition.x - this.props.x + this.props.lineWidth / 2}`\n );\n line.setAttribute(\n \"y2\",\n `${this.props.endPosition.y - this.props.y + this.props.lineWidth / 2}`\n );\n line.setAttribute(\"stroke\", this.props.color || \"black\");\n line.setAttribute(\"stroke-width\", this.props.lineWidth.toString());\n\n svg.append(line);\n element.append(svg);\n\n return element;\n }\n\n /**\n * Extract the size and position of the box from\n * the start and the finish of the line.\n * @param props Item properties.\n */\n public static extractBoxSizeAndPosition(props: LineProps): Size & Position {\n return {\n width: Math.abs(props.startPosition.x - props.endPosition.x),\n height: Math.abs(props.startPosition.y - props.endPosition.y),\n x: Math.min(props.startPosition.x, props.endPosition.x),\n y: Math.min(props.startPosition.y, props.endPosition.y)\n };\n }\n}\n","import { LinkedVisualConsoleProps, AnyObject } from \"../lib/types\";\nimport { linkedVCPropsDecoder } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type LabelProps = {\n type: ItemType.LABEL;\n} & ItemProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the label props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function labelPropsDecoder(data: AnyObject): LabelProps | never {\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.LABEL,\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Label extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"label\";\n element.innerHTML = this.getLabelWithMacrosReplaced();\n\n return element;\n }\n\n /**\n * @override Item.createLabelDomElement\n * Create a new label for the visual console item.\n * @return Item label.\n */\n public createLabelDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"visual-console-item-label\";\n // Always return an empty label.\n return element;\n }\n}\n","import {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n parseIntOr,\n modulePropsDecoder,\n replaceMacros\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type SimpleValueProps = {\n type: ItemType.SIMPLE_VALUE;\n valueType: \"string\" | \"image\";\n value: string;\n} & (\n | {\n processValue: \"none\";\n }\n | {\n processValue: \"avg\" | \"max\" | \"min\";\n period: number;\n }) &\n ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Extract a valid enum value from a raw value type.\n * @param valueType Raw value.\n */\nconst parseValueType = (valueType: unknown): SimpleValueProps[\"valueType\"] => {\n switch (valueType) {\n case \"string\":\n case \"image\":\n return valueType;\n default:\n return \"string\";\n }\n};\n\n/**\n * Extract a valid enum value from a raw process value.\n * @param processValue Raw value.\n */\nconst parseProcessValue = (\n processValue: unknown\n): SimpleValueProps[\"processValue\"] => {\n switch (processValue) {\n case \"none\":\n case \"avg\":\n case \"max\":\n case \"min\":\n return processValue;\n default:\n return \"none\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the simple value props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function simpleValuePropsDecoder(\n data: AnyObject\n): SimpleValueProps | never {\n if (typeof data.value !== \"string\" || data.value.length === 0) {\n throw new TypeError(\"invalid value\");\n }\n\n const processValue = parseProcessValue(data.processValue);\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.SIMPLE_VALUE,\n valueType: parseValueType(data.valueType),\n value: data.value,\n ...(processValue === \"none\"\n ? { processValue }\n : { processValue, period: parseIntOr(data.period, 0) }), // Object spread. It will merge the properties of the two objects.\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class SimpleValue extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"simple-value\";\n\n if (this.props.valueType === \"image\") {\n const img = document.createElement(\"img\");\n img.src = this.props.value;\n element.append(img);\n } else {\n // Add the value to the label and show it.\n let text = this.props.value;\n let label = this.getLabelWithMacrosReplaced();\n if (label.length > 0) {\n text = replaceMacros([{ macro: /\\(?_VALUE_\\)?/i, value: text }], label);\n }\n\n element.innerHTML = text;\n }\n\n return element;\n }\n\n /**\n * @override Item.createLabelDomElement\n * Create a new label for the visual console item.\n * @return Item label.\n */\n protected createLabelDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"visual-console-item-label\";\n // Always return an empty label.\n return element;\n }\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import curveLinear from \"./linear\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","export var slice = Array.prototype.slice;\n","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\n\nexport default {\n draw: function(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","import {pi, tau} from \"../math\";\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","import {pi, tau} from \"../math\";\n\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","export default function() {}\n","var sqrt3 = Math.sqrt(3);\n\nexport default {\n draw: function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // proceed\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop\";\nimport {point} from \"./basis\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import {Basis} from \"./basis\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop\";\nimport {point} from \"./cardinal\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math\";\nimport {Cardinal} from \"./cardinal\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed\";\nimport noop from \"../noop\";\nimport {point} from \"./catmullRom\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen\";\nimport {point} from \"./catmullRom\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import noop from \"../noop\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","import ascending from \"./ascending\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import { arc as arcFactory } from \"d3-shape\";\n\nimport {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n modulePropsDecoder,\n notEmptyStringOr,\n parseIntOr,\n parseFloatOr\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type PercentileProps = {\n type: ItemType.PERCENTILE_BAR;\n percentileType:\n | \"progress-bar\"\n | \"bubble\"\n | \"circular-progress-bar\"\n | \"circular-progress-bar-alt\";\n valueType: \"percent\" | \"value\";\n minValue: number | null;\n maxValue: number | null;\n color: string | null;\n labelColor: string | null;\n value: number | null;\n unit: string | null;\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Extract a valid enum value from a raw type value.\n * @param type Raw value.\n */\nfunction extractPercentileType(\n type: unknown\n): PercentileProps[\"percentileType\"] {\n switch (type) {\n case \"progress-bar\":\n case \"bubble\":\n case \"circular-progress-bar\":\n case \"circular-progress-bar-alt\":\n return type;\n default:\n case ItemType.PERCENTILE_BAR:\n return \"progress-bar\";\n case ItemType.PERCENTILE_BUBBLE:\n return \"bubble\";\n case ItemType.CIRCULAR_PROGRESS_BAR:\n return \"circular-progress-bar\";\n case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:\n return \"circular-progress-bar-alt\";\n }\n}\n\n/**\n * Extract a valid enum value from a raw value type value.\n * @param type Raw value.\n */\nfunction extractValueType(valueType: unknown): PercentileProps[\"valueType\"] {\n switch (valueType) {\n case \"percent\":\n case \"value\":\n return valueType;\n default:\n return \"percent\";\n }\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the percentile props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function percentilePropsDecoder(\n data: AnyObject\n): PercentileProps | never {\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.PERCENTILE_BAR,\n percentileType: extractPercentileType(data.percentileType || data.type),\n valueType: extractValueType(data.valueType),\n minValue: parseIntOr(data.minValue, null),\n maxValue: parseIntOr(data.maxValue, null),\n color: notEmptyStringOr(data.color, null),\n labelColor: notEmptyStringOr(data.labelColor, null),\n value: parseFloatOr(data.value, null),\n unit: notEmptyStringOr(data.unit, null),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nconst svgNS = \"http://www.w3.org/2000/svg\";\n\nexport default class Percentile extends Item {\n protected createDomElement(): HTMLElement {\n const colors = {\n background: \"#000000\",\n progress: this.props.color || \"#F0F0F0\",\n text: this.props.labelColor || \"#444444\"\n };\n // Progress.\n const progress = this.getProgress();\n // Main element.\n const element = document.createElement(\"div\");\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n\n var formatValue;\n if (this.props.value != null) {\n if (Intl) {\n formatValue = Intl.NumberFormat(\"en-EN\").format(this.props.value);\n } else {\n formatValue = this.props.value;\n }\n }\n\n switch (this.props.percentileType) {\n case \"progress-bar\":\n {\n const backgroundRect = document.createElementNS(svgNS, \"rect\");\n backgroundRect.setAttribute(\"fill\", colors.background);\n backgroundRect.setAttribute(\"fill-opacity\", \"0.5\");\n backgroundRect.setAttribute(\"width\", \"100\");\n backgroundRect.setAttribute(\"height\", \"20\");\n backgroundRect.setAttribute(\"rx\", \"5\");\n backgroundRect.setAttribute(\"ry\", \"5\");\n const progressRect = document.createElementNS(svgNS, \"rect\");\n progressRect.setAttribute(\"fill\", colors.progress);\n progressRect.setAttribute(\"fill-opacity\", \"1\");\n progressRect.setAttribute(\"width\", `${progress}`);\n progressRect.setAttribute(\"height\", \"20\");\n progressRect.setAttribute(\"rx\", \"5\");\n progressRect.setAttribute(\"ry\", \"5\");\n const text = document.createElementNS(svgNS, \"text\");\n text.setAttribute(\"text-anchor\", \"middle\");\n text.setAttribute(\"alignment-baseline\", \"middle\");\n text.setAttribute(\"font-size\", \"12\");\n text.setAttribute(\"font-family\", \"arial\");\n text.setAttribute(\"font-weight\", \"bold\");\n text.setAttribute(\"transform\", \"translate(50 11)\");\n text.setAttribute(\"fill\", colors.text);\n\n if (this.props.valueType === \"value\") {\n text.style.fontSize = \"6pt\";\n\n text.textContent = this.props.unit\n ? `${formatValue} ${this.props.unit}`\n : `${formatValue}`;\n } else {\n text.textContent = `${progress}%`;\n }\n\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 20\");\n svg.append(backgroundRect, progressRect, text);\n }\n break;\n case \"bubble\":\n case \"circular-progress-bar\":\n case \"circular-progress-bar-alt\":\n {\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 100\");\n\n if (this.props.percentileType === \"bubble\") {\n // Create and append the circles.\n const backgroundCircle = document.createElementNS(svgNS, \"circle\");\n backgroundCircle.setAttribute(\"transform\", \"translate(50 50)\");\n backgroundCircle.setAttribute(\"fill\", colors.background);\n backgroundCircle.setAttribute(\"fill-opacity\", \"0.5\");\n backgroundCircle.setAttribute(\"r\", \"50\");\n const progressCircle = document.createElementNS(svgNS, \"circle\");\n progressCircle.setAttribute(\"transform\", \"translate(50 50)\");\n progressCircle.setAttribute(\"fill\", colors.progress);\n progressCircle.setAttribute(\"fill-opacity\", \"1\");\n progressCircle.setAttribute(\"r\", `${progress / 2}`);\n\n svg.append(backgroundCircle, progressCircle);\n } else {\n // Create and append the circles.\n const arcProps = {\n innerRadius:\n this.props.percentileType === \"circular-progress-bar\" ? 30 : 0,\n outerRadius: 50,\n startAngle: 0,\n endAngle: Math.PI * 2\n };\n const arc = arcFactory();\n\n const backgroundCircle = document.createElementNS(svgNS, \"path\");\n backgroundCircle.setAttribute(\"transform\", \"translate(50 50)\");\n backgroundCircle.setAttribute(\"fill\", colors.background);\n backgroundCircle.setAttribute(\"fill-opacity\", \"0.5\");\n backgroundCircle.setAttribute(\"d\", `${arc(arcProps)}`);\n const progressCircle = document.createElementNS(svgNS, \"path\");\n progressCircle.setAttribute(\"transform\", \"translate(50 50)\");\n progressCircle.setAttribute(\"fill\", colors.progress);\n progressCircle.setAttribute(\"fill-opacity\", \"1\");\n progressCircle.setAttribute(\n \"d\",\n `${arc({\n ...arcProps,\n endAngle: arcProps.endAngle * (progress / 100)\n })}`\n );\n\n svg.append(backgroundCircle, progressCircle);\n }\n\n // Create and append the text.\n const text = document.createElementNS(svgNS, \"text\");\n text.setAttribute(\"text-anchor\", \"middle\");\n text.setAttribute(\"alignment-baseline\", \"middle\");\n text.setAttribute(\"font-size\", \"16\");\n text.setAttribute(\"font-family\", \"arial\");\n text.setAttribute(\"font-weight\", \"bold\");\n text.setAttribute(\"fill\", colors.text);\n\n if (this.props.valueType === \"value\" && this.props.value != null) {\n // Show value and unit in 1 (no unit) or 2 lines.\n if (this.props.unit && this.props.unit.length > 0) {\n const value = document.createElementNS(svgNS, \"tspan\");\n value.setAttribute(\"x\", \"0\");\n value.setAttribute(\"dy\", \"1em\");\n value.textContent = `${formatValue}`;\n value.style.fontSize = \"8pt\";\n const unit = document.createElementNS(svgNS, \"tspan\");\n unit.setAttribute(\"x\", \"0\");\n unit.setAttribute(\"dy\", \"1em\");\n unit.textContent = `${this.props.unit}`;\n unit.style.fontSize = \"8pt\";\n text.append(value, unit);\n text.setAttribute(\"transform\", \"translate(50 33)\");\n } else {\n text.textContent = `${formatValue}`;\n text.style.fontSize = \"8pt\";\n text.setAttribute(\"transform\", \"translate(50 50)\");\n }\n } else {\n // Percentage.\n text.textContent = `${progress}%`;\n text.setAttribute(\"transform\", \"translate(50 50)\");\n }\n\n svg.append(text);\n }\n break;\n }\n\n element.append(svg);\n\n return element;\n }\n\n private getProgress(): number {\n const minValue = this.props.minValue || 0;\n const maxValue = this.props.maxValue || 100;\n const value = this.props.value == null ? 0 : this.props.value;\n\n if (value <= minValue) return 0;\n else if (value >= maxValue) return 100;\n else return Math.trunc(((value - minValue) / (maxValue - minValue)) * 100);\n }\n}\n","import { AnyObject } from \"../lib/types\";\nimport {\n stringIsEmpty,\n notEmptyStringOr,\n decodeBase64,\n parseIntOr\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type ServiceProps = {\n type: ItemType.SERVICE;\n serviceId: number;\n imageSrc: string | null;\n statusImageSrc: string | null;\n encodedTitle: string | null;\n} & ItemProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the service props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function servicePropsDecoder(data: AnyObject): ServiceProps | never {\n if (data.imageSrc !== null) {\n if (\n typeof data.statusImageSrc !== \"string\" ||\n data.imageSrc.statusImageSrc === 0\n ) {\n throw new TypeError(\"invalid status image src.\");\n }\n } else {\n if (stringIsEmpty(data.encodedTitle)) {\n throw new TypeError(\"missing encode tittle content.\");\n }\n }\n\n if (parseIntOr(data.serviceId, null) === null) {\n throw new TypeError(\"invalid service id.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.SERVICE,\n serviceId: data.serviceId,\n imageSrc: notEmptyStringOr(data.imageSrc, null),\n statusImageSrc: notEmptyStringOr(data.statusImageSrc, null),\n encodedTitle: notEmptyStringOr(data.encodedTitle, null)\n };\n}\n\nexport default class Service extends Item {\n public createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"service\";\n\n if (this.props.statusImageSrc !== null) {\n element.style.background = `url(${this.props.statusImageSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n } else if (this.props.encodedTitle !== null) {\n element.innerHTML = decodeBase64(this.props.encodedTitle);\n }\n\n return element;\n }\n}\n","import { AnyObject, Size } from \"./lib/types\";\nimport {\n parseBoolean,\n sizePropsDecoder,\n parseIntOr,\n notEmptyStringOr,\n itemMetaDecoder\n} from \"./lib\";\nimport Item, {\n ItemType,\n ItemProps,\n ItemClickEvent,\n ItemRemoveEvent,\n ItemMovedEvent,\n ItemResizedEvent\n} from \"./Item\";\nimport StaticGraph, { staticGraphPropsDecoder } from \"./items/StaticGraph\";\nimport Icon, { iconPropsDecoder } from \"./items/Icon\";\nimport ColorCloud, { colorCloudPropsDecoder } from \"./items/ColorCloud\";\nimport Group, { groupPropsDecoder } from \"./items/Group\";\nimport Clock, { clockPropsDecoder } from \"./items/Clock\";\nimport Box, { boxPropsDecoder } from \"./items/Box\";\nimport Line, { linePropsDecoder } from \"./items/Line\";\nimport Label, { labelPropsDecoder } from \"./items/Label\";\nimport SimpleValue, { simpleValuePropsDecoder } from \"./items/SimpleValue\";\nimport EventsHistory, {\n eventsHistoryPropsDecoder\n} from \"./items/EventsHistory\";\nimport Percentile, { percentilePropsDecoder } from \"./items/Percentile\";\nimport TypedEvent, { Disposable, Listener } from \"./lib/TypedEvent\";\nimport DonutGraph, { donutGraphPropsDecoder } from \"./items/DonutGraph\";\nimport BarsGraph, { barsGraphPropsDecoder } from \"./items/BarsGraph\";\nimport ModuleGraph, { moduleGraphPropsDecoder } from \"./items/ModuleGraph\";\nimport Service, { servicePropsDecoder } from \"./items/Service\";\n\n// TODO: Document.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction itemInstanceFrom(data: AnyObject) {\n const type = parseIntOr(data.type, null);\n if (type == null) throw new TypeError(\"missing item type.\");\n\n const meta = itemMetaDecoder(data);\n\n switch (type as ItemType) {\n case ItemType.STATIC_GRAPH:\n return new StaticGraph(staticGraphPropsDecoder(data), meta);\n case ItemType.MODULE_GRAPH:\n return new ModuleGraph(moduleGraphPropsDecoder(data), meta);\n case ItemType.SIMPLE_VALUE:\n case ItemType.SIMPLE_VALUE_MAX:\n case ItemType.SIMPLE_VALUE_MIN:\n case ItemType.SIMPLE_VALUE_AVG:\n return new SimpleValue(simpleValuePropsDecoder(data), meta);\n case ItemType.PERCENTILE_BAR:\n case ItemType.PERCENTILE_BUBBLE:\n case ItemType.CIRCULAR_PROGRESS_BAR:\n case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:\n return new Percentile(percentilePropsDecoder(data), meta);\n case ItemType.LABEL:\n return new Label(labelPropsDecoder(data), meta);\n case ItemType.ICON:\n return new Icon(iconPropsDecoder(data), meta);\n case ItemType.SERVICE:\n return new Service(servicePropsDecoder(data), meta);\n case ItemType.GROUP_ITEM:\n return new Group(groupPropsDecoder(data), meta);\n case ItemType.BOX_ITEM:\n return new Box(boxPropsDecoder(data), meta);\n case ItemType.LINE_ITEM:\n return new Line(linePropsDecoder(data), meta);\n case ItemType.AUTO_SLA_GRAPH:\n return new EventsHistory(eventsHistoryPropsDecoder(data), meta);\n case ItemType.DONUT_GRAPH:\n return new DonutGraph(donutGraphPropsDecoder(data), meta);\n case ItemType.BARS_GRAPH:\n return new BarsGraph(barsGraphPropsDecoder(data), meta);\n case ItemType.CLOCK:\n return new Clock(clockPropsDecoder(data), meta);\n case ItemType.COLOR_CLOUD:\n return new ColorCloud(colorCloudPropsDecoder(data), meta);\n default:\n throw new TypeError(\"item not found\");\n }\n}\n\n// TODO: Document.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction decodeProps(data: AnyObject) {\n const type = parseIntOr(data.type, null);\n if (type == null) throw new TypeError(\"missing item type.\");\n\n switch (type as ItemType) {\n case ItemType.STATIC_GRAPH:\n return staticGraphPropsDecoder(data);\n case ItemType.MODULE_GRAPH:\n return moduleGraphPropsDecoder(data);\n case ItemType.SIMPLE_VALUE:\n case ItemType.SIMPLE_VALUE_MAX:\n case ItemType.SIMPLE_VALUE_MIN:\n case ItemType.SIMPLE_VALUE_AVG:\n return simpleValuePropsDecoder(data);\n case ItemType.PERCENTILE_BAR:\n case ItemType.PERCENTILE_BUBBLE:\n case ItemType.CIRCULAR_PROGRESS_BAR:\n case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:\n return percentilePropsDecoder(data);\n case ItemType.LABEL:\n return labelPropsDecoder(data);\n case ItemType.ICON:\n return iconPropsDecoder(data);\n case ItemType.SERVICE:\n return servicePropsDecoder(data);\n case ItemType.GROUP_ITEM:\n return groupPropsDecoder(data);\n case ItemType.BOX_ITEM:\n return boxPropsDecoder(data);\n case ItemType.LINE_ITEM:\n return linePropsDecoder(data);\n case ItemType.AUTO_SLA_GRAPH:\n return eventsHistoryPropsDecoder(data);\n case ItemType.DONUT_GRAPH:\n return donutGraphPropsDecoder(data);\n case ItemType.BARS_GRAPH:\n return barsGraphPropsDecoder(data);\n case ItemType.CLOCK:\n return clockPropsDecoder(data);\n case ItemType.COLOR_CLOUD:\n return colorCloudPropsDecoder(data);\n default:\n throw new TypeError(\"decoder not found\");\n }\n}\n\n// Base properties.\nexport interface VisualConsoleProps extends Size {\n readonly id: number;\n name: string;\n groupId: number;\n backgroundURL: string | null; // URL?\n backgroundColor: string | null;\n isFavorite: boolean;\n relationLineWidth: number;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the Visual Console props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function visualConsolePropsDecoder(\n data: AnyObject\n): VisualConsoleProps | never {\n // Object destructuring: http://es6-features.org/#ObjectMatchingShorthandNotation\n const {\n id,\n name,\n groupId,\n backgroundURL,\n backgroundColor,\n isFavorite,\n relationLineWidth\n } = data;\n\n if (id == null || isNaN(parseInt(id))) {\n throw new TypeError(\"invalid Id.\");\n }\n if (typeof name !== \"string\" || name.length === 0) {\n throw new TypeError(\"invalid name.\");\n }\n if (groupId == null || isNaN(parseInt(groupId))) {\n throw new TypeError(\"invalid group Id.\");\n }\n\n return {\n id: parseInt(id),\n name,\n groupId: parseInt(groupId),\n backgroundURL: notEmptyStringOr(backgroundURL, null),\n backgroundColor: notEmptyStringOr(backgroundColor, null),\n isFavorite: parseBoolean(isFavorite),\n relationLineWidth: parseIntOr(relationLineWidth, 0),\n ...sizePropsDecoder(data)\n };\n}\n\nexport default class VisualConsole {\n // Reference to the DOM element which will contain the items.\n private readonly containerRef: HTMLElement;\n // Properties.\n private _props: VisualConsoleProps;\n // Visual Console Item instances by their Id.\n private elementsById: {\n [key: number]: Item;\n } = {};\n // Visual Console Item Ids.\n private elementIds: ItemProps[\"id\"][] = [];\n // Dictionary which store the created lines.\n private relations: {\n [key: string]: Line;\n } = {};\n // Event manager for click events.\n private readonly clickEventManager = new TypedEvent<\n ItemClickEvent\n >();\n // Event manager for move events.\n private readonly movedEventManager = new TypedEvent();\n // Event manager for resize events.\n private readonly resizedEventManager = new TypedEvent();\n // List of references to clean the event listeners.\n private readonly disposables: Disposable[] = [];\n\n /**\n * React to a click on an element.\n * @param e Event object.\n */\n private handleElementClick: (e: ItemClickEvent) => void = e => {\n this.clickEventManager.emit(e);\n // console.log(`Clicked element #${e.data.id}`, e);\n };\n\n /**\n * React to a movement on an element.\n * @param e Event object.\n */\n private handleElementMovement: (e: ItemMovedEvent) => void = e => {\n this.movedEventManager.emit(e);\n // console.log(`Moved element #${e.item.props.id}`, e);\n };\n\n /**\n * React to a resizement on an element.\n * @param e Event object.\n */\n private handleElementResizement: (e: ItemResizedEvent) => void = e => {\n this.resizedEventManager.emit(e);\n // console.log(`Resized element #${e.item.props.id}`, e);\n };\n\n /**\n * Clear some element references.\n * @param e Event object.\n */\n private handleElementRemove: (e: ItemRemoveEvent) => void = e => {\n // Remove the element from the list and its relations.\n this.elementIds = this.elementIds.filter(id => id !== e.data.id);\n delete this.elementsById[e.data.id];\n this.clearRelations(e.data.id);\n };\n\n public constructor(\n container: HTMLElement,\n props: AnyObject,\n items: AnyObject[]\n ) {\n this.containerRef = container;\n this._props = visualConsolePropsDecoder(props);\n\n // Force the first render.\n this.render();\n\n // Sort by isOnTop, id ASC\n items = items.sort(function(a, b) {\n if (\n a.isOnTop == null ||\n b.isOnTop == null ||\n a.id == null ||\n b.id == null\n ) {\n return 0;\n }\n\n if (a.isOnTop && !b.isOnTop) return 1;\n else if (!a.isOnTop && b.isOnTop) return -1;\n else if (a.id > b.id) return 1;\n else return -1;\n });\n\n // Initialize the items.\n items.forEach(item => {\n try {\n const itemInstance = itemInstanceFrom(item);\n // Add the item to the list.\n this.elementsById[itemInstance.props.id] = itemInstance;\n this.elementIds.push(itemInstance.props.id);\n // Item event handlers.\n itemInstance.onClick(this.handleElementClick);\n itemInstance.onMoved(this.handleElementMovement);\n itemInstance.onResized(this.handleElementResizement);\n itemInstance.onRemove(this.handleElementRemove);\n // Add the item to the DOM.\n this.containerRef.append(itemInstance.elementRef);\n } catch (error) {\n console.log(\"Error creating a new element:\", error.message);\n }\n });\n\n // Create lines.\n this.buildRelations();\n }\n\n /**\n * Public accessor of the `elements` property.\n * @return Properties.\n */\n public get elements(): Item[] {\n // Ensure the type cause Typescript doesn't know the filter removes null items.\n return this.elementIds\n .map(id => this.elementsById[id])\n .filter(_ => _ != null) as Item[];\n }\n\n /**\n * Public setter of the `elements` property.\n * @param items.\n */\n public updateElements(items: AnyObject[]): void {\n // Ensure the type cause Typescript doesn't know the filter removes null items.\n const itemIds = items\n .map(item => item.id || null)\n .filter(id => id != null) as number[];\n // Get the elements we should delete.\n const deletedIds = this.elementIds.filter(id => itemIds.indexOf(id) < 0);\n // Delete the elements.\n deletedIds.forEach(id => {\n if (this.elementsById[id] != null) {\n this.elementsById[id].remove();\n delete this.elementsById[id];\n }\n });\n // Replace the element ids.\n this.elementIds = itemIds;\n\n // Initialize the items.\n items.forEach(item => {\n if (item.id) {\n if (this.elementsById[item.id] == null) {\n // New item.\n try {\n const itemInstance = itemInstanceFrom(item);\n // Add the item to the list.\n this.elementsById[itemInstance.props.id] = itemInstance;\n // Item event handlers.\n itemInstance.onClick(this.handleElementClick);\n itemInstance.onRemove(this.handleElementRemove);\n // Add the item to the DOM.\n this.containerRef.append(itemInstance.elementRef);\n } catch (error) {\n console.log(\"Error creating a new element:\", error.message);\n }\n } else {\n // Update item.\n try {\n this.elementsById[item.id].props = decodeProps(item);\n } catch (error) {\n console.log(\"Error updating an element:\", error.message);\n }\n }\n }\n });\n\n // Re-build relations.\n this.buildRelations();\n }\n\n /**\n * Public accessor of the `props` property.\n * @return Properties.\n */\n public get props(): VisualConsoleProps {\n return { ...this._props }; // Return a copy.\n }\n\n /**\n * Public setter of the `props` property.\n * If the new props are different enough than the\n * stored props, a render would be fired.\n * @param newProps\n */\n public set props(newProps: VisualConsoleProps) {\n const prevProps = this.props;\n // Update the internal props.\n this._props = newProps;\n\n // From this point, things which rely on this.props can access to the changes.\n\n // Re-render.\n this.render(prevProps);\n }\n\n /**\n * Recreate or update the HTMLElement which represents the Visual Console into the DOM.\n * @param prevProps If exists it will be used to only DOM updates instead of a full replace.\n */\n public render(prevProps: VisualConsoleProps | null = null): void {\n if (prevProps) {\n if (prevProps.backgroundURL !== this.props.backgroundURL) {\n this.containerRef.style.backgroundImage =\n this.props.backgroundURL !== null\n ? `url(${this.props.backgroundURL})`\n : null;\n }\n if (prevProps.backgroundColor !== this.props.backgroundColor) {\n this.containerRef.style.backgroundColor = this.props.backgroundColor;\n }\n if (this.sizeChanged(prevProps, this.props)) {\n this.resizeElement(this.props.width, this.props.height);\n }\n } else {\n this.containerRef.style.backgroundImage =\n this.props.backgroundURL !== null\n ? `url(${this.props.backgroundURL})`\n : null;\n\n this.containerRef.style.backgroundColor = this.props.backgroundColor;\n this.resizeElement(this.props.width, this.props.height);\n }\n }\n\n /**\n * Compare the previous and the new size and return\n * a boolean value in case the size changed.\n * @param prevSize\n * @param newSize\n * @return Whether the size changed or not.\n */\n public sizeChanged(prevSize: Size, newSize: Size): boolean {\n return (\n prevSize.width !== newSize.width || prevSize.height !== newSize.height\n );\n }\n\n /**\n * Resize the DOM container.\n * @param width\n * @param height\n */\n public resizeElement(width: number, height: number): void {\n this.containerRef.style.width = `${width}px`;\n this.containerRef.style.height = `${height}px`;\n }\n\n /**\n * Update the size into the properties and resize the DOM container.\n * @param width\n * @param height\n */\n public resize(width: number, height: number): void {\n this.props = {\n ...this.props, // Object spread: http://es6-features.org/#SpreadOperator\n width,\n height\n };\n }\n\n /**\n * To remove the event listeners and the elements from the DOM.\n */\n public remove(): void {\n this.disposables.forEach(d => d.dispose()); // Arrow function.\n this.elements.forEach(e => e.remove()); // Arrow function.\n this.elementsById = {};\n this.elementIds = [];\n // Clear relations.\n this.clearRelations();\n // Clean container.\n this.containerRef.innerHTML = \"\";\n }\n\n /**\n * Create line elements which connect the elements with their parents.\n */\n private buildRelations(): void {\n // Clear relations.\n this.clearRelations();\n // Add relations.\n this.elements.forEach(item => {\n if (item.props.parentId !== null) {\n const parent = this.elementsById[item.props.parentId];\n const child = this.elementsById[item.props.id];\n if (parent && child) this.addRelationLine(parent, child);\n }\n });\n }\n\n /**\n * @param itemId Optional identifier of a parent or child item.\n * Remove the line elements which connect the elements with their parents.\n */\n private clearRelations(itemId?: number): void {\n if (itemId != null) {\n for (let key in this.relations) {\n const ids = key.split(\"|\");\n const parentId = Number.parseInt(ids[0]);\n const childId = Number.parseInt(ids[1]);\n\n if (itemId === parentId || itemId === childId) {\n this.relations[key].remove();\n delete this.relations[key];\n }\n }\n } else {\n for (let key in this.relations) {\n this.relations[key].remove();\n delete this.relations[key];\n }\n }\n }\n\n /**\n * Retrieve the line element which represent the relation between items.\n * @param parentId Identifier of the parent item.\n * @param childId Itentifier of the child item.\n * @return The line element or nothing.\n */\n private getRelationLine(parentId: number, childId: number): Line | null {\n const identifier = `${parentId}|${childId}`;\n return this.relations[identifier] || null;\n }\n\n /**\n * Add a new line item to represent a relation between the items.\n * @param parent Parent item.\n * @param child Child item.\n * @return Whether the line was added or not.\n */\n private addRelationLine(\n parent: Item,\n child: Item\n ): Line {\n const identifier = `${parent.props.id}|${child.props.id}`;\n if (this.relations[identifier] != null) {\n this.relations[identifier].remove();\n }\n\n // Get the items center.\n const startX = parent.props.x + parent.elementRef.clientWidth / 2;\n const startY =\n parent.props.y +\n (parent.elementRef.clientHeight - parent.labelElementRef.clientHeight) /\n 2;\n const endX = child.props.x + child.elementRef.clientWidth / 2;\n const endY =\n child.props.y +\n (child.elementRef.clientHeight - child.labelElementRef.clientHeight) / 2;\n\n const line = new Line(\n linePropsDecoder({\n id: 0,\n type: ItemType.LINE_ITEM,\n startX,\n startY,\n endX,\n endY,\n width: 0,\n height: 0,\n lineWidth: this.props.relationLineWidth,\n color: \"#CCCCCC\"\n }),\n itemMetaDecoder({\n receivedAt: new Date()\n })\n );\n // Save a reference to the line item.\n this.relations[identifier] = line;\n\n // Add the line to the DOM.\n line.elementRef.style.zIndex = \"0\";\n this.containerRef.append(line.elementRef);\n\n return line;\n }\n\n /**\n * Add an event handler to the click of the linked visual console elements.\n * @param listener Function which is going to be executed when a linked console is clicked.\n */\n public onItemClick(\n listener: Listener>\n ): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.clickEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * Add an event handler to the movement of the visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onItemMoved(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.movedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * Add an event handler to the resizement of the visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onItemResized(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.resizedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * Enable the edition mode.\n */\n public enableEditMode(): void {\n this.elements.forEach(item => {\n item.meta = { ...item.meta, editMode: true };\n });\n this.containerRef.classList.add(\"is-editing\");\n }\n\n /**\n * Disable the edition mode.\n */\n public disableEditMode(): void {\n this.elements.forEach(item => {\n item.meta = { ...item.meta, editMode: false };\n });\n this.containerRef.classList.remove(\"is-editing\");\n }\n}\n","import TypedEvent, { Disposable, Listener } from \"./TypedEvent\";\n\ninterface Cancellable {\n cancel(): void;\n}\n\ntype AsyncTaskStatus = \"waiting\" | \"started\" | \"cancelled\" | \"finished\";\ntype AsyncTaskInitiator = (done: () => void) => Cancellable;\n\n/**\n * Defines an async task which can be started and cancelled.\n * It's possible to observe the status changes of the task.\n */\nclass AsyncTask {\n private readonly taskInitiator: AsyncTaskInitiator;\n private cancellable: Cancellable = { cancel: () => {} };\n private _status: AsyncTaskStatus = \"waiting\";\n\n // Event manager for status change events.\n private readonly statusChangeEventManager = new TypedEvent();\n // List of references to clean the event listeners.\n private readonly disposables: Disposable[] = [];\n\n public constructor(taskInitiator: AsyncTaskInitiator) {\n this.taskInitiator = taskInitiator;\n }\n\n /**\n * Public setter of the `status` property.\n * @param status.\n */\n public set status(status: AsyncTaskStatus) {\n this._status = status;\n this.statusChangeEventManager.emit(status);\n }\n\n /**\n * Public accessor of the `status` property.\n * @return status.\n */\n public get status() {\n return this._status;\n }\n\n /**\n * Start the async task.\n */\n public init(): void {\n this.cancellable = this.taskInitiator(() => {\n this.status = \"finished\";\n });\n this.status = \"started\";\n }\n\n /**\n * Cancel the async task.\n */\n public cancel(): void {\n this.cancellable.cancel();\n this.status = \"cancelled\";\n }\n\n /**\n * Add an event handler to the status change.\n * @param listener Function which is going to be executed when the status changes.\n */\n public onStatusChange(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.statusChangeEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n}\n\n/**\n * Wrap an async task into another which will execute that task indefinitely\n * every time the tash finnish and the chosen period ends.\n * Will last until cancellation.\n *\n * @param task Async task to execute.\n * @param period Time in milliseconds to wait until the next async esecution.\n *\n * @return A new async task.\n */\nfunction asyncPeriodic(task: AsyncTask, period: number): AsyncTask {\n return new AsyncTask(() => {\n let ref: number | null = null;\n\n task.onStatusChange(status => {\n if (status === \"finished\") {\n ref = window.setTimeout(() => {\n task.init();\n }, period);\n }\n });\n\n task.init();\n\n return {\n cancel: () => {\n if (ref) clearTimeout(ref);\n task.cancel();\n }\n };\n });\n}\n\n/**\n * Manages a list of async tasks.\n */\nexport default class AsyncTaskManager {\n private tasks: { [identifier: string]: AsyncTask } = {};\n\n /**\n * Adds an async task to the manager.\n *\n * @param identifier Unique identifier.\n * @param taskInitiator Function to initialize the async task.\n * Should return a structure to cancel the task.\n * @param period Optional period to repeat the task indefinitely.\n */\n public add(\n identifier: string,\n taskInitiator: AsyncTaskInitiator,\n period: number = 0\n ): AsyncTask {\n if (this.tasks[identifier] && this.tasks[identifier].status === \"started\") {\n this.tasks[identifier].cancel();\n }\n\n const asyncTask =\n period > 0\n ? asyncPeriodic(new AsyncTask(taskInitiator), period)\n : new AsyncTask(taskInitiator);\n\n this.tasks[identifier] = asyncTask;\n\n return this.tasks[identifier];\n }\n\n /**\n * Starts an async task.\n *\n * @param identifier Unique identifier.\n */\n public init(identifier: string) {\n if (\n this.tasks[identifier] &&\n (this.tasks[identifier].status === \"waiting\" ||\n this.tasks[identifier].status === \"cancelled\" ||\n this.tasks[identifier].status === \"finished\")\n ) {\n this.tasks[identifier].init();\n }\n }\n\n /**\n * Cancel a running async task.\n *\n * @param identifier Unique identifier.\n */\n public cancel(identifier: string) {\n if (this.tasks[identifier] && this.tasks[identifier].status === \"started\") {\n this.tasks[identifier].cancel();\n }\n }\n}\n","/*\n * Useful resources.\n * http://es6-features.org/\n * http://exploringjs.com/es6\n * https://www.typescriptlang.org/\n */\n\nimport \"./main.css\"; // CSS import.\nimport VisualConsole from \"./VisualConsole\";\nimport AsyncTaskManager from \"./lib/AsyncTaskManager\";\n\n// Export the VisualConsole class to the global object.\n// eslint-disable-next-line\n(window as any).VisualConsole = VisualConsole;\n\n// Export the AsyncTaskManager class to the global object.\n// eslint-disable-next-line\n(window as any).AsyncTaskManager = AsyncTaskManager;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/lib/index.ts","webpack:///./src/Item.ts","webpack:///./src/lib/TypedEvent.ts","webpack:///./src/items/EventsHistory.ts","webpack:///./src/items/DonutGraph.ts","webpack:///./src/items/BarsGraph.ts","webpack:///./src/items/ModuleGraph.ts","webpack:///./src/items/StaticGraph.ts","webpack:///./src/items/Icon.ts","webpack:///./src/items/ColorCloud.ts","webpack:///./src/items/Group.ts","webpack:///./src/items/Clock/index.ts","webpack:///./src/items/Box.ts","webpack:///./src/items/Line.ts","webpack:///./src/items/Label.ts","webpack:///./src/items/SimpleValue.ts","webpack:///./node_modules/d3-path/src/path.js","webpack:///./node_modules/d3-shape/src/constant.js","webpack:///./node_modules/d3-shape/src/math.js","webpack:///./node_modules/d3-shape/src/arc.js","webpack:///./node_modules/d3-shape/src/curve/linear.js","webpack:///./node_modules/d3-shape/src/curve/radial.js","webpack:///./node_modules/d3-shape/src/array.js","webpack:///./node_modules/d3-shape/src/symbol/diamond.js","webpack:///./node_modules/d3-shape/src/symbol/circle.js","webpack:///./node_modules/d3-shape/src/symbol/star.js","webpack:///./node_modules/d3-shape/src/noop.js","webpack:///./node_modules/d3-shape/src/symbol/triangle.js","webpack:///./node_modules/d3-shape/src/symbol/wye.js","webpack:///./node_modules/d3-shape/src/curve/basis.js","webpack:///./node_modules/d3-shape/src/curve/basisClosed.js","webpack:///./node_modules/d3-shape/src/curve/basisOpen.js","webpack:///./node_modules/d3-shape/src/curve/bundle.js","webpack:///./node_modules/d3-shape/src/curve/cardinal.js","webpack:///./node_modules/d3-shape/src/curve/cardinalClosed.js","webpack:///./node_modules/d3-shape/src/curve/cardinalOpen.js","webpack:///./node_modules/d3-shape/src/curve/catmullRom.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack:///./node_modules/d3-shape/src/curve/linearClosed.js","webpack:///./node_modules/d3-shape/src/curve/monotone.js","webpack:///./node_modules/d3-shape/src/curve/natural.js","webpack:///./node_modules/d3-shape/src/curve/step.js","webpack:///./node_modules/d3-shape/src/order/descending.js","webpack:///./src/items/Percentile.ts","webpack:///./src/items/Service.ts","webpack:///./src/VisualConsole.ts","webpack:///./src/lib/AsyncTaskManager.ts","webpack:///./src/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","parseIntOr","defaultValue","length","isNaN","parseInt","parseFloatOr","parseFloat","stringIsEmpty","notEmptyStringOr","parseBoolean","leftPad","pad","diffLength","substr","Math","abs","substring","repeatTimes","floor","restLength","newPad","positionPropsDecoder","data","x","y","sizePropsDecoder","width","height","TypeError","modulePropsDecoder","__assign","moduleName","moduleDescription","agentProps","agentId","agent","agentName","agentAlias","agentDescription","agentAddress","metaconsoleId","agentPropsDecoder","linkedVCPropsDecoder","id","linkedLayoutId","linkedLayoutAgentId","linkedLayoutStatusProps","linkedLayoutStatusType","weight","linkedLayoutStatusTypeWeight","warningThreshold","linkedLayoutStatusTypeWarningThreshold","criticalThreshold","linkedLayoutStatusTypeCriticalThreshold","linkedLayoutBaseProps","itemMetaDecoder","receivedAt","Date","Number","getTime","error","Error","editMode","isFromCache","isFetching","isUpdating","prefixedCssRules","ruleName","ruleValue","rule","decodeBase64","input","decodeURIComponent","escape","window","atob","humanDate","date","locale","Intl","DateTimeFormat","day","month","year","format","getDate","getMonth","getFullYear","humanTime","getHours","getMinutes","getSeconds","replaceMacros","macros","text","reduce","acc","_a","macro","replace","throttle","delay","fn","last","args","_i","arguments","now","apply","debounce","timerRef","clearTimeout","setTimeout","getOffset","el","offsetLeft","offsetTop","scrollLeft","scrollTop","offsetParent","top","left","addMovementListener","element","onMoved","container","parentElement","isDraggable","draggable","lastX","lastY","lastMouseX","lastMouseY","mouseElementOffsetX","mouseElementOffsetY","containerBounds","getBoundingClientRect","containerOffset","containerTop","containerBottom","containerLeft","containerRight","elementBounds","borderWidth","getComputedStyle","borderFix","debouncedMovement","throttledMovement","handleMove","e","mouseX","pageX","mouseY","pageY","mouseDeltaX","mouseDeltaY","maxX","maxY","outOfBoundsLeft","outOfBoundsRight","outOfBoundsTop","outOfBoundsBottom","handleEnd","document","removeEventListener","body","style","userSelect","handleStart","stopPropagation","offsetX","offsetY","addEventListener","addResizementListener","onResized","resizeDraggable","createElement","className","appendChild","lastWidth","lastHeight","elementOffset","elementTop","elementLeft","debouncedResizement","throttledResizement","handleResize","remove","parseLabelPosition","labelPosition","itemBasePropsDecoder","type","label","_lib__WEBPACK_IMPORTED_MODULE_0__","isLinkEnabled","link","isOnTop","parentId","aclGroupId","VisualConsoleItem","props","metadata","_this","this","clickEventManager","_lib_TypedEvent__WEBPACK_IMPORTED_MODULE_1__","movedEventManager","resizedEventManager","removeEventManager","disposables","debouncedMovementSave","prevPosition","newPosition","positionChanged","move","emit","item","removeMovement","debouncedResizementSave","prevSize","newSize","sizeChanged","resize","removeResizement","itemProps","_metadata","elementRef","createContainerDomElement","labelElementRef","createLabelDomElement","childElementRef","createDomElement","append","resizeElement","changeLabelPosition","initMovementListener","moveElement","stopMovementListener","initResizementListener","labelWidth","labelHeight","stopResizementListener","box","href","zIndex","meta","preventDefault","nativeEvent","classList","add","getLabelWithMacrosReplaced","table","row","emptyRow1","emptyRow2","cell","innerHTML","textAlign","updateDomElement","newProps","prevProps","shouldBeUpdated","render","newMetadata","setMeta","prevMetadata","prevMeta","oldLabelHtml","newLabelHtml","attrs","attributes","nodeName","setAttributeNode","parentNode","replaceChild","forEach","disposable","dispose","ignored","position","flexDirection","tables","getElementsByTagName","onClick","listener","on","push","onRemove","__webpack_exports__","TypedEvent","listeners","listenersOncer","off","once","callbackIndex","indexOf","splice","event","pipe","te","eventsHistoryPropsDecoder","html","encodedHtml","_Item__WEBPACK_IMPORTED_MODULE_1__","maxTime","EventsHistory","_super","__extends","scripts","src","eval","trim","aux","donutGraphPropsDecoder","DonutGraph","barsGraphPropsDecoder","BarsGraph","moduleGraphPropsDecoder","ModuleGraph","legendP","margin","overviewGraphs","getElementsByClassName","parseShowLastValueTooltip","showLastValueTooltip","staticGraphPropsDecoder","imageSrc","Item","statusImageSrc","lib","lastValue","StaticGraph","imgSrc","background","backgroundSize","backgroundPosition","setAttribute","iconPropsDecoder","Icon_assign","Icon","Icon_extends","colorCloudPropsDecoder","color","ColorCloud_assign","ColorCloud_svgNS","ColorCloud","ColorCloud_extends","createSvgElement","gradientId","svg","createElementNS","defs","radialGradient","stop0","stop100","circle","groupPropsDecoder","groupId","showStatistics","extractHtml","Group_assign","Group","Group_extends","parseClockType","clockType","parseClockFormat","clockFormat","clockPropsDecoder","clockTimezone","Clock_assign","clockTimezoneOffset","showClockTimezone","items_Clock","Clock","intervalRef","startTick","createClock","TICK_INTERVAL","Clock_extends","stopTick","clearInterval","handler","interval","setInterval","getElementSize","newWidth","newHeight","createAnalogicClock","createDigitalClock","svgNS","colors","dateFontSize","baseTimeFontSize","div","clockFace","clockFaceBackground","city","getHumanTimezone","timezoneComplication","textContent","marksGroup","mainMarkGroup","mark1a","mark1b","mark","hourHand","hourHandA","hourHandB","minuteHand","minuteHandA","minuteHandB","minuteHandPin","secondHand","secondHandBar","secondHandPin","pin","getOriginDate","seconds","minutes","secAngle","minuteAngle","hourAngle","join","dateElem","fontSize","tzFontSizeMultiplier","timeFontSize","tzFontSize","min","timeElem","tzElem","initialDate","targetTZOffset","localTZOffset","getTimezoneOffset","utimestamp","timezone","_b","split","diameter","boxPropsDecoder","Box_assign","borderColor","fillColor","Box","Box_extends","boxSizing","backgroundColor","borderStyle","maxBorderWidth","linePropsDecoder","Line_assign","startPosition","startX","startY","endPosition","endX","endY","lineWidth","Line","extractBoxSizeAndPosition","Line_extends","toString","line","labelPropsDecoder","Label_assign","Label","Label_extends","parseValueType","valueType","parseProcessValue","processValue","simpleValuePropsDecoder","SimpleValue_assign","period","SimpleValue","SimpleValue_extends","img","pi","PI","tau","tauEpsilon","Path","_x0","_y0","_x1","_y1","_","path","constructor","moveTo","closePath","lineTo","quadraticCurveTo","x1","y1","bezierCurveTo","x2","y2","arcTo","x0","y0","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","sqrt","l01","tan","acos","t01","t21","arc","a0","a1","ccw","dx","cos","dy","sin","cw","da","rect","w","h","src_path","constant","atan2","max","math_epsilon","math_pi","halfPi","math_tau","asin","arcInnerRadius","innerRadius","arcOuterRadius","outerRadius","arcStartAngle","startAngle","arcEndAngle","endAngle","arcPadAngle","padAngle","cornerTangents","r1","rc","lo","ox","oy","x11","y11","x10","y10","x00","y00","d2","D","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cx","cy","src_arc","cornerRadius","padRadius","context","buffer","r0","t0","t1","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","p0","p1","oc","x3","y3","x32","y32","intersect","ax","ay","bx","by","kc","lc","centroid","a","Linear","_context","areaStart","_line","areaEnd","NaN","lineStart","_point","lineEnd","point","linear","curveRadial","Radial","curve","_curve","radial","Array","slice","kr","noop","that","Basis","BasisClosed","_x2","_x3","_x4","_y2","_y3","_y4","BasisOpen","Bundle","beta","_basis","_beta","_x","_y","j","custom","bundle","cardinal_point","_k","Cardinal","tension","cardinal","CardinalClosed","_x5","_y5","CardinalOpen","catmullRom_point","_l01_a","_l01_2a","_l12_a","_l12_2a","_l23_a","b","_l23_2a","CatmullRom","alpha","_alpha","x23","y23","pow","catmullRom","CatmullRomClosed","CatmullRomOpen","LinearClosed","sign","slope3","h0","h1","s0","s1","slope2","monotone_point","MonotoneX","MonotoneY","ReflectContext","Natural","controlPoints","_t0","px","py","i0","i1","Step","_t","extractPercentileType","extractValueType","percentilePropsDecoder","Percentile_assign","percentileType","minValue","maxValue","labelColor","unit","Percentile_svgNS","Percentile","Percentile_extends","formatValue","progress","getProgress","NumberFormat","backgroundRect","progressRect","backgroundCircle","progressCircle","arcProps","trunc","servicePropsDecoder","encodedTitle","serviceId","Service_assign","Service","Service_extends","itemInstanceFrom","items_StaticGraph","items_SimpleValue","items_Percentile","items_Label","items_Icon","items_Service","items_Group","items_Box","items_Line","items_ColorCloud","VisualConsole","items","elementsById","elementIds","relations","handleElementClick","handleElementMovement","handleElementResizement","handleElementRemove","filter","clearRelations","containerRef","_props","backgroundURL","isFavorite","relationLineWidth","VisualConsole_assign","visualConsolePropsDecoder","sort","itemInstance","console","log","message","buildRelations","map","updateElements","itemIds","decodeProps","backgroundImage","elements","parent_1","child","addRelationLine","itemId","ids","childId","getRelationLine","identifier","parent","clientWidth","clientHeight","onItemClick","onItemMoved","onItemResized","enableEditMode","disableEditMode","AsyncTaskManager_AsyncTask","AsyncTask","taskInitiator","cancellable","cancel","_status","statusChangeEventManager","status","init","onStatusChange","AsyncTaskManager","tasks","asyncTask","task","ref","asyncPeriodic","src_VisualConsole","lib_AsyncTaskManager"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS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","file":"vc.main.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","import {\n AnyObject,\n Position,\n Size,\n WithAgentProps,\n WithModuleProps,\n LinkedVisualConsoleProps,\n LinkedVisualConsolePropsStatus,\n UnknownObject,\n ItemMeta\n} from \"./types\";\n\n/**\n * Return a number or a default value from a raw value.\n * @param value Raw value from which we will try to extract a valid number.\n * @param defaultValue Default value to use if we cannot extract a valid number.\n * @return A valid number or the default value.\n */\nexport function parseIntOr(value: unknown, defaultValue: T): number | T {\n if (typeof value === \"number\") return value;\n if (typeof value === \"string\" && value.length > 0 && !isNaN(parseInt(value)))\n return parseInt(value);\n else return defaultValue;\n}\n\n/**\n * Return a number or a default value from a raw value.\n * @param value Raw value from which we will try to extract a valid number.\n * @param defaultValue Default value to use if we cannot extract a valid number.\n * @return A valid number or the default value.\n */\nexport function parseFloatOr(value: unknown, defaultValue: T): number | T {\n if (typeof value === \"number\") return value;\n if (\n typeof value === \"string\" &&\n value.length > 0 &&\n !isNaN(parseFloat(value))\n )\n return parseFloat(value);\n else return defaultValue;\n}\n\n/**\n * Check if a string exists and it's not empty.\n * @param value Value to check.\n * @return The check result.\n */\nexport function stringIsEmpty(value?: string | null): boolean {\n return value == null || value.length === 0;\n}\n\n/**\n * Return a not empty string or a default value from a raw value.\n * @param value Raw value from which we will try to extract a non empty string.\n * @param defaultValue Default value to use if we cannot extract a non empty string.\n * @return A non empty string or the default value.\n */\nexport function notEmptyStringOr(\n value: unknown,\n defaultValue: T\n): string | T {\n return typeof value === \"string\" && value.length > 0 ? value : defaultValue;\n}\n\n/**\n * Return a boolean from a raw value.\n * @param value Raw value from which we will try to extract the boolean.\n * @return A valid boolean value. false by default.\n */\nexport function parseBoolean(value: unknown): boolean {\n if (typeof value === \"boolean\") return value;\n else if (typeof value === \"number\") return value > 0;\n else if (typeof value === \"string\") return value === \"1\" || value === \"true\";\n else return false;\n}\n\n/**\n * Return a valid date or a default value from a raw value.\n * @param value Raw value from which we will try to extract a valid date.\n * @param defaultValue Default value to use if we cannot extract a valid date.\n * @return A valid date or the default value.\n */\nexport function parseDateOr(value: unknown, defaultValue: T): Date | T {\n if (value instanceof Date) return value;\n else if (typeof value === \"number\") return new Date(value * 1000);\n else if (\n typeof value === \"string\" &&\n !Number.isNaN(new Date(value).getTime())\n )\n return new Date(value);\n else return defaultValue;\n}\n\n/**\n * Pad the current string with another string (multiple times, if needed)\n * until the resulting string reaches the given length.\n * The padding is applied from the start (left) of the current string.\n * @param value Text that needs to be padded.\n * @param length Length of the returned text.\n * @param pad Text to add.\n * @return Padded text.\n */\nexport function leftPad(\n value: string | number,\n length: number,\n pad: string | number = \" \"\n): string {\n if (typeof value === \"number\") value = `${value}`;\n if (typeof pad === \"number\") pad = `${pad}`;\n\n const diffLength = length - value.length;\n if (diffLength === 0) return value;\n if (diffLength < 0) return value.substr(Math.abs(diffLength));\n\n if (diffLength === pad.length) return `${pad}${value}`;\n if (diffLength < pad.length) return `${pad.substring(0, diffLength)}${value}`;\n\n const repeatTimes = Math.floor(diffLength / pad.length);\n const restLength = diffLength - pad.length * repeatTimes;\n\n let newPad = \"\";\n for (let i = 0; i < repeatTimes; i++) newPad += pad;\n\n if (restLength === 0) return `${newPad}${value}`;\n return `${newPad}${pad.substring(0, restLength)}${value}`;\n}\n\n/* Decoders */\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the position.\n */\nexport function positionPropsDecoder(data: AnyObject): Position {\n return {\n x: parseIntOr(data.x, 0),\n y: parseIntOr(data.y, 0)\n };\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the size.\n * @throws Will throw a TypeError if the width and height are not valid numbers.\n */\nexport function sizePropsDecoder(data: AnyObject): Size | never {\n if (\n data.width == null ||\n isNaN(parseInt(data.width)) ||\n data.height == null ||\n isNaN(parseInt(data.height))\n ) {\n throw new TypeError(\"invalid size.\");\n }\n\n return {\n width: parseInt(data.width),\n height: parseInt(data.height)\n };\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the agent properties.\n */\nexport function agentPropsDecoder(data: AnyObject): WithAgentProps {\n const agentProps: WithAgentProps = {\n agentId: parseIntOr(data.agent, null),\n agentName: notEmptyStringOr(data.agentName, null),\n agentAlias: notEmptyStringOr(data.agentAlias, null),\n agentDescription: notEmptyStringOr(data.agentDescription, null),\n agentAddress: notEmptyStringOr(data.agentAddress, null)\n };\n\n return data.metaconsoleId != null\n ? {\n metaconsoleId: data.metaconsoleId,\n ...agentProps // Object spread: http://es6-features.org/#SpreadOperator\n }\n : agentProps;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the module and agent properties.\n */\nexport function modulePropsDecoder(data: AnyObject): WithModuleProps {\n return {\n moduleId: parseIntOr(data.moduleId, null),\n moduleName: notEmptyStringOr(data.moduleName, null),\n moduleDescription: notEmptyStringOr(data.moduleDescription, null),\n ...agentPropsDecoder(data) // Object spread: http://es6-features.org/#SpreadOperator\n };\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the linked visual console properties.\n * @throws Will throw a TypeError if the status calculation properties are invalid.\n */\nexport function linkedVCPropsDecoder(\n data: AnyObject\n): LinkedVisualConsoleProps | never {\n // Object destructuring: http://es6-features.org/#ObjectMatchingShorthandNotation\n const {\n metaconsoleId,\n linkedLayoutId: id,\n linkedLayoutAgentId: agentId\n } = data;\n\n let linkedLayoutStatusProps: LinkedVisualConsolePropsStatus = {\n linkedLayoutStatusType: \"default\"\n };\n switch (data.linkedLayoutStatusType) {\n case \"weight\": {\n const weight = parseIntOr(data.linkedLayoutStatusTypeWeight, null);\n if (weight == null)\n throw new TypeError(\"invalid status calculation properties.\");\n\n if (data.linkedLayoutStatusTypeWeight)\n linkedLayoutStatusProps = {\n linkedLayoutStatusType: \"weight\",\n linkedLayoutStatusTypeWeight: weight\n };\n break;\n }\n case \"service\": {\n const warningThreshold = parseIntOr(\n data.linkedLayoutStatusTypeWarningThreshold,\n null\n );\n const criticalThreshold = parseIntOr(\n data.linkedLayoutStatusTypeCriticalThreshold,\n null\n );\n if (warningThreshold == null || criticalThreshold == null) {\n throw new TypeError(\"invalid status calculation properties.\");\n }\n\n linkedLayoutStatusProps = {\n linkedLayoutStatusType: \"service\",\n linkedLayoutStatusTypeWarningThreshold: warningThreshold,\n linkedLayoutStatusTypeCriticalThreshold: criticalThreshold\n };\n break;\n }\n }\n\n const linkedLayoutBaseProps = {\n linkedLayoutId: parseIntOr(id, null),\n linkedLayoutAgentId: parseIntOr(agentId, null),\n ...linkedLayoutStatusProps // Object spread: http://es6-features.org/#SpreadOperator\n };\n\n return metaconsoleId != null\n ? {\n metaconsoleId,\n ...linkedLayoutBaseProps // Object spread: http://es6-features.org/#SpreadOperator\n }\n : linkedLayoutBaseProps;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * @param data Raw object.\n * @return An object representing the item's meta properties.\n */\nexport function itemMetaDecoder(data: UnknownObject): ItemMeta | never {\n const receivedAt = parseDateOr(data.receivedAt, null);\n if (receivedAt === null) throw new TypeError(\"invalid meta structure\");\n\n let error = null;\n if (data.error instanceof Error) error = data.error;\n else if (typeof data.error === \"string\") error = new Error(data.error);\n\n return {\n receivedAt,\n error,\n editMode: parseBoolean(data.editMode),\n isFromCache: parseBoolean(data.isFromCache),\n isFetching: false,\n isUpdating: false\n };\n}\n\n/**\n * To get a CSS rule with the most used prefixes.\n * @param ruleName Name of the CSS rule.\n * @param ruleValue Value of the CSS rule.\n * @return An array of rules with the prefixes applied.\n */\nexport function prefixedCssRules(\n ruleName: string,\n ruleValue: string\n): string[] {\n const rule = `${ruleName}: ${ruleValue};`;\n return [\n `-webkit-${rule}`,\n `-moz-${rule}`,\n `-ms-${rule}`,\n `-o-${rule}`,\n `${rule}`\n ];\n}\n\n/**\n * Decode a base64 string.\n * @param input Data encoded using base64.\n * @return Decoded data.\n */\nexport function decodeBase64(input: string): string {\n return decodeURIComponent(escape(window.atob(input)));\n}\n\n/**\n * Generate a date representation with the format 'd/m/Y'.\n * @param initialDate Date to be used instead of a generated one.\n * @param locale Locale to use if localization is required and available.\n * @example 24/02/2020.\n * @return Date representation.\n */\nexport function humanDate(date: Date, locale: string | null = null): string {\n if (locale && Intl && Intl.DateTimeFormat) {\n // Format using the user locale.\n const options: Intl.DateTimeFormatOptions = {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\"\n };\n return Intl.DateTimeFormat(locale, options).format(date);\n } else {\n // Use getDate, getDay returns the week day.\n const day = leftPad(date.getDate(), 2, 0);\n // The getMonth function returns the month starting by 0.\n const month = leftPad(date.getMonth() + 1, 2, 0);\n const year = leftPad(date.getFullYear(), 4, 0);\n\n // Format: 'd/m/Y'.\n return `${day}/${month}/${year}`;\n }\n}\n\n/**\n * Generate a time representation with the format 'hh:mm:ss'.\n * @param initialDate Date to be used instead of a generated one.\n * @example 01:34:09.\n * @return Time representation.\n */\nexport function humanTime(date: Date): string {\n const hours = leftPad(date.getHours(), 2, 0);\n const minutes = leftPad(date.getMinutes(), 2, 0);\n const seconds = leftPad(date.getSeconds(), 2, 0);\n\n return `${hours}:${minutes}:${seconds}`;\n}\n\ninterface Macro {\n macro: string | RegExp;\n value: string;\n}\n/**\n * Replace the macros of a text.\n * @param macros List of macros and their replacements.\n * @param text Text in which we need to replace the macros.\n */\nexport function replaceMacros(macros: Macro[], text: string): string {\n return macros.reduce(\n (acc, { macro, value }) => acc.replace(macro, value),\n text\n );\n}\n\n/**\n * Create a function which will limit the rate of execution of\n * the selected function to one time for the selected interval.\n * @param delay Interval.\n * @param fn Function to be executed at a limited rate.\n */\nexport function throttle(delay: number, fn: (...args: T[]) => R) {\n let last = 0;\n return (...args: T[]) => {\n const now = Date.now();\n if (now - last < delay) return;\n last = now;\n return fn(...args);\n };\n}\n\n/**\n * Create a function which will call the selected function only\n * after the interval time has passed after its last execution.\n * @param delay Interval.\n * @param fn Function to be executed after the last call.\n */\nexport function debounce(delay: number, fn: (...args: T[]) => void) {\n let timerRef: number | null = null;\n return (...args: T[]) => {\n if (timerRef !== null) window.clearTimeout(timerRef);\n timerRef = window.setTimeout(() => {\n fn(...args);\n timerRef = null;\n }, delay);\n };\n}\n\n/**\n * Retrieve the offset of an element relative to the page.\n * @param el Node used to calculate the offset.\n */\nfunction getOffset(el: HTMLElement | null) {\n let x = 0;\n let y = 0;\n while (el && !Number.isNaN(el.offsetLeft) && !Number.isNaN(el.offsetTop)) {\n x += el.offsetLeft - el.scrollLeft;\n y += el.offsetTop - el.scrollTop;\n el = el.offsetParent as HTMLElement | null;\n }\n return { top: y, left: x };\n}\n\n/**\n * Add the grab & move functionality to a certain element inside it's container.\n *\n * @param element Element to move.\n * @param onMoved Function to execute when the element moves.\n *\n * @return A function which will clean the event handlers when executed.\n */\nexport function addMovementListener(\n element: HTMLElement,\n onMoved: (x: Position[\"x\"], y: Position[\"y\"]) => void\n): Function {\n const container = element.parentElement as HTMLElement;\n // Store the initial draggable state.\n const isDraggable = element.draggable;\n // Init the coordinates.\n let lastX: Position[\"x\"] = 0;\n let lastY: Position[\"y\"] = 0;\n let lastMouseX: Position[\"x\"] = 0;\n let lastMouseY: Position[\"y\"] = 0;\n let mouseElementOffsetX: Position[\"x\"] = 0;\n let mouseElementOffsetY: Position[\"y\"] = 0;\n // Bounds.\n let containerBounds = container.getBoundingClientRect();\n let containerOffset = getOffset(container);\n let containerTop = containerOffset.top;\n let containerBottom = containerTop + containerBounds.height;\n let containerLeft = containerOffset.left;\n let containerRight = containerLeft + containerBounds.width;\n let elementBounds = element.getBoundingClientRect();\n let borderWidth = window.getComputedStyle(element).borderWidth || \"0\";\n let borderFix = Number.parseInt(borderWidth) * 2;\n\n // Will run onMoved 32ms after its last execution.\n const debouncedMovement = debounce(32, (x: Position[\"x\"], y: Position[\"y\"]) =>\n onMoved(x, y)\n );\n // Will run onMoved one time max every 16ms.\n const throttledMovement = throttle(16, (x: Position[\"x\"], y: Position[\"y\"]) =>\n onMoved(x, y)\n );\n\n const handleMove = (e: MouseEvent) => {\n // Calculate the new element coordinates.\n let x = 0;\n let y = 0;\n\n const mouseX = e.pageX;\n const mouseY = e.pageY;\n const mouseDeltaX = mouseX - lastMouseX;\n const mouseDeltaY = mouseY - lastMouseY;\n\n const minX = 0;\n const maxX = containerBounds.width - elementBounds.width + borderFix;\n const minY = 0;\n const maxY = containerBounds.height - elementBounds.height + borderFix;\n\n const outOfBoundsLeft =\n mouseX < containerLeft ||\n (lastX === 0 &&\n mouseDeltaX > 0 &&\n mouseX < containerLeft + mouseElementOffsetX);\n const outOfBoundsRight =\n mouseX > containerRight ||\n mouseDeltaX + lastX + elementBounds.width - borderFix >\n containerBounds.width ||\n (lastX === maxX &&\n mouseDeltaX < 0 &&\n mouseX > containerLeft + maxX + mouseElementOffsetX);\n const outOfBoundsTop =\n mouseY < containerTop ||\n (lastY === 0 &&\n mouseDeltaY > 0 &&\n mouseY < containerTop + mouseElementOffsetY);\n const outOfBoundsBottom =\n mouseY > containerBottom ||\n mouseDeltaY + lastY + elementBounds.height - borderFix >\n containerBounds.height ||\n (lastY === maxY &&\n mouseDeltaY < 0 &&\n mouseY > containerTop + maxY + mouseElementOffsetY);\n\n if (outOfBoundsLeft) x = minX;\n else if (outOfBoundsRight) x = maxX;\n else x = mouseDeltaX + lastX;\n\n if (outOfBoundsTop) y = minY;\n else if (outOfBoundsBottom) y = maxY;\n else y = mouseDeltaY + lastY;\n\n if (x < 0) x = minX;\n if (y < 0) y = minY;\n\n // Store the last mouse coordinates.\n lastMouseX = mouseX;\n lastMouseY = mouseY;\n\n if (x === lastX && y === lastY) return;\n\n // Run the movement events.\n throttledMovement(x, y);\n debouncedMovement(x, y);\n\n // Store the coordinates of the element.\n lastX = x;\n lastY = y;\n };\n const handleEnd = () => {\n // Reset the positions.\n lastX = 0;\n lastY = 0;\n lastMouseX = 0;\n lastMouseY = 0;\n // Remove the move event.\n document.removeEventListener(\"mousemove\", handleMove);\n // Clean itself.\n document.removeEventListener(\"mouseup\", handleEnd);\n // Reset the draggable property to its initial state.\n element.draggable = isDraggable;\n // Reset the body selection property to a default state.\n document.body.style.userSelect = \"auto\";\n };\n const handleStart = (e: MouseEvent) => {\n e.stopPropagation();\n\n // Disable the drag temporarily.\n element.draggable = false;\n\n // Store the difference between the cursor and\n // the initial coordinates of the element.\n lastX = element.offsetLeft;\n lastY = element.offsetTop;\n // Store the mouse position.\n lastMouseX = e.pageX;\n lastMouseY = e.pageY;\n // Store the relative position between the mouse and the element.\n mouseElementOffsetX = e.offsetX;\n mouseElementOffsetY = e.offsetY;\n\n // Initialize the bounds.\n containerBounds = container.getBoundingClientRect();\n containerOffset = getOffset(container);\n containerTop = containerOffset.top;\n containerBottom = containerTop + containerBounds.height;\n containerLeft = containerOffset.left;\n containerRight = containerLeft + containerBounds.width;\n elementBounds = element.getBoundingClientRect();\n borderWidth = window.getComputedStyle(element).borderWidth || \"0\";\n borderFix = Number.parseInt(borderWidth) * 2;\n\n // Listen to the mouse movement.\n document.addEventListener(\"mousemove\", handleMove);\n // Listen to the moment when the mouse click is not pressed anymore.\n document.addEventListener(\"mouseup\", handleEnd);\n // Limit the mouse selection of the body.\n document.body.style.userSelect = \"none\";\n };\n\n // Event to listen the init of the movement.\n element.addEventListener(\"mousedown\", handleStart);\n\n // Returns a function to clean the event listeners.\n return () => {\n element.removeEventListener(\"mousedown\", handleStart);\n handleEnd();\n };\n}\n\n/**\n * Add the grab & resize functionality to a certain element.\n *\n * @param element Element to move.\n * @param onResized Function to execute when the element is resized.\n *\n * @return A function which will clean the event handlers when executed.\n */\nexport function addResizementListener(\n element: HTMLElement,\n onResized: (x: Position[\"x\"], y: Position[\"y\"]) => void\n): Function {\n const minWidth = 15;\n const minHeight = 15;\n\n const resizeDraggable = document.createElement(\"div\");\n resizeDraggable.className = \"resize-draggable\";\n element.appendChild(resizeDraggable);\n\n // Container of the resizable element.\n const container = element.parentElement as HTMLElement;\n // Store the initial draggable state.\n const isDraggable = element.draggable;\n // Init the coordinates.\n let lastWidth: Size[\"width\"] = 0;\n let lastHeight: Size[\"height\"] = 0;\n let lastMouseX: Position[\"x\"] = 0;\n let lastMouseY: Position[\"y\"] = 0;\n let mouseElementOffsetX: Position[\"x\"] = 0;\n let mouseElementOffsetY: Position[\"y\"] = 0;\n // Init the bounds.\n let containerBounds = container.getBoundingClientRect();\n let containerOffset = getOffset(container);\n let containerTop = containerOffset.top;\n let containerBottom = containerTop + containerBounds.height;\n let containerLeft = containerOffset.left;\n let containerRight = containerLeft + containerBounds.width;\n let elementOffset = getOffset(element);\n let elementTop = elementOffset.top;\n let elementLeft = elementOffset.left;\n let borderWidth = window.getComputedStyle(element).borderWidth || \"0\";\n let borderFix = Number.parseInt(borderWidth);\n\n // Will run onResized 32ms after its last execution.\n const debouncedResizement = debounce(\n 32,\n (width: Size[\"width\"], height: Size[\"height\"]) => onResized(width, height)\n );\n // Will run onResized one time max every 16ms.\n const throttledResizement = throttle(\n 16,\n (width: Size[\"width\"], height: Size[\"height\"]) => onResized(width, height)\n );\n\n const handleResize = (e: MouseEvent) => {\n // Calculate the new element coordinates.\n let width = lastWidth + (e.pageX - lastMouseX);\n let height = lastHeight + (e.pageY - lastMouseY);\n\n if (width === lastWidth && height === lastHeight) return;\n\n if (\n width < lastWidth &&\n e.pageX > elementLeft + (lastWidth - mouseElementOffsetX)\n )\n return;\n\n if (width < minWidth) {\n // Minimum value.\n width = minWidth;\n } else if (width + elementLeft - borderFix / 2 >= containerRight) {\n // Limit the size to the container.\n width = containerRight - elementLeft;\n }\n if (height < minHeight) {\n // Minimum value.\n height = minHeight;\n } else if (height + elementTop - borderFix / 2 >= containerBottom) {\n // Limit the size to the container.\n height = containerBottom - elementTop;\n }\n\n // Run the movement events.\n throttledResizement(width, height);\n debouncedResizement(width, height);\n\n // Store the coordinates of the element.\n lastWidth = width;\n lastHeight = height;\n // Store the last mouse coordinates.\n lastMouseX = e.pageX;\n lastMouseY = e.pageY;\n };\n const handleEnd = () => {\n // Reset the positions.\n lastWidth = 0;\n lastHeight = 0;\n lastMouseX = 0;\n lastMouseY = 0;\n mouseElementOffsetX = 0;\n mouseElementOffsetY = 0;\n // Remove the move event.\n document.removeEventListener(\"mousemove\", handleResize);\n // Clean itself.\n document.removeEventListener(\"mouseup\", handleEnd);\n // Reset the draggable property to its initial state.\n element.draggable = isDraggable;\n // Reset the body selection property to a default state.\n document.body.style.userSelect = \"auto\";\n };\n const handleStart = (e: MouseEvent) => {\n e.stopPropagation();\n\n // Disable the drag temporarily.\n element.draggable = false;\n\n // Store the difference between the cursor and\n // the initial coordinates of the element.\n const { width, height } = element.getBoundingClientRect();\n lastWidth = width;\n lastHeight = height;\n // Store the mouse position.\n lastMouseX = e.pageX;\n lastMouseY = e.pageY;\n // Store the relative position between the mouse and the element.\n mouseElementOffsetX = e.offsetX;\n mouseElementOffsetY = e.offsetY;\n\n // Initialize the bounds.\n containerBounds = container.getBoundingClientRect();\n containerOffset = getOffset(container);\n containerTop = containerOffset.top;\n containerBottom = containerTop + containerBounds.height;\n containerLeft = containerOffset.left;\n containerRight = containerLeft + containerBounds.width;\n elementOffset = getOffset(element);\n elementTop = elementOffset.top;\n elementLeft = elementOffset.left;\n\n // Listen to the mouse movement.\n document.addEventListener(\"mousemove\", handleResize);\n // Listen to the moment when the mouse click is not pressed anymore.\n document.addEventListener(\"mouseup\", handleEnd);\n // Limit the mouse selection of the body.\n document.body.style.userSelect = \"none\";\n };\n\n // Event to listen the init of the movement.\n resizeDraggable.addEventListener(\"mousedown\", handleStart);\n\n // Returns a function to clean the event listeners.\n return () => {\n resizeDraggable.remove();\n handleEnd();\n };\n}\n","import {\n Position,\n Size,\n AnyObject,\n WithModuleProps,\n ItemMeta\n} from \"./lib/types\";\nimport {\n sizePropsDecoder,\n positionPropsDecoder,\n parseIntOr,\n parseBoolean,\n notEmptyStringOr,\n replaceMacros,\n humanDate,\n humanTime,\n addMovementListener,\n debounce,\n addResizementListener\n} from \"./lib\";\nimport TypedEvent, { Listener, Disposable } from \"./lib/TypedEvent\";\n\n// Enum: https://www.typescriptlang.org/docs/handbook/enums.html.\nexport const enum ItemType {\n STATIC_GRAPH = 0,\n MODULE_GRAPH = 1,\n SIMPLE_VALUE = 2,\n PERCENTILE_BAR = 3,\n LABEL = 4,\n ICON = 5,\n SIMPLE_VALUE_MAX = 6,\n SIMPLE_VALUE_MIN = 7,\n SIMPLE_VALUE_AVG = 8,\n PERCENTILE_BUBBLE = 9,\n SERVICE = 10,\n GROUP_ITEM = 11,\n BOX_ITEM = 12,\n LINE_ITEM = 13,\n AUTO_SLA_GRAPH = 14,\n CIRCULAR_PROGRESS_BAR = 15,\n CIRCULAR_INTERIOR_PROGRESS_BAR = 16,\n DONUT_GRAPH = 17,\n BARS_GRAPH = 18,\n CLOCK = 19,\n COLOR_CLOUD = 20\n}\n\n// Base item properties. This interface should be extended by the item implementations.\nexport interface ItemProps extends Position, Size {\n readonly id: number;\n readonly type: ItemType;\n label: string | null;\n labelPosition: \"up\" | \"right\" | \"down\" | \"left\";\n isLinkEnabled: boolean;\n link: string | null;\n isOnTop: boolean;\n parentId: number | null;\n aclGroupId: number | null;\n}\n\n// FIXME: Fix type compatibility.\nexport interface ItemClickEvent {\n // data: Props;\n data: AnyObject;\n nativeEvent: Event;\n}\n\n// FIXME: Fix type compatibility.\nexport interface ItemRemoveEvent {\n // data: Props;\n data: AnyObject;\n}\n\nexport interface ItemMovedEvent {\n item: VisualConsoleItem;\n prevPosition: Position;\n newPosition: Position;\n}\n\nexport interface ItemResizedEvent {\n item: VisualConsoleItem;\n prevSize: Size;\n newSize: Size;\n}\n\n/**\n * Extract a valid enum value from a raw label positi9on value.\n * @param labelPosition Raw value.\n */\nconst parseLabelPosition = (\n labelPosition: unknown\n): ItemProps[\"labelPosition\"] => {\n switch (labelPosition) {\n case \"up\":\n case \"right\":\n case \"down\":\n case \"left\":\n return labelPosition;\n default:\n return \"down\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the item props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function itemBasePropsDecoder(data: AnyObject): ItemProps | never {\n if (data.id == null || isNaN(parseInt(data.id))) {\n throw new TypeError(\"invalid id.\");\n }\n if (data.type == null || isNaN(parseInt(data.type))) {\n throw new TypeError(\"invalid type.\");\n }\n\n return {\n id: parseInt(data.id),\n type: parseInt(data.type),\n label: notEmptyStringOr(data.label, null),\n labelPosition: parseLabelPosition(data.labelPosition),\n isLinkEnabled: parseBoolean(data.isLinkEnabled),\n link: notEmptyStringOr(data.link, null),\n isOnTop: parseBoolean(data.isOnTop),\n parentId: parseIntOr(data.parentId, null),\n aclGroupId: parseIntOr(data.aclGroupId, null),\n ...sizePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...positionPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\n/**\n * Base class of the visual console items. Should be extended to use its capabilities.\n */\nabstract class VisualConsoleItem {\n // Properties of the item.\n private itemProps: Props;\n // Metadata of the item.\n private _metadata: ItemMeta;\n // Reference to the DOM element which will contain the item.\n public elementRef: HTMLElement;\n public readonly labelElementRef: HTMLElement;\n // Reference to the DOM element which will contain the view of the item which extends this class.\n protected readonly childElementRef: HTMLElement;\n // Event manager for click events.\n private readonly clickEventManager = new TypedEvent>();\n // Event manager for moved events.\n private readonly movedEventManager = new TypedEvent();\n // Event manager for resized events.\n private readonly resizedEventManager = new TypedEvent();\n // Event manager for remove events.\n private readonly removeEventManager = new TypedEvent<\n ItemRemoveEvent\n >();\n // List of references to clean the event listeners.\n private readonly disposables: Disposable[] = [];\n\n // This function will only run the 2nd arg function after the time\n // of the first arg have passed after its last execution.\n private debouncedMovementSave = debounce(\n 500, // ms.\n (x: Position[\"x\"], y: Position[\"y\"]) => {\n const prevPosition = {\n x: this.props.x,\n y: this.props.y\n };\n const newPosition = {\n x: x,\n y: y\n };\n\n if (!this.positionChanged(prevPosition, newPosition)) return;\n\n // Save the new position to the props.\n this.move(x, y);\n // Emit the movement event.\n this.movedEventManager.emit({\n item: this,\n prevPosition: prevPosition,\n newPosition: newPosition\n });\n }\n );\n // This property will store the function\n // to clean the movement listener.\n private removeMovement: Function | null = null;\n\n /**\n * Start the movement funtionality.\n * @param element Element to move inside its container.\n */\n private initMovementListener(element: HTMLElement): void {\n this.removeMovement = addMovementListener(\n element,\n (x: Position[\"x\"], y: Position[\"y\"]) => {\n // Move the DOM element.\n this.moveElement(x, y);\n // Run the save function.\n this.debouncedMovementSave(x, y);\n }\n );\n }\n /**\n * Stop the movement fun\n */\n private stopMovementListener(): void {\n if (this.removeMovement) {\n this.removeMovement();\n this.removeMovement = null;\n }\n }\n\n // This function will only run the 2nd arg function after the time\n // of the first arg have passed after its last execution.\n private debouncedResizementSave = debounce(\n 500, // ms.\n (width: Size[\"width\"], height: Size[\"height\"]) => {\n const prevSize = {\n width: this.props.width,\n height: this.props.height\n };\n const newSize = {\n width: width,\n height: height\n };\n\n if (!this.sizeChanged(prevSize, newSize)) return;\n\n // Save the new position to the props.\n this.resize(width, height);\n // Emit the resizement event.\n this.resizedEventManager.emit({\n item: this,\n prevSize: prevSize,\n newSize: newSize\n });\n }\n );\n // This property will store the function\n // to clean the resizement listener.\n private removeResizement: Function | null = null;\n\n /**\n * Start the resizement funtionality.\n * @param element Element to move inside its container.\n */\n protected initResizementListener(element: HTMLElement): void {\n this.removeResizement = addResizementListener(\n element,\n (width: Size[\"width\"], height: Size[\"height\"]) => {\n // The label it's outside the item's size, so we need\n // to get rid of its size to get the real size of the\n // item's content.\n if (this.props.label && this.props.label.length > 0) {\n const {\n width: labelWidth,\n height: labelHeight\n } = this.labelElementRef.getBoundingClientRect();\n\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n height -= labelHeight;\n break;\n case \"left\":\n case \"right\":\n width -= labelWidth;\n break;\n }\n }\n\n // Move the DOM element.\n this.resizeElement(width, height);\n // Run the save function.\n this.debouncedResizementSave(width, height);\n }\n );\n }\n /**\n * Stop the resizement functionality.\n */\n private stopResizementListener(): void {\n if (this.removeResizement) {\n this.removeResizement();\n this.removeResizement = null;\n }\n }\n\n /**\n * To create a new element which will be inside the item box.\n * @return Item.\n */\n protected abstract createDomElement(): HTMLElement;\n\n public constructor(props: Props, metadata: ItemMeta) {\n this.itemProps = props;\n this._metadata = metadata;\n\n /*\n * Get a HTMLElement which represents the container box\n * of the Visual Console item. This element will manage\n * all the common things like click events, show a border\n * when hovered, etc.\n */\n this.elementRef = this.createContainerDomElement();\n this.labelElementRef = this.createLabelDomElement();\n\n /*\n * Get a HTMLElement which represents the custom view\n * of the Visual Console item. This element will be\n * different depending on the item implementation.\n */\n this.childElementRef = this.createDomElement();\n\n // Insert the elements into the container.\n this.elementRef.append(this.childElementRef, this.labelElementRef);\n\n // Resize element.\n this.resizeElement(props.width, props.height);\n // Set label position.\n this.changeLabelPosition(props.labelPosition);\n }\n\n /**\n * To create a new box for the visual console item.\n * @return Item box.\n */\n private createContainerDomElement(): HTMLElement {\n let box;\n if (this.props.isLinkEnabled) {\n box = document.createElement(\"a\") as HTMLAnchorElement;\n if (this.props.link) box.href = this.props.link;\n } else {\n box = document.createElement(\"div\") as HTMLDivElement;\n }\n\n box.className = \"visual-console-item\";\n box.style.zIndex = this.props.isOnTop ? \"2\" : \"1\";\n box.style.left = `${this.props.x}px`;\n box.style.top = `${this.props.y}px`;\n // Init the click listener.\n box.addEventListener(\"click\", e => {\n if (this.meta.editMode) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n this.clickEventManager.emit({ data: this.props, nativeEvent: e });\n }\n });\n\n // Metadata state.\n if (this.meta.editMode) {\n box.classList.add(\"is-editing\");\n // Init the movement listener.\n this.initMovementListener(box);\n // Init the resizement listener.\n this.initResizementListener(box);\n }\n if (this.meta.isFetching) {\n box.classList.add(\"is-fetching\");\n }\n if (this.meta.isUpdating) {\n box.classList.add(\"is-updating\");\n }\n\n return box;\n }\n\n /**\n * To create a new label for the visual console item.\n * @return Item label.\n */\n protected createLabelDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"visual-console-item-label\";\n // Add the label if it exists.\n const label = this.getLabelWithMacrosReplaced();\n if (label.length > 0) {\n // Ugly table we need to use to replicate the legacy style.\n const table = document.createElement(\"table\");\n const row = document.createElement(\"tr\");\n const emptyRow1 = document.createElement(\"tr\");\n const emptyRow2 = document.createElement(\"tr\");\n const cell = document.createElement(\"td\");\n\n cell.innerHTML = label;\n row.append(cell);\n table.append(emptyRow1, row, emptyRow2);\n table.style.textAlign = \"center\";\n\n // Change the table size depending on its position.\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n if (this.props.width > 0) {\n table.style.width = `${this.props.width}px`;\n table.style.height = null;\n }\n break;\n case \"left\":\n case \"right\":\n if (this.props.height > 0) {\n table.style.width = null;\n table.style.height = `${this.props.height}px`;\n }\n break;\n }\n\n // element.innerHTML = this.props.label;\n element.append(table);\n }\n\n return element;\n }\n\n /**\n * Return the label stored into the props with some macros replaced.\n */\n protected getLabelWithMacrosReplaced(): string {\n // We assert that the props may have some needed properties.\n const props = this.props as Partial;\n\n return replaceMacros(\n [\n {\n macro: \"_date_\",\n value: humanDate(new Date())\n },\n {\n macro: \"_time_\",\n value: humanTime(new Date())\n },\n {\n macro: \"_agent_\",\n value: props.agentAlias != null ? props.agentAlias : \"\"\n },\n {\n macro: \"_agentdescription_\",\n value: props.agentDescription != null ? props.agentDescription : \"\"\n },\n {\n macro: \"_address_\",\n value: props.agentAddress != null ? props.agentAddress : \"\"\n },\n {\n macro: \"_module_\",\n value: props.moduleName != null ? props.moduleName : \"\"\n },\n {\n macro: \"_moduledescription_\",\n value: props.moduleDescription != null ? props.moduleDescription : \"\"\n }\n ],\n this.props.label || \"\"\n );\n }\n\n /**\n * To update the content element.\n * @return Item.\n */\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.createDomElement().innerHTML;\n }\n\n /**\n * Public accessor of the `props` property.\n * @return Properties.\n */\n public get props(): Props {\n return { ...this.itemProps }; // Return a copy.\n }\n\n /**\n * Public setter of the `props` property.\n * If the new props are different enough than the\n * stored props, a render would be fired.\n * @param newProps\n */\n public set props(newProps: Props) {\n const prevProps = this.props;\n // Update the internal props.\n this.itemProps = newProps;\n\n // From this point, things which rely on this.props can access to the changes.\n\n // Check if we should re-render.\n if (this.shouldBeUpdated(prevProps, newProps))\n this.render(prevProps, this._metadata);\n }\n\n /**\n * Public accessor of the `meta` property.\n * @return Properties.\n */\n public get meta(): ItemMeta {\n return { ...this._metadata }; // Return a copy.\n }\n\n /**\n * Public setter of the `meta` property.\n * If the new meta are different enough than the\n * stored meta, a render would be fired.\n * @param newProps\n */\n public set meta(newMetadata: ItemMeta) {\n this.setMeta(newMetadata);\n }\n\n /**\n * Clasic and protected version of the setter of the `meta` property.\n * Useful to override it from children classes.\n * @param newProps\n */\n protected setMeta(newMetadata: ItemMeta) {\n const prevMetadata = this._metadata;\n // Update the internal meta.\n this._metadata = newMetadata;\n\n // From this point, things which rely on this.props can access to the changes.\n\n // Check if we should re-render.\n // if (this.shouldBeUpdated(prevMetadata, newMetadata))\n this.render(this.itemProps, prevMetadata);\n }\n\n /**\n * To compare the previous and the new props and returns a boolean value\n * in case the difference is meaningfull enough to perform DOM changes.\n *\n * Here, the only comparision is done by reference.\n *\n * Override this function to perform a different comparision depending on the item needs.\n *\n * @param prevProps\n * @param newProps\n * @return Whether the difference is meaningful enough to perform DOM changes or not.\n */\n protected shouldBeUpdated(prevProps: Props, newProps: Props): boolean {\n return prevProps !== newProps;\n }\n\n /**\n * To recreate or update the HTMLElement which represents the item into the DOM.\n * @param prevProps If exists it will be used to only perform DOM updates instead of a full replace.\n */\n public render(\n prevProps: Props | null = null,\n prevMeta: ItemMeta | null = null\n ): void {\n this.updateDomElement(this.childElementRef);\n\n // Move box.\n if (!prevProps || this.positionChanged(prevProps, this.props)) {\n this.moveElement(this.props.x, this.props.y);\n }\n // Resize box.\n if (!prevProps || this.sizeChanged(prevProps, this.props)) {\n this.resizeElement(this.props.width, this.props.height);\n }\n // Change label.\n const oldLabelHtml = this.labelElementRef.innerHTML;\n const newLabelHtml = this.createLabelDomElement().innerHTML;\n if (oldLabelHtml !== newLabelHtml) {\n this.labelElementRef.innerHTML = newLabelHtml;\n }\n // Change label position.\n if (!prevProps || prevProps.labelPosition !== this.props.labelPosition) {\n this.changeLabelPosition(this.props.labelPosition);\n }\n // Change link.\n if (\n prevProps &&\n (prevProps.isLinkEnabled !== this.props.isLinkEnabled ||\n (this.props.isLinkEnabled && prevProps.link !== this.props.link))\n ) {\n const container = this.createContainerDomElement();\n // Add the children of the old element.\n container.innerHTML = this.elementRef.innerHTML;\n // Copy the attributes.\n const attrs = this.elementRef.attributes;\n for (let i = 0; i < attrs.length; i++) {\n if (attrs[i].nodeName !== \"id\") {\n container.setAttributeNode(attrs[i]);\n }\n }\n // Replace the reference.\n if (this.elementRef.parentNode !== null) {\n this.elementRef.parentNode.replaceChild(container, this.elementRef);\n }\n\n // Changed the reference to the main element. It's ugly, but needed.\n this.elementRef = container;\n }\n\n // Change metadata related things.\n if (!prevMeta || prevMeta.editMode !== this.meta.editMode) {\n if (this.meta.editMode) {\n this.elementRef.classList.add(\"is-editing\");\n this.initMovementListener(this.elementRef);\n this.initResizementListener(this.elementRef);\n } else {\n this.elementRef.classList.remove(\"is-editing\");\n this.stopMovementListener();\n this.stopResizementListener();\n }\n }\n if (!prevMeta || prevMeta.isFetching !== this.meta.isFetching) {\n if (this.meta.isFetching) {\n this.elementRef.classList.add(\"is-fetching\");\n } else {\n this.elementRef.classList.remove(\"is-fetching\");\n }\n }\n if (!prevMeta || prevMeta.isUpdating !== this.meta.isUpdating) {\n if (this.meta.isUpdating) {\n this.elementRef.classList.add(\"is-updating\");\n } else {\n this.elementRef.classList.remove(\"is-updating\");\n }\n }\n }\n\n /**\n * To remove the event listeners and the elements from the DOM.\n */\n public remove(): void {\n // Call the remove event.\n this.removeEventManager.emit({ data: this.props });\n // Event listeners.\n this.disposables.forEach(disposable => {\n try {\n disposable.dispose();\n } catch (ignored) {} // eslint-disable-line no-empty\n });\n // VisualConsoleItem DOM element.\n this.elementRef.remove();\n }\n\n /**\n * Compare the previous and the new position and return\n * a boolean value in case the position changed.\n * @param prevPosition\n * @param newPosition\n * @return Whether the position changed or not.\n */\n protected positionChanged(\n prevPosition: Position,\n newPosition: Position\n ): boolean {\n return prevPosition.x !== newPosition.x || prevPosition.y !== newPosition.y;\n }\n\n /**\n * Move the label around the item content.\n * @param position Label position.\n */\n protected changeLabelPosition(position: Props[\"labelPosition\"]): void {\n switch (position) {\n case \"up\":\n this.elementRef.style.flexDirection = \"column-reverse\";\n break;\n case \"left\":\n this.elementRef.style.flexDirection = \"row-reverse\";\n break;\n case \"right\":\n this.elementRef.style.flexDirection = \"row\";\n break;\n case \"down\":\n default:\n this.elementRef.style.flexDirection = \"column\";\n break;\n }\n\n // Ugly table to show the label as its legacy counterpart.\n const tables = this.labelElementRef.getElementsByTagName(\"table\");\n const table = tables.length > 0 ? tables.item(0) : null;\n // Change the table size depending on its position.\n if (table) {\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n if (this.props.width > 0) {\n table.style.width = `${this.props.width}px`;\n table.style.height = null;\n }\n break;\n case \"left\":\n case \"right\":\n if (this.props.height > 0) {\n table.style.width = null;\n table.style.height = `${this.props.height}px`;\n }\n break;\n }\n }\n }\n\n /**\n * Move the DOM container.\n * @param x Horizontal axis position.\n * @param y Vertical axis position.\n */\n protected moveElement(x: number, y: number): void {\n this.elementRef.style.left = `${x}px`;\n this.elementRef.style.top = `${y}px`;\n }\n\n /**\n * Update the position into the properties and move the DOM container.\n * @param x Horizontal axis position.\n * @param y Vertical axis position.\n */\n public move(x: number, y: number): void {\n this.moveElement(x, y);\n this.itemProps = {\n ...this.props, // Object spread: http://es6-features.org/#SpreadOperator\n x,\n y\n };\n }\n\n /**\n * Compare the previous and the new size and return\n * a boolean value in case the size changed.\n * @param prevSize\n * @param newSize\n * @return Whether the size changed or not.\n */\n protected sizeChanged(prevSize: Size, newSize: Size): boolean {\n return (\n prevSize.width !== newSize.width || prevSize.height !== newSize.height\n );\n }\n\n /**\n * Resize the DOM content container.\n * @param width\n * @param height\n */\n protected resizeElement(width: number, height: number): void {\n // The most valuable size is the content size.\n this.childElementRef.style.width = width > 0 ? `${width}px` : null;\n this.childElementRef.style.height = height > 0 ? `${height}px` : null;\n\n if (this.props.label && this.props.label.length > 0) {\n // Ugly table to show the label as its legacy counterpart.\n const tables = this.labelElementRef.getElementsByTagName(\"table\");\n const table = tables.length > 0 ? tables.item(0) : null;\n\n if (table) {\n switch (this.props.labelPosition) {\n case \"up\":\n case \"down\":\n table.style.width = width > 0 ? `${width}px` : null;\n break;\n case \"left\":\n case \"right\":\n table.style.height = height > 0 ? `${height}px` : null;\n break;\n }\n }\n }\n }\n\n /**\n * Update the size into the properties and resize the DOM container.\n * @param width\n * @param height\n */\n public resize(width: number, height: number): void {\n this.resizeElement(width, height);\n this.itemProps = {\n ...this.props, // Object spread: http://es6-features.org/#SpreadOperator\n width,\n height\n };\n }\n\n /**\n * To add an event handler to the click of the linked visual console elements.\n * @param listener Function which is going to be executed when a linked console is clicked.\n */\n public onClick(listener: Listener>): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.clickEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * To add an event handler to the movement of visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onMoved(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.movedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * To add an event handler to the resizement of visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onResized(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.resizedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * To add an event handler to the removal of the item.\n * @param listener Function which is going to be executed when a item is removed.\n */\n public onRemove(listener: Listener>): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.removeEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n}\n\nexport default VisualConsoleItem;\n","export interface Listener {\n (event: T): void;\n}\n\nexport interface Disposable {\n dispose: () => void;\n}\n\n/** passes through events as they happen. You will not get events from before you start listening */\nexport default class TypedEvent {\n private listeners: Listener[] = [];\n private listenersOncer: Listener[] = [];\n\n public on = (listener: Listener): Disposable => {\n this.listeners.push(listener);\n return {\n dispose: () => this.off(listener)\n };\n };\n\n public once = (listener: Listener): void => {\n this.listenersOncer.push(listener);\n };\n\n public off = (listener: Listener): void => {\n const callbackIndex = this.listeners.indexOf(listener);\n if (callbackIndex > -1) this.listeners.splice(callbackIndex, 1);\n };\n\n public emit = (event: T): void => {\n /** Update any general listeners */\n this.listeners.forEach(listener => listener(event));\n\n /** Clear the `once` queue */\n this.listenersOncer.forEach(listener => listener(event));\n this.listenersOncer = [];\n };\n\n public pipe = (te: TypedEvent): Disposable => this.on(e => te.emit(e));\n}\n","import { AnyObject, WithModuleProps } from \"../lib/types\";\nimport {\n modulePropsDecoder,\n parseIntOr,\n decodeBase64,\n stringIsEmpty\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type EventsHistoryProps = {\n type: ItemType.AUTO_SLA_GRAPH;\n maxTime: number | null;\n html: string;\n} & ItemProps &\n WithModuleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the events history props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function eventsHistoryPropsDecoder(\n data: AnyObject\n): EventsHistoryProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.AUTO_SLA_GRAPH,\n maxTime: parseIntOr(data.maxTime, null),\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class EventsHistory extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"events-history\";\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n setTimeout(() => {\n try {\n eval(scripts[i].innerHTML.trim());\n } catch (ignored) {} // eslint-disable-line no-empty\n }, 0);\n }\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n modulePropsDecoder,\n decodeBase64,\n stringIsEmpty\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type DonutGraphProps = {\n type: ItemType.DONUT_GRAPH;\n html: string;\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the donut graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function donutGraphPropsDecoder(\n data: AnyObject\n): DonutGraphProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.DONUT_GRAPH,\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class DonutGraph extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"donut-graph\";\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n setTimeout(() => {\n if (scripts[i].src.length === 0) eval(scripts[i].innerHTML.trim());\n }, 0);\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import { AnyObject, WithModuleProps } from \"../lib/types\";\nimport { modulePropsDecoder, decodeBase64, stringIsEmpty } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type BarsGraphProps = {\n type: ItemType.BARS_GRAPH;\n html: string;\n} & ItemProps &\n WithModuleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the bars graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function barsGraphPropsDecoder(data: AnyObject): BarsGraphProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.BARS_GRAPH,\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class BarsGraph extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"bars-graph\";\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n setTimeout(() => {\n if (scripts[i].src.length === 0) eval(scripts[i].innerHTML.trim());\n }, 0);\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n modulePropsDecoder,\n decodeBase64,\n stringIsEmpty\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type ModuleGraphProps = {\n type: ItemType.MODULE_GRAPH;\n html: string;\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the module graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function moduleGraphPropsDecoder(\n data: AnyObject\n): ModuleGraphProps | never {\n if (stringIsEmpty(data.html) && stringIsEmpty(data.encodedHtml)) {\n throw new TypeError(\"missing html content.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.MODULE_GRAPH,\n html: !stringIsEmpty(data.html)\n ? data.html\n : decodeBase64(data.encodedHtml),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class ModuleGraph extends Item {\n /**\n * @override Item.resizeElement.\n * Resize the DOM content container.\n * We need to override the resize function cause this item's height\n * is larger than the configured and the graph is over the label.\n * @param width\n * @param height\n */\n protected resizeElement(width: number): void {\n super.resizeElement(width, 0);\n }\n\n /**\n * @override Item.initResizementListener. To disable the functionality.\n * Start the resizement funtionality.\n * @param element Element to move inside its container.\n */\n protected initResizementListener(): void {\n // No-Op. Disable the resizement functionality for this item.\n }\n\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"module-graph\";\n element.innerHTML = this.props.html;\n\n // Remove the overview graph.\n const legendP = element.getElementsByTagName(\"p\");\n for (let i = 0; i < legendP.length; i++) {\n legendP[i].style.margin = \"0px\";\n }\n\n // Remove the overview graph.\n const overviewGraphs = element.getElementsByClassName(\"overview_graph\");\n for (let i = 0; i < overviewGraphs.length; i++) {\n overviewGraphs[i].remove();\n }\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const scripts = element.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n setTimeout(() => {\n try {\n eval(scripts[i].innerHTML.trim());\n } catch (ignored) {} // eslint-disable-line no-empty\n }, 0);\n }\n }\n\n return element;\n }\n\n protected updateDomElement(element: HTMLElement): void {\n element.innerHTML = this.props.html;\n\n // Remove the overview graph.\n const legendP = element.getElementsByTagName(\"p\");\n for (let i = 0; i < legendP.length; i++) {\n legendP[i].style.margin = \"0px\";\n }\n\n // Remove the overview graph.\n const overviewGraphs = element.getElementsByClassName(\"overview_graph\");\n for (let i = 0; i < overviewGraphs.length; i++) {\n overviewGraphs[i].remove();\n }\n\n // Hack to execute the JS after the HTML is added to the DOM.\n const aux = document.createElement(\"div\");\n aux.innerHTML = this.props.html;\n const scripts = aux.getElementsByTagName(\"script\");\n for (let i = 0; i < scripts.length; i++) {\n if (scripts[i].src.length === 0) {\n eval(scripts[i].innerHTML.trim());\n }\n }\n }\n}\n","import {\n WithModuleProps,\n LinkedVisualConsoleProps,\n AnyObject\n} from \"../lib/types\";\n\nimport {\n modulePropsDecoder,\n linkedVCPropsDecoder,\n notEmptyStringOr\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type StaticGraphProps = {\n type: ItemType.STATIC_GRAPH;\n imageSrc: string; // URL?\n showLastValueTooltip: \"default\" | \"enabled\" | \"disabled\";\n statusImageSrc: string | null; // URL?\n lastValue: string | null;\n} & ItemProps &\n (WithModuleProps | LinkedVisualConsoleProps);\n\n/**\n * Extract a valid enum value from a raw unknown value.\n * @param showLastValueTooltip Raw value.\n */\nconst parseShowLastValueTooltip = (\n showLastValueTooltip: unknown\n): StaticGraphProps[\"showLastValueTooltip\"] => {\n switch (showLastValueTooltip) {\n case \"default\":\n case \"enabled\":\n case \"disabled\":\n return showLastValueTooltip;\n default:\n return \"default\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the static graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function staticGraphPropsDecoder(\n data: AnyObject\n): StaticGraphProps | never {\n if (typeof data.imageSrc !== \"string\" || data.imageSrc.length === 0) {\n throw new TypeError(\"invalid image src.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.STATIC_GRAPH,\n imageSrc: data.imageSrc,\n showLastValueTooltip: parseShowLastValueTooltip(data.showLastValueTooltip),\n statusImageSrc: notEmptyStringOr(data.statusImageSrc, null),\n lastValue: notEmptyStringOr(data.lastValue, null),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class StaticGraph extends Item {\n protected createDomElement(): HTMLElement {\n const imgSrc = this.props.statusImageSrc || this.props.imageSrc;\n const element = document.createElement(\"div\");\n element.className = \"static-graph\";\n element.style.background = `url(${imgSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n\n // Show last value in a tooltip.\n if (\n this.props.lastValue !== null &&\n this.props.showLastValueTooltip !== \"disabled\"\n ) {\n element.className = \"static-graph image forced_title\";\n element.setAttribute(\"data-use_title_for_force_title\", \"1\");\n element.setAttribute(\"data-title\", this.props.lastValue);\n }\n\n return element;\n }\n}\n","import { LinkedVisualConsoleProps, AnyObject } from \"../lib/types\";\nimport { linkedVCPropsDecoder } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type IconProps = {\n type: ItemType.ICON;\n imageSrc: string; // URL?\n} & ItemProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the icon props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function iconPropsDecoder(data: AnyObject): IconProps | never {\n if (typeof data.imageSrc !== \"string\" || data.imageSrc.length === 0) {\n throw new TypeError(\"invalid image src.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.ICON,\n imageSrc: data.imageSrc,\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Icon extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"icon\";\n element.style.background = `url(${this.props.imageSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n\n return element;\n }\n}\n","import {\n WithModuleProps,\n LinkedVisualConsoleProps,\n AnyObject\n} from \"../lib/types\";\nimport { modulePropsDecoder, linkedVCPropsDecoder } from \"../lib\";\nimport Item, { itemBasePropsDecoder, ItemType, ItemProps } from \"../Item\";\n\nexport type ColorCloudProps = {\n type: ItemType.COLOR_CLOUD;\n color: string;\n // TODO: Add the rest of the color cloud values?\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the static graph props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function colorCloudPropsDecoder(\n data: AnyObject\n): ColorCloudProps | never {\n // TODO: Validate the color.\n if (typeof data.color !== \"string\" || data.color.length === 0) {\n throw new TypeError(\"invalid color.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.COLOR_CLOUD,\n color: data.color,\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nconst svgNS = \"http://www.w3.org/2000/svg\";\n\nexport default class ColorCloud extends Item {\n protected createDomElement(): HTMLElement {\n const container: HTMLDivElement = document.createElement(\"div\");\n container.className = \"color-cloud\";\n\n // Add the SVG.\n container.append(this.createSvgElement());\n\n return container;\n }\n\n protected resizeElement(width: number): void {\n super.resizeElement(width, width);\n }\n\n public createSvgElement(): SVGSVGElement {\n const gradientId = `grad_${this.props.id}`;\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 100\");\n\n // Defs.\n const defs = document.createElementNS(svgNS, \"defs\");\n // Radial gradient.\n const radialGradient = document.createElementNS(svgNS, \"radialGradient\");\n radialGradient.setAttribute(\"id\", gradientId);\n radialGradient.setAttribute(\"cx\", \"50%\");\n radialGradient.setAttribute(\"cy\", \"50%\");\n radialGradient.setAttribute(\"r\", \"50%\");\n radialGradient.setAttribute(\"fx\", \"50%\");\n radialGradient.setAttribute(\"fy\", \"50%\");\n // Stops.\n const stop0 = document.createElementNS(svgNS, \"stop\");\n stop0.setAttribute(\"offset\", \"0%\");\n stop0.setAttribute(\n \"style\",\n `stop-color:${this.props.color};stop-opacity:0.9`\n );\n const stop100 = document.createElementNS(svgNS, \"stop\");\n stop100.setAttribute(\"offset\", \"100%\");\n stop100.setAttribute(\n \"style\",\n `stop-color:${this.props.color};stop-opacity:0`\n );\n // Circle.\n const circle = document.createElementNS(svgNS, \"circle\");\n circle.setAttribute(\"fill\", `url(#${gradientId})`);\n circle.setAttribute(\"cx\", \"50%\");\n circle.setAttribute(\"cy\", \"50%\");\n circle.setAttribute(\"r\", \"50%\");\n\n // Append elements.\n radialGradient.append(stop0, stop100);\n defs.append(radialGradient);\n svg.append(defs, circle);\n\n return svg;\n }\n}\n","import { LinkedVisualConsoleProps, AnyObject } from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n parseIntOr,\n notEmptyStringOr,\n stringIsEmpty,\n decodeBase64,\n parseBoolean\n} from \"../lib\";\nimport Item, { ItemProps, itemBasePropsDecoder, ItemType } from \"../Item\";\n\nexport type GroupProps = {\n type: ItemType.GROUP_ITEM;\n groupId: number;\n imageSrc: string | null; // URL?\n statusImageSrc: string | null;\n showStatistics: boolean;\n html?: string | null;\n} & ItemProps &\n LinkedVisualConsoleProps;\n\nfunction extractHtml(data: AnyObject): string | null {\n if (!stringIsEmpty(data.html)) return data.html;\n if (!stringIsEmpty(data.encodedHtml)) return decodeBase64(data.encodedHtml);\n return null;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the group props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function groupPropsDecoder(data: AnyObject): GroupProps | never {\n if (\n (typeof data.imageSrc !== \"string\" || data.imageSrc.length === 0) &&\n data.encodedHtml === null\n ) {\n throw new TypeError(\"invalid image src.\");\n }\n if (parseIntOr(data.groupId, null) === null) {\n throw new TypeError(\"invalid group Id.\");\n }\n\n const showStatistics = parseBoolean(data.showStatistics);\n const html = showStatistics ? extractHtml(data) : null;\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.GROUP_ITEM,\n groupId: parseInt(data.groupId),\n imageSrc: notEmptyStringOr(data.imageSrc, null),\n statusImageSrc: notEmptyStringOr(data.statusImageSrc, null),\n showStatistics,\n html,\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Group extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"group\";\n\n if (!this.props.showStatistics && this.props.statusImageSrc !== null) {\n // Icon with status.\n element.style.background = `url(${this.props.statusImageSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n } else if (this.props.showStatistics && this.props.html != null) {\n // Stats table.\n element.innerHTML = this.props.html;\n }\n\n return element;\n }\n}\n","import \"./styles.css\";\n\nimport {\n LinkedVisualConsoleProps,\n AnyObject,\n Size,\n ItemMeta\n} from \"../../lib/types\";\nimport {\n linkedVCPropsDecoder,\n parseIntOr,\n parseBoolean,\n prefixedCssRules,\n notEmptyStringOr,\n humanDate,\n humanTime\n} from \"../../lib\";\nimport Item, { ItemProps, itemBasePropsDecoder, ItemType } from \"../../Item\";\n\nexport type ClockProps = {\n type: ItemType.CLOCK;\n clockType: \"analogic\" | \"digital\";\n clockFormat: \"datetime\" | \"time\";\n clockTimezone: string;\n clockTimezoneOffset: number; // Offset of the timezone to UTC in seconds.\n showClockTimezone: boolean;\n color?: string | null;\n} & ItemProps &\n LinkedVisualConsoleProps;\n\n/**\n * Extract a valid enum value from a raw unknown value.\n * @param clockType Raw value.\n */\nconst parseClockType = (clockType: unknown): ClockProps[\"clockType\"] => {\n switch (clockType) {\n case \"analogic\":\n case \"digital\":\n return clockType;\n default:\n return \"analogic\";\n }\n};\n\n/**\n * Extract a valid enum value from a raw unknown value.\n * @param clockFormat Raw value.\n */\nconst parseClockFormat = (clockFormat: unknown): ClockProps[\"clockFormat\"] => {\n switch (clockFormat) {\n case \"datetime\":\n case \"time\":\n return clockFormat;\n default:\n return \"datetime\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the clock props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function clockPropsDecoder(data: AnyObject): ClockProps | never {\n if (\n typeof data.clockTimezone !== \"string\" ||\n data.clockTimezone.length === 0\n ) {\n throw new TypeError(\"invalid timezone.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.CLOCK,\n clockType: parseClockType(data.clockType),\n clockFormat: parseClockFormat(data.clockFormat),\n clockTimezone: data.clockTimezone,\n clockTimezoneOffset: parseIntOr(data.clockTimezoneOffset, 0),\n showClockTimezone: parseBoolean(data.showClockTimezone),\n color: notEmptyStringOr(data.color, null),\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Clock extends Item {\n public static readonly TICK_INTERVAL = 1000; // In ms.\n private intervalRef: number | null = null;\n\n public constructor(props: ClockProps, meta: ItemMeta) {\n // Call the superclass constructor.\n super(props, meta);\n\n /* The item is already loaded and inserted into the DOM.\n * The class properties are now initialized.\n * Now you can modify the item, add event handlers, timers, etc.\n */\n\n /* The use of the arrow function is important here. startTick will\n * use the function passed as an argument to call the global setInterval\n * function. The interval, timeout or event functions, among other, are\n * called into another execution loop and using a different context.\n * The arrow functions, unlike the classic functions, doesn't create\n * their own context (this), so their context at execution time will be\n * use the current context at the declaration time.\n * http://es6-features.org/#Lexicalthis\n */\n this.startTick(\n () => {\n // Replace the old element with the updated date.\n this.childElementRef.innerHTML = this.createClock().innerHTML;\n },\n /* The analogic clock doesn't need to tick,\n * but it will be refreshed every 20 seconds\n * to avoid a desync caused by page freezes.\n */\n this.props.clockType === \"analogic\" ? 20000 : Clock.TICK_INTERVAL\n );\n }\n\n /**\n * Wrap a window.clearInterval call.\n */\n private stopTick(): void {\n if (this.intervalRef !== null) {\n window.clearInterval(this.intervalRef);\n this.intervalRef = null;\n }\n }\n\n /**\n * Wrap a window.setInterval call.\n * @param handler Function to be called every time the interval\n * timer is reached.\n * @param interval Number in milliseconds for the interval timer.\n */\n private startTick(\n handler: TimerHandler,\n interval: number = Clock.TICK_INTERVAL\n ): void {\n this.stopTick();\n this.intervalRef = window.setInterval(handler, interval);\n }\n\n /**\n * Create a element which contains the DOM representation of the item.\n * @return DOM Element.\n * @override\n */\n protected createDomElement(): HTMLElement | never {\n return this.createClock();\n }\n\n /**\n * To remove the event listeners and the elements from the DOM.\n * @override\n */\n public remove(): void {\n // Clear the interval.\n this.stopTick();\n // Call to the parent clean function.\n super.remove();\n }\n\n /**\n * @override Item.resizeElement\n * Resize the DOM content container.\n * @param width\n * @param height\n */\n protected resizeElement(width: number, height: number): void {\n const { width: newWidth, height: newHeight } = this.getElementSize(\n width,\n height\n ); // Destructuring assigment: http://es6-features.org/#ObjectMatchingShorthandNotation\n super.resizeElement(newWidth, newHeight);\n // Re-render the item to force it calculate a new font size.\n if (this.props.clockType === \"digital\") {\n // Replace the old element with the updated date.\n this.childElementRef.innerHTML = this.createClock().innerHTML;\n }\n }\n\n /**\n * Create a element which contains a representation of a clock.\n * It choose between the clock types.\n * @return DOM Element.\n * @throws Error.\n */\n private createClock(): HTMLElement | never {\n switch (this.props.clockType) {\n case \"analogic\":\n return this.createAnalogicClock();\n case \"digital\":\n return this.createDigitalClock();\n default:\n throw new Error(\"invalid clock type.\");\n }\n }\n\n /**\n * Create a element which contains a representation of an analogic clock.\n * @return DOM Element.\n */\n private createAnalogicClock(): HTMLElement {\n const svgNS = \"http://www.w3.org/2000/svg\";\n const colors = {\n watchFace: \"#FFFFF0\",\n watchFaceBorder: \"#242124\",\n mark: \"#242124\",\n handDark: \"#242124\",\n handLight: \"#525252\",\n secondHand: \"#DC143C\"\n };\n\n const { width, height } = this.getElementSize(); // Destructuring assigment: http://es6-features.org/#ObjectMatchingShorthandNotation\n\n // Calculate font size to adapt the font to the item size.\n const baseTimeFontSize = 20; // Per 100px of width.\n const dateFontSizeMultiplier = 0.5;\n const dateFontSize =\n (baseTimeFontSize * dateFontSizeMultiplier * width) / 100;\n\n const div = document.createElement(\"div\");\n div.className = \"analogic-clock\";\n div.style.width = `${width}px`;\n div.style.height = `${height}px`;\n\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 100\");\n\n // Clock face.\n const clockFace = document.createElementNS(svgNS, \"g\");\n clockFace.setAttribute(\"class\", \"clockface\");\n const clockFaceBackground = document.createElementNS(svgNS, \"circle\");\n clockFaceBackground.setAttribute(\"cx\", \"50\");\n clockFaceBackground.setAttribute(\"cy\", \"50\");\n clockFaceBackground.setAttribute(\"r\", \"48\");\n clockFaceBackground.setAttribute(\"fill\", colors.watchFace);\n clockFaceBackground.setAttribute(\"stroke\", colors.watchFaceBorder);\n clockFaceBackground.setAttribute(\"stroke-width\", \"2\");\n clockFaceBackground.setAttribute(\"stroke-linecap\", \"round\");\n // Insert the clockface background into the clockface group.\n clockFace.append(clockFaceBackground);\n\n // Timezone complication.\n const city = this.getHumanTimezone();\n if (city.length > 0) {\n const timezoneComplication = document.createElementNS(svgNS, \"text\");\n timezoneComplication.setAttribute(\"text-anchor\", \"middle\");\n timezoneComplication.setAttribute(\"font-size\", \"8\");\n timezoneComplication.setAttribute(\n \"transform\",\n \"translate(30 50) rotate(90)\" // Rotate to counter the clock rotation.\n );\n timezoneComplication.setAttribute(\"fill\", colors.mark);\n timezoneComplication.textContent = city;\n clockFace.append(timezoneComplication);\n }\n\n // Marks group.\n const marksGroup = document.createElementNS(svgNS, \"g\");\n marksGroup.setAttribute(\"class\", \"marks\");\n // Build the 12 hours mark.\n const mainMarkGroup = document.createElementNS(svgNS, \"g\");\n mainMarkGroup.setAttribute(\"class\", \"mark\");\n mainMarkGroup.setAttribute(\"transform\", \"translate(50 50)\");\n const mark1a = document.createElementNS(svgNS, \"line\");\n mark1a.setAttribute(\"x1\", \"36\");\n mark1a.setAttribute(\"y1\", \"0\");\n mark1a.setAttribute(\"x2\", \"46\");\n mark1a.setAttribute(\"y2\", \"0\");\n mark1a.setAttribute(\"stroke\", colors.mark);\n mark1a.setAttribute(\"stroke-width\", \"5\");\n const mark1b = document.createElementNS(svgNS, \"line\");\n mark1b.setAttribute(\"x1\", \"36\");\n mark1b.setAttribute(\"y1\", \"0\");\n mark1b.setAttribute(\"x2\", \"46\");\n mark1b.setAttribute(\"y2\", \"0\");\n mark1b.setAttribute(\"stroke\", colors.watchFace);\n mark1b.setAttribute(\"stroke-width\", \"1\");\n // Insert the 12 mark lines into their group.\n mainMarkGroup.append(mark1a, mark1b);\n // Insert the main mark into the marks group.\n marksGroup.append(mainMarkGroup);\n // Build the rest of the marks.\n for (let i = 1; i < 60; i++) {\n const mark = document.createElementNS(svgNS, \"line\");\n mark.setAttribute(\"y1\", \"0\");\n mark.setAttribute(\"y2\", \"0\");\n mark.setAttribute(\"stroke\", colors.mark);\n mark.setAttribute(\"transform\", `translate(50 50) rotate(${i * 6})`);\n\n if (i % 5 === 0) {\n mark.setAttribute(\"x1\", \"38\");\n mark.setAttribute(\"x2\", \"46\");\n mark.setAttribute(\"stroke-width\", i % 15 === 0 ? \"2\" : \"1\");\n } else {\n mark.setAttribute(\"x1\", \"42\");\n mark.setAttribute(\"x2\", \"46\");\n mark.setAttribute(\"stroke-width\", \"0.5\");\n }\n\n // Insert the mark into the marks group.\n marksGroup.append(mark);\n }\n\n /* Clock hands */\n\n // Hour hand.\n const hourHand = document.createElementNS(svgNS, \"g\");\n hourHand.setAttribute(\"class\", \"hour-hand\");\n hourHand.setAttribute(\"transform\", \"translate(50 50)\");\n // This will go back and will act like a border.\n const hourHandA = document.createElementNS(svgNS, \"line\");\n hourHandA.setAttribute(\"class\", \"hour-hand-a\");\n hourHandA.setAttribute(\"x1\", \"0\");\n hourHandA.setAttribute(\"y1\", \"0\");\n hourHandA.setAttribute(\"x2\", \"30\");\n hourHandA.setAttribute(\"y2\", \"0\");\n hourHandA.setAttribute(\"stroke\", colors.handLight);\n hourHandA.setAttribute(\"stroke-width\", \"4\");\n hourHandA.setAttribute(\"stroke-linecap\", \"round\");\n // This will go in front of the previous line.\n const hourHandB = document.createElementNS(svgNS, \"line\");\n hourHandB.setAttribute(\"class\", \"hour-hand-b\");\n hourHandB.setAttribute(\"x1\", \"0\");\n hourHandB.setAttribute(\"y1\", \"0\");\n hourHandB.setAttribute(\"x2\", \"29.9\");\n hourHandB.setAttribute(\"y2\", \"0\");\n hourHandB.setAttribute(\"stroke\", colors.handDark);\n hourHandB.setAttribute(\"stroke-width\", \"3.1\");\n hourHandB.setAttribute(\"stroke-linecap\", \"round\");\n // Append the elements to finish the hour hand.\n hourHand.append(hourHandA, hourHandB);\n\n // Minute hand.\n const minuteHand = document.createElementNS(svgNS, \"g\");\n minuteHand.setAttribute(\"class\", \"minute-hand\");\n minuteHand.setAttribute(\"transform\", \"translate(50 50)\");\n // This will go back and will act like a border.\n const minuteHandA = document.createElementNS(svgNS, \"line\");\n minuteHandA.setAttribute(\"class\", \"minute-hand-a\");\n minuteHandA.setAttribute(\"x1\", \"0\");\n minuteHandA.setAttribute(\"y1\", \"0\");\n minuteHandA.setAttribute(\"x2\", \"40\");\n minuteHandA.setAttribute(\"y2\", \"0\");\n minuteHandA.setAttribute(\"stroke\", colors.handLight);\n minuteHandA.setAttribute(\"stroke-width\", \"2\");\n minuteHandA.setAttribute(\"stroke-linecap\", \"round\");\n // This will go in front of the previous line.\n const minuteHandB = document.createElementNS(svgNS, \"line\");\n minuteHandB.setAttribute(\"class\", \"minute-hand-b\");\n minuteHandB.setAttribute(\"x1\", \"0\");\n minuteHandB.setAttribute(\"y1\", \"0\");\n minuteHandB.setAttribute(\"x2\", \"39.9\");\n minuteHandB.setAttribute(\"y2\", \"0\");\n minuteHandB.setAttribute(\"stroke\", colors.handDark);\n minuteHandB.setAttribute(\"stroke-width\", \"1.5\");\n minuteHandB.setAttribute(\"stroke-linecap\", \"round\");\n const minuteHandPin = document.createElementNS(svgNS, \"circle\");\n minuteHandPin.setAttribute(\"r\", \"3\");\n minuteHandPin.setAttribute(\"fill\", colors.handDark);\n // Append the elements to finish the minute hand.\n minuteHand.append(minuteHandA, minuteHandB, minuteHandPin);\n\n // Second hand.\n const secondHand = document.createElementNS(svgNS, \"g\");\n secondHand.setAttribute(\"class\", \"second-hand\");\n secondHand.setAttribute(\"transform\", \"translate(50 50)\");\n const secondHandBar = document.createElementNS(svgNS, \"line\");\n secondHandBar.setAttribute(\"x1\", \"0\");\n secondHandBar.setAttribute(\"y1\", \"0\");\n secondHandBar.setAttribute(\"x2\", \"46\");\n secondHandBar.setAttribute(\"y2\", \"0\");\n secondHandBar.setAttribute(\"stroke\", colors.secondHand);\n secondHandBar.setAttribute(\"stroke-width\", \"1\");\n secondHandBar.setAttribute(\"stroke-linecap\", \"round\");\n const secondHandPin = document.createElementNS(svgNS, \"circle\");\n secondHandPin.setAttribute(\"r\", \"2\");\n secondHandPin.setAttribute(\"fill\", colors.secondHand);\n // Append the elements to finish the second hand.\n secondHand.append(secondHandBar, secondHandPin);\n\n // Pin.\n const pin = document.createElementNS(svgNS, \"circle\");\n pin.setAttribute(\"cx\", \"50\");\n pin.setAttribute(\"cy\", \"50\");\n pin.setAttribute(\"r\", \"0.3\");\n pin.setAttribute(\"fill\", colors.handDark);\n\n // Get the hand angles.\n const date = this.getOriginDate();\n const seconds = date.getSeconds();\n const minutes = date.getMinutes();\n const hours = date.getHours();\n const secAngle = (360 / 60) * seconds;\n const minuteAngle = (360 / 60) * minutes + (360 / 60) * (seconds / 60);\n const hourAngle = (360 / 12) * hours + (360 / 12) * (minutes / 60);\n // Set the clock time by moving the hands.\n hourHand.setAttribute(\"transform\", `translate(50 50) rotate(${hourAngle})`);\n minuteHand.setAttribute(\n \"transform\",\n `translate(50 50) rotate(${minuteAngle})`\n );\n secondHand.setAttribute(\n \"transform\",\n `translate(50 50) rotate(${secAngle})`\n );\n\n // Build the clock\n svg.append(clockFace, marksGroup, hourHand, minuteHand, secondHand, pin);\n // Rotate the clock to its normal position.\n svg.setAttribute(\"transform\", \"rotate(-90)\");\n\n /* Add the animation declaration to the container.\n * Since the animation keyframes need to know the\n * start angle, this angle is dynamic (current time),\n * and we can't edit keyframes through javascript\n * safely and with backwards compatibility, we need\n * to inject it.\n */\n div.innerHTML = `\n \n `;\n // Add the clock to the container\n div.append(svg);\n\n // Date.\n if (this.props.clockFormat === \"datetime\") {\n const dateElem: HTMLSpanElement = document.createElement(\"span\");\n dateElem.className = \"date\";\n dateElem.textContent = humanDate(date, \"default\");\n dateElem.style.fontSize = `${dateFontSize}px`;\n if (this.props.color) dateElem.style.color = this.props.color;\n div.append(dateElem);\n }\n\n return div;\n }\n\n /**\n * Create a element which contains a representation of a digital clock.\n * @return DOM Element.\n */\n private createDigitalClock(): HTMLElement {\n const element: HTMLDivElement = document.createElement(\"div\");\n element.className = \"digital-clock\";\n\n const { width } = this.getElementSize(); // Destructuring assigment: http://es6-features.org/#ObjectMatchingShorthandNotation\n\n // Calculate font size to adapt the font to the item size.\n const baseTimeFontSize = 20; // Per 100px of width.\n const dateFontSizeMultiplier = 0.5;\n const tzFontSizeMultiplier = 6 / this.props.clockTimezone.length;\n const timeFontSize = (baseTimeFontSize * width) / 100;\n const dateFontSize =\n (baseTimeFontSize * dateFontSizeMultiplier * width) / 100;\n const tzFontSize = Math.min(\n (baseTimeFontSize * tzFontSizeMultiplier * width) / 100,\n (width / 100) * 10\n );\n\n // Date calculated using the original timezone.\n const date = this.getOriginDate();\n\n // Date.\n if (this.props.clockFormat === \"datetime\") {\n const dateElem: HTMLSpanElement = document.createElement(\"span\");\n dateElem.className = \"date\";\n dateElem.textContent = humanDate(date, \"default\");\n dateElem.style.fontSize = `${dateFontSize}px`;\n if (this.props.color) dateElem.style.color = this.props.color;\n element.append(dateElem);\n }\n\n // Time.\n const timeElem: HTMLSpanElement = document.createElement(\"span\");\n timeElem.className = \"time\";\n timeElem.textContent = humanTime(date);\n timeElem.style.fontSize = `${timeFontSize}px`;\n if (this.props.color) timeElem.style.color = this.props.color;\n element.append(timeElem);\n\n // City name.\n const city = this.getHumanTimezone();\n if (city.length > 0) {\n const tzElem: HTMLSpanElement = document.createElement(\"span\");\n tzElem.className = \"timezone\";\n tzElem.textContent = city;\n tzElem.style.fontSize = `${tzFontSize}px`;\n if (this.props.color) tzElem.style.color = this.props.color;\n element.append(tzElem);\n }\n\n return element;\n }\n\n /**\n * Generate the current date using the timezone offset stored into the properties.\n * @return The current date.\n */\n private getOriginDate(initialDate: Date | null = null): Date {\n const d = initialDate ? initialDate : new Date();\n const targetTZOffset = this.props.clockTimezoneOffset * 1000; // In ms.\n const localTZOffset = d.getTimezoneOffset() * 60 * 1000; // In ms.\n const utimestamp = d.getTime() + targetTZOffset + localTZOffset;\n\n return new Date(utimestamp);\n }\n\n /**\n * Extract a human readable city name from the timezone text.\n * @param timezone Timezone text.\n */\n public getHumanTimezone(timezone: string = this.props.clockTimezone): string {\n const [, city = \"\"] = timezone.split(\"/\");\n return city.replace(\"_\", \" \");\n }\n\n /**\n * Generate a element size using the current size and the default values.\n * @return The size.\n */\n private getElementSize(\n width: number = this.props.width,\n height: number = this.props.height\n ): Size {\n switch (this.props.clockType) {\n case \"analogic\": {\n let diameter = 100; // Default value.\n\n if (width > 0 && height > 0) {\n diameter = Math.min(width, height);\n } else if (width > 0) {\n diameter = width;\n } else if (height > 0) {\n diameter = height;\n }\n\n return {\n width: diameter,\n height: diameter\n };\n }\n case \"digital\": {\n if (width > 0 && height > 0) {\n // The proportion of the clock should be (width = height / 2) aproximately.\n height = width / 2 < height ? width / 2 : height;\n } else if (width > 0) {\n height = width / 2;\n } else if (height > 0) {\n // The proportion of the clock should be (height * 2 = width) aproximately.\n width = height * 2;\n } else {\n width = 100; // Default value.\n height = 50; // Default value.\n }\n\n return {\n width,\n height\n };\n }\n default:\n throw new Error(\"invalid clock type.\");\n }\n }\n}\n","import { AnyObject } from \"../lib/types\";\nimport { parseIntOr, notEmptyStringOr } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\ninterface BoxProps extends ItemProps {\n // Overrided properties.\n readonly type: ItemType.BOX_ITEM;\n label: null;\n isLinkEnabled: false;\n parentId: null;\n aclGroupId: null;\n // Custom properties.\n borderWidth: number;\n borderColor: string | null;\n fillColor: string | null;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the item props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function boxPropsDecoder(data: AnyObject): BoxProps | never {\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.BOX_ITEM,\n label: null,\n isLinkEnabled: false,\n parentId: null,\n aclGroupId: null,\n // Custom properties.\n borderWidth: parseIntOr(data.borderWidth, 0),\n borderColor: notEmptyStringOr(data.borderColor, null),\n fillColor: notEmptyStringOr(data.fillColor, null)\n };\n}\n\nexport default class Box extends Item {\n protected createDomElement(): HTMLElement {\n const box: HTMLDivElement = document.createElement(\"div\");\n box.className = \"box\";\n // To prevent this item to expand beyond its parent.\n box.style.boxSizing = \"border-box\";\n\n if (this.props.fillColor) {\n box.style.backgroundColor = this.props.fillColor;\n }\n\n // Border.\n if (this.props.borderWidth > 0) {\n box.style.borderStyle = \"solid\";\n // Control the max width to prevent this item to expand beyond its parent.\n const maxBorderWidth = Math.min(this.props.width, this.props.height) / 2;\n const borderWidth = Math.min(this.props.borderWidth, maxBorderWidth);\n box.style.borderWidth = `${borderWidth}px`;\n\n if (this.props.borderColor) {\n box.style.borderColor = this.props.borderColor;\n }\n }\n\n return box;\n }\n}\n","import { AnyObject, Position, Size, ItemMeta } from \"../lib/types\";\nimport { parseIntOr, notEmptyStringOr } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\ninterface LineProps extends ItemProps {\n // Overrided properties.\n readonly type: ItemType.LINE_ITEM;\n label: null;\n isLinkEnabled: false;\n parentId: null;\n aclGroupId: null;\n // Custom properties.\n startPosition: Position;\n endPosition: Position;\n lineWidth: number;\n color: string | null;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the item props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function linePropsDecoder(data: AnyObject): LineProps | never {\n const props: LineProps = {\n ...itemBasePropsDecoder({ ...data, width: 1, height: 1 }), // Object spread. It will merge the properties of the two objects.\n type: ItemType.LINE_ITEM,\n label: null,\n isLinkEnabled: false,\n parentId: null,\n aclGroupId: null,\n // Initialize Position & Size.\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n // Custom properties.\n startPosition: {\n x: parseIntOr(data.startX, 0),\n y: parseIntOr(data.startY, 0)\n },\n endPosition: {\n x: parseIntOr(data.endX, 0),\n y: parseIntOr(data.endY, 0)\n },\n lineWidth: parseIntOr(data.lineWidth || data.borderWidth, 1),\n color: notEmptyStringOr(data.borderColor || data.color, null)\n };\n\n /*\n * We need to enhance the props with the extracted size and position\n * of the box cause there are missing at the props update. A better\n * solution would be overriding the props setter to do it there, but\n * the language doesn't allow it while targetting ES5.\n * TODO: We need to figure out a more consistent solution.\n */\n\n return {\n ...props,\n // Enhance the props extracting the box size and position.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n ...Line.extractBoxSizeAndPosition(props)\n };\n}\n\nexport default class Line extends Item {\n /**\n * @override\n */\n public constructor(props: LineProps, meta: ItemMeta) {\n /*\n * We need to override the constructor cause we need to obtain\n * the\n * box size and position from the start and finish points\n * of the line.\n */\n super(\n {\n ...props,\n ...Line.extractBoxSizeAndPosition(props)\n },\n {\n ...meta,\n editMode: false\n }\n );\n }\n\n /**\n * Clasic and protected version of the setter of the `meta` property.\n * Useful to override it from children classes.\n * @param newProps\n * @override Item.setMeta\n */\n public setMeta(newMetadata: ItemMeta) {\n super.setMeta({\n ...newMetadata,\n editMode: false\n });\n }\n\n /**\n * @override\n * To create the item's DOM representation.\n * @return Item.\n */\n protected createDomElement(): HTMLElement {\n const element: HTMLDivElement = document.createElement(\"div\");\n element.className = \"line\";\n\n const svgNS = \"http://www.w3.org/2000/svg\";\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n // Set SVG size.\n svg.setAttribute(\n \"width\",\n (this.props.width + this.props.lineWidth).toString()\n );\n svg.setAttribute(\n \"height\",\n (this.props.height + this.props.lineWidth).toString()\n );\n const line = document.createElementNS(svgNS, \"line\");\n line.setAttribute(\n \"x1\",\n `${this.props.startPosition.x - this.props.x + this.props.lineWidth / 2}`\n );\n line.setAttribute(\n \"y1\",\n `${this.props.startPosition.y - this.props.y + this.props.lineWidth / 2}`\n );\n line.setAttribute(\n \"x2\",\n `${this.props.endPosition.x - this.props.x + this.props.lineWidth / 2}`\n );\n line.setAttribute(\n \"y2\",\n `${this.props.endPosition.y - this.props.y + this.props.lineWidth / 2}`\n );\n line.setAttribute(\"stroke\", this.props.color || \"black\");\n line.setAttribute(\"stroke-width\", this.props.lineWidth.toString());\n\n svg.append(line);\n element.append(svg);\n\n return element;\n }\n\n /**\n * Extract the size and position of the box from\n * the start and the finish of the line.\n * @param props Item properties.\n */\n public static extractBoxSizeAndPosition(props: LineProps): Size & Position {\n return {\n width: Math.abs(props.startPosition.x - props.endPosition.x),\n height: Math.abs(props.startPosition.y - props.endPosition.y),\n x: Math.min(props.startPosition.x, props.endPosition.x),\n y: Math.min(props.startPosition.y, props.endPosition.y)\n };\n }\n}\n","import { LinkedVisualConsoleProps, AnyObject } from \"../lib/types\";\nimport { linkedVCPropsDecoder } from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type LabelProps = {\n type: ItemType.LABEL;\n} & ItemProps &\n LinkedVisualConsoleProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the label props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function labelPropsDecoder(data: AnyObject): LabelProps | never {\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.LABEL,\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class Label extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"label\";\n element.innerHTML = this.getLabelWithMacrosReplaced();\n\n return element;\n }\n\n /**\n * @override Item.createLabelDomElement\n * Create a new label for the visual console item.\n * @return Item label.\n */\n public createLabelDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"visual-console-item-label\";\n // Always return an empty label.\n return element;\n }\n}\n","import {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n parseIntOr,\n modulePropsDecoder,\n replaceMacros\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type SimpleValueProps = {\n type: ItemType.SIMPLE_VALUE;\n valueType: \"string\" | \"image\";\n value: string;\n} & (\n | {\n processValue: \"none\";\n }\n | {\n processValue: \"avg\" | \"max\" | \"min\";\n period: number;\n }) &\n ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Extract a valid enum value from a raw value type.\n * @param valueType Raw value.\n */\nconst parseValueType = (valueType: unknown): SimpleValueProps[\"valueType\"] => {\n switch (valueType) {\n case \"string\":\n case \"image\":\n return valueType;\n default:\n return \"string\";\n }\n};\n\n/**\n * Extract a valid enum value from a raw process value.\n * @param processValue Raw value.\n */\nconst parseProcessValue = (\n processValue: unknown\n): SimpleValueProps[\"processValue\"] => {\n switch (processValue) {\n case \"none\":\n case \"avg\":\n case \"max\":\n case \"min\":\n return processValue;\n default:\n return \"none\";\n }\n};\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the simple value props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function simpleValuePropsDecoder(\n data: AnyObject\n): SimpleValueProps | never {\n if (typeof data.value !== \"string\" || data.value.length === 0) {\n throw new TypeError(\"invalid value\");\n }\n\n const processValue = parseProcessValue(data.processValue);\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.SIMPLE_VALUE,\n valueType: parseValueType(data.valueType),\n value: data.value,\n ...(processValue === \"none\"\n ? { processValue }\n : { processValue, period: parseIntOr(data.period, 0) }), // Object spread. It will merge the properties of the two objects.\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nexport default class SimpleValue extends Item {\n protected createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"simple-value\";\n\n if (this.props.valueType === \"image\") {\n const img = document.createElement(\"img\");\n img.src = this.props.value;\n element.append(img);\n } else {\n // Add the value to the label and show it.\n let text = this.props.value;\n let label = this.getLabelWithMacrosReplaced();\n if (label.length > 0) {\n text = replaceMacros([{ macro: /\\(?_VALUE_\\)?/i, value: text }], label);\n }\n\n element.innerHTML = text;\n }\n\n return element;\n }\n\n /**\n * @override Item.createLabelDomElement\n * Create a new label for the visual console item.\n * @return Item label.\n */\n protected createLabelDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"visual-console-item-label\";\n // Always return an empty label.\n return element;\n }\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import curveLinear from \"./linear\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","export var slice = Array.prototype.slice;\n","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\n\nexport default {\n draw: function(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","import {pi, tau} from \"../math\";\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","import {pi, tau} from \"../math\";\n\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","export default function() {}\n","var sqrt3 = Math.sqrt(3);\n\nexport default {\n draw: function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // proceed\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop\";\nimport {point} from \"./basis\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import {Basis} from \"./basis\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop\";\nimport {point} from \"./cardinal\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math\";\nimport {Cardinal} from \"./cardinal\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed\";\nimport noop from \"../noop\";\nimport {point} from \"./catmullRom\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen\";\nimport {point} from \"./catmullRom\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import noop from \"../noop\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","import ascending from \"./ascending\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import { arc as arcFactory } from \"d3-shape\";\n\nimport {\n LinkedVisualConsoleProps,\n AnyObject,\n WithModuleProps\n} from \"../lib/types\";\nimport {\n linkedVCPropsDecoder,\n modulePropsDecoder,\n notEmptyStringOr,\n parseIntOr,\n parseFloatOr\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type PercentileProps = {\n type: ItemType.PERCENTILE_BAR;\n percentileType:\n | \"progress-bar\"\n | \"bubble\"\n | \"circular-progress-bar\"\n | \"circular-progress-bar-alt\";\n valueType: \"percent\" | \"value\";\n minValue: number | null;\n maxValue: number | null;\n color: string | null;\n labelColor: string | null;\n value: number | null;\n unit: string | null;\n} & ItemProps &\n WithModuleProps &\n LinkedVisualConsoleProps;\n\n/**\n * Extract a valid enum value from a raw type value.\n * @param type Raw value.\n */\nfunction extractPercentileType(\n type: unknown\n): PercentileProps[\"percentileType\"] {\n switch (type) {\n case \"progress-bar\":\n case \"bubble\":\n case \"circular-progress-bar\":\n case \"circular-progress-bar-alt\":\n return type;\n default:\n case ItemType.PERCENTILE_BAR:\n return \"progress-bar\";\n case ItemType.PERCENTILE_BUBBLE:\n return \"bubble\";\n case ItemType.CIRCULAR_PROGRESS_BAR:\n return \"circular-progress-bar\";\n case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:\n return \"circular-progress-bar-alt\";\n }\n}\n\n/**\n * Extract a valid enum value from a raw value type value.\n * @param type Raw value.\n */\nfunction extractValueType(valueType: unknown): PercentileProps[\"valueType\"] {\n switch (valueType) {\n case \"percent\":\n case \"value\":\n return valueType;\n default:\n return \"percent\";\n }\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the percentile props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function percentilePropsDecoder(\n data: AnyObject\n): PercentileProps | never {\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.PERCENTILE_BAR,\n percentileType: extractPercentileType(data.percentileType || data.type),\n valueType: extractValueType(data.valueType),\n minValue: parseIntOr(data.minValue, null),\n maxValue: parseIntOr(data.maxValue, null),\n color: notEmptyStringOr(data.color, null),\n labelColor: notEmptyStringOr(data.labelColor, null),\n value: parseFloatOr(data.value, null),\n unit: notEmptyStringOr(data.unit, null),\n ...modulePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n ...linkedVCPropsDecoder(data) // Object spread. It will merge the properties of the two objects.\n };\n}\n\nconst svgNS = \"http://www.w3.org/2000/svg\";\n\nexport default class Percentile extends Item {\n protected createDomElement(): HTMLElement {\n const colors = {\n background: \"#000000\",\n progress: this.props.color || \"#F0F0F0\",\n text: this.props.labelColor || \"#444444\"\n };\n // Progress.\n const progress = this.getProgress();\n // Main element.\n const element = document.createElement(\"div\");\n // SVG container.\n const svg = document.createElementNS(svgNS, \"svg\");\n\n var formatValue;\n if (this.props.value != null) {\n if (Intl) {\n formatValue = Intl.NumberFormat(\"en-EN\").format(this.props.value);\n } else {\n formatValue = this.props.value;\n }\n }\n\n switch (this.props.percentileType) {\n case \"progress-bar\":\n {\n const backgroundRect = document.createElementNS(svgNS, \"rect\");\n backgroundRect.setAttribute(\"fill\", colors.background);\n backgroundRect.setAttribute(\"fill-opacity\", \"0.5\");\n backgroundRect.setAttribute(\"width\", \"100\");\n backgroundRect.setAttribute(\"height\", \"20\");\n backgroundRect.setAttribute(\"rx\", \"5\");\n backgroundRect.setAttribute(\"ry\", \"5\");\n const progressRect = document.createElementNS(svgNS, \"rect\");\n progressRect.setAttribute(\"fill\", colors.progress);\n progressRect.setAttribute(\"fill-opacity\", \"1\");\n progressRect.setAttribute(\"width\", `${progress}`);\n progressRect.setAttribute(\"height\", \"20\");\n progressRect.setAttribute(\"rx\", \"5\");\n progressRect.setAttribute(\"ry\", \"5\");\n const text = document.createElementNS(svgNS, \"text\");\n text.setAttribute(\"text-anchor\", \"middle\");\n text.setAttribute(\"alignment-baseline\", \"middle\");\n text.setAttribute(\"font-size\", \"12\");\n text.setAttribute(\"font-family\", \"arial\");\n text.setAttribute(\"font-weight\", \"bold\");\n text.setAttribute(\"transform\", \"translate(50 11)\");\n text.setAttribute(\"fill\", colors.text);\n\n if (this.props.valueType === \"value\") {\n text.style.fontSize = \"6pt\";\n\n text.textContent = this.props.unit\n ? `${formatValue} ${this.props.unit}`\n : `${formatValue}`;\n } else {\n text.textContent = `${progress}%`;\n }\n\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 20\");\n svg.append(backgroundRect, progressRect, text);\n }\n break;\n case \"bubble\":\n case \"circular-progress-bar\":\n case \"circular-progress-bar-alt\":\n {\n // Auto resize SVG using the view box magic: https://css-tricks.com/scale-svg/\n svg.setAttribute(\"viewBox\", \"0 0 100 100\");\n\n if (this.props.percentileType === \"bubble\") {\n // Create and append the circles.\n const backgroundCircle = document.createElementNS(svgNS, \"circle\");\n backgroundCircle.setAttribute(\"transform\", \"translate(50 50)\");\n backgroundCircle.setAttribute(\"fill\", colors.background);\n backgroundCircle.setAttribute(\"fill-opacity\", \"0.5\");\n backgroundCircle.setAttribute(\"r\", \"50\");\n const progressCircle = document.createElementNS(svgNS, \"circle\");\n progressCircle.setAttribute(\"transform\", \"translate(50 50)\");\n progressCircle.setAttribute(\"fill\", colors.progress);\n progressCircle.setAttribute(\"fill-opacity\", \"1\");\n progressCircle.setAttribute(\"r\", `${progress / 2}`);\n\n svg.append(backgroundCircle, progressCircle);\n } else {\n // Create and append the circles.\n const arcProps = {\n innerRadius:\n this.props.percentileType === \"circular-progress-bar\" ? 30 : 0,\n outerRadius: 50,\n startAngle: 0,\n endAngle: Math.PI * 2\n };\n const arc = arcFactory();\n\n const backgroundCircle = document.createElementNS(svgNS, \"path\");\n backgroundCircle.setAttribute(\"transform\", \"translate(50 50)\");\n backgroundCircle.setAttribute(\"fill\", colors.background);\n backgroundCircle.setAttribute(\"fill-opacity\", \"0.5\");\n backgroundCircle.setAttribute(\"d\", `${arc(arcProps)}`);\n const progressCircle = document.createElementNS(svgNS, \"path\");\n progressCircle.setAttribute(\"transform\", \"translate(50 50)\");\n progressCircle.setAttribute(\"fill\", colors.progress);\n progressCircle.setAttribute(\"fill-opacity\", \"1\");\n progressCircle.setAttribute(\n \"d\",\n `${arc({\n ...arcProps,\n endAngle: arcProps.endAngle * (progress / 100)\n })}`\n );\n\n svg.append(backgroundCircle, progressCircle);\n }\n\n // Create and append the text.\n const text = document.createElementNS(svgNS, \"text\");\n text.setAttribute(\"text-anchor\", \"middle\");\n text.setAttribute(\"alignment-baseline\", \"middle\");\n text.setAttribute(\"font-size\", \"16\");\n text.setAttribute(\"font-family\", \"arial\");\n text.setAttribute(\"font-weight\", \"bold\");\n text.setAttribute(\"fill\", colors.text);\n\n if (this.props.valueType === \"value\" && this.props.value != null) {\n // Show value and unit in 1 (no unit) or 2 lines.\n if (this.props.unit && this.props.unit.length > 0) {\n const value = document.createElementNS(svgNS, \"tspan\");\n value.setAttribute(\"x\", \"0\");\n value.setAttribute(\"dy\", \"1em\");\n value.textContent = `${formatValue}`;\n value.style.fontSize = \"8pt\";\n const unit = document.createElementNS(svgNS, \"tspan\");\n unit.setAttribute(\"x\", \"0\");\n unit.setAttribute(\"dy\", \"1em\");\n unit.textContent = `${this.props.unit}`;\n unit.style.fontSize = \"8pt\";\n text.append(value, unit);\n text.setAttribute(\"transform\", \"translate(50 33)\");\n } else {\n text.textContent = `${formatValue}`;\n text.style.fontSize = \"8pt\";\n text.setAttribute(\"transform\", \"translate(50 50)\");\n }\n } else {\n // Percentage.\n text.textContent = `${progress}%`;\n text.setAttribute(\"transform\", \"translate(50 50)\");\n }\n\n svg.append(text);\n }\n break;\n }\n\n element.append(svg);\n\n return element;\n }\n\n private getProgress(): number {\n const minValue = this.props.minValue || 0;\n const maxValue = this.props.maxValue || 100;\n const value = this.props.value == null ? 0 : this.props.value;\n\n if (value <= minValue) return 0;\n else if (value >= maxValue) return 100;\n else return Math.trunc(((value - minValue) / (maxValue - minValue)) * 100);\n }\n}\n","import { AnyObject } from \"../lib/types\";\nimport {\n stringIsEmpty,\n notEmptyStringOr,\n decodeBase64,\n parseIntOr\n} from \"../lib\";\nimport Item, { ItemType, ItemProps, itemBasePropsDecoder } from \"../Item\";\n\nexport type ServiceProps = {\n type: ItemType.SERVICE;\n serviceId: number;\n imageSrc: string | null;\n statusImageSrc: string | null;\n encodedTitle: string | null;\n} & ItemProps;\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the service props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function servicePropsDecoder(data: AnyObject): ServiceProps | never {\n if (data.imageSrc !== null) {\n if (\n typeof data.statusImageSrc !== \"string\" ||\n data.imageSrc.statusImageSrc === 0\n ) {\n throw new TypeError(\"invalid status image src.\");\n }\n } else {\n if (stringIsEmpty(data.encodedTitle)) {\n throw new TypeError(\"missing encode tittle content.\");\n }\n }\n\n if (parseIntOr(data.serviceId, null) === null) {\n throw new TypeError(\"invalid service id.\");\n }\n\n return {\n ...itemBasePropsDecoder(data), // Object spread. It will merge the properties of the two objects.\n type: ItemType.SERVICE,\n serviceId: data.serviceId,\n imageSrc: notEmptyStringOr(data.imageSrc, null),\n statusImageSrc: notEmptyStringOr(data.statusImageSrc, null),\n encodedTitle: notEmptyStringOr(data.encodedTitle, null)\n };\n}\n\nexport default class Service extends Item {\n public createDomElement(): HTMLElement {\n const element = document.createElement(\"div\");\n element.className = \"service\";\n\n if (this.props.statusImageSrc !== null) {\n element.style.background = `url(${this.props.statusImageSrc}) no-repeat`;\n element.style.backgroundSize = \"contain\";\n element.style.backgroundPosition = \"center\";\n } else if (this.props.encodedTitle !== null) {\n element.innerHTML = decodeBase64(this.props.encodedTitle);\n }\n\n return element;\n }\n}\n","import { AnyObject, Size } from \"./lib/types\";\nimport {\n parseBoolean,\n sizePropsDecoder,\n parseIntOr,\n notEmptyStringOr,\n itemMetaDecoder\n} from \"./lib\";\nimport Item, {\n ItemType,\n ItemProps,\n ItemClickEvent,\n ItemRemoveEvent,\n ItemMovedEvent,\n ItemResizedEvent\n} from \"./Item\";\nimport StaticGraph, { staticGraphPropsDecoder } from \"./items/StaticGraph\";\nimport Icon, { iconPropsDecoder } from \"./items/Icon\";\nimport ColorCloud, { colorCloudPropsDecoder } from \"./items/ColorCloud\";\nimport Group, { groupPropsDecoder } from \"./items/Group\";\nimport Clock, { clockPropsDecoder } from \"./items/Clock\";\nimport Box, { boxPropsDecoder } from \"./items/Box\";\nimport Line, { linePropsDecoder } from \"./items/Line\";\nimport Label, { labelPropsDecoder } from \"./items/Label\";\nimport SimpleValue, { simpleValuePropsDecoder } from \"./items/SimpleValue\";\nimport EventsHistory, {\n eventsHistoryPropsDecoder\n} from \"./items/EventsHistory\";\nimport Percentile, { percentilePropsDecoder } from \"./items/Percentile\";\nimport TypedEvent, { Disposable, Listener } from \"./lib/TypedEvent\";\nimport DonutGraph, { donutGraphPropsDecoder } from \"./items/DonutGraph\";\nimport BarsGraph, { barsGraphPropsDecoder } from \"./items/BarsGraph\";\nimport ModuleGraph, { moduleGraphPropsDecoder } from \"./items/ModuleGraph\";\nimport Service, { servicePropsDecoder } from \"./items/Service\";\n\n// TODO: Document.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction itemInstanceFrom(data: AnyObject) {\n const type = parseIntOr(data.type, null);\n if (type == null) throw new TypeError(\"missing item type.\");\n\n const meta = itemMetaDecoder(data);\n\n switch (type as ItemType) {\n case ItemType.STATIC_GRAPH:\n return new StaticGraph(staticGraphPropsDecoder(data), meta);\n case ItemType.MODULE_GRAPH:\n return new ModuleGraph(moduleGraphPropsDecoder(data), meta);\n case ItemType.SIMPLE_VALUE:\n case ItemType.SIMPLE_VALUE_MAX:\n case ItemType.SIMPLE_VALUE_MIN:\n case ItemType.SIMPLE_VALUE_AVG:\n return new SimpleValue(simpleValuePropsDecoder(data), meta);\n case ItemType.PERCENTILE_BAR:\n case ItemType.PERCENTILE_BUBBLE:\n case ItemType.CIRCULAR_PROGRESS_BAR:\n case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:\n return new Percentile(percentilePropsDecoder(data), meta);\n case ItemType.LABEL:\n return new Label(labelPropsDecoder(data), meta);\n case ItemType.ICON:\n return new Icon(iconPropsDecoder(data), meta);\n case ItemType.SERVICE:\n return new Service(servicePropsDecoder(data), meta);\n case ItemType.GROUP_ITEM:\n return new Group(groupPropsDecoder(data), meta);\n case ItemType.BOX_ITEM:\n return new Box(boxPropsDecoder(data), meta);\n case ItemType.LINE_ITEM:\n return new Line(linePropsDecoder(data), meta);\n case ItemType.AUTO_SLA_GRAPH:\n return new EventsHistory(eventsHistoryPropsDecoder(data), meta);\n case ItemType.DONUT_GRAPH:\n return new DonutGraph(donutGraphPropsDecoder(data), meta);\n case ItemType.BARS_GRAPH:\n return new BarsGraph(barsGraphPropsDecoder(data), meta);\n case ItemType.CLOCK:\n return new Clock(clockPropsDecoder(data), meta);\n case ItemType.COLOR_CLOUD:\n return new ColorCloud(colorCloudPropsDecoder(data), meta);\n default:\n throw new TypeError(\"item not found\");\n }\n}\n\n// TODO: Document.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction decodeProps(data: AnyObject) {\n const type = parseIntOr(data.type, null);\n if (type == null) throw new TypeError(\"missing item type.\");\n\n switch (type as ItemType) {\n case ItemType.STATIC_GRAPH:\n return staticGraphPropsDecoder(data);\n case ItemType.MODULE_GRAPH:\n return moduleGraphPropsDecoder(data);\n case ItemType.SIMPLE_VALUE:\n case ItemType.SIMPLE_VALUE_MAX:\n case ItemType.SIMPLE_VALUE_MIN:\n case ItemType.SIMPLE_VALUE_AVG:\n return simpleValuePropsDecoder(data);\n case ItemType.PERCENTILE_BAR:\n case ItemType.PERCENTILE_BUBBLE:\n case ItemType.CIRCULAR_PROGRESS_BAR:\n case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:\n return percentilePropsDecoder(data);\n case ItemType.LABEL:\n return labelPropsDecoder(data);\n case ItemType.ICON:\n return iconPropsDecoder(data);\n case ItemType.SERVICE:\n return servicePropsDecoder(data);\n case ItemType.GROUP_ITEM:\n return groupPropsDecoder(data);\n case ItemType.BOX_ITEM:\n return boxPropsDecoder(data);\n case ItemType.LINE_ITEM:\n return linePropsDecoder(data);\n case ItemType.AUTO_SLA_GRAPH:\n return eventsHistoryPropsDecoder(data);\n case ItemType.DONUT_GRAPH:\n return donutGraphPropsDecoder(data);\n case ItemType.BARS_GRAPH:\n return barsGraphPropsDecoder(data);\n case ItemType.CLOCK:\n return clockPropsDecoder(data);\n case ItemType.COLOR_CLOUD:\n return colorCloudPropsDecoder(data);\n default:\n throw new TypeError(\"decoder not found\");\n }\n}\n\n// Base properties.\nexport interface VisualConsoleProps extends Size {\n readonly id: number;\n name: string;\n groupId: number;\n backgroundURL: string | null; // URL?\n backgroundColor: string | null;\n isFavorite: boolean;\n relationLineWidth: number;\n}\n\n/**\n * Build a valid typed object from a raw object.\n * This will allow us to ensure the type safety.\n *\n * @param data Raw object.\n * @return An object representing the Visual Console props.\n * @throws Will throw a TypeError if some property\n * is missing from the raw object or have an invalid type.\n */\nexport function visualConsolePropsDecoder(\n data: AnyObject\n): VisualConsoleProps | never {\n // Object destructuring: http://es6-features.org/#ObjectMatchingShorthandNotation\n const {\n id,\n name,\n groupId,\n backgroundURL,\n backgroundColor,\n isFavorite,\n relationLineWidth\n } = data;\n\n if (id == null || isNaN(parseInt(id))) {\n throw new TypeError(\"invalid Id.\");\n }\n if (typeof name !== \"string\" || name.length === 0) {\n throw new TypeError(\"invalid name.\");\n }\n if (groupId == null || isNaN(parseInt(groupId))) {\n throw new TypeError(\"invalid group Id.\");\n }\n\n return {\n id: parseInt(id),\n name,\n groupId: parseInt(groupId),\n backgroundURL: notEmptyStringOr(backgroundURL, null),\n backgroundColor: notEmptyStringOr(backgroundColor, null),\n isFavorite: parseBoolean(isFavorite),\n relationLineWidth: parseIntOr(relationLineWidth, 0),\n ...sizePropsDecoder(data)\n };\n}\n\nexport default class VisualConsole {\n // Reference to the DOM element which will contain the items.\n private readonly containerRef: HTMLElement;\n // Properties.\n private _props: VisualConsoleProps;\n // Visual Console Item instances by their Id.\n private elementsById: {\n [key: number]: Item;\n } = {};\n // Visual Console Item Ids.\n private elementIds: ItemProps[\"id\"][] = [];\n // Dictionary which store the created lines.\n private relations: {\n [key: string]: Line;\n } = {};\n // Event manager for click events.\n private readonly clickEventManager = new TypedEvent<\n ItemClickEvent\n >();\n // Event manager for move events.\n private readonly movedEventManager = new TypedEvent();\n // Event manager for resize events.\n private readonly resizedEventManager = new TypedEvent();\n // List of references to clean the event listeners.\n private readonly disposables: Disposable[] = [];\n\n /**\n * React to a click on an element.\n * @param e Event object.\n */\n private handleElementClick: (e: ItemClickEvent) => void = e => {\n this.clickEventManager.emit(e);\n // console.log(`Clicked element #${e.data.id}`, e);\n };\n\n /**\n * React to a movement on an element.\n * @param e Event object.\n */\n private handleElementMovement: (e: ItemMovedEvent) => void = e => {\n this.movedEventManager.emit(e);\n // console.log(`Moved element #${e.item.props.id}`, e);\n };\n\n /**\n * React to a resizement on an element.\n * @param e Event object.\n */\n private handleElementResizement: (e: ItemResizedEvent) => void = e => {\n this.resizedEventManager.emit(e);\n // console.log(`Resized element #${e.item.props.id}`, e);\n };\n\n /**\n * Clear some element references.\n * @param e Event object.\n */\n private handleElementRemove: (e: ItemRemoveEvent) => void = e => {\n // Remove the element from the list and its relations.\n this.elementIds = this.elementIds.filter(id => id !== e.data.id);\n delete this.elementsById[e.data.id];\n this.clearRelations(e.data.id);\n };\n\n public constructor(\n container: HTMLElement,\n props: AnyObject,\n items: AnyObject[]\n ) {\n this.containerRef = container;\n this._props = visualConsolePropsDecoder(props);\n\n // Force the first render.\n this.render();\n\n // Sort by isOnTop, id ASC\n items = items.sort(function(a, b) {\n if (\n a.isOnTop == null ||\n b.isOnTop == null ||\n a.id == null ||\n b.id == null\n ) {\n return 0;\n }\n\n if (a.isOnTop && !b.isOnTop) return 1;\n else if (!a.isOnTop && b.isOnTop) return -1;\n else if (a.id > b.id) return 1;\n else return -1;\n });\n\n // Initialize the items.\n items.forEach(item => {\n try {\n const itemInstance = itemInstanceFrom(item);\n // Add the item to the list.\n this.elementsById[itemInstance.props.id] = itemInstance;\n this.elementIds.push(itemInstance.props.id);\n // Item event handlers.\n itemInstance.onClick(this.handleElementClick);\n itemInstance.onMoved(this.handleElementMovement);\n itemInstance.onResized(this.handleElementResizement);\n itemInstance.onRemove(this.handleElementRemove);\n // Add the item to the DOM.\n this.containerRef.append(itemInstance.elementRef);\n } catch (error) {\n console.log(\"Error creating a new element:\", error.message);\n }\n });\n\n // Create lines.\n this.buildRelations();\n }\n\n /**\n * Public accessor of the `elements` property.\n * @return Properties.\n */\n public get elements(): Item[] {\n // Ensure the type cause Typescript doesn't know the filter removes null items.\n return this.elementIds\n .map(id => this.elementsById[id])\n .filter(_ => _ != null) as Item[];\n }\n\n /**\n * Public setter of the `elements` property.\n * @param items.\n */\n public updateElements(items: AnyObject[]): void {\n // Ensure the type cause Typescript doesn't know the filter removes null items.\n const itemIds = items\n .map(item => item.id || null)\n .filter(id => id != null) as number[];\n // Get the elements we should delete.\n const deletedIds = this.elementIds.filter(id => itemIds.indexOf(id) < 0);\n // Delete the elements.\n deletedIds.forEach(id => {\n if (this.elementsById[id] != null) {\n this.elementsById[id].remove();\n delete this.elementsById[id];\n }\n });\n // Replace the element ids.\n this.elementIds = itemIds;\n\n // Initialize the items.\n items.forEach(item => {\n if (item.id) {\n if (this.elementsById[item.id] == null) {\n // New item.\n try {\n const itemInstance = itemInstanceFrom(item);\n // Add the item to the list.\n this.elementsById[itemInstance.props.id] = itemInstance;\n // Item event handlers.\n itemInstance.onClick(this.handleElementClick);\n itemInstance.onRemove(this.handleElementRemove);\n // Add the item to the DOM.\n this.containerRef.append(itemInstance.elementRef);\n } catch (error) {\n console.log(\"Error creating a new element:\", error.message);\n }\n } else {\n // Update item.\n try {\n this.elementsById[item.id].props = decodeProps(item);\n } catch (error) {\n console.log(\"Error updating an element:\", error.message);\n }\n }\n }\n });\n\n // Re-build relations.\n this.buildRelations();\n }\n\n /**\n * Public accessor of the `props` property.\n * @return Properties.\n */\n public get props(): VisualConsoleProps {\n return { ...this._props }; // Return a copy.\n }\n\n /**\n * Public setter of the `props` property.\n * If the new props are different enough than the\n * stored props, a render would be fired.\n * @param newProps\n */\n public set props(newProps: VisualConsoleProps) {\n const prevProps = this.props;\n // Update the internal props.\n this._props = newProps;\n\n // From this point, things which rely on this.props can access to the changes.\n\n // Re-render.\n this.render(prevProps);\n }\n\n /**\n * Recreate or update the HTMLElement which represents the Visual Console into the DOM.\n * @param prevProps If exists it will be used to only DOM updates instead of a full replace.\n */\n public render(prevProps: VisualConsoleProps | null = null): void {\n if (prevProps) {\n if (prevProps.backgroundURL !== this.props.backgroundURL) {\n this.containerRef.style.backgroundImage =\n this.props.backgroundURL !== null\n ? `url(${this.props.backgroundURL})`\n : null;\n }\n if (prevProps.backgroundColor !== this.props.backgroundColor) {\n this.containerRef.style.backgroundColor = this.props.backgroundColor;\n }\n if (this.sizeChanged(prevProps, this.props)) {\n this.resizeElement(this.props.width, this.props.height);\n }\n } else {\n this.containerRef.style.backgroundImage =\n this.props.backgroundURL !== null\n ? `url(${this.props.backgroundURL})`\n : null;\n\n this.containerRef.style.backgroundColor = this.props.backgroundColor;\n this.resizeElement(this.props.width, this.props.height);\n }\n }\n\n /**\n * Compare the previous and the new size and return\n * a boolean value in case the size changed.\n * @param prevSize\n * @param newSize\n * @return Whether the size changed or not.\n */\n public sizeChanged(prevSize: Size, newSize: Size): boolean {\n return (\n prevSize.width !== newSize.width || prevSize.height !== newSize.height\n );\n }\n\n /**\n * Resize the DOM container.\n * @param width\n * @param height\n */\n public resizeElement(width: number, height: number): void {\n this.containerRef.style.width = `${width}px`;\n this.containerRef.style.height = `${height}px`;\n }\n\n /**\n * Update the size into the properties and resize the DOM container.\n * @param width\n * @param height\n */\n public resize(width: number, height: number): void {\n this.props = {\n ...this.props, // Object spread: http://es6-features.org/#SpreadOperator\n width,\n height\n };\n }\n\n /**\n * To remove the event listeners and the elements from the DOM.\n */\n public remove(): void {\n this.disposables.forEach(d => d.dispose()); // Arrow function.\n this.elements.forEach(e => e.remove()); // Arrow function.\n this.elementsById = {};\n this.elementIds = [];\n // Clear relations.\n this.clearRelations();\n // Clean container.\n this.containerRef.innerHTML = \"\";\n }\n\n /**\n * Create line elements which connect the elements with their parents.\n */\n private buildRelations(): void {\n // Clear relations.\n this.clearRelations();\n // Add relations.\n this.elements.forEach(item => {\n if (item.props.parentId !== null) {\n const parent = this.elementsById[item.props.parentId];\n const child = this.elementsById[item.props.id];\n if (parent && child) this.addRelationLine(parent, child);\n }\n });\n }\n\n /**\n * @param itemId Optional identifier of a parent or child item.\n * Remove the line elements which connect the elements with their parents.\n */\n private clearRelations(itemId?: number): void {\n if (itemId != null) {\n for (let key in this.relations) {\n const ids = key.split(\"|\");\n const parentId = Number.parseInt(ids[0]);\n const childId = Number.parseInt(ids[1]);\n\n if (itemId === parentId || itemId === childId) {\n this.relations[key].remove();\n delete this.relations[key];\n }\n }\n } else {\n for (let key in this.relations) {\n this.relations[key].remove();\n delete this.relations[key];\n }\n }\n }\n\n /**\n * Retrieve the line element which represent the relation between items.\n * @param parentId Identifier of the parent item.\n * @param childId Itentifier of the child item.\n * @return The line element or nothing.\n */\n private getRelationLine(parentId: number, childId: number): Line | null {\n const identifier = `${parentId}|${childId}`;\n return this.relations[identifier] || null;\n }\n\n /**\n * Add a new line item to represent a relation between the items.\n * @param parent Parent item.\n * @param child Child item.\n * @return Whether the line was added or not.\n */\n private addRelationLine(\n parent: Item,\n child: Item\n ): Line {\n const identifier = `${parent.props.id}|${child.props.id}`;\n if (this.relations[identifier] != null) {\n this.relations[identifier].remove();\n }\n\n // Get the items center.\n const startX = parent.props.x + parent.elementRef.clientWidth / 2;\n const startY =\n parent.props.y +\n (parent.elementRef.clientHeight - parent.labelElementRef.clientHeight) /\n 2;\n const endX = child.props.x + child.elementRef.clientWidth / 2;\n const endY =\n child.props.y +\n (child.elementRef.clientHeight - child.labelElementRef.clientHeight) / 2;\n\n const line = new Line(\n linePropsDecoder({\n id: 0,\n type: ItemType.LINE_ITEM,\n startX,\n startY,\n endX,\n endY,\n width: 0,\n height: 0,\n lineWidth: this.props.relationLineWidth,\n color: \"#CCCCCC\"\n }),\n itemMetaDecoder({\n receivedAt: new Date()\n })\n );\n // Save a reference to the line item.\n this.relations[identifier] = line;\n\n // Add the line to the DOM.\n line.elementRef.style.zIndex = \"0\";\n this.containerRef.append(line.elementRef);\n\n return line;\n }\n\n /**\n * Add an event handler to the click of the linked visual console elements.\n * @param listener Function which is going to be executed when a linked console is clicked.\n */\n public onItemClick(\n listener: Listener>\n ): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.clickEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * Add an event handler to the movement of the visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onItemMoved(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.movedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * Add an event handler to the resizement of the visual console elements.\n * @param listener Function which is going to be executed when a linked console is moved.\n */\n public onItemResized(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.resizedEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n\n /**\n * Enable the edition mode.\n */\n public enableEditMode(): void {\n this.elements.forEach(item => {\n item.meta = { ...item.meta, editMode: true };\n });\n this.containerRef.classList.add(\"is-editing\");\n }\n\n /**\n * Disable the edition mode.\n */\n public disableEditMode(): void {\n this.elements.forEach(item => {\n item.meta = { ...item.meta, editMode: false };\n });\n this.containerRef.classList.remove(\"is-editing\");\n }\n}\n","import TypedEvent, { Disposable, Listener } from \"./TypedEvent\";\n\ninterface Cancellable {\n cancel(): void;\n}\n\ntype AsyncTaskStatus = \"waiting\" | \"started\" | \"cancelled\" | \"finished\";\ntype AsyncTaskInitiator = (done: () => void) => Cancellable;\n\n/**\n * Defines an async task which can be started and cancelled.\n * It's possible to observe the status changes of the task.\n */\nclass AsyncTask {\n private readonly taskInitiator: AsyncTaskInitiator;\n private cancellable: Cancellable = { cancel: () => {} };\n private _status: AsyncTaskStatus = \"waiting\";\n\n // Event manager for status change events.\n private readonly statusChangeEventManager = new TypedEvent();\n // List of references to clean the event listeners.\n private readonly disposables: Disposable[] = [];\n\n public constructor(taskInitiator: AsyncTaskInitiator) {\n this.taskInitiator = taskInitiator;\n }\n\n /**\n * Public setter of the `status` property.\n * @param status.\n */\n public set status(status: AsyncTaskStatus) {\n this._status = status;\n this.statusChangeEventManager.emit(status);\n }\n\n /**\n * Public accessor of the `status` property.\n * @return status.\n */\n public get status() {\n return this._status;\n }\n\n /**\n * Start the async task.\n */\n public init(): void {\n this.cancellable = this.taskInitiator(() => {\n this.status = \"finished\";\n });\n this.status = \"started\";\n }\n\n /**\n * Cancel the async task.\n */\n public cancel(): void {\n this.cancellable.cancel();\n this.status = \"cancelled\";\n }\n\n /**\n * Add an event handler to the status change.\n * @param listener Function which is going to be executed when the status changes.\n */\n public onStatusChange(listener: Listener): Disposable {\n /*\n * The '.on' function returns a function which will clean the event\n * listener when executed. We store all the 'dispose' functions to\n * call them when the item should be cleared.\n */\n const disposable = this.statusChangeEventManager.on(listener);\n this.disposables.push(disposable);\n\n return disposable;\n }\n}\n\n/**\n * Wrap an async task into another which will execute that task indefinitely\n * every time the tash finnish and the chosen period ends.\n * Will last until cancellation.\n *\n * @param task Async task to execute.\n * @param period Time in milliseconds to wait until the next async esecution.\n *\n * @return A new async task.\n */\nfunction asyncPeriodic(task: AsyncTask, period: number): AsyncTask {\n return new AsyncTask(() => {\n let ref: number | null = null;\n\n task.onStatusChange(status => {\n if (status === \"finished\") {\n ref = window.setTimeout(() => {\n task.init();\n }, period);\n }\n });\n\n task.init();\n\n return {\n cancel: () => {\n if (ref) clearTimeout(ref);\n task.cancel();\n }\n };\n });\n}\n\n/**\n * Manages a list of async tasks.\n */\nexport default class AsyncTaskManager {\n private tasks: { [identifier: string]: AsyncTask } = {};\n\n /**\n * Adds an async task to the manager.\n *\n * @param identifier Unique identifier.\n * @param taskInitiator Function to initialize the async task.\n * Should return a structure to cancel the task.\n * @param period Optional period to repeat the task indefinitely.\n */\n public add(\n identifier: string,\n taskInitiator: AsyncTaskInitiator,\n period: number = 0\n ): AsyncTask {\n if (this.tasks[identifier] && this.tasks[identifier].status === \"started\") {\n this.tasks[identifier].cancel();\n }\n\n const asyncTask =\n period > 0\n ? asyncPeriodic(new AsyncTask(taskInitiator), period)\n : new AsyncTask(taskInitiator);\n\n this.tasks[identifier] = asyncTask;\n\n return this.tasks[identifier];\n }\n\n /**\n * Starts an async task.\n *\n * @param identifier Unique identifier.\n */\n public init(identifier: string) {\n if (\n this.tasks[identifier] &&\n (this.tasks[identifier].status === \"waiting\" ||\n this.tasks[identifier].status === \"cancelled\" ||\n this.tasks[identifier].status === \"finished\")\n ) {\n this.tasks[identifier].init();\n }\n }\n\n /**\n * Cancel a running async task.\n *\n * @param identifier Unique identifier.\n */\n public cancel(identifier: string) {\n if (this.tasks[identifier] && this.tasks[identifier].status === \"started\") {\n this.tasks[identifier].cancel();\n }\n }\n}\n","/*\n * Useful resources.\n * http://es6-features.org/\n * http://exploringjs.com/es6\n * https://www.typescriptlang.org/\n */\n\nimport \"./main.css\"; // CSS import.\nimport VisualConsole from \"./VisualConsole\";\nimport AsyncTaskManager from \"./lib/AsyncTaskManager\";\n\n// Export the VisualConsole class to the global object.\n// eslint-disable-next-line\n(window as any).VisualConsole = VisualConsole;\n\n// Export the AsyncTaskManager class to the global object.\n// eslint-disable-next-line\n(window as any).AsyncTaskManager = AsyncTaskManager;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/visual_console_client/src/Item.ts b/visual_console_client/src/Item.ts index 7809b5b29d..0b23c8c26a 100644 --- a/visual_console_client/src/Item.ts +++ b/visual_console_client/src/Item.ts @@ -248,7 +248,7 @@ abstract class VisualConsoleItem { * Start the resizement funtionality. * @param element Element to move inside its container. */ - private initResizementListener(element: HTMLElement): void { + protected initResizementListener(element: HTMLElement): void { this.removeResizement = addResizementListener( element, (width: Size["width"], height: Size["height"]) => { diff --git a/visual_console_client/src/items/ModuleGraph.ts b/visual_console_client/src/items/ModuleGraph.ts index ce23785d36..a2882d6c97 100644 --- a/visual_console_client/src/items/ModuleGraph.ts +++ b/visual_console_client/src/items/ModuleGraph.ts @@ -58,6 +58,15 @@ export default class ModuleGraph extends Item { super.resizeElement(width, 0); } + /** + * @override Item.initResizementListener. To disable the functionality. + * Start the resizement funtionality. + * @param element Element to move inside its container. + */ + protected initResizementListener(): void { + // No-Op. Disable the resizement functionality for this item. + } + protected createDomElement(): HTMLElement { const element = document.createElement("div"); element.className = "module-graph"; From 006e0cd4ece0d801522c172e11ae9e4e3f7c5bb0 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 26 Jun 2019 12:31:47 +0200 Subject: [PATCH 196/206] Changed js --- .../godmode/reporting/visual_console_builder.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 85cbd9be5e..ad78900be2 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -254,7 +254,7 @@ function update_button_palette_callback() { var values = {}; values = readFields(); - if (values["map_linked"] == 0) { + if (selectedItem == "static_graph") { if (values["agent"] == "" || values["agent"] == "none") { dialog_message("#message_alert_no_agent"); return false; From c223e0bdad0c11d00d4a5a4bcd2a583b7e0142a3 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 26 Jun 2019 12:50:19 +0200 Subject: [PATCH 197/206] Changed js --- .../godmode/reporting/visual_console_builder.editor.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index ad78900be2..a4c18d3737 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -255,9 +255,11 @@ function update_button_palette_callback() { values = readFields(); if (selectedItem == "static_graph") { - if (values["agent"] == "" || values["agent"] == "none") { - dialog_message("#message_alert_no_agent"); - return false; + if (values["map_linked"] == 0) { + if (values["agent"] == "" || values["agent"] == "none") { + dialog_message("#message_alert_no_agent"); + return false; + } } } // TODO VALIDATE DATA From fb407c51f2d36835da5e5feffc9ea88712f47253 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 26 Jun 2019 13:25:57 +0200 Subject: [PATCH 198/206] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.rhel7.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 51 files changed, 59 insertions(+), 59 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 0ff67a62d3..30fb45624c 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, AIX version +# Version 7.0NG.736, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index c7c6fdd493..fc704fb87b 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, FreeBSD Version +# Version 7.0NG.736, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 1a349583dc..46789e8bea 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, HP-UX Version +# Version 7.0NG.736, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index dc172b7e2f..ce69b462a5 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, GNU/Linux +# Version 7.0NG.736, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 3d76832397..904015a997 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, GNU/Linux +# Version 7.0NG.736, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 9b088eae51..d2d0661065 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, Solaris Version +# Version 7.0NG.736, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index e2c442a520..d0593ebcc9 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.735 +# Version 7.0NG.736 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index fea0cb56db..74c397dc94 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.735, AIX version +# Version 7.0NG.736, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index f0ce5b2519..b7a30f962e 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.735 +# Version 7.0NG.736 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 20cdfeff99..9114cd7348 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.735, HPUX Version +# Version 7.0NG.736, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index e8ba9653ce..8eb9c0bbc8 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735 +# Version 7.0NG.736 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 29d13ff75c..24d44d51fc 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735 +# Version 7.0NG.736 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 8ef8a6fdc1..a940b58a89 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735 +# Version 7.0NG.736 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index 1ace947818..13611f36c0 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.735, Solaris version +# Version 7.0NG.736, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index c67f64d16c..6a826afd8b 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, AIX version +# Version 7.0NG.736, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2faf21c47a..23cf78af16 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.735-190626 +Version: 7.0NG.736 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 7521094eba..0eb8507e7b 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.735-190626" +pandora_version="7.0NG.736" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index d7ee481255..35a24de477 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, GNU/Linux +# Version 7.0NG.736, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index b02b379470..fba8f9fa24 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, FreeBSD Version +# Version 7.0NG.736, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 57e35c0a03..36164100be 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, HP-UX Version +# Version 7.0NG.736, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index db07876f12..6012f59705 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, GNU/Linux +# Version 7.0NG.736, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 8cda0f8fe0..300c03a3f5 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, GNU/Linux +# Version 7.0NG.736, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 629fe6a6fb..e899eed824 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, NetBSD Version +# Version 7.0NG.736, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 8ff3c52de5..be7904794d 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.735, Solaris Version +# Version 7.0NG.736, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3cf1d22126..6c685e63db 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.735'; +use constant AGENT_VERSION => '7.0NG.736'; use constant AGENT_BUILD => '190626'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 725d5abaa2..61ef7466ca 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.735 -%define release 190626 +%define version 7.0NG.736 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 970291a4c3..187ab0c80f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.735 -%define release 190626 +%define version 7.0NG.736 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 2b9cf3b68c..17c2af4cea 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.735" +PI_VERSION="7.0NG.736" PI_BUILD="190626" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 518cd3df0e..9c2fe6d01d 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2017 Artica Soluciones Tecnologicas -# Version 7.0NG.735 +# Version 7.0NG.736 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 7aecb7cff2..ccbb5d18b6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.735} +{Pandora FMS Windows Agent v7.0NG.736} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f655faabc6..26384d8353 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.735(Build 190626)") +#define PANDORA_VERSION ("7.0NG.736(Build 190626)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3d3a2ebf4a..45cb437458 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.735(Build 190626))" + VALUE "ProductVersion", "(7.0NG.736(Build 190626))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5fc2731073..e47a0a982b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.735-190626 +Version: 7.0NG.736 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 44d78e12ac..0e886c4585 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.735-190626" +pandora_version="7.0NG.736" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 95f6595032..0672366db4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -21,7 +21,7 @@ * Pandora build version and version */ $build_version = 'PC190626'; -$pandora_version = 'v7.0NG.735'; +$pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index 00a940965b..1404ef3c32 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -128,7 +128,7 @@
    Date: Wed, 26 Jun 2019 15:37:04 +0200 Subject: [PATCH 199/206] update current package --- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 4 ++-- pandora_console/pandoradb_data.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index c4dabae30d..8fe694d8e4 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1235,13 +1235,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 28); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 29); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '735'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '736'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); -- --------------------------------------------------------------------- diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index eb52c1dad8..c69e37e545 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -114,10 +114,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 28), +('MR', 29), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package_enterprise', '735'), +('current_package_enterprise', '736'), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), From 58483e87487cf7e59286afb0798ecf30d05d7fe5 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 26 Jun 2019 16:23:54 +0200 Subject: [PATCH 200/206] improved countdown --- pandora_console/operation/agentes/ver_agente.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 5f7f29f916..b9b2a2128d 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -68,15 +68,16 @@ if (is_ajax()) { if ($refresh_contact) { $id_agente = get_parameter('id_agente', 0); if ($id_agente > 0) { - $d = db_get_row( - 'tagente', - 'id_agente', - $id_agente + $last_contact = db_get_value_sql( + sprintf( + 'SELECT intervalo - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) + FROM `tagente` + WHERE id_agente = %d ', + $id_agente + ) ); $progress = agents_get_next_contact($id_agente); - $last_contact = floor(($d['intervalo'] * (100 - $progress) / 100)); - if ($progress < 0 || $progress > 100) { $progress = 100; } From 225de6b5ea7f0b12499649f8573bdb2d92d714cc Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 26 Jun 2019 19:33:42 +0200 Subject: [PATCH 201/206] MR forgotten change --- pandora_console/extras/mr/29.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/extras/mr/29.sql b/pandora_console/extras/mr/29.sql index e036c9d2eb..2bc8b9a8c9 100644 --- a/pandora_console/extras/mr/29.sql +++ b/pandora_console/extras/mr/29.sql @@ -23,5 +23,6 @@ UPDATE `tagente` ta INNER JOIN `tagente` taa on ta.`id_parent` = taa.`id_agente` UPDATE `tagente` SET `nombre` = md5(concat((SELECT `username` FROM `tcredential_store` WHERE `identifier` = "imported_aws_account" LIMIT 1), `nombre`)) WHERE `nombre` IN ("Aws", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1"); +UPDATE `trecon_task` SET `auth_strings` = "imported_aws_account" WHERE `type` IN (2,6,7); COMMIT; From 470e399f508d251ed6d63695e09609fc598e3164 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 26 Jun 2019 19:34:34 +0200 Subject: [PATCH 202/206] Fixed url edit task in RDS --- pandora_console/godmode/wizards/DiscoveryTaskList.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 1a16967f60..e018ec3d30 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -725,7 +725,7 @@ class DiscoveryTaskList extends Wizard return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&page=1'; case DISCOVERY_CLOUD_AWS_RDS: - return 'wiz=cloud&mode=amazonws&sub=rds&page=0'; + return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&sub=rds&page=0'; default: if ($task['description'] == 'console_task') { From ead768c9df9a9fc9531928e5ed0c748126296fb1 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 27 Jun 2019 00:01:10 +0200 Subject: [PATCH 203/206] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 23cf78af16..97a0f96608 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736 +Version: 7.0NG.736-190627 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 0eb8507e7b..cea74298d9 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736" +pandora_version="7.0NG.736-190627" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 6c685e63db..c105fe6e07 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.736'; -use constant AGENT_BUILD => '190626'; +use constant AGENT_BUILD => '190627'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 61ef7466ca..147b53eea0 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 1 +%define release 190627 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 187ab0c80f..2747373302 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 1 +%define release 190627 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 17c2af4cea..f52301c2ef 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190626" +PI_BUILD="190627" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ccbb5d18b6..73d18a13be 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190626} +{190627} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 26384d8353..bafda8aaef 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.736(Build 190626)") +#define PANDORA_VERSION ("7.0NG.736(Build 190627)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 45cb437458..f1336d2ab8 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.736(Build 190626))" + VALUE "ProductVersion", "(7.0NG.736(Build 190627))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e47a0a982b..8b39df1b04 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736 +Version: 7.0NG.736-190627 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 0e886c4585..1665ae05d1 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736" +pandora_version="7.0NG.736-190627" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0672366db4..6b175d2a3b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190626'; +$build_version = 'PC190627'; $pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1404ef3c32..add341cb50 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 006283762f..19aa431817 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 1 +%define release 190627 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1069c66b3b..e59b71f0e1 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 1 +%define release 190627 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6b6666b145..8c2ee3fe84 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190626" +PI_BUILD="190627" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0de9fdef13..c9ea0135c0 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.736 PS190626"; +my $version = "7.0NG.736 PS190627"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0d0d83d5fa..99458b0b0d 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.736 PS190626"; +my $version = "7.0NG.736 PS190627"; # save program name for logging my $progname = basename($0); From d956f0801110e43ef41e4bba036f1c6d42a5084e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 27 Jun 2019 10:39:43 +0200 Subject: [PATCH 204/206] Minor fixes --- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 14 +++++++++----- pandora_console/pandoradb.sql | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 8fe694d8e4..4bad7b3652 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1007,10 +1007,12 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` ( `agent_version` varchar(100) default '', `ultimo_contacto_remoto` datetime default '1970-01-01 00:00:00', `disabled` tinyint(2) NOT NULL default '0', + `remote` tinyint(1) NOT NULL default '0', `id_parent` int(10) unsigned default '0', `custom_id` varchar(255) default '', `server_name` varchar(100) default '', `cascade_protection` tinyint(2) NOT NULL default '0', + `cascade_protection_module` int(10) unsigned default '0', `timezone_offset` TINYINT(2) NULL DEFAULT '0' COMMENT 'number of hours of diference with the server timezone' , `icon_path` VARCHAR(127) NULL DEFAULT NULL COMMENT 'path in the server to the image of the icon representing the agent' , `update_gis_data` TINYINT(1) NOT NULL DEFAULT '1' COMMENT 'set it to one to update the position data (altitude, longitude, latitude) when getting information from the agent or to 0 to keep the last value and do not update it' , @@ -1025,19 +1027,21 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` ( `fired_count` bigint(20) NOT NULL default '0', `update_module_count` tinyint(1) NOT NULL default '0', `update_alert_count` tinyint(1) NOT NULL default '0', + `update_secondary_groups` tinyint(1) NOT NULL default '0', + `transactional_agent` tinyint(1) NOT NULL default '0', + `alias` varchar(600) BINARY NOT NULL default '', + `alias_as_name` tinyint(2) NOT NULL default '0', + `safe_mode_module` int(10) unsigned NOT NULL default '0', + `cps` int NOT NULL default 0, PRIMARY KEY (`id_agente`), KEY `nombre` (`nombre`(255)), KEY `direccion` (`direccion`), + KEY `id_tagente_idx` (`id_tagente`), KEY `disabled` (`disabled`), KEY `id_grupo` (`id_grupo`), FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE tmetaconsole_agent ADD COLUMN `remote` tinyint(1) NOT NULL default '0'; -ALTER TABLE tmetaconsole_agent ADD COLUMN `cascade_protection_module` int(10) default '0'; -ALTER TABLE tmetaconsole_agent ADD COLUMN `transactional_agent` tinyint(1) NOT NULL default '0'; -ALTER TABLE tmetaconsole_agent ADD COLUMN `alias` VARCHAR(600) not null DEFAULT ''; - -- --------------------------------------------------------------------- -- Table `ttransaction` -- --------------------------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index e5c4467551..6784ecb309 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3233,6 +3233,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` ( PRIMARY KEY (`id_agente`), KEY `nombre` (`nombre`(255)), KEY `direccion` (`direccion`), + KEY `id_tagente_idx` (`id_tagente`), KEY `disabled` (`disabled`), KEY `id_grupo` (`id_grupo`), FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`) ON DELETE CASCADE ON UPDATE CASCADE From 5ccc16d7d659897dc5fa61533675cf5e5de293cc Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 27 Jun 2019 15:04:58 +0200 Subject: [PATCH 205/206] Revert 28.sql --- pandora_console/extras/mr/28.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/extras/mr/28.sql b/pandora_console/extras/mr/28.sql index 6aa30fb34c..bab07bead8 100644 --- a/pandora_console/extras/mr/28.sql +++ b/pandora_console/extras/mr/28.sql @@ -42,5 +42,4 @@ ALTER TABLE `tusuario` ADD COLUMN `ehorus_user_level_user` VARCHAR(60); ALTER TABLE `tusuario` ADD COLUMN `ehorus_user_level_pass` VARCHAR(45); ALTER TABLE `tusuario` ADD COLUMN `ehorus_user_level_enabled` TINYINT(1) DEFAULT '1'; - COMMIT; From 8a04e2eec279f2ee60ace457f7ef2e4376ad7860 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 28 Jun 2019 00:01:06 +0200 Subject: [PATCH 206/206] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 97a0f96608..b6e8eee877 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736-190627 +Version: 7.0NG.736-190628 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index cea74298d9..5b33962912 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736-190627" +pandora_version="7.0NG.736-190628" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c105fe6e07..e547e26c9d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.736'; -use constant AGENT_BUILD => '190627'; +use constant AGENT_BUILD => '190628'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 147b53eea0..dae9afb803 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 190627 +%define release 190628 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2747373302..d195943bad 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.736 -%define release 190627 +%define release 190628 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index f52301c2ef..8df338265a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190627" +PI_BUILD="190628" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 73d18a13be..12e927b377 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190627} +{190628} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index bafda8aaef..df44b628ce 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.736(Build 190627)") +#define PANDORA_VERSION ("7.0NG.736(Build 190628)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f1336d2ab8..6e5b9873bf 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.736(Build 190627))" + VALUE "ProductVersion", "(7.0NG.736(Build 190628))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8b39df1b04..ccfbbb3ace 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736-190627 +Version: 7.0NG.736-190628 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1665ae05d1..270ec1354b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.736-190627" +pandora_version="7.0NG.736-190628" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6b175d2a3b..213036374f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190627'; +$build_version = 'PC190628'; $pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index add341cb50..4e708966e3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 19aa431817..58de3c6e8d 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 190627 +%define release 190628 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e59b71f0e1..c79285db3f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.736 -%define release 190627 +%define release 190628 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 8c2ee3fe84..3b3d487c43 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190627" +PI_BUILD="190628" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c9ea0135c0..4addd4b6f8 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.736 PS190627"; +my $version = "7.0NG.736 PS190628"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 99458b0b0d..7e638ace81 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.736 PS190627"; +my $version = "7.0NG.736 PS190628"; # save program name for logging my $progname = basename($0);