diff --git a/pandora_console/images/agent_ms.menu.svg b/pandora_console/images/agent_ms.menu.svg new file mode 100644 index 0000000000..5c0a1fb057 --- /dev/null +++ b/pandora_console/images/agent_ms.menu.svg @@ -0,0 +1,15 @@ + + + 96007EC9-FBFB-4CDC-A8D3-39F8126F7269 + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/arrow-d-mobile.svg b/pandora_console/images/arrow-d-mobile.svg new file mode 100644 index 0000000000..6c0ea7b1a1 --- /dev/null +++ b/pandora_console/images/arrow-d-mobile.svg @@ -0,0 +1,17 @@ + + + + E5134209-ED99-4D42-AFFC-E210CA7C75CA@svg + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/arrow-u-mobile.svg b/pandora_console/images/arrow-u-mobile.svg new file mode 100644 index 0000000000..8dfb133adf --- /dev/null +++ b/pandora_console/images/arrow-u-mobile.svg @@ -0,0 +1,17 @@ + + + + 468CE642-FF47-4D9D-8D01-9137E4A42791@svg + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/brick.menu.svg b/pandora_console/images/brick.menu.svg new file mode 100644 index 0000000000..1f3a6a89e9 --- /dev/null +++ b/pandora_console/images/brick.menu.svg @@ -0,0 +1,15 @@ + + + 788260CF-3DE6-4D64-8B30-B9B35413937B + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/checkbox.svg b/pandora_console/images/checkbox.svg new file mode 100644 index 0000000000..77cac9e5da --- /dev/null +++ b/pandora_console/images/checkbox.svg @@ -0,0 +1,8 @@ + + + Icons/Dark/20/checkbox-on@svg + + + + + \ No newline at end of file diff --git a/pandora_console/images/close-grey.svg b/pandora_console/images/close-grey.svg new file mode 100644 index 0000000000..d022a4472b --- /dev/null +++ b/pandora_console/images/close-grey.svg @@ -0,0 +1,18 @@ + + + + 43B3919E-8FE7-441D-8427-E2652997A80E@svg + Created with sketchtool. + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/go-back-mobile.svg b/pandora_console/images/go-back-mobile.svg new file mode 100644 index 0000000000..6760932b50 --- /dev/null +++ b/pandora_console/images/go-back-mobile.svg @@ -0,0 +1,19 @@ + + + + 27D252CA-B4D5-442E-ACDD-238B8E51751E@svg + Created with sketchtool. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/group.menu.svg b/pandora_console/images/group.menu.svg new file mode 100644 index 0000000000..e7ad7b639c --- /dev/null +++ b/pandora_console/images/group.menu.svg @@ -0,0 +1,15 @@ + + + B6EE5BBF-2CE4-4EFF-9E46-50036986C7F3 + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/home-mobile.svg b/pandora_console/images/home-mobile.svg new file mode 100644 index 0000000000..2e83a72cdc --- /dev/null +++ b/pandora_console/images/home-mobile.svg @@ -0,0 +1,19 @@ + + + + 13ED062F-1DD5-4B18-B16F-64D609ACA6F7@svg + Created with sketchtool. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/logout-red.svg b/pandora_console/images/logout-red.svg new file mode 100644 index 0000000000..44b96c468e --- /dev/null +++ b/pandora_console/images/logout-red.svg @@ -0,0 +1,13 @@ + + + C79B9248-AD28-44E6-97FA-8E8BEC5C229D + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/op_alerts.menu.svg b/pandora_console/images/op_alerts.menu.svg new file mode 100644 index 0000000000..f611f3672e --- /dev/null +++ b/pandora_console/images/op_alerts.menu.svg @@ -0,0 +1,15 @@ + + + 1823C61D-1174-471F-8BAD-A0B8CB687967 + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/op_events.menu.svg b/pandora_console/images/op_events.menu.svg new file mode 100644 index 0000000000..d275e66942 --- /dev/null +++ b/pandora_console/images/op_events.menu.svg @@ -0,0 +1,17 @@ + + + DD299FDE-0DC6-4356-92DC-926BFF90D985 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/op_monitoring.menu.svg b/pandora_console/images/op_monitoring.menu.svg new file mode 100644 index 0000000000..e2980972c5 --- /dev/null +++ b/pandora_console/images/op_monitoring.menu.svg @@ -0,0 +1,15 @@ + + + 2CF74761-33EB-44F4-9088-CC2767F8DD95 + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/search-mobile.svg b/pandora_console/images/search-mobile.svg new file mode 100644 index 0000000000..579d03b5a4 --- /dev/null +++ b/pandora_console/images/search-mobile.svg @@ -0,0 +1,15 @@ + + + B4F9F258-05E7-4180-8981-655BFA2BA77E@svg + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/server-status.menu.svg b/pandora_console/images/server-status.menu.svg new file mode 100644 index 0000000000..544ac117d8 --- /dev/null +++ b/pandora_console/images/server-status.menu.svg @@ -0,0 +1,15 @@ + + + 5DF60C72-9560-434D-8EEE-2966DF14C3C5 + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/services.menu.svg b/pandora_console/images/services.menu.svg new file mode 100644 index 0000000000..960bce25fc --- /dev/null +++ b/pandora_console/images/services.menu.svg @@ -0,0 +1,13 @@ + + + 7A93DEF5-4FEF-40B6-99B7-F2F36D7D47A0 + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/star-dark.svg b/pandora_console/images/star-dark.svg new file mode 100644 index 0000000000..3345d2790a --- /dev/null +++ b/pandora_console/images/star-dark.svg @@ -0,0 +1,25 @@ + + + + 8FDB48E7-691D-43C7-B7AD-DC381E7FA74C@svg + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/visual_console.menu.svg b/pandora_console/images/visual_console.menu.svg new file mode 100644 index 0000000000..84077fdfad --- /dev/null +++ b/pandora_console/images/visual_console.menu.svg @@ -0,0 +1,15 @@ + + + 51F33933-7E26-4D16-9D45-F3415926FFF6 + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 1d11aad151..54325f28e0 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -813,6 +813,7 @@ define('AUDIT_LOG_SERVICE_MANAGEMENT', 'Service management'); define('AUDIT_LOG_INCIDENT_MANAGEMENT', 'Incident management'); define('AUDIT_LOG_UMC', 'Warp Manager'); define('AUDIT_LOG_NMS_VIOLATION', 'NMS Violation'); +define('AUDIT_LOG_ENTERPRISE_VIOLATION', 'Enterprise Violation'); // MIMEs. define( diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 418804dcab..fb6f4552e2 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -77,7 +77,7 @@ function html_debug_print($var, $file='', $oneline=false) fprintf($f, '%s', $output); fclose($f); } else { - echo '
'.date('Y/m/d H:i:s').' ('.gettype($var).') '.$more_info."\n";
+        echo '
'.date('Y/m/d H:i:s').' ('.gettype($var).') '.$more_info."\n";
         print_r($var);
         echo '
'; } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index deb37fda73..5adae9abf7 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -12130,6 +12130,70 @@ function reporting_get_stats_indicators($data, $width=280, $height=20, $html=tru } +function reporting_get_stats_indicators_mobile($data, $width=280, $height=20, $html=true) +{ + $table_ind = html_get_predefined_table(); + + $servers = []; + $servers['all'] = (int) db_get_value('COUNT(id_server)', 'tserver'); + $servers['up'] = (int) servers_check_status(); + $servers['down'] = ($servers['all'] - $servers['up']); + if ($servers['all'] == 0) { + $servers['health'] = 0; + } else { + $servers['health'] = ($servers['up'] / ($servers['all'] / 100)); + } + + $return = []; + + $color = get_color_progress_mobile($servers['health']); + $return['server_health'] = [ + 'title' => __('Server health'), + 'graph' => ui_progress($servers['health'], '90%', '.8', $color, true, ' ', false), + ]; + + $color = get_color_progress_mobile($data['monitor_health']); + $return['monitor_health'] = [ + 'title' => __('Monitor health'), + 'graph' => ui_progress($data['monitor_health'], '90%', '.8', $color, true, ' ', false), + ]; + + $color = get_color_progress_mobile($data['module_sanity']); + $return['module_sanity'] = [ + 'title' => __('Module sanity'), + 'graph' => ui_progress($data['module_sanity'], '90%', '.8', $color, true, ' ', false), + ]; + + $color = get_color_progress_mobile($data['alert_level']); + $return['alert_level'] = [ + 'title' => __('Alert level'), + 'graph' => ui_progress($data['alert_level'], '90%', '.8', $color, true, ' ', false), + ]; + + return $return; +} + + +function get_color_progress_mobile($value) +{ + $color = ''; + + if ((int) $value > 66) { + $color = '#82B92E'; + } + + if ((int) $value < 66) { + $color = '#FCAB10'; + } + + if ((int) $value < 33) { + $color = '#ED474A'; + } + + return $color; +} + + function reporting_get_stats_alerts($data, $links=false) { global $config; diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index e432f06554..7ba3c50303 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -522,7 +522,7 @@ function servers_get_rate($avg_interval, $num_modules) * * @return mixed False in case the server doesn't exist or an array with info. */ -function servers_get_info($id_server=-1) +function servers_get_info($id_server=-1, $sql_limit=-1) { global $config; @@ -538,6 +538,14 @@ function servers_get_info($id_server=-1) SELECT * FROM tserver '.$select_id.' ORDER BY server_type'; + + if ($sql_limit !== -1) { + $sql = ' + SELECT * + FROM tserver '.$select_id.' + ORDER BY server_type'.$sql_limit; + } + $result = db_get_all_rows_sql($sql); $time = get_system_time(); diff --git a/pandora_console/mobile/include/javascript/jquery.mobile-1.5.0-rc1.js b/pandora_console/mobile/include/javascript/jquery.mobile-1.5.0-rc1.js index a8cf0da798..2d75309d4b 100644 --- a/pandora_console/mobile/include/javascript/jquery.mobile-1.5.0-rc1.js +++ b/pandora_console/mobile/include/javascript/jquery.mobile-1.5.0-rc1.js @@ -13338,7 +13338,7 @@ $.widget( "mobile.textinput", { }, _handleBlur: function() { - this._removeClass( this._outer, null, "ui-focus" ); + // this._removeClass( this._outer, null, "ui-focus" ); if ( this.options.preventFocusZoom ) { $.mobile.zoom.enable( true ); } @@ -13351,7 +13351,7 @@ $.widget( "mobile.textinput", { if ( this.options.preventFocusZoom ) { $.mobile.zoom.disable( true ); } - this._addClass( this._outer, null, "ui-focus" ); + // this._addClass( this._outer, null, "ui-focus" ); }, _setOptions: function( options ) { @@ -15410,10 +15410,10 @@ var selectmenu = $.widget( "mobile.selectmenu", [ { that.button.addClass( "ui-button-active" ); } ) .bind( "focus", function() { - that.button.addClass( "ui-focus" ); + // that.button.addClass( "ui-focus" ); } ) .bind( "blur", function() { - that.button.removeClass( "ui-focus" ); + // that.button.removeClass( "ui-focus" ); } ) .bind( "focus vmouseover", function() { that.button.trigger( "vmouseover" ); diff --git a/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css b/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css index e543176676..2775545860 100644 --- a/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css +++ b/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css @@ -918,27 +918,8 @@ html .ui-body-a .ui-accordion-content { html .ui-bar-a a, html .ui-body-a a, html body .ui-group-theme-a a { - color: #38c; font-weight: 700; } -.ui-page-theme-a a:visited, -html .ui-bar-a a:visited, -html .ui-body-a a:visited, -html body .ui-group-theme-a a:visited { - color: #38c; -} -.ui-page-theme-a a:hover, -html .ui-bar-a a:hover, -html .ui-body-a a:hover, -html body .ui-group-theme-a a:hover { - color: #059; -} -.ui-page-theme-a a:active, -html .ui-bar-a a:active, -html .ui-body-a a:active, -html body .ui-group-theme-a a:active { - color: #059; -} .ui-page-theme-a .ui-button, html .ui-bar-a .ui-button, html .ui-body-a .ui-button, @@ -1015,25 +996,7 @@ html body div.ui-slider-track.ui-body-a .ui-button-active, .ui-page-theme-a .ui-accordion-header.ui-state-active, html .ui-body-a .ui-accordion-header-active, html .ui-body-a .ui-accordion-header.ui-state-active { - background-color: #38c; - border-color: #38c; color: #fff; - text-shadow: 0 1px 0 #059; -} -.ui-page-theme-a .ui-button:focus, -html .ui-bar-a .ui-button:focus, -html .ui-body-a .ui-button:focus, -html body .ui-group-theme-a .ui-button:focus, -html head + body .ui-button.ui-button-a:focus, -.ui-page-theme-a .ui-focus, -html .ui-bar-a .ui-focus, -html .ui-body-a .ui-focus, -html body .ui-group-theme-a .ui-focus, -html head + body .ui-button-a.ui-focus, -html head + body .ui-body-a.ui-focus { - -webkit-box-shadow: 0 0 12px #38c; - -moz-box-shadow: 0 0 12px #38c; - box-shadow: 0 0 12px #38c; } .ui-bar-b, .ui-page-theme-b .ui-bar-inherit, @@ -1078,27 +1041,8 @@ html .ui-body-b .ui-accordion-content { html .ui-bar-b a, html .ui-body-b a, html body .ui-group-theme-b a { - color: #2ad; font-weight: 700; } -.ui-page-theme-b a:visited, -html .ui-bar-b a:visited, -html .ui-body-b a:visited, -html body .ui-group-theme-b a:visited { - color: #2ad; -} -.ui-page-theme-b a:hover, -html .ui-bar-b a:hover, -html .ui-body-b a:hover, -html body .ui-group-theme-b a:hover { - color: #08b; -} -.ui-page-theme-b a:active, -html .ui-bar-b a:active, -html .ui-body-b a:active, -html body .ui-group-theme-b a:active { - color: #08b; -} .ui-page-theme-b .ui-button, html .ui-bar-b .ui-button, html .ui-body-b .ui-button, @@ -1175,25 +1119,7 @@ html body div.ui-slider-track.ui-body-b .ui-button-active, .ui-page-theme-b .ui-accordion-header.ui-state-active, html .ui-body-b .ui-accordion-header-active, html .ui-body-b .ui-accordion-header.ui-state-active { - background-color: #2ad; - border-color: #2ad; color: #fff; - text-shadow: 0 1px 0 #08b; -} -.ui-page-theme-b .ui-button:focus, -html .ui-bar-b .ui-button:focus, -html .ui-body-b .ui-button:focus, -html body .ui-group-theme-b .ui-button:focus, -html head + body .ui-button.ui-button-b:focus, -.ui-page-theme-b .ui-focus, -html .ui-bar-b .ui-focus, -html .ui-body-b .ui-focus, -html body .ui-group-theme-b .ui-focus, -html head + body .ui-button-b.ui-focus, -html head + body .ui-body-b.ui-focus { - -webkit-box-shadow: 0 0 12px #2ad; - -moz-box-shadow: 0 0 12px #2ad; - box-shadow: 0 0 12px #2ad; } .ui-disabled, .ui-state-disabled, diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index f6b3f17874..d25a70eafa 100755 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -27,8 +27,12 @@ */ :root { --primary-color: #14524f; + --primary-color-hover: #104240; --secondary-color: #ffffff; - --input-border: #c0ccdc; + --body-color: #f6f7fb; + --border-color: #e5e9ed; + --border-dark-color: #c0ccdc; + --muted-color: #8a96a6; } @font-face { @@ -51,13 +55,26 @@ body { text-align: left; vertical-align: top; font-weight: 400; - font-family: "Lato"; + font-family: "Lato" !important; +} + +a.ui-link, +a > span.name_count, +a:not(.ui-button) { + font-weight: normal; + text-decoration: underline !important; + text-decoration-color: var(--muted-color) !important; + color: var(--primary-color) !important; } .small { font-size: 10px !important; } +.font-10pt { + font-size: 10pt !important; +} + .center { text-align: center; } @@ -66,8 +83,24 @@ body { display: none; } +.flex { + display: flex; +} + +.align-items-center { + align-items: center; +} + +.flex-column { + flex-direction: column; +} + +.space-between { + justify-content: space-between; +} + .ui-header .ui-title { - font-size: 14px !important; + font-size: 12pt !important; min-height: 1.1em; text-align: center; display: block; @@ -77,6 +110,7 @@ body { overflow: hidden; white-space: nowrap; outline: 0 !important; + line-height: 18pt; } .ui-btn-inner { @@ -104,11 +138,6 @@ td.flex-center { padding-top: 10px; } -#tactical1 *, -#tactical2 * { - font-weight: bold; -} - #tactical1 a, #tactical2 a { font-weight: bold; @@ -125,7 +154,7 @@ legend { } /* For mobiles */ -@media screen and (max-width: 750px) { +@media screen and (max-width: 480px) { #tactical1 *, #tactical2 * { font-size: 12px; @@ -136,7 +165,7 @@ legend { } } /* For tablets */ -@media screen and (min-width: 750px) { +@media screen and (min-width: 480px) { #tactical1 a, #tactical2 a { font-size: 25px !important; @@ -333,13 +362,13 @@ tr.group_view_data, } /* For mobiles */ -@media screen and (max-width: 750px) { +@media screen and (max-width: 480px) { .list_groups .name_count img { margin-top: 0px; } } /* For tablets */ -@media screen and (min-width: 750px) { +@media screen and (min-width: 480px) { .list_groups .name_count img { margin-top: 0px; } @@ -353,7 +382,7 @@ tr.group_view_data, .datos_green a, .datos_greenf9 a { background-color: #52a000; - color: #ffffff !important; + color: #000000 !important; text-shadow: none !important; } .datos_red, @@ -361,7 +390,7 @@ tr.group_view_data, .datos_red a, .datos_redf9 a { background-color: #ff3e41; - color: #ffffff !important; + color: #000000 !important; text-shadow: none !important; } @@ -407,7 +436,7 @@ tr.group_view_data, } tr.events { - border-bottom: 6px solid #f7f7f7 !important; + border-bottom: 6px solid var(--secondary-color) !important; font-size: 12px !important; } @@ -476,8 +505,9 @@ table.event_details td.cell_event_name { height: 40px; } -@media screen and (max-width: 35em) { +@media screen and (max-width: 480px) { /* Hide the title of event name */ + #last_agent_events tbody tr.events td.cell_0 b.ui-table-cell-label, #list_events tbody tr.events td.cell_0 b.ui-table-cell-label { display: none; } @@ -510,7 +540,41 @@ table.event_details td.cell_event_name { font-weight: bold; } -.green, +.agents_tiny_stats span { + background-color: transparent !important; +} + +.agents_tiny_stats .red, +.color-red { + color: #c00 !important; +} + +.agents_tiny_stats .green, +.color-green { + color: #5a8629 !important; +} + +.agents_tiny_stats .orange, +.color-orange { + color: #fd7304 !important; +} + +.agents_tiny_stats .yellow, +.color-yellow { + color: #f3c500 !important; +} + +.agents_tiny_stats .grey, +.color-grey { + color: #808080 !important; +} + +.agents_tiny_stats .blue, +.color-blue { + color: #4a83f3 !important; +} + +/* .green, .orange, .yellow, .red, @@ -520,11 +584,11 @@ table.event_details td.cell_event_name { color: white !important; padding: 1px 3px; border-radius: 2px; -} +} */ -.agents_tiny_stats span { +/* .agents_tiny_stats span { background: #222; -} +} */ .agent_details { padding: 10px 0px 10px 0px; @@ -560,18 +624,14 @@ table.event_details td.cell_event_name { font-size: 14px; } -#list_agents .cell_0 img { - float: left; - margin-right: 3px; -} - #list_agents td:hover, #list_networkmaps td:hover, #list_events td:hover, #list_Modules td:hover, #list_agent_Modules td:hover, #list_visualmaps td:hover, -#last_agent_events td:hover { +#last_agent_events td:hover, +#list_servers_status td:hover { cursor: pointer; } @@ -586,88 +646,7 @@ table.event_details td.cell_event_name { width: 100%; } -@media screen and (max-width: 34.99em) { - #list_agents td { - height: 35px; - padding-top: 7px; - display: table-cell; - clear: none; - float: none; - padding-left: 0px !important; - padding-right: 0px !important; - width: auto !important; - } - - #list_agents td.cell_0 { - border-top: 0px none; - } - #list_agents td.cell_0 > span.tiny > img { - width: 5px; - height: 30px; - margin-top: -6px; - margin-left: 0px; - } - - #list_agents .cell_2 .ui-table-cell-label, - #list_agents .cell_3 .ui-table-cell-label, - #list_agents .cell_6 .ui-table-cell-label, - #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; - } - - #list_agents .cell_3 .ui-table-cell-label, - #list_agents .cell_6 .ui-table-cell-label, - #list_agents .cell_7 .ui-table-cell-label { - padding-left: 10px; - } - - #list_agents .cell_2, - #list_agents .cell_3, - #list_agents .cell_7 { - display: inline !important; - float: none !important; - } - - #list_agents .cell_4, - #list_agents .cell_8 { - display: inline !important; - float: none !important; - } - - #list_agents .cell_8 { - display: inline !important; - float: none !important; - } - - #list_agents b.ui-table-cell-label { - display: none; - } - - #list_agents .show_collapside { - display: none !important; - } - - #list_agents .cell_1, - #list_agents .cell_2, - #list_agents .cell_3, - #list_agents .cell_4 { - display: none !important; - } - - #list_agents .cell_0 .ui-link { - font-size: 12px; - } - - #list_agents .cell_6 .show_collapside { - display: none !important; - } - - .agents_tiny_stats * { - font-size: 12px !important; - } - +@media screen and (max-width: 480px) { #list_agent_Modules td { padding-top: 7px !important; } @@ -677,29 +656,8 @@ table.event_details td.cell_event_name { } } -/* For mobiles */ -@media screen and (max-width: 750px) { - .agents_tiny_stats * { - font-size: 12px !important; - } -} -/* For tablets */ -@media screen and (min-width: 750px) { - .agents_tiny_stats * { - font-size: 17px !important; - } -} /*END-----------Agents styles-----------------------------------------*/ -/*INIT-----------Alerts styles---------------------------------------*/ - -#list_alerts td { - height: 35px; - padding-top: 20px; -} - -/*END-----------Alerts styles---------------------------------------*/ - /*INIT-----------Network maps styles---------------------------------------*/ #list_networkmaps td { @@ -726,20 +684,7 @@ table.event_details td.cell_event_name { } /* For mobiles */ -@media screen and (max-width: 750px) { - #rendered_visual_map div { - font-size: 6pt !important; - } -} -/* For tablets */ -@media screen and (min-width: 750px) { - #rendered_visual_map div { - font-size: 8pt !important; - } -} - -/* For mobiles */ -@media screen and (max-width: 750px) { +@media screen and (max-width: 480px) { .resize_visual_font_size_4pt * { font-size: 2pt !important; } @@ -763,7 +708,7 @@ table.event_details td.cell_event_name { } } /* For tablets */ -@media screen and (min-width: 750px) { +@media screen and (min-width: 480px) { .resize_visual_font_size_4pt * { font-size: 2pt !important; } @@ -790,7 +735,7 @@ table.event_details td.cell_event_name { /*END-----------Visual maps styles---------------------------------------*/ /*INIT-----------Modules styles---------------------------------------*/ -@media screen and (max-width: 34.99em) { +@media screen and (max-width: 480px) { #list_Modules .cell_1 .ui-table-cell-label, #list_Modules .cell_5 .ui-table-cell-label, #list_Modules .cell_6 .ui-table-cell-label { @@ -866,6 +811,52 @@ table.event_details td.cell_event_name { #list_Modules .module_name { font-size: 12px !important; } + + table#list_agent_Modules tr, + table#list_agents tr, + table#list_Modules tr, + table#list_alerts tr, + table#list_module_data tr, + table#list_servers tr, + table[id^="service-table-"] tr { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + } + + table#list_agents b.ui-table-cell-label, + table#list_alerts b.ui-table-cell-label, + table#list_module_data b.ui-table-cell-label, + table#list_servers b.ui-table-cell-label, + table[id^="service-table-"] b.ui-table-cell-label { + display: none; + } + + table#list_servers tr td.cell_0 { + width: 10%; + } + table#list_servers tr td.cell_1 { + width: 10%; + } + table#list_servers tr td.cell_2 { + width: 80%; + } + + table[id^="service-table-"] tr td.cell_0 { + width: 10%; + } + table[id^="service-table-"] tr td.cell_1 { + width: 80%; + } + table[id^="service-table-"] tr td.cell_2 { + width: 10%; + } +} + +table#list_servers tr td.cell_0, +table[id^="service-table-"] td.cell_0 { + border-top: 0px; } #list_Modules .cell_5 a { @@ -879,8 +870,8 @@ table.event_details td.cell_event_name { #list_Modules td, #list_agent_Modules td { - height: 35px; - padding-top: 20px; + height: 25px; + vertical-align: middle; } #list_agent_Modules td.cell_0 > span.tiny { @@ -889,19 +880,23 @@ table.event_details td.cell_event_name { #list_Modules .cell_5 img { float: left; + margin-left: 5px; } #user_logged { + color: var(--muted-color); + font-weight: 600; position: absolute; font-size: 11px !important; right: 10px; top: 8px; - background: url(../../../images/header_user.png) no-repeat right; + /* background: url(../../../images/user.svg) no-repeat right !important; */ padding-right: 20px; line-height: 20px; + background-size: 17px !important; } -@media screen and (max-width: 34.99em) { +@media screen and (max-width: 480px) { #list_agent_Modules .ui-table-cell-label, #list_agent_Modules .cell_2, #list_agent_Modules .cell_3 { @@ -949,10 +944,10 @@ li.ui-btn { border-bottom: 0px solid white !important; } -.cell_0 { +/* .cell_0 { border-top: solid 1px #666; margin-top: 0px; -} +} */ #list_events .cell_0 { border: 0px; @@ -963,7 +958,7 @@ li.ui-btn { float: left; } -@media screen and (max-width: 34.99em) { +@media screen and (max-width: 480px) { .ui-table th, .ui-table td { padding: 8px !important; @@ -1005,7 +1000,7 @@ li.ui-btn { height: 28px !important; } -@media screen and (max-width: 35em) { +@media screen and (max-width: 480px) { .events .status_row { display: none; } @@ -1024,7 +1019,7 @@ li.ui-btn { } } -@media screen and (min-width: 35em) { +@media screen and (min-width: 480px) { .events .cell_0 .event_link { display: none; } @@ -1057,7 +1052,7 @@ li.ui-btn { } /* For mobiles */ -@media screen and (max-width: 750px) { +@media screen and (max-width: 480px) { .ui-content > .ui-btn { margin: 10px 7px; height: 30px; @@ -1076,9 +1071,8 @@ li.ui-btn { } .login_logo img { - width: 220px; + width: 80%; margin-bottom: 10px; - padding-top: 5%; } .untiny { @@ -1086,7 +1080,7 @@ li.ui-btn { } } /* For tablets */ -@media screen and (min-width: 750px) { +@media screen and (min-width: 480px) { .ui-content > .ui-btn { display: inline-block; margin: 8px 5px; @@ -1126,7 +1120,6 @@ li.ui-btn { .login_logo img { width: 300px; margin-bottom: 20px; - padding-top: 5%; } .tiny { @@ -1135,7 +1128,7 @@ li.ui-btn { } #login_container { - width: 60%; + width: 80%; margin: 0 auto; max-width: 300px; padding-top: 5%; @@ -1238,12 +1231,61 @@ table.tactical_bars { background-size: 18px 18px !important; } +.ui-icon-server-status { + background-image: url(../../../images/server-status.menu.png) !important; + background-color: #333 !important; + background-size: 18px 18px !important; +} + +.ui-icon-services { + background-image: url(../../../images/services.menu.png) !important; + background-color: #333 !important; + background-size: 18px 18px !important; +} + +/* New */ +.ui-icon-menu-services { + background-image: url(../../../images/services.menu.svg) !important; +} +.ui-icon-menu-server-status { + background-image: url(../../../images/server-status.menu.svg) !important; +} +.ui-icon-menu-brick { + background-image: url(../../../images/brick.menu.svg) !important; +} +.ui-icon-menu-agent_ms { + background-image: url(../../../images/agent_ms.menu.svg) !important; +} +.ui-icon-menu-op_alerts { + background-image: url(../../../images/op_alerts.menu.svg) !important; +} +.ui-icon-menu-visual_console { + background-image: url(../../../images/visual_console.menu.svg) !important; +} +.ui-icon-menu-group { + background-image: url(../../../images/group.menu.svg) !important; +} +.ui-icon-menu-op_events { + background-image: url(../../../images/op_events.menu.svg) !important; +} +.ui-icon-menu-op_monitoring { + background-image: url(../../../images/op_monitoring.menu.svg) !important; +} + +.ui-icon-menu-square { + border-radius: 0% !important; + width: 30px !important; + height: 30px !important; +} + .ui-icon-tactical_view, .ui-icon-events, .ui-icon-groups, .ui-icon-alerts, .ui-icon-agents, .ui-icon-modules, +.ui-icon-server-status, +.ui-icon-services, .ui-icon-network_maps, .ui-icon-visual_console, .ui-icon-dashboard { @@ -1267,40 +1309,9 @@ table.tactical_bars { -webkit-border-radius: 15px !important; } -/* For mobiles */ -@media screen and (max-width: 750px) { - .ui-icon-tactical_view, - .ui-icon-events, - .ui-icon-groups, - .ui-icon-alerts, - .ui-icon-agents, - .ui-icon-modules, - .ui-icon-network_maps, - .ui-icon-visual_console, - .ui-icon-dashboard { - height: 18px !important; - width: 18px !important; - margin-top: 0px !important; - } -} -/* For tablets */ -@media screen and (min-width: 750px) { - .ui-icon-tactical_view, - .ui-icon-events, - .ui-icon-groups, - .ui-icon-alerts, - .ui-icon-agents, - .ui-icon-modules, - .ui-icon-network_maps, - .ui-icon-visual_console, - .ui-icon-dashboard { - height: 18px !important; - width: 18px !important; - } -} - /*END-----------Network maps styles---------------------------------------*/ +#error-dialog-button_close, #logout_dialog-button_close { display: flex; margin: 0 auto; @@ -1344,9 +1355,9 @@ span.nobold * { } .status_rounded_rectangles.forced_title { - width: 1em; - height: 1em; - border-radius: 50%; + width: 30px; + height: 15px; + border-radius: 4px; } .status_small_rectangles { @@ -1535,14 +1546,1730 @@ img.os-big-icon[src$=".svg"] { height: 100px; } -div.noresizevc.graph.adapted_sparse +div.noresizevc.graph div.flot-x-axis.flot-x1-axis.xAxis.x1Axis > div.flot-tick-label.tickLabel:nth-child(odd) { visibility: hidden !important; } -div.noresizevc.graph.adapted_sparse +div.noresizevc.graph div.flot-x-axis.flot-x1-axis.xAxis.x1Axis > div.flot-tick-label.tickLabel:first-child { visibility: visible !important; } + +.relative { + position: relative; +} + +.container-div-input-password input { + width: 100%; +} + +.show-hide-pass { + position: absolute; + right: 0px; + top: 4px; + border: 0; + outline: none; + margin: 0; + height: 30px; + width: 35px; + cursor: pointer; + display: inline-block; +} + +div.relative.container-div-input-password > div > input { + background-repeat: no-repeat !important; + background-size: 25px !important; + background-position: right 5px bottom 50% !important; + padding-right: 42px; +} + +input[name="login_btn"], +input[name="auth_code_btn"] { + height: 50px; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; + /* box-shadow: 0px 3px 6px #c7c7c7 !important; */ + color: #fff !important; + border: 0px; + border-radius: 15px !important; + font-weight: bold; + background: linear-gradient(90deg, #81b82f 0%, #1d7873 100%); +} + +body.login-background { + /* background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2)), */ + background: linear-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.1)), + url("../../../images/backgrounds/random_backgrounds/CGI_nodes.jpg") !important; + background-size: cover !important; + background-position: center !important; +} + +body.login-background #text-user, +body.login-background #text-password, +body.login-background #text-auth_code { + background-color: #f6f7fb; + border: 0px; + color: #343434; + border-radius: 3px; + width: 100%; + height: 40px; + box-sizing: border-box; +} + +body.login-background div#user-container input:-webkit-autofill, +body.login-background div#user-container input:-webkit-autofill:hover, +body.login-background div#user-container input:-webkit-autofill:focus, +body.login-background div#user-container input:-webkit-autofill:active, +body.login-background div#password-container input:-webkit-autofill, +body.login-background div#password-container input:-webkit-autofill:hover, +body.login-background div#password-container input:-webkit-autofill:focus, +body.login-background div#password-container input:-webkit-autofill:active, +body.login-background div#auth_code-container input:-webkit-autofill, +body.login-background div#auth_code-container input:-webkit-autofill:hover, +body.login-background div#auth_code-container input:-webkit-autofill:focus, +body.login-background div#auth_code-container input:-webkit-autofill:active { + transition: background-color 10000s ease-in-out 0s; + -webkit-box-shadow: 0 0 0px 0px transparent inset; + -webkit-text-fill-color: #343434; + border: 0px; + width: 89%; +} + +div#ver_num { + color: #fff; + margin-top: 15px; + text-shadow: none; + font-size: smaller; +} + +body.login-background a.ui-button[data-icon="ui-icon-back"] { + background-color: var(--secondary-color) !important; + border: 2px solid var(--primary-color) !important; + color: var(--primary-color) !important; + display: flex; + flex-direction: row-reverse; + align-items: center; + margin-top: 2px !important; + padding: 3px 5px !important; +} + +body.login-background + a.ui-button[data-icon="ui-icon-back"] + > span.ui-button-icon-space { + width: 5px; +} + +/* ==== Spinner ==== */ +.spinner { + width: 100px; + height: 100px; + border-radius: 100%; + background: linear-gradient(#82b92e, #c1ccdc); + animation: animate 1.2s linear infinite; + margin: auto; + margin-bottom: 40px; +} +.spinner span { + position: absolute; + width: 100%; + height: 100%; + border-radius: 100%; + background: linear-gradient(#82b92e, #c1ccdc); +} +.spinner span:nth-child(1) { + filter: blur(4px); +} +.spinner span:nth-child(2) { + filter: blur(8px); +} +.spinner span:nth-child(3) { + filter: blur(12px); +} +.spinner span:nth-child(4) { + filter: blur(16px); +} +.spinner:after { + content: ""; + position: absolute; + top: 10px; + left: 10px; + right: 10px; + bottom: 10px; + /* background: transparent; */ + background: #f1f1f1; + border: solid #fff 10px; + border-radius: 50%; +} + +@keyframes animate { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.status_small_squares, +.status_balls { + width: 12px; + height: 12px; + display: inline-block; +} + +table#list_servers span.data a { + pointer-events: none; + color: inherit; + text-decoration: inherit; + font-weight: inherit; +} + +.zindex10000 { + z-index: 10000; +} + +.relative-mobile { + position: relative !important; +} + +span.agents-counter { + float: right; + margin-right: 15px; +} + +span.agents-counter span { + padding-left: 1px; + padding-right: 1px; +} + +div.border-collapsible + > h4.ui-collapsible-heading + + div.ui-collapsible-content { + border-width: 1px !important; + border-top: 0px !important; + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +table[id^="service-table-"] { + margin-left: -14px; + width: calc(100% + 28px); +} + +table > tbody > tr:nth-child(even), +table[id^="service-table-"] > tbody > tr:nth-child(even) { + background-color: var(--border-color); +} + +table[id^="service-table-"] a strong { + color: #000 !important; +} + +table#last-activity > tbody > tr, +table.tactical_bars > tbody > tr, +.tactical_set > table > tbody > tr { + background-color: var(--secondary-color) !important; +} + +.mt15px { + margin-top: 15px; + margin-bottom: 15px; +} + +.ml5px { + margin-left: 5px; +} + +.close-button-dialog { + padding: 2px 7px !important; + margin-right: 5px !important; +} + +div#main_page { + background-color: var(--body-color); +} + +.ui-header.ui-bar-inherit.ui-header-fixed.slidedown { + height: 45px; + background-color: var(--secondary-color); +} + +.ui-page.ui-page-theme-a.ui-page-active { + padding-top: 45px !important; +} + +.header-button-right.ui-button.ui-shadow.ui-corner-all.ui-widget.ui-button-inherit { + color: var(--secondary-color); + background-color: var(--primary-color); + border-radius: 8px; + border-color: var(--secondary-color); + box-shadow: var(--secondary-color); + -webkit-box-shadow: #fff; + text-shadow: none; + margin-top: 5px !important; + display: flex; + align-items: center; +} + +.header-button-left.ui-button.ui-shadow.ui-corner-all.ui-widget.ui-button-inherit { + color: #95a3bf; + background-color: transparent; + border-color: var(--secondary-color); + box-shadow: var(--secondary-color); + -webkit-box-shadow: #fff; + text-shadow: none; + margin-top: 7px !important; + display: flex; + align-items: center; +} + +span#user_logged { + padding-right: 0px; + right: 20px; + line-height: 30px; + font-size: 10pt !important; +} + +.ui-grid-a.ui-responsive { + background-color: var(--secondary-color); + border-radius: 8px; + border: 1px solid var(--border-color); + margin-bottom: 10px; +} + +.ui-button-icon-space { + margin-left: 2px; + margin-right: 2px; +} + +.ui-icon-back { + background-image: url(../../../images/go-back-mobile.svg) !important; +} + +.ui-icon-home { + background-image: url(../../../images/home-mobile.svg) !important; +} + +.ui-icon-caret-d, +.ui-icon-arrow-d { + background-image: url(../../../images/arrow-d-mobile.svg) !important; +} + +.ui-icon-caret-u, +.ui-icon-arrow-u { + background-image: url(../../../images/arrow-u-mobile.svg) !important; +} + +.ui-icon-delete { + background-image: url(../../../images/close-grey.svg) !important; +} + +.ui-icon-search { + background-image: url(../../../images/search-mobile.svg) !important; +} + +.ui-checkboxradio-icon { + background-image: url(../../../images/checkbox.svg) !important; +} + +.ui-icon-logout { + background-image: url(../../../images/logout-red.svg) !important; +} + +.ui-icon { + background-color: transparent !important; +} + +.ui-body.ui-body-d { + padding: 5px 0px; + margin: 0px; +} + +div.hr { + border-bottom: 1px solid var(--border-color); + width: 100%; + margin: 10px 0px; +} + +div.hr-full { + border-bottom: 1px solid var(--border-color); + width: 200%; + margin: 10px -100px; +} + +table, +fieldset { + padding: 0px 5px !important; +} + +table.tactical_bars tbody tr { + height: 20px; +} + +table.tactical_bars * { + font-size: 16px; +} + +.progress_main { + height: 2.5em; + border: 2px solid #82b92e; + position: relative; + width: 100%; + display: inline-block; + display: flex; + border-radius: 4px; + line-height: 9pt; + font-size: 9pt; + border: 1px solid var(--border-color) !important; + background-color: var(--body-color); + margin-right: 40px !important; +} + +.progress_main_noborder { + height: 2.5em; + position: relative; + width: 100%; + display: inline-block; + display: flex; +} + +.progress_main:before { + content: attr(data-label); + position: absolute; + text-align: center; + left: 0; + right: 0; + margin-top: 0.2em; +} + +.progress { + width: 0%; + background: #82b92e; + height: 100%; + float: left; + border-radius: 4px; +} + +.tiny.tactical_bar { + width: 50%; +} + +.tactical_set > table { + width: 60% !important; +} + +.tactical_set > table > tbody > tr > td { + text-align: left !important; +} + +.tactical_set > table > tbody > tr > #table1-0-0, +.tactical_set > table > tbody > tr > #table1-0-3, +.tactical_set > table > tbody > tr > #table2-0-0, +.tactical_set > table > tbody > tr > #table2-0-3 { + width: 15% !important; +} + +.tactical_set > table > tbody > tr > #table1-0-1, +.tactical_set > table > tbody > tr > #table2-0-1 { + width: 40% !important; +} + +.tactical_set > table > tbody > tr > #table2-0-3 > div.alert_background_state { + margin: 0px !important; +} + +div#tactical2 .tactical_set > table { + width: 100% !important; +} + +.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content, +.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content.ui-collapsible-collapsed { + border: 1px solid var(--border-color); + border-radius: 8px; + margin-top: 0px; + margin-bottom: 10px; +} + +.ui-collapsible-heading-toggle.ui-button.ui-button-a.ui-mini, +.ui-collapsible-heading.ui-collapsible-heading-collapsed { + background-color: var(--secondary-color) !important; + border: 0px !important; + font-weight: 400; +} + +.ui-collapsible-content.ui-body-c { + padding: 0px; + margin: 0px; +} + +.ui-listview-item.ui-listview-item-static.ui-body-inherit.ui-first-child.ui-last-child { + padding: 0px; +} + +table#last-activity > tbody > tr:not(:last-child) { + border-bottom: 1px solid var(--border-color) !important; +} + +table#last-activity > tbody > tr { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} + +table#last-activity > tbody > tr > td.cell_0 { + width: 10%; + padding-bottom: 2px !important; +} +table#last-activity > tbody > tr > td.cell_1 { + width: 70%; + max-width: 75%; + padding-bottom: 2px !important; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} +table#last-activity > tbody > tr > td.cell_2 { + width: 20%; + padding-bottom: 2px !important; + padding-left: 0px !important; + padding-right: 0px !important; +} +table#last-activity > tbody > tr > td.cell_3 { + width: 10%; + margin-left: 10%; + padding-top: 2px !important; +} + +table#last-activity > tbody > tr > td > b { + display: none; +} + +.muted { + color: var(--muted-color) !important; +} + +.white-card { + background-color: var(--secondary-color); + padding: 10px; + border: 1px solid var(--border-color); + border-radius: 8px; +} + +.white-card.p-lr-0px { + padding-left: 0px; + padding-right: 0px; +} + +.white-card.p-tb-0px { + padding-top: 0px; + padding-bottom: 0px; +} + +/* Events table */ +table#last_agent_events > tbody > tr.events > td.cell_0, +table#list_events > tbody > tr.events > td.cell_0 { + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} + +table#last_agent_events > tbody > tr.events > td.vertical_middle, +table#list_events > tbody > tr.events > td.vertical_middle { + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + color: #4a4a4a; +} + +table#last_agent_events > tbody > tr.events, +table#list_events > tbody > tr.events { + background-color: var(--secondary-color) !important; +} + +table#last_agent_events > tbody > tr.events.datos_green > td, +table#list_events > tbody > tr.events.datos_green > td { + background-color: #81b92e40; +} +table#last_agent_events > tbody > tr.events.datos_red > td, +table#list_events > tbody > tr.events.datos_red > td { + background-color: #ed474a40; +} +table#last_agent_events > tbody > tr.events.datos_yellow > td, +table#list_events > tbody > tr.events.datos_yellow > td { + background-color: #fcab1040; +} +table#last_agent_events > tbody > tr.events.datos_blue > td, +table#list_events > tbody > tr.events.datos_blue > td { + background-color: #25a8ff40; +} +table#last_agent_events > tbody > tr.events.datos_grey > td, +table#list_events > tbody > tr.events.datos_grey > td { + background-color: #adadad40; +} +table#last_agent_events > tbody > tr.events.datos_pink > td, +table#list_events > tbody > tr.events.datos_pink > td { + background-color: #ef6dfb40; +} +table#last_agent_events > tbody > tr.events.datos_brown > td, +table#list_events > tbody > tr.events.datos_brown > td { + background-color: #a52e0040; +} + +table#list_agents > thead > tr > th, +table#list_Modules > thead > tr > th, +table#list_alerts > thead > tr > th, +table#list_module_data > thead > tr > th { + display: initial; + text-align: center; +} + +h4[id^="service-"].ui-collapsible-heading + > a + > span.ui-icon.ui-collapsible-icon-right { + margin-top: 2px !important; +} + +h4[id^="service-"].ui-collapsible-heading + > a.ui-collapsible-heading-toggle.ui-button.ui-button-a { + padding-left: 10px !important; +} + +table[id^="service-table-"] { + padding: 0px !important; +} + +table[id^="service-table-"] > tbody > tr { + padding: 0px 5px !important; + height: 48px !important; +} + +table#list_events td { + width: calc(100vw - 44px) !important; +} + +.white-card.p-lr-0px table#list_alerts, +.white-card.p-lr-0px table#list_alerts thead, +.white-card.p-lr-0px table#list_alerts tbody, +.white-card.p-lr-0px table#list_alerts tr, +.white-card.p-lr-0px table#list_agents, +.white-card.p-lr-0px table#list_agents thead, +.white-card.p-lr-0px table#list_agents tbody, +.white-card.p-lr-0px table#list_agents tr, +.white-card.p-lr-0px table#list_Modules, +.white-card.p-lr-0px table#list_Modules thead, +.white-card.p-lr-0px table#list_Modules tbody, +.white-card.p-lr-0px table#list_Modules tr { + width: calc(100vw - 26px) !important; +} + +table#list_alerts > thead > tr > th[data-colstart="1"], +table#list_alerts > tbody > tr > td.cell_0 { + width: 7%; + padding-right: 5px; +} +table#list_alerts > thead > tr > th[data-colstart="2"], +table#list_alerts > tbody > tr > td.cell_1 { + width: 50%; +} +table#list_alerts > tbody > tr > td.cell_1 > div > span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +table#list_alerts > thead > tr > th[data-colstart="3"], +table#list_alerts > tbody > tr > td.cell_2 { + width: 25%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +table#list_alerts > thead > tr > th[data-colstart="4"], +table#list_alerts > tbody > tr > td.cell_3 { + width: 18%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +table#list_alerts > thead > tr > th[data-colstart="1"] { + color: transparent; + text-shadow: none; +} + +table#list_alerts > tbody > tr > td.cell_1 { + padding: 0px !important; +} + +table#list_agents span.agents_last_contact { + margin-left: 5px; +} + +table#list_agents td.cell_0 > span.agent-status { + margin-right: 5px; +} + +table#list_agents td.cell_0 > a { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +table#list_agents td.cell_5 { + display: flex; + flex-direction: row; + justify-content: center; + white-space: nowrap; +} + +table#list_agents td.cell_6 span.agents_last_contact { + white-space: nowrap; + margin-right: 5px; +} + +table#list_agents.ui-table-reflow thead tr th { + display: initial; +} + +table#list_agents > tbody > tr > td.cell_1, +table#list_agents > tbody > tr > td.cell_2, +table#list_agents > tbody > tr > td.cell_3, +table#list_agents > tbody > tr > td.cell_4, +table#list_agents > tbody > tr > td.cell_7, +table#list_agents > thead > tr > th[data-colstart="2"], +table#list_agents > thead > tr > th[data-colstart="3"], +table#list_agents > thead > tr > th[data-colstart="4"], +table#list_agents > thead > tr > th[data-colstart="5"], +table#list_agents > thead > tr > th[data-colstart="8"], +table#list_Modules > thead > tr > th[data-colstart="2"], +table#list_Modules > thead > tr > th[data-colstart="3"], +table#list_Modules > thead > tr > th[data-colstart="4"] { + display: none; +} + +table#list_Modules > thead > tr > th[data-colstart="1"], +table#list_Modules > tbody > tr > td.cell_0 { + width: 50%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-left: 5px; +} +table#list_Modules > thead > tr > th[data-colstart="5"], +table#list_Modules > tbody > tr > td.cell_4 { + width: 25%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} +table#list_Modules > thead > tr > th[data-colstart="6"], +table#list_Modules > tbody > tr > td.cell_5 { + width: 25%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; + margin-right: 5px; +} + +table#list_alerts > tbody > tr, +table#list_agents > tbody > tr, +table#list_Modules > tbody > tr { + height: 48px !important; +} + +table#list_alerts tbody td .status_rounded_rectangles, +table#list_Modules tbody td .status_rounded_rectangles, +table#list_agents tbody td .status_rounded_rectangles { + line-height: 20px; + width: 5px; + height: 20px; +} + +table#list_alerts tbody td.cell_4 div.status_rounded_rectangles { +} + +table#list_Modules td.cell_0 span.module-status { + margin-right: 5px; +} + +table#list_agents thead tr { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; +} + +table#list_agents tr th { + text-align: center; +} + +table#list_Modules tr td, +table#list_agents tr td { + padding: 0px !important; + line-height: 25px; +} + +table#list_agents > thead > tr > th[data-colstart="1"], +table#list_agents > tbody > tr > td.cell_0 { + width: 50%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-left: 5px; +} +table#list_agents > thead > tr > th[data-colstart="6"], +table#list_agents > tbody > tr > td.cell_5 { + width: 25%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} +table#list_agents > thead > tr > th[data-colstart="7"], +table#list_agents > tbody > tr > td.cell_6 { + width: 25%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; + margin-right: 5px; +} + +table#list_events td a div.event_name { + word-wrap: break-word; +} + +div#module-dialog-popup { + width: 280px; + height: 200px; + max-width: 100vw !important; +} + +div#module-dialog { + height: 100%; + border-radius: 8px; +} + +a#close-dialog-btn { + padding: 0px; + height: 25px; + width: 25px; + line-height: 25px; + margin-right: 5px; +} + +a#graph-option, +a#historical-option { + line-height: 40px; +} + +fieldset.ui-controlgroup.ui-controlgroup-vertical.ui-group-theme-inherit + > label, +div[data-role="fieldcontain"] > fieldset > label[for^="select-"] { + margin-top: 10px; + font-size: 10pt !important; + font-weight: 600; +} + +div[data-role="fieldcontain"] + > fieldset + > div.ui-selectmenu + > a[id^="select-"] { + box-shadow: unset; + text-align: left; + font-weight: 400; + border: 1px solid var(--border-dark-color) !important; + border-radius: 8px !important; +} + +ul.ui-selectmenu-custom-list.ui-listview + > li + > a.ui-listview-item-button.ui-button.ui-button-active { + background-color: var(--primary-color); +} + +ul.ui-selectmenu-custom-list.ui-listview + > li + > a.ui-listview-item-button.ui-button { + font-weight: 400; +} + +div.ui-page-dialog-contain.ui-overlay-shadow.ui-corner-all.ui-body-a + > div.ui-content { + padding: 0px; +} + +div.ui-popup.ui-corner-all.ui-overlay-shadow.ui-selectmenu-custom.ui-body-inherit + > ul.ui-selectmenu-custom-list.ui-listview { + margin-left: -1px; + margin-right: -1px; +} + +div.ui-popup.ui-corner-all.ui-overlay-shadow.ui-selectmenu-custom.ui-body-inherit, +div.ui-page-dialog-contain.ui-overlay-shadow.ui-corner-all.ui-body-a { + border-radius: 8px; +} + +div.ui-toolbar-header.ui-bar-inherit { + height: 40px; + line-height: 22px; + font-size: 10pt; + background-color: var(--secondary-color) !important; + height: 48px; + border-bottom: 1px solid var(--border-color); +} + +div.ui-toolbar-header.ui-bar-inherit h1.ui-toolbar-title { + font-size: 11pt; + text-align: left; + margin-left: 10px; + line-height: 28px; +} + +div.ui-toolbar-header.ui-bar-inherit + > .ui-page-dialog-close-button.ui-button.ui-corner-all.ui-button-icon-only.ui-toolbar-header-button-left { + background-color: transparent; + border: 0px; + right: 10px; + left: unset; + top: 10px; +} + +div#free_search-container + > fieldset.ui-controlgroup.ui-controlgroup-vertical.ui-group-theme-inherit + > div.ui-textinput.ui-corner-all.ui-shadow-inset.ui-textinput-search.ui-body-inherit.ui-textinput-has-clear-button { + box-shadow: unset; + border: 1px solid var(--border-dark-color) !important; + border-radius: 8px !important; +} + +input[name="free_search"] { + height: 48px; + margin-left: 15px !important; + padding-left: 30px !important; +} + +input[name="free_search"]::placeholder { + font-style: italic; + color: var(--muted-color); +} + +div#free_search-container + span.ui-textinput-search-icon.ui-icon.ui-alt-icon.ui-icon-search { + height: 30px; + width: 25px; + margin-top: -15px !important; + margin-left: 5px; +} + +a.ui-textinput-clear-button.ui-button-icon-only.ui-button-right.ui-widget.ui-button-inherit.ui-button.ui-shadow.ui-controlgroup-item { + height: 40px; + padding: 0px; + width: 40px; + margin-top: -20px !important; + box-shadow: unset; +} + +div#error-dialog a#error-dialog-button_close, +div#logout_dialog a#logout_dialog-button_close, +div#detail_event_dialog > div > div a#validate_button, +div#detail_event_dialog > div > div a#process_button, +fieldset[data-role="controlgroup"] > input[type="submit"] { + height: 48px; + border-radius: 8px; + background-color: var(--primary-color); + text-shadow: none; + color: var(--secondary-color); + font-size: 11pt !important; +} + +div#detail_event_dialog > div > div a#validate_button, +div#detail_event_dialog > div > div a#process_button { + margin-right: 10px; + margin-left: 10px; +} + +div#detail_event_dialog > div > div a#process_button { + background-color: var(--secondary-color); + color: var(--primary-color); + height: 22px; +} + +div#error-dialog h1.dialog_title, +div#logout_dialog h1.dialog_title { + font-size: 11pt; +} + +div#error-dialog + div.ui-page-dialog-contain.ui-overlay-shadow.ui-corner-all.ui-body-a, +div#logout_dialog + div.ui-page-dialog-contain.ui-overlay-shadow.ui-corner-all.ui-body-a { + padding: 10px; +} + +div#error-dialog a#error-dialog-button_close, +div#logout_dialog a#logout_dialog-button_close { + height: 30px; +} + +div#detail_event_dialog > div > div a#validate_button:active, +div#detail_event_dialog > div > div a#validate_button:hover, +fieldset[data-role="controlgroup"] > input[type="submit"]:active, +fieldset[data-role="controlgroup"] > input[type="submit"]:hover { + background-color: var(--primary-color-hover); + text-shadow: none; + color: var(--body-color); +} + +fieldset[data-role="controlgroup"] > div.ui-slider > input[type="number"] { + border: 1px solid var(--border-dark-color) !important; + border-radius: 8px; + text-shadow: none; + box-shadow: unset; + font-weight: 400; + height: 32px; +} + +fieldset[data-role="controlgroup"] + > div.ui-slider + > div.ui-slider-track.ui-shadow-inset.ui-corner-all.ui-body-inherit { + background-color: var(--border-dark-color); + border: 0px; + box-shadow: unset; + border-radius: 8px; + height: 10px; + margin-top: 10px; +} + +fieldset[data-role="controlgroup"] + > div.ui-slider + > div.ui-slider-track.ui-shadow-inset.ui-corner-all.ui-body-inherit + > a { + line-height: 28px; + border-radius: 50%; + background-color: var(--secondary-color); +} + +fieldset[data-role="controlgroup"] + > div.ui-slider + > div.ui-slider-track.ui-shadow-inset.ui-corner-all.ui-body-inherit + > a::before { + color: var(--muted-color); + content: "< >"; +} + +div.filter-collapsible.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content + > h4 + > a { + height: 48px; + padding-top: 0px; + padding-left: 0px; + line-height: 55px; + font-size: 11pt; +} + +div.filter-collapsible.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content + > h4 + > a + > span.ui-icon.ui-icon-arrow-u, +div.filter-collapsible.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content + > h4 + > a + > span.ui-icon.ui-icon-arrow-d { + margin-left: 5px; +} + +div.filter-collapsible.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content + > h4 + > a, +div.filter-collapsible.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content + > div + > ul + > li { + text-shadow: none !important; + background-color: var(--border-color) !important; +} + +div.list_groups.ui-collapsible-set + div.ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content + h4 + a { + background-color: var(--secondary-color) !important; +} + +div.list_groups.ui-collapsible-set div.ui-collapsible-content.ui-body-d { + padding: 0px; +} + +div.list_groups.ui-collapsible-set + div.ui-collapsible-content.ui-body-d + li.ui-listview-item { + height: 28px; +} + +div.list_groups.ui-collapsible-set + div.ui-collapsible-content.ui-body-d + li.ui-listview-item + a { + font-weight: 400px; + height: 28px; + line-height: 33px; + padding-top: 0px; + padding-bottom: 0px; +} + +div.list_groups.ui-collapsible-set + div.ui-collapsible.ui-collapsible-inset + h4 + a + span.ui-icon.ui-collapsible-icon-right { + margin-top: 2px; +} + +div.list_groups.ui-collapsible-set + div.ui-collapsible.ui-collapsible-inset + h4 + a + span.agents-counter { + margin-top: 4px; +} + +div.list_groups.ui-collapsible-set + div.ui-collapsible.ui-collapsible-inset + h4 + a + img { + margin-bottom: -4px; +} + +a > span.number_count { + font-weight: normal; +} + +.close-button-dialog, +div#detail_event_dialog > div .close-button-dialog { + background-image: url(../../../images/close-grey.svg) !important; + background-repeat: no-repeat; + background-position: center; + margin: 0px; + margin-right: 10px !important; + width: 25px; + height: 25px; + background-color: transparent !important; + border: unset !important; + box-shadow: none !important; +} + +div#detail_event_dialog > div h1.dialog_title { + font-size: 11pt; + margin-left: 10px; +} + +div#detail_event_dialog tr.event_name { + display: none; +} + +div#detail_event_dialog table.pandora_responsive.event_details * { + font-size: 10pt; +} + +div#detail_event_dialog + table.pandora_responsive.event_details + > tbody + > tr:nth-child(even), +div#detail_event_dialog table.pandora_responsive.event_details th, +div#detail_event_dialog table.pandora_responsive.event_details td { + background-color: var(--secondary-color); +} + +a.big_data { + text-decoration: none !important; + color: initial !important; +} + +div#module-dialog > div.ui-content > a { + box-shadow: none; + background-color: var(--border-color); + text-shadow: none; + border-radius: 8px; +} + +div#agent_graphs, +div#agent_details { + padding-left: 10px; + padding-right: 10px; +} + +a.ui-collapsible-heading-toggle.ui-button.ui-button-a.ui-mini { + height: 38px; + line-height: 40px; + font-weight: 400; + font-size: 11pt; +} + +div#filter-modules-container + div.ui-textinput.ui-corner-all.ui-shadow-inset.ui-textinput-text.ui-body-inherit { + box-shadow: unset; + border: 1px solid var(--border-dark-color); + border-radius: 8px; + background-color: var(--border-color); +} + +div#filter-modules-container input#filter-modules { + height: 38px; +} + +table#list_agent_Modules, +table#list_agent_Modules thead, +table#list_agent_Modules tbody, +table#list_agent_Modules tr { + width: calc(100vw - 48px) !important; +} + +table#list_agent_Modules tr { + height: 38px; +} + +table#list_agent_Modules thead th { + display: initial; +} + +table#list_agent_Modules > thead > tr > th[data-colstart="3"], +table#list_agent_Modules > thead > tr > th[data-colstart="4"] { + display: none; +} + +table#list_agent_Modules > thead > tr > th[data-colstart="1"], +table#list_agent_Modules > tbody > tr > td.cell_0 { + width: 60%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: left; +} +table#list_agent_Modules > thead > tr > th[data-colstart="2"], +table#list_agent_Modules > tbody > tr > td.cell_1 { + width: 15%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} +table#list_agent_Modules > thead > tr > th[data-colstart="5"], +table#list_agent_Modules > tbody > tr > td.cell_4 { + width: 25%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} + +.truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} + +div#start_date-container + div.ui-textinput.ui-corner-all.ui-shadow-inset.ui-textinput-text.ui-body-inherit, +div#unknown_graph-container label, +div#time_compare_overlapped-container label, +div#time_compare_separated-container label, +div#draw_events-container label, +div#draw_alerts-container label { + border: 1px solid var(--border-dark-color); + border-radius: 8px; + height: 48px; + line-height: 30px; + font-weight: 400; +} + +div#start_date-container + div.ui-textinput.ui-corner-all.ui-shadow-inset.ui-textinput-text.ui-body-inherit { + background-color: #f6f6f6; + border: 1px solid var(--border-dark-color); + border-radius: 8px; + height: 44px; + box-shadow: none; + line-height: 30px; + font-weight: 400; +} + +div#start_date-container + div.ui-textinput.ui-corner-all.ui-shadow-inset.ui-textinput-text.ui-body-inherit + input { + margin-top: 10px; +} + +div#graph_content > div.parent_graph { + width: 100% !important; + display: flex; + flex-direction: column; + flex-wrap: nowrap; + align-items: center; +} + +.logout-text { + color: #ed474a !important; +} + +div.menu-buttons { + display: flex; + flex-direction: column; + flex-wrap: nowrap; + align-items: stretch; +} + +div.menu-buttons > a[data-role="button"] { + margin-top: 0px; + margin-bottom: -1px; + box-shadow: unset; + background-color: var(--secondary-color) !important; + border-radius: 0px; + line-height: 28px; + text-align: left; +} + +div.menu-buttons > a[data-role="button"]:first-child { + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +div.menu-buttons > a[data-role="button"]:last-child { + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; +} + +div.search-home { + margin-left: -5px; + margin-right: -5px; +} + +.no-data { + color: #ed474a !important; + text-align: center !important; + font-size: 10pt !important; +} + +a.visual-console-button { + text-shadow: none !important; + box-shadow: unset !important; + background-color: var(--border-color) !important; +} + +table#list_visualmaps tr td { + background-color: var(--secondary-color); + border-bottom: 1px solid var(--border-color); + height: 48px; +} + +table#list_visualmaps tr td a { + font-size: 10pt; + font-weight: 400; +} + +table#list_visualmaps tr:first-child td { + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} + +table#list_visualmaps tr:last-child td { + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + border-bottom: 0px; +} + +table[id^="service-table-"] { + margin-top: -8px; +} + +table[id^="service-table-"] tbody tr:nth-child(odd) { + background-color: var(--secondary-color) !important; +} + +div.list_services h4 > a { + background-color: var(--secondary-color) !important; +} + +div.agent-last-events ul li.ui-last-child { + border-top: 0px; + padding: 0px; +} + +table#list_servers tbody td .status_small_squares { + margin-top: 5px; +} +table#list_servers tbody td span.data a { + text-decoration: none !important; + color: unset !important; +} + +/* =============================================================== */ +/* ========================= For tablets ========================= */ +/* =============================================================== */ +@media screen and (min-width: 480px) { + table#last-activity > tbody > tr { + display: table-row; + } + table#last-activity > thead > tr > th[data-colstart="1"], + table#last-activity > tbody > tr > td.cell_0 { + width: 10%; + } + table#last-activity > thead > tr > th[data-colstart="2"], + table#last-activity > tbody > tr > td.cell_1 { + width: 50%; + } + table#last-activity > thead > tr > th[data-colstart="3"], + table#last-activity > tbody > tr > td.cell_2 { + width: 20%; + } + table#last-activity > thead > tr > th[data-colstart="4"], + table#last-activity > tbody > tr > td.cell_3 { + width: 20%; + } + + table#list_events > tbody > tr { + display: table-row; + } + table#list_events > tbody > tr > td.cell_0 { + width: 70% !important; + line-height: 34px; + border-top-right-radius: 0px !important; + border-top-left-radius: 8px !important; + border-bottom-left-radius: 8px !important; + } + table#list_events > tbody > tr > td.vertical_middle { + width: 30% !important; + line-height: 34px; + border-bottom-left-radius: 0px !important; + border-top-right-radius: 8px !important; + border-bottom-right-radius: 8px !important; + } + table#list_events > tbody > tr > td.vertical_middle .events_timestamp { + margin-top: 10px; + } + + table#list_agents > thead > tr > th { + display: unset !important; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-align: left; + padding-left: 0px; + padding-right: 0px; + } + table#list_agents > tbody > tr > td { + display: initial !important; + white-space: nowrap; + line-height: 48px; + height: 48px; + } + table#list_agents > tbody > tr > td span.align-none-10p { + display: none; + } + table#list_agents > tbody > tr > td .status_rounded_rectangles { + width: 30px; + } + table#list_agents > tbody > tr > td > img { + margin-top: 15px; + } + table#list_agents > tbody > tr { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + } + table#list_agents > thead > tr > th[data-colstart="1"], + table#list_agents > tbody > tr > td.cell_0 { + width: 40%; + } + table#list_agents > thead > tr > th[data-colstart="2"], + table#list_agents > tbody > tr > td.cell_1 { + width: 7%; + } + table#list_agents > thead > tr > th[data-colstart="3"], + table#list_agents > tbody > tr > td.cell_2 { + width: 7%; + } + table#list_agents > thead > tr > th[data-colstart="4"], + table#list_agents > tbody > tr > td.cell_3 { + width: 7%; + } + table#list_agents > thead > tr > th[data-colstart="5"], + table#list_agents > tbody > tr > td.cell_4 { + width: 7%; + } + table#list_agents > thead > tr > th[data-colstart="6"], + table#list_agents > tbody > tr > td.cell_5 { + width: 12%; + } + table#list_agents > thead > tr > th[data-colstart="7"], + table#list_agents > tbody > tr > td.cell_6 { + width: 10%; + margin-right: 0px; + } + table#list_agents > thead > tr > th[data-colstart="8"], + table#list_agents > tbody > tr > td.cell_7 { + width: 10%; + margin-right: 5px; + } + + table#list_Modules > thead > tr { + display: flex; + } + table#list_Modules > thead > tr > th { + display: initial !important; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-align: center; + padding-left: 0px; + padding-right: 0px; + font-size: 10pt; + } + table#list_Modules > tbody > tr > td { + display: initial !important; + white-space: nowrap; + line-height: 48px; + height: 48px; + text-align: center; + } + table#list_Modules > tbody > tr > td * { + font-size: 10pt !important; + } + table#list_Modules > tbody > tr > td span.align-none-10p { + display: none; + } + table#list_Modules > tbody > tr > td .status_rounded_rectangles { + width: 30px; + } + table#list_Modules > tbody > tr { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + } + table#list_Modules > thead > tr > th[data-colstart="1"], + table#list_Modules > tbody > tr > td.cell_0 { + width: 30%; + text-align: left; + } + table#list_Modules > thead > tr > th[data-colstart="2"], + table#list_Modules > tbody > tr > td.cell_1 { + width: 30%; + } + table#list_Modules > thead > tr > th[data-colstart="3"], + table#list_Modules > tbody > tr > td.cell_2 { + width: 10%; + } + table#list_Modules > thead > tr > th[data-colstart="4"], + table#list_Modules > tbody > tr > td.cell_3 { + width: 10%; + } + table#list_Modules > thead > tr > th[data-colstart="5"], + table#list_Modules > tbody > tr > td.cell_4 { + width: 10%; + } + table#list_Modules > thead > tr > th[data-colstart="6"], + table#list_Modules > tbody > tr > td.cell_5 { + width: 10%; + } + + table#list_alerts > thead > tr { + display: flex; + } + table#list_alerts > thead > tr > th { + display: initial !important; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-align: center; + padding-left: 0px; + padding-right: 0px; + font-size: 10pt; + } + table#list_alerts > tbody > tr > td { + display: initial !important; + white-space: nowrap; + line-height: 48px; + height: 48px; + text-align: center; + } + table#list_alerts > tbody > tr > td * { + font-size: 10pt !important; + } + table#list_alerts > tbody > tr > td span.align-none-10p { + display: none; + } + table#list_alerts > tbody > tr > td .status_rounded_rectangles { + width: 30px; + margin-top: 10px; + } + table#list_alerts > tbody > tr { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + } + table#list_alerts > thead > tr > th[data-colstart="1"], + table#list_alerts > tbody > tr > td.cell_0 { + width: 10%; + text-align: left; + } + table#list_alerts > thead > tr > th[data-colstart="2"], + table#list_alerts > tbody > tr > td.cell_1 { + width: 60%; + } + table#list_alerts > thead > tr > th[data-colstart="3"], + table#list_alerts > tbody > tr > td.cell_2 { + width: 15%; + } + table#list_alerts > thead > tr > th[data-colstart="4"], + table#list_alerts > tbody > tr > td.cell_3 { + width: 15%; + } + table#list_alerts > tbody > tr > td.cell_1 > div { + flex-direction: row; + } + table#list_alerts > tbody > tr > td.cell_1 > div > span:first-child { + margin-right: 10px; + } + + table#list_agent_Modules > tbody > tr, + table#list_agent_Modules > thead > tr { + display: flex; + } + table#list_agent_Modules > thead > tr > th { + display: initial !important; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-align: center; + padding-left: 0px; + padding-right: 0px; + font-size: 10pt; + } + table#list_agent_Modules > tbody > tr > td { + display: initial !important; + white-space: nowrap; + line-height: 38px; + height: 48px; + text-align: center; + } + table#list_agent_Modules > tbody > tr > td * { + font-size: 10pt !important; + } + table#list_agent_Modules > tbody > tr > td span.align-none-10p { + display: none; + } + table#list_agent_Modules > tbody > tr > td .status_rounded_rectangles { + width: 30px; + margin-top: 12px; + } + table#list_agent_Modules > thead > tr > th[data-colstart="1"], + table#list_agent_Modules > tbody > tr > td.cell_0 { + width: 40%; + text-align: left; + } + table#list_agent_Modules > thead > tr > th[data-colstart="2"], + table#list_agent_Modules > tbody > tr > td.cell_1 { + width: 10%; + } + table#list_agent_Modules > thead > tr > th[data-colstart="3"], + table#list_agent_Modules > tbody > tr > td.cell_2 { + width: 15%; + } + table#list_agent_Modules > thead > tr > th[data-colstart="4"], + table#list_agent_Modules > tbody > tr > td.cell_3 { + width: 15%; + } + table#list_agent_Modules > thead > tr > th[data-colstart="5"], + table#list_agent_Modules > tbody > tr > td.cell_4 { + width: 20%; + } + table#list_agent_Modules > tbody > tr > td.cell_1 > div { + flex-direction: row; + } + + div#module-dialog-popup { + height: 225px; + } + div#module-dialog div[role="main"] { + display: flex; + flex-direction: column; + } + + table#list_module_data > thead > tr { + display: flex; + } + table#list_module_data > thead > tr > th { + display: initial !important; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-align: left; + padding-left: 0px; + padding-right: 0px; + font-size: 10pt; + } + table#list_module_data > tbody > tr > td { + display: initial !important; + white-space: nowrap; + } + table#list_module_data > tbody > tr > td * { + font-size: 10pt !important; + } + table#list_module_data > tbody > tr > td span.align-none-10p { + display: none; + } + table#list_module_data > tbody > tr > td .status_rounded_rectangles { + width: 30px; + } + table#list_module_data > tbody > tr { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + } + table#list_module_data > thead > tr > th[data-colstart="1"], + table#list_module_data > tbody > tr > td.cell_0 { + width: 50%; + } + table#list_module_data > thead > tr > th[data-colstart="2"], + table#list_module_data > tbody > tr > td.cell_1 { + width: 50%; + } + + table#list_servers tbody td .status_small_squares { + margin-top: 5px; + } + table#list_servers tbody td span.data a { + text-decoration: none !important; + color: unset !important; + } + + table[id^="service-table-"] { + border-collapse: collapse; + } + table[id^="service-table-"] tbody td { + padding: 0px; + /* border: 0px !important; */ + } + table[id^="service-table-"] tbody td:first-child { + padding-left: 10px; + border-left: 1px solid var(--border-color); + } + table[id^="service-table-"] tbody td:last-child { + border-right: 1px solid var(--border-color); + } + + table#list_visualmaps tbody td { + padding: 0px 10px; + } + table#list_visualmaps thead th { + display: none; + } + + input[name="login_btn"] { + line-height: 38px; + } +} diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index b8a21d60b1..253885659f 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -151,10 +151,35 @@ class System } + public function checkEnterprise($page='') + { + if ((int) $this->getConfig('enterprise_installed', false) === 1) { + return true; + } else { + if (empty($this->getRequest('page', false)) === false && $page === '') { + $page = $this->getRequest('page', false); + } + + db_pandora_audit( + AUDIT_LOG_ENTERPRISE_VIOLATION, + 'Trying to access to Mobile Page: '.$page + ); + + return false; + } + } + + public static function getDefaultACLFailText() { return __('Access to this page is restricted to authorized users only, please contact your system administrator if you should need help.').'

'.__('Please remember that any attempts to access this page will be recorded on the %s System Database.', get_product_name()); } + public static function getDefaultLicenseFailText() + { + return __('Invalid license, please contact your system administrator if you should need help.').'

'.__('Please remember that any attempts to access this page will be recorded on the %s System Database.', get_product_name()); + } + + } diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index 3d330994cf..c2ab2d76d3 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -220,11 +220,11 @@ class Ui if ($left_button === false) { $left_button = $this->createHeaderButton( [ - 'icon' => 'ui-icon-back', + 'icon' => 'ui-icon-logout', 'pos' => 'left', 'text' => __('Logout'), 'href' => 'index.php?action=logout', - 'class' => 'header-button-left', + 'class' => 'header-button-left logout-text', ] ); } @@ -413,12 +413,13 @@ class Ui } - public function contentBeginCollapsible($title=' ') + public function contentBeginCollapsible($title=' ', $class='') { $this->endCollapsible = false; $this->collapsible = []; $this->collapsible['items'] = []; $this->collapsible['title'] = $title; + $this->collapsible['class'] = $class; } @@ -432,7 +433,7 @@ class Ui { $this->endCollapsible = true; - $html = "
\n"; + $html = "
\n"; $html .= '

'.$this->collapsible['title']."

\n"; $html .= "
    \n"; @@ -511,9 +512,14 @@ class Ui $html .= "\n"; } - // Erase other options and only for the input + // Erase other options and only for the input. unset($options['label']); + if ($options['type'] === 'password') { + $html .= '
    '; + $options['style'] .= 'background-image: url("'.ui_get_full_url('/').'/images/enable.svg");'; + } + $html .= ' $value) { $html .= ' '.$option."='".$value."' "; @@ -521,6 +527,26 @@ class Ui $html .= ">\n"; + if ($options['type'] === 'password') { + $html .= '
    '; + $html .= '
    '; + $html .= ' + '; + } + $html .= "\n"; $html .= "
\n"; @@ -757,6 +783,10 @@ class Ui $dialogHtml .= "
\n"; $dialogHtml .= "\n"; + if ($options['return_html_dialog'] === true) { + return $dialogHtml; + } + $this->dialogs[$type][] = $dialogHtml; } diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index 6e932366c8..200a3faba8 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -366,6 +366,60 @@ class User $ui->showFooter(false); $ui->beginContent(); + $ui->contentAddHtml( + ' + + + ' + ); + $logo_image = html_print_image( ui_get_mobile_login_icon(), true, @@ -389,17 +443,29 @@ class User 'name' => 'user', 'value' => $this->user, 'placeholder' => __('user'), - 'label' => __('User'), + // 'autofocus' => 'autofocus', + // 'label' => __('User'), ]; $ui->formAddInputText($options); $options = [ 'name' => 'password', 'value' => '', 'placeholder' => __('password'), - 'label' => __('Password'), + // 'label' => __('Password'), 'required' => 'required', ]; $ui->formAddInputPassword($options); + + $spinner = ' +
+ + + + +
+ '; + $ui->formAddHtml($spinner); + $options = [ 'value' => __('Login'), 'icon' => 'arrow-r', @@ -431,6 +497,7 @@ class User } $ui->contentAddHtml(''); + $ui->contentAddHtml('
'.$pandora_version.'
'); $ui->endContent(); $ui->showPage(); @@ -465,43 +532,79 @@ class User $ui->createHeader('', $left_button); $ui->showFooter(false); $ui->beginContent(); - $ui->contentAddHtml( - '
'.html_print_image( - ui_get_mobile_login_icon(), - true, - [ - 'alt' => 'logo', - 'border' => 0, - ], - false, - false, - false, - true - ).'
' - ); - $ui->contentAddHtml('
'); - $ui->beginForm(); - $ui->formAddHtml(html_print_input_hidden('action', 'double_auth', true)); - $options = [ - 'name' => 'auth_code', - 'value' => '', - 'placeholder' => __('Authenticator code'), - 'label' => __('Authenticator code'), - ]; - $ui->formAddInputPassword($options); - $options = [ - 'value' => __('Check code'), - 'icon' => 'arrow-r', - 'icon_pos' => 'right', - 'name' => 'auth_code_btn', - ]; - $ui->formAddSubmitButton($options); - $ui->endForm(); - $ui->contentAddHtml('
'); - $ui->endContent(); - $ui->showPage(); - $this->errorDoubleAuth = false; + $ui->contentAddHtml( + ' + + + ' + ); + + $ui->contentAddHtml( + '
'.html_print_image( + ui_get_mobile_login_icon(), + true, + [ + 'alt' => 'logo', + 'border' => 0, + ], + false, + false, + false, + true + ).'
' + ); + $ui->contentAddHtml('
'); + $ui->beginForm(); + $ui->formAddHtml(html_print_input_hidden('action', 'double_auth', true)); + $options = [ + 'name' => 'auth_code', + 'value' => '', + 'placeholder' => __('Authenticator code'), + 'autofocus' => 'autofocus', + // 'label' => __('Authenticator code'), + ]; + $ui->formAddInputPassword($options); + $options = [ + 'value' => __('Check code'), + 'icon' => 'arrow-r', + 'icon_pos' => 'right', + 'name' => 'auth_code_btn', + ]; + $ui->formAddSubmitButton($options); + $ui->endForm(); + $ui->contentAddHtml('
'); + $ui->contentAddHtml('
'.$pandora_version.'
'); + $ui->endContent(); + $ui->showPage(); + + $this->errorDoubleAuth = false; } diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index dc79e07c04..fe0eb231d8 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -43,6 +43,9 @@ require_once 'operation/module_graph.php'; require_once 'operation/agent.php'; require_once 'operation/visualmaps.php'; require_once 'operation/visualmap.php'; +require_once 'operation/server_status.php'; +require_once 'operation/services.php'; +require_once 'operation/module_data.php'; $enterpriseHook = enterprise_include('mobile/include/enterprise.class.php'); $enterpriseHook = enterprise_include('mobile/operation/home.php'); @@ -177,6 +180,21 @@ switch ($action) { $tactical->ajax($parameter2); break; + case 'server_status': + $server_status = new ServerStatus(); + $server_status->ajax($parameter2); + break; + + case 'services': + $services = new Services(); + $services->ajax($parameter2); + break; + + case 'module_data': + $module_data = new ModuleData(); + $module_data->ajax($parameter2); + break; + default: if (class_exists('Enterprise')) { $enterprise->enterpriseAjax($parameter1, $parameter2); @@ -407,6 +425,21 @@ switch ($action) { $vc = new Visualmap(); $vc->show(); break; + + case 'server_status': + $server_status = new ServerStatus(); + $server_status->show(); + break; + + case 'services': + $services = new Services(); + $services->show(); + break; + + case 'module_data': + $module_data = new ModuleData(); + $module_data->show(); + break; } break; } diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index 4ab3f7a234..cb55b07259 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -27,6 +27,8 @@ * ============================================================================ */ +use PandoraFMS\Event; + // Begin. require_once '../include/functions_users.php'; @@ -130,9 +132,13 @@ class Agent { $ui = Ui::getInstance(); $system = System::getInstance(); + $eventObj = new Events; $ui->createPage(); + $options = $eventObj->getEventDialogOptions(); + $ui->addDialog($options); + if ($this->id != 0) { $agent_alias = (string) $this->agent['alias']; @@ -159,7 +165,7 @@ class Agent $ui->beginContent(); if (empty($this->agent)) { $ui->contentAddHtml( - ''.__('No agent found').'' + ''.__('No agent found').'' ); } else { $ui->contentBeginGrid(); @@ -191,10 +197,7 @@ class Agent $address = $this->agent['direccion']; $ip .= (empty($address) === true) ? ''.__('N/A').'' : $address; $last_contact = ''.__('Last contact').': '; - $last_contact .= ui_print_timestamp( - $this->agent['ultimo_contacto'], - true - ); + $last_contact .= human_time_comparation($this->agent['ultimo_contacto'], 'tiny'); if (empty($agent['comentarios']) === true) { $description .= ''.__('N/A').''; @@ -213,7 +216,7 @@ class Agent false, false, false, - ['class' => 'invert_filter os-big-icon'], + ['class' => 'invert_filter main_menu_icon'], false ).''; $html .= '
'; @@ -366,7 +369,7 @@ class Agent $ui->contentAddHtml("detail_event_hook"); $ui->contentAddHtml("detail_event_dialog_error_hook"); - $ui->contentBeginCollapsible(sprintf(__('Last %s Events'), $system->getPageSize())); + $ui->contentBeginCollapsible(sprintf(__('Last %s Events'), $system->getPageSize()), 'agent-last-events'); $tabledata = $events->listEventsHtml(0, true, 'last_agent_events'); $ui->contentCollapsibleAddItem($tabledata['table']); $ui->contentCollapsibleAddItem($events->putEventsTableJS($this->id)); @@ -438,7 +441,7 @@ class Agent $.mobile.loading('hide'); var className = $('#list_agent_Modules').attr('class'); if (document.getElementById('list_agent_Modules') == null) { - $($('p.empty_advice')[0]).parent().html(r); + $($('p.no-data')[0]).parent().html(r); className = 'ui-responsive table-stroke ui-table ui-table-reflow'; } else { $('#list_agent_Modules').parent().html(r); diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php index 1a6b0061e2..0c773d040e 100644 --- a/pandora_console/mobile/operation/agents.php +++ b/pandora_console/mobile/operation/agents.php @@ -97,6 +97,7 @@ class Agents $agent[6] = ''.__('Status').''.$agent[6]; $agent[7] = ''.__('Alerts').''.$agent[7]; $agent[8] = ''.__('Last contact').''.$agent[8]; + $agent[9] = ''.__('Last status change').''.$agent[9]; $agents[$key] = $agent; } @@ -218,7 +219,7 @@ class Agents __('Filter Agents by %s'), $this->filterEventsGetString() ); - $ui->contentBeginCollapsible($filter_title); + $ui->contentBeginCollapsible($filter_title, 'filter-collapsible'); $ui->beginForm('index.php?page=agents'); $system = System::getInstance(); $groups = users_get_groups_for_select( @@ -400,18 +401,18 @@ class Agents $serialized_filters_q_param = empty($this->serializedFilters) ? '' : '&agents_filter='.$this->serializedFilters; - $row[0] = $row[__('Agent')] = ''.$img_status.''.''.ui_print_truncate_text($agent['alias'], 30, false).''; + $row[0] = $row[__('Agent')] = ''.$img_status.''.''.ui_print_truncate_text($agent['alias'], 30, false).''; $row[2] = $row[__('OS')] = ui_print_os_icon($agent['id_os'], false, true); $row[3] = $row[__('Group')] = ui_print_group_icon($agent['id_grupo'], true, 'groups_small', '', false); $row[5] = $row[__('Status')] = ''.__('S.').' '.$img_status; $row[6] = $row[__('Alerts')] = '  '.__('A.').' '.$img_alert; - $row[7] = $row[__('Modules')] = ''.__('Modules').' '.''.reporting_tiny_stats($agent, true, 'agent', ' ').' '; + $row[7] = $row[__('Modules')] = ''.reporting_tiny_stats($agent, true, 'agent', ':').' '; $last_time = time_w_fixed_tz($agent['ultimo_contacto']); $now = get_system_time(); $diferencia = ($now - $last_time); - $time = ui_print_timestamp($last_time, true, ['style' => 'font-size: 12px; margin-left: 20px;', 'units' => 'tiny']); + $time = human_time_comparation($agent['ultimo_contacto'], 'tiny'); $style = ''; if ($diferencia > ($agent['intervalo'] * 2)) { $row[8] = $row[__('Last contact')] = ''.$time.''; @@ -419,7 +420,10 @@ class Agents $row[8] = $row[__('Last contact')] = $time; } - $row[8] = $row[__('Last contact')] = ''.__('Last contact').' '.''.$row[__('Last contact')].''; + $row[8] = $row[__('Last contact')] = ''.$row[__('Last contact')].''; + + $last_status_change = human_time_comparation(agents_get_last_status_change($agent['id_agente']), 'tiny'); + $row[9] = $row[__('Last status change')] = ''.$last_status_change.''; if (!$ajax) { unset($row[0]); @@ -431,6 +435,7 @@ class Agents unset($row[6]); unset($row[7]); unset($row[8]); + unset($row[9]); } $agents[$agent['id_agente']] = $row; @@ -451,20 +456,25 @@ class Agents $listAgents = $this->getListAgents($page); if ($listAgents['total'] == 0) { - $ui->contentAddHtml('

'.__('No agents').'

'); + $ui->contentAddHtml('

'.__('No agents').'

'); } else { $table = new Table(); $table->id = 'list_agents'; $table->importFromHash($listAgents['agents']); + + $ui->contentAddHtml('
'); + $ui->contentAddHtml('
'); $ui->contentAddHtml($table->getHTML()); if ($system->getPageSize() < $listAgents['total']) { $ui->contentAddHtml( - '
'.html_print_image('images/spinner.gif', true, false, false, false, false, true).' '.__('Loading...').'
' + '
'.html_print_image('images/spinner.gif', true, false, false, false, false, true).' '.__('Loading...').'
' ); $this->addJavascriptAddBottom(); } + + $ui->contentAddHtml('
'); } $ui->contentAddLinkListener('list_agents'); @@ -513,6 +523,7 @@ class Agents \"\" + agent[6] + \"\" + \"\" + agent[7] + \"\" + \"\" + agent[8] + \"\" + + \"\" + agent[9] + \"\" + \"\"); }); @@ -522,7 +533,7 @@ class Agents }, \"json\"); // Clean - $('#loading_rows').remove(); + // $('#loading_rows').remove(); } } } diff --git a/pandora_console/mobile/operation/alerts.php b/pandora_console/mobile/operation/alerts.php index 65971a52ea..47cdb8012f 100644 --- a/pandora_console/mobile/operation/alerts.php +++ b/pandora_console/mobile/operation/alerts.php @@ -208,7 +208,7 @@ class Alerts __('Filter Alerts by %s'), $this->filterAlertsGetString() ); - $ui->contentBeginCollapsible($filter_title); + $ui->contentBeginCollapsible($filter_title, 'filter-collapsible'); $ui->beginForm(); $options = [ 'name' => 'page', @@ -331,30 +331,36 @@ class Alerts } $row = []; - if (isset($this->columns['agent']) && $this->columns['agent']) { - $row[__('Agent')] = sprintf($disabled_style, io_safe_output($alert['agent_alias'])); - } + $row[__('Status')] = ui_print_status_image($status, $title, true); - $row[__('Module')] = sprintf( + $row[__('Module/Agent')] = '
'; + $row[__('Module/Agent')] .= sprintf( $disabled_style, io_safe_output($alert['module_name']) ); + + $row[__('Module/Agent')] .= ''; + if (isset($this->columns['agent']) && $this->columns['agent']) { + $row[__('Module/Agent')] .= sprintf($disabled_style, io_safe_output($alert['agent_alias'])); + } + + $row[__('Module/Agent')] .= '
'; + $row[__('Template')] = sprintf( $disabled_style, io_safe_output($alert['template_name']) ); $row[__('Last Fired')] = sprintf( $disabled_style, - ui_print_timestamp($alert['last_fired'], true) + human_time_comparation($alert['last_fired'], 'tiny') ); - $row[__('Status')] = ui_print_status_image($status, $title, true); $table[] = $row; } $ui = UI::getInstance(); if (empty($table)) { - $html = '

'.__('No alerts').'

'; + $html = '

'.__('No alerts').'

'; if (!$return) { $ui->contentAddHtml($html); } else { @@ -365,7 +371,10 @@ class Alerts $tableHTML->id = 'list_alerts'; $tableHTML->importFromHash($table); if (!$return) { + $ui->contentAddHtml('
'); + $ui->contentAddHtml('
'); $ui->contentAddHtml($tableHTML->getHTML()); + $ui->contentAddHtml('
'); } else { return $tableHTML->getHTML(); } diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index 50e9aab8ba..82180a40f4 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -195,15 +195,15 @@ class Events switch ($event['estado']) { case 0: - $img_st = 'images/star_white.png'; + $img_st = 'images/star-dark.svg'; break; case 1: - $img_st = 'images/tick_white.png'; + $img_st = 'images/validate.svg'; break; case 2: - $img_st = 'images/hourglass_white.png'; + $img_st = 'images/clock.svg'; break; default: @@ -221,7 +221,7 @@ class Events $status_icon = html_print_image( $img_st, true, - false, + ['class' => 'main_menu_icon'], false, false, false, @@ -264,11 +264,7 @@ class Events $row_1 = ''.$agent_name.''; $row_1 .= ''; - $row_1 .= ui_print_timestamp( - $event['timestamp_last'], - true, - ['units' => 'tiny'] - ); + $row_1 .= human_time_comparation($event['timestamp_last'], 'tiny'); $row_1 .= $status_icon; $row_1 .= ''; @@ -326,10 +322,7 @@ class Events $event['clean_tags'] = events_clean_tags( $event['tags'] ); - $event['timestamp'] = date( - $system->getConfig('date_format'), - $event['utimestamp'] - ); + $event['timestamp'] = human_time_comparation($event['utimestamp'], 'tiny'); if (empty($event['owner_user']) === true) { $event['owner_user'] = ''.__('N/A').''; } else { @@ -380,30 +373,30 @@ class Events switch ($event['criticity']) { default: case 0: - $img_sev = 'images/status_sets/default/severity_maintenance.png'; + $img_sev = 'images/status_sets/default/severity_maintenance_rounded.png'; break; case 1: - $img_sev = 'images/status_sets/default/severity_informational.png'; + $img_sev = 'images/status_sets/default/severity_informational_rounded.png'; break; case 2: - $img_sev = 'images/status_sets/default/severity_normal.png'; + $img_sev = 'images/status_sets/default/severity_normal_rounded.png'; break; case 3: - $img_sev = 'images/status_sets/default/severity_warning.png'; + $img_sev = 'images/status_sets/default/severity_warning_rounded.png'; break; case 4: - $img_sev = 'images/status_sets/default/severity_critical.png'; + $img_sev = 'images/status_sets/default/severity_critical_rounded.png'; break; case 5: - $img_sev = 'images/status_sets/default/severity_minor.png'; + $img_sev = 'images/status_sets/default/severity_minor_rounded.png'; break; case 6: - $img_sev = 'images/status_sets/default/severity_major.png'; + $img_sev = 'images/status_sets/default/severity_major_rounded.png'; break; } @@ -412,9 +405,8 @@ class Events $img_sev, true, [ - 'class' => 'image_status', - 'width' => 12, - 'height' => 12, + 'width' => 30, + 'height' => 15, 'title' => $event_criticity, ], false, @@ -446,17 +438,17 @@ class Events // Get Status. switch ($event['estado']) { case 0: - $img_st = 'images/star_dark.png'; + $img_st = 'images/star-dark.svg'; $title_st = __('New event'); break; case 1: - $img_st = 'images/tick.png'; + $img_st = 'images/validate.svg'; $title_st = __('Event validated'); break; case 2: - $img_st = 'images/hourglass.png'; + $img_st = 'images/clock.svg'; $title_st = __('Event in process'); break; @@ -592,6 +584,43 @@ class Events } break; + case 'process_event': + $system = System::getInstance(); + + $id_event = $system->getRequest('id_event', 0); + $server_id = $system->getRequest('server_id', 0); + + try { + if (is_metaconsole() === true + && $server_id > 0 + ) { + $node = new Node($server_id); + $node->connect(); + } + + if (events_change_status($id_event, EVENT_PROCESS) === true) { + echo json_encode(['correct' => 1]); + } else { + echo json_encode(['correct' => 0]); + } + } catch (\Exception $e) { + // Unexistent agent. + if (is_metaconsole() === true + && $server_id > 0 + ) { + $node->disconnect(); + } + + echo json_encode(['correct' => 0]); + } finally { + if (is_metaconsole() === true + && $server_id > 0 + ) { + $node->disconnect(); + } + } + break; + default: // Not possible. break; @@ -791,7 +820,7 @@ class Events // Content. ob_start(); ?> - +
@@ -860,6 +889,14 @@ class Events 'href' => 'javascript: validateEvent();', ]; $options['content_text'] .= $ui->createButton($options_button); + + $options_button = [ + 'text' => __('In process'), + 'id' => 'process_button', + 'href' => 'javascript: processEvent();', + ]; + $options['content_text'] .= $ui->createButton($options_button); + $options_hidden = [ 'id' => 'event_id', 'value' => 0, @@ -879,7 +916,14 @@ class Events $options['content_text'] .= '

'.__('Fail validate').'

'; - $options['button_close'] = false; + $options['content_text'] .= '
+
'; + $options['content_text'] .= '
+

'.__('Sucessful in process').'

'; + $options['content_text'] .= '
+

'.__('Fail in process').'

'; + + $options['button_close'] = true; return $options; } @@ -922,7 +966,7 @@ class Events $ui->contentAddHtml("detail_event_dialog_error_hook"); $filter_title = sprintf(__('Filter Events by %s'), $this->filterEventsGetString()); - $ui->contentBeginCollapsible($filter_title); + $ui->contentBeginCollapsible($filter_title, 'filter-collapsible'); $ui->beginForm('index.php?page=events'); $items = db_get_all_rows_in_table('tevent_filter'); $items[] = [ @@ -1012,7 +1056,10 @@ class Events $html = $ui->getEndForm(); $ui->contentCollapsibleAddItem($html); $ui->contentEndCollapsible(); + $ui->contentAddHtml('
'); + $ui->contentAddHtml('
'); $this->listEventsHtml(); + $ui->contentAddHtml('
'); $ui->endContent(); $ui->showPage(); } @@ -1141,7 +1188,7 @@ class Events $table = new Table(); $table->id = $id_table; - $no_events = '

'.__('No events').'

'; + $no_events = '

'.__('No events').'

'; if (!$return) { $ui->contentAddHtml($table->getHTML()); @@ -1206,12 +1253,10 @@ class Events data: postvars, success: function (data) { - if (data.correct) { - event = data.event; + if (data.correct) { + event = data.event; //Fill the dialog - $("#detail_event_dialog h1.dialog_title") - .html(event["evento"]); - $("#detail_event_dialog .cell_event_name") + $("#detail_event_dialog h1.dialog_title") .html(event["evento"]); $("#detail_event_dialog .cell_event_id") .html(id_event); @@ -1227,6 +1272,8 @@ class Events .html(event["criticity"]); $("#detail_event_dialog .cell_event_status") .html(event["status"]); + $("#detail_event_dialog .cell_event_status img") + .addClass("main_menu_icon"); $("#detail_event_dialog .cell_event_acknowledged_by") .html(event["acknowledged_by"]); $("#detail_event_dialog .cell_event_group") @@ -1251,11 +1298,21 @@ class Events //The event is validated. $("#validate_button").hide(); } + + if (event["status"].indexOf("clock") >= 0) { + $("#process_button").hide(); + } + $("#validate_button_loading").hide(); $("#validate_button_fail").hide(); $("#validate_button_correct").hide(); $.mobile.loading( "hide" ); $("#detail_event_dialog_hook").click(); + + $("#detail_event_dialog-button_close").html(""); + $("#detail_event_dialog-button_close").addClass("close-button-dialog"); + $(".dialog_title").parent().addClass("flex align-items-center space-between"); + $(".dialog_title").parent().append($("#detail_event_dialog-button_close")); } else { $.mobile.loading( "hide" ); @@ -1316,6 +1373,53 @@ class Events } }); } + + function processEvent() { + id_event = $("#event_id").val(); + server_id = $("#server_id").val(); + + $("#process_button").hide(); + $("#process_button_loading").show(); + + //Hide the button to close + $("#detail_event_dialog div.ui-header a.ui-btn-right") + .hide(); + + postvars = {}; + postvars["action"] = "ajax"; + postvars["parameter1"] = "events"; + postvars["parameter2"] = "process_event"; + postvars["id_event"] = id_event; + postvars["server_id"] = server_id; + + $.ajax ({ + type: "POST", + url: "index.php", + dataType: "json", + data: postvars, + success: + function (data) { + $("#process_button_loading").hide(); + + if (data.correct) { + $("#process_button_correct").show(); + } + else { + $("#process_button_fail").show(); + } + + $("#detail_event_dialog div.ui-header a.ui-btn-right") + .show(); + }, + error: + function (jqXHR, textStatus, errorThrown) { + $("#process_button_loading").hide(); + $("#process_button_fail").show(); + $("#detail_event_dialog div.ui-header a.ui-btn-right") + .show(); + } + }); + } ' ); } @@ -1351,14 +1455,14 @@ class Events $(\"table#\"+table_id+\" tbody\").append(new_rows); - load_more_rows = 0; + // load_more_rows = 0; refresh_link_listener_list_events(); } } function ajax_load_rows() { - if (load_more_rows) { - load_more_rows = 0; + if (load_more_rows) { + // load_more_rows = 0; postvars = {}; postvars[\"action\"] = \"ajax\"; postvars[\"parameter1\"] = \"events\"; @@ -1383,7 +1487,7 @@ class Events //Check if the end of the event list tables is in the client limits var table_end = $('#list_events').offset().top + $('#list_events').height(); if (table_end < document.documentElement.clientHeight) { - ajax_load_rows(); + // ajax_load_rows(); } } @@ -1411,26 +1515,47 @@ class Events if (data.events.length == 0) { $('#last_agent_events').css('visibility', 'hidden'); $('#empty_advice_events').show(); - } + } else { + $('#empty_advice_events').hide(); + } }, \"json\"); } + let intervalId; + let count = 0; + function getFreeSpace() { + let headerHeight = $('div[data-role=\"header\"].ui-header').outerHeight(); + let contentHeight = $('div[data-role=\"content\"].ui-content').outerHeight(); + let windowHeight = $(window).height(); + + let freeSpace = windowHeight - (headerHeight + contentHeight); + + if (freeSpace > 0 && count < 50) { + custom_scroll(); + } else { + clearInterval(intervalId); + } + + count++; + } + $(document).ready(function() { - ajax_load_rows(); - $(window).bind(\"scroll\", function () { - custom_scroll(); - }); - $(window).on(\"touchmove\", function(event) { - custom_scroll(); - }); + intervalId = setInterval(getFreeSpace, 500); + ajax_load_rows(); + $(window).bind(\"scroll\", function () { + custom_scroll(); + }); + $(window).on(\"touchmove\", function(event) { + custom_scroll(); + }); }); function custom_scroll() { if ($(this).scrollTop() + $(this).height() - >= ($(document).height() - 100)) { - ajax_load_rows(); - } + >= ($(document).height() - 100)) { + ajax_load_rows(); + } } " ); diff --git a/pandora_console/mobile/operation/groups.php b/pandora_console/mobile/operation/groups.php index 3c7088fd4e..10ecd2568e 100644 --- a/pandora_console/mobile/operation/groups.php +++ b/pandora_console/mobile/operation/groups.php @@ -121,6 +121,45 @@ class Groups $status_image = ui_print_status_image('agent_no_data_ball.png', '', true); } + // Show agent counter by states. + $agents_counter = '['.$group['_total_agents_']; + + if ($group['_monitors_alerts_fired_'] > 0) { + $agents_counter .= ':'; + $agents_counter .= ''.$group['_monitors_alerts_fired_'].''; + } + + if ($group['_monitors_critical_'] > 0) { + $agents_counter .= ':'; + $agents_counter .= ''.$group['_monitors_critical_'].''; + } + + if ($group['_agents_warning_'] > 0) { + $agents_counter .= ':'; + $agents_counter .= ''.$group['_agents_warning_'].''; + } + + if ($group['_agents_unknown_'] > 0) { + $agents_counter .= ':'; + $agents_counter .= ''.$group['_agents_unknown_'].''; + } + + if ($group['_agents_not_init_'] > 0) { + $agents_counter .= ':'; + $agents_counter .= ''.$group['_agents_not_init_'].''; + } + + if ($group['_agents_ok_'] > 0) { + $agents_counter .= ':'; + $agents_counter .= ''.$group['_agents_ok_'].''; + } + + $agents_counter .= ']'; + + if ($group['_iconImg_'] !== null) { + $img_group = html_print_image('images/'.$group['_iconImg_'], true, false, false, false, false, true); + } + $group['_iconImg_'] = ($group['_iconImg_'] == '') ? 'world.png' : $group['_iconImg_']; $ui->contentAddHtml( ' @@ -138,45 +177,45 @@ class Groups ' ); $ui->contentAddHtml( - '
' + '
' ); - $ui->contentAddHtml('

'.$group['_name_'].'

'); + $ui->contentAddHtml('

'.$img_group.' '.$group['_name_'].''.$agents_counter.'

'); $ui->contentAddHtml('
    '); $ui->contentAddHtml( - '
  • '.''.html_print_image('images/agent.png', true, ['class' => 'invert_filter'], false, false, false, true).__('Total agents').''.''.$group['_total_agents_'].''.'
  • ' + '
  • '.html_print_image('images/agent.png', true, ['class' => 'invert_filter'], false, false, false, true).__('Total agents').''.$group['_total_agents_'].'
  • ' ); $ui->contentAddHtml( - '
  • '.''.html_print_image('images/agent_notinit.png', true, false, false, false, false, true).__('Agents not init').''.''.$group['_agents_not_init_'].''.'
  • ' + '
  • '.html_print_image('images/agent_notinit.png', true, false, false, false, false, true).__('Agents not init').''.$group['_agents_not_init_'].'
  • ' ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/agent_critical.png', true, false, false, false, false, true).__('Agents critical').''.''.$group['_agents_critical_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/agent_unknown.png', true, false, false, false, false, true).__('Agents unknown').''.''.$group['_agents_unknown_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/module_unknown.png', true, false, false, false, false, true).__('Unknown modules').''.''.$group['_monitors_unknown_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/module_notinit.png', true, false, false, false, false, true).__('Not init modules').''.''.$group['_monitors_not_init_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/module_ok.png', true, false, false, false, false, true).__('Normal modules').''.''.$group['_monitors_ok_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/module_warning.png', true, false, false, false, false, true).__('Warning modules').''.''.$group['_monitors_warning_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/module_critical.png', true, false, false, false, false, true).__('Critical modules').''.''.$group['_monitors_critical_'].''.'
  • ' - ); - $ui->contentAddHtml( - '
  • '.''.html_print_image('images/bell_error.png', true, false, false, false, false, true).__('Alerts fired').''.''.$group['_monitors_alerts_fired_'].''.'
  • ' - ); - $ui->contentAddHtml('
'); - $ui->contentAddHtml('
'); + $ui->contentAddHtml( + '
  • '.html_print_image('images/agent_critical.png', true, false, false, false, false, true).__('Agents critical').''.$group['_agents_critical_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/agent_unknown.png', true, false, false, false, false, true).__('Agents unknown').''.$group['_agents_unknown_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/module_unknown.png', true, false, false, false, false, true).__('Unknown modules').''.$group['_monitors_unknown_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/module_notinit.png', true, false, false, false, false, true).__('Not init modules').''.$group['_monitors_not_init_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/module_ok.png', true, false, false, false, false, true).__('Normal modules').''.$group['_monitors_ok_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/module_warning.png', true, false, false, false, false, true).__('Warning modules').''.$group['_monitors_warning_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/module_critical.png', true, false, false, false, false, true).__('Critical modules').''.$group['_monitors_critical_'].'
  • ' + ); + $ui->contentAddHtml( + '
  • '.html_print_image('images/bell_error.png', true, false, false, false, false, true).__('Alerts fired').''.$group['_monitors_alerts_fired_'].'
  • ' + ); + $ui->contentAddHtml(''); + $ui->contentAddHtml('
    '); - $count++; + $count++; } $ui->contentAddHtml(''); diff --git a/pandora_console/mobile/operation/home.php b/pandora_console/mobile/operation/home.php index f6ea3e60f1..47a96d6433 100644 --- a/pandora_console/mobile/operation/home.php +++ b/pandora_console/mobile/operation/home.php @@ -40,24 +40,24 @@ class Home $items = []; - // In home + // In home. $items['tactical'] = [ 'name' => __('Tactical view'), 'filename' => 'tactical.php', 'menu_item' => true, - 'icon' => 'ui-icon-tactical_view ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-op_monitoring ui-widget-icon-floatbeginning ui-icon-menu-square', ]; $items['events'] = [ 'name' => __('Events'), 'filename' => 'events.php', 'menu_item' => true, - 'icon' => 'ui-icon-events ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-op_events ui-widget-icon-floatbeginning ui-icon-menu-square', ]; $items['groups'] = [ 'name' => __('Groups'), 'filename' => 'groups.php', 'menu_item' => true, - 'icon' => 'ui-icon-groups ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-group ui-widget-icon-floatbeginning ui-icon-menu-square', ]; if ((bool) $system->getConfig('legacy_vc', false) === false) { @@ -66,7 +66,7 @@ class Home 'name' => __('Visual consoles'), 'filename' => 'visualmaps.php', 'menu_item' => true, - 'icon' => 'ui-icon-visual_console ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-visual_console ui-widget-icon-floatbeginning ui-icon-menu-square', ]; } @@ -74,23 +74,39 @@ class Home 'name' => __('Alerts'), 'filename' => 'alerts.php', 'menu_item' => true, - 'icon' => 'ui-icon-alerts ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-op_alerts ui-widget-icon-floatbeginning ui-icon-menu-square', ]; $items['agents'] = [ 'name' => __('Agents'), 'filename' => 'agents.php', 'menu_item' => true, - 'icon' => 'ui-icon-agents ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-agent_ms ui-widget-icon-floatbeginning ui-icon-menu-square', ]; $items['modules'] = [ 'name' => __('Modules'), 'filename' => 'modules.php', 'menu_item' => true, - 'icon' => 'ui-icon-modules ui-widget-icon-floatbeginning', + 'icon' => 'ui-icon-menu-brick ui-widget-icon-floatbeginning ui-icon-menu-square', ]; + $items['server_status'] = [ + 'name' => __('Server status'), + 'filename' => 'server_status.php', + 'menu_item' => true, + 'icon' => 'ui-icon-menu-server-status ui-widget-icon-floatbeginning ui-icon-menu-square', + ]; + + if ((int) $system->getConfig('enterprise_installed', false) === 1) { + $items['services'] = [ + 'name' => __('Services'), + 'filename' => 'services.php', + 'menu_item' => true, + 'icon' => 'ui-icon-menu-services ui-widget-icon-floatbeginning ui-icon-menu-square', + ]; + } + // Not in home. $items['agent'] = [ 'name' => __('Agent'), @@ -115,6 +131,7 @@ class Home $this->loadPagesItems(); } + $ui->contentAddHtml('
    '); foreach ($this->pagesItems as $page => $data) { if ($data['menu_item']) { $options = [ @@ -127,6 +144,8 @@ class Home $ui->contentAddHtml($ui->createButton($options)); } } + + $ui->contentAddHtml('
    '); } @@ -143,11 +162,11 @@ class Home } else { $left_button = $ui->createHeaderButton( [ - 'icon' => 'ui-icon-back', + 'icon' => 'ui-icon-logout', 'pos' => 'left', 'text' => __('Logout'), 'href' => 'index.php?action=logout', - 'class' => 'header-button-left', + 'class' => 'header-button-left logout-text', ] ); } @@ -161,6 +180,7 @@ class Home $ui->createHeader(__('Home'), $left_button, $user_logged); $ui->showFooter(false); $ui->beginContent(); + $ui->contentAddHtml('
    '); $ui->beginForm('index.php?page=agents'); $options = [ 'name' => 'free_search', @@ -169,11 +189,13 @@ class Home ]; $ui->formAddInputSearch($options); $ui->endForm(); + $ui->contentAddHtml('
    '); // List of buttons $this->loadButtons($ui); if (!empty($error)) { + $error['dialog_id'] = 'error-dialog'; $ui->addDialog($error); } diff --git a/pandora_console/mobile/operation/module_data.php b/pandora_console/mobile/operation/module_data.php new file mode 100644 index 0000000000..5672f0233d --- /dev/null +++ b/pandora_console/mobile/operation/module_data.php @@ -0,0 +1,354 @@ +checkACL($this->acl)) { + $this->correct_acl = true; + } else { + $this->correct_acl = false; + } + + $this->moduleId = $system->getRequest('module_id'); + } + + + public function ajax($parameter2=false) + { + $system = System::getInstance(); + + if (!$this->correct_acl) { + return; + } else { + switch ($parameter2) { + case 'get_module_data': + $this->getFilters(); + $page = $system->getRequest('page', 0); + $module_id = $system->getRequest('module_id'); + $servers = []; + $end = 1; + + $listData = $this->getListData($page, true); + + if (!empty($listData['data'])) { + $end = 0; + $servers = $listData['data']; + } + + echo json_encode(['end' => $end, 'servers' => $servers]); + break; + } + } + } + + + public function show() + { + if (!$this->correct_acl) { + $this->show_fail_acl(); + } else { + $this->show_module_data(); + } + } + + + private function show_fail_acl() + { + $error['type'] = 'onStart'; + $error['title_text'] = __('You don\'t have access to this page'); + $error['content_text'] = System::getDefaultACLFailText(); + if (class_exists('HomeEnterprise')) { + $home = new HomeEnterprise(); + } else { + $home = new Home(); + } + + $home->show($error); + } + + + private function show_module_data() + { + $ui = Ui::getInstance(); + + $ui->createPage(); + $ui->createDefaultHeader( + __('Module data'), + $ui->createHeaderButton( + [ + 'icon' => 'ui-icon-back', + 'pos' => 'left', + 'text' => __('Back'), + 'href' => 'index.php?page=modules', + 'class' => 'header-button-left', + ] + ) + ); + $ui->showFooter(false); + $ui->beginContent(); + $this->listDataHtml(); + $ui->endContent(); + $ui->showPage(); + } + + + private function getListData($page=0, $ajax=false) + { + global $config; + $system = System::getInstance(); + + $total = 0; + $data = []; + + $module_data = modules_get_agentmodule_data( + $this->moduleId, + 604800, + 0, + false, + false, + 'DESC' + ); + + $total = (int) count($module_data); + + foreach ($module_data as $module) { + $row[__('Data')] = ''.$module['data'].''; + $row[__('Timestamp')] = ''.human_time_comparation($module['utimestamp'], 'tiny').''; + + array_push($data, $row); + } + + return [ + 'data' => $data, + 'total' => $total, + ]; + } + + + public function listDataHtml($page=0, $return=false) + { + $system = System::getInstance(); + $ui = Ui::getInstance(); + + $listData = $this->getListData($page); + if ($listData['total'] == 0) { + $html = '

    '.__('No data').'

    '; + if (!$return) { + $ui->contentAddHtml($html); + } else { + return $html; + } + } else { + if (!$return) { + $table = new Table(); + $table->id = 'list_module_data'; + $table->importFromHash($listData['data']); + + $ui->contentAddHtml('
    '); + + $agent_id = agents_get_agent_id_by_module_id($this->moduleId); + $agent_name = agents_get_name($agent_id); + $module_name = modules_get_agentmodule_name($this->moduleId); + $ui->contentAddHtml('

    '.$module_name.'

    '); + $ui->contentAddHtml('

    '.$agent_name.'

    '); + + $ui->contentAddHtml($table->getHTML()); + + $ui->contentAddHtml('
    '); + } else { + $table = new Table(); + $table->id = 'list_module_data'; + + $table->importFromHash($listData['data']); + + $html = $table->getHTML(); + + return $html; + } + + // if ($system->getPageSize() < $listData['total']) { + // $ui->contentAddHtml( + // '
    '.html_print_image('images/spinner.gif', true, false, false, false, false, true).' '.__('Loading...').'
    ' + // ); + // $this->addJavascriptAddBottom(); + // } + } + + $ui->contentAddLinkListener('list_servers'); + } + + + private function addJavascriptAddBottom() + { + $ui = Ui::getInstance(); + + $ui->contentAddHtml( + "" + ); + } + + + private function filterServersGetString() + { + if ($this->default) { + return __('(Default)'); + } else { + $filters_to_serialize = []; + + if (!$this->default_filters['group']) { + $filters_to_serialize[] = sprintf( + __('Group: %s'), + groups_get_name($this->group, true) + ); + } + + if (!$this->default_filters['module_group']) { + $module_group = db_get_value( + 'name', + 'tmodule_group', + 'id_mg', + $this->module_group + ); + $module_group = io_safe_output($module_group); + + $filters_to_serialize[] = sprintf( + __('Module group: %s'), + $module_group + ); + } + + if (!$this->default_filters['status']) { + $filters_to_serialize[] = sprintf( + __('Status: %s'), + $this->list_status[$this->status] + ); + } + + if (!$this->default_filters['free_search']) { + $filters_to_serialize[] = sprintf( + __('Free Search: %s'), + $this->free_search + ); + } + + if (!$this->default_filters['tag']) { + $tag_name = tags_get_name($this->tag); + $filters_to_serialize[] = sprintf( + __('Tag: %s'), + $tag_name + ); + } + + $string = '('.implode(' - ', $filters_to_serialize).')'; + + return $string; + } + } + + +} diff --git a/pandora_console/mobile/operation/module_graph.php b/pandora_console/mobile/operation/module_graph.php index f8fb4da297..4c7be64b4d 100644 --- a/pandora_console/mobile/operation/module_graph.php +++ b/pandora_console/mobile/operation/module_graph.php @@ -404,7 +404,7 @@ class ModuleGraph ) ); $title = sprintf(__('Options for %s : %s'), $agent_alias, $this->module['nombre']); - $ui->contentBeginCollapsible($title); + $ui->contentBeginCollapsible($title, 'filter-collapsible'); $ui->beginForm('index.php?page=module_graph&id='.$this->id.'&server_id='.$this->server_id); $options = [ 'name' => 'draw_alerts', diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php index d610c5a13a..9fa379426e 100644 --- a/pandora_console/mobile/operation/modules.php +++ b/pandora_console/mobile/operation/modules.php @@ -250,7 +250,7 @@ class Modules __('Filter Modules by %s'), $this->filterEventsGetString() ); - $ui->contentBeginCollapsible($filter_title); + $ui->contentBeginCollapsible($filter_title, 'filter-collapsible'); $ui->beginForm('index.php?page=modules'); $system = System::getInstance(); $groups = users_get_groups_for_select( @@ -591,7 +591,18 @@ class Modules } } - $row[0] = $row[__('Module name')] = ''.$image_status.''.''.ui_print_truncate_text($module['module_name'], 30, false).''; + $script = ''; + if ($system->getConfig('metaconsole')) { + $script = 'onclick="openDialog('.$module['id_agente_modulo'].', '.$this->id_agent.' ,'.$module['server_id'].');"'; + } else { + $script = 'onclick="openDialog('.$module['id_agente_modulo'].', '.$this->id_agent.', \'node\');"'; + } + + if ($system->getRequest('page') === 'modules') { + $row[0] = $row[__('Module name')] = ''.$image_status.''.''.ui_print_truncate_text($module['module_name'], 30, false).''; + } else { + $row[0] = $row[__('Module name')] = ''.$image_status.''.''.ui_print_truncate_text($module['module_name'], 30, false).''; + } if ($this->columns['agent']) { $row[1] = $row[__('Agent name')] = ''.__('Agent').' '.ui_print_truncate_text($module['agent_alias'], 50, false).''; @@ -658,7 +669,7 @@ class Modules $row[4] = $row[__('Interval')] = ''.__('Interval.').' '.$row[__('Interval')].''; - $row[6] = $row[__('Timestamp')] = ''.__('Last update.').' '.ui_print_timestamp($module['utimestamp'], true, ['units' => 'tiny']).''; + $row[6] = $row[__('Timestamp')] = ''.__('Last update.').' '.human_time_comparation($module['utimestamp'], 'tiny').''; if (is_numeric($module['datos'])) { $output = format_numeric($module['datos']); @@ -712,29 +723,50 @@ class Modules ); // Row 7. - $row[__('Data')] = ui_get_snapshot_image($link, $is_snapshot).'  '; + $row[7] = $row[__('Data')] = ui_get_snapshot_image($link, $is_snapshot).'  '; } else { - if ($system->getConfig('metaconsole')) { - $row[__('Data')] = ''; - $row[__('Data')] .= ''; - $row[__('Data')] .= $row[__('Status')].'  '; - $row[__('Data')] .= 'id_agent.'">'; - $row[__('Data')] .= $output.''; - // Row 7. - $row[__('Data')]; + if ($system->getRequest('page') === 'modules') { + if ($system->getConfig('metaconsole')) { + $row[7] = $row[__('Data')] = ''; + $row[7] = $row[__('Data')] .= ''; + $row[7] = $row[__('Data')] .= $row[__('Status')].'  '; + $row[7] = $row[__('Data')] .= ''; + // Row 7. + $row[7] = $row[__('Data')]; + } else { + // Row 7. + $row[7] = $row[__('Data')] = ''; + $row[7] = $row[__('Data')] .= ''; + $row[7] = $row[__('Data')] .= $row[__('Status')].'  '; + $row[7] = $row[__('Data')] .= ''; + } } else { - // Row 7. - $row[__('Data')] = ''; - $row[__('Data')] .= ''; - $row[__('Data')] .= $row[__('Status')].'  '; - $row[__('Data')] .= 'id_agent.'">'; - $row[__('Data')] .= $output.''; + if ($system->getConfig('metaconsole')) { + $row[__('Data')] = ''; + $row[__('Data')] .= ''; + $row[__('Data')] .= $row[__('Status')].'  '; + $row[__('Data')] .= 'id_agent.'">'; + $row[__('Data')] .= $output.''; + // Row 7. + $row[__('Data')]; + } else { + // Row 7. + $row[__('Data')] = ''; + $row[__('Data')] .= ''; + $row[__('Data')] .= $row[__('Status')].'  '; + $row[__('Data')] .= 'id_agent.'">'; + $row[__('Data')] .= $output.''; + } } } @@ -769,7 +801,7 @@ class Modules $listModules = $this->getListModules($page); if ($listModules['total'] == 0) { - $html = '

    '.__('No modules').'

    '; + $html = '

    '.__('No modules').'

    '; if (!$return) { $ui->contentAddHtml($html); } else { @@ -781,7 +813,21 @@ class Modules $table->id = 'list_Modules'; $table->importFromHash($listModules['modules']); + $ui->contentAddHtml('
    '); + $ui->contentAddHtml('
    '); $ui->contentAddHtml($table->getHTML()); + + if (!$this->all_modules) { + if ($system->getPageSize() < $listModules['total']) { + $ui->contentAddHtml( + '
    '.html_print_image('images/spinner.gif', true, false, false, false, false, true).' '.__('Loading...').'
    ' + ); + + $this->addJavascriptAddBottom(); + } + } + + $ui->contentAddHtml('
    '); } else { $table = new Table(); $table->id = 'list_agent_Modules'; @@ -792,18 +838,31 @@ class Modules return $html; } - - if (!$this->all_modules) { - if ($system->getPageSize() < $listModules['total']) { - $ui->contentAddHtml( - '
    '.html_print_image('images/spinner.gif', true, false, false, false, false, true).' '.__('Loading...').'
    ' - ); - - $this->addJavascriptAddBottom(); - } - } } + $ui->contentAddHtml( + ' + + +
    +
    +

    '.__('Choose option').'

    + +
    + +
    + + '.__('Graph').' + + + + '.__('Historical data').' + +
    +
    ' + ); + $ui->contentAddLinkListener('list_Modules'); } @@ -850,8 +909,8 @@ class Modules \"
    \" + \"\" + \"\" + - \"" + - ""); + \"\" + + \"\"); }); load_more_rows = 1; @@ -860,21 +919,58 @@ class Modules }, - "json"); + \"json\"); } } } - + + function openDialog(moduleId, agentId, serverId) { + var graph = ''; + var historical = ''; + if (serverId === 'node') { + graph = 'index.php?page=module_graph&id='+moduleId+'&id_agent='+agentId; + historical = 'index.php?page=module_data&module_id='+moduleId; + } else { + graph = 'index.php?page=module_graph&id='+moduleId+'&id_agent='+agentId+'&server_id='+serverId; + historical = 'index.php?page=module_data&module_id='+moduleId; + } + + $('#graph-option').attr('href', graph); + $('#historical-option').attr('href', historical); + + $('#module-dialog-button').click(); + } + + let intervalId; + let count = 0; + function getFreeSpace() { + let headerHeight = $('div[data-role=\"header\"].ui-header').outerHeight(); + let contentHeight = $('div[data-role=\"content\"].ui-content').outerHeight(); + let windowHeight = $(window).height(); + + let freeSpace = windowHeight - (headerHeight + contentHeight); + + if (freeSpace > 0 && count < 50) { + custom_scroll(); + } else { + clearInterval(intervalId); + } + + count++; + } + $(document).ready(function() { - $(window).bind("scroll", function () { + intervalId = setInterval(getFreeSpace, 500); + + $(window).bind(\"scroll\", function () { custom_scroll(); }); - $(window).on("touchmove", function(event) { + $(window).on(\"touchmove\", function(event) { custom_scroll(); }); - }); - ' + }); + " ); } diff --git a/pandora_console/mobile/operation/server_status.php b/pandora_console/mobile/operation/server_status.php new file mode 100644 index 0000000000..eb21825f72 --- /dev/null +++ b/pandora_console/mobile/operation/server_status.php @@ -0,0 +1,556 @@ +checkACL($this->acl)) { + $this->correct_acl = true; + } else { + $this->correct_acl = false; + } + + if ($system->getConfig('metaconsole') === 0) { + $this->all_servers = true; + } + } + + + public function ajax($parameter2=false) + { + $system = System::getInstance(); + + if (!$this->correct_acl) { + return; + } else { + switch ($parameter2) { + case 'get_server_status': + $this->getFilters(); + $page = $system->getRequest('page', 0); + $servers = []; + $end = 1; + + $listServers = $this->getListServers($page, true); + + if (!empty($listServers['servers'])) { + $end = 0; + $servers = $listServers['servers']; + } + + echo json_encode(['end' => $end, 'servers' => $servers]); + break; + } + } + } + + + public function setFilters($filters) + { + if (isset($filters['id_agent'])) { + $this->id_agent = $filters['id_agent']; + } + + if (isset($filters['all_servers'])) { + $this->all_servers = $filters['all_servers']; + } + + if (isset($filters['status'])) { + $this->status = (int) $filters['status']; + } + + if (isset($filters['name'])) { + $this->name = $filters['name']; + } + } + + + public function disabledColumns($columns=null) + { + if (!empty($columns)) { + foreach ($columns as $column) { + $this->columns[$column] = 0; + } + } + } + + + private function getFilters() + { + $system = System::getInstance(); + $user = User::getInstance(); + + $this->default_filters['module_group'] = true; + $this->default_filters['group'] = true; + $this->default_filters['status'] = true; + $this->default_filters['free_search'] = true; + $this->default_filters['tag'] = true; + + $this->free_search = $system->getRequest('free_search', ''); + if ($this->free_search != '') { + $this->default = false; + $this->default_filters['free_search'] = false; + } + + $this->status = $system->getRequest('status', __('Status')); + if (($this->status === __('Status')) || ((int) $this->status === AGENT_MODULE_STATUS_ALL)) { + $this->status = AGENT_MODULE_STATUS_ALL; + } else { + $this->default = false; + $this->default_filters['status'] = false; + } + + $this->group = (int) $system->getRequest('group', __('Group')); + if (!$user->isInGroup($this->acl, $this->group)) { + $this->group = 0; + } + + if (($this->group === __('Group')) || ($this->group == 0)) { + $this->group = 0; + } else { + $this->default = false; + $this->default_filters['group'] = false; + } + + $this->module_group = (int) $system->getRequest('module_group', __('Module group')); + if (($this->module_group === __('Module group')) || ($this->module_group === -1) + || ($this->module_group == 0) + ) { + $this->module_group = -1; + } else { + $this->default = false; + $this->module_group = (int) $this->module_group; + $this->default_filters['module_group'] = false; + } + + $this->tag = (int) $system->getRequest('tag', __('Tag')); + if (($this->tag === __('Tag')) || ($this->tag == 0)) { + $this->tag = 0; + } else { + $this->default = false; + $this->default_filters['tag'] = false; + } + } + + + public function show() + { + if (!$this->correct_acl) { + $this->show_fail_acl(); + } else { + $this->getFilters(); + $this->show_servers(); + } + } + + + private function show_fail_acl() + { + $error['type'] = 'onStart'; + $error['title_text'] = __('You don\'t have access to this page'); + $error['content_text'] = System::getDefaultACLFailText(); + if (class_exists('HomeEnterprise')) { + $home = new HomeEnterprise(); + } else { + $home = new Home(); + } + + $home->show($error); + } + + + private function show_servers() + { + $ui = Ui::getInstance(); + + $ui->createPage(); + $ui->createDefaultHeader( + __('Server status'), + $ui->createHeaderButton( + [ + 'icon' => 'ui-icon-back', + 'pos' => 'left', + 'text' => __('Back'), + 'href' => 'index.php?page=home', + 'class' => 'header-button-left', + ] + ) + ); + $ui->showFooter(false); + $ui->beginContent(); + $this->listServersHtml(); + $ui->endContent(); + $ui->showPage(); + } + + + private function getListServers($page=0, $ajax=false) + { + global $config; + $system = System::getInstance(); + $user = User::getInstance(); + + $total = 0; + $servers = []; + $servers_db = []; + + if ($this->all_servers === true) { + $sql_limit = ' LIMIT '.(int) ($page * $system->getPageSize()).','.(int) $system->getPageSize(); + } + + if ($system->getConfig('metaconsole')) { + $servers_info = servers_get_info(); + $total = (int) count(servers_get_info()); + + foreach ($servers_info as $server_value) { + $image_status = ui_print_status_image(STATUS_SERVER_OK, '', true); + if ($server_value['status'] == -1) { + $image_status = ui_print_status_image( + STATUS_SERVER_CRASH, + __('Server has crashed.'), + true + ); + } else if ($server_value['status'] == 0) { + $image_status = ui_print_status_image( + STATUS_SERVER_DOWN, + __('Server is stopped.'), + true + ); + } + + // $row[__('Status')] = ''.$server_value['status'].''; + $row[__('Status')] = ''.$image_status.''; + $row[__('Image')] = ''.$server_value['img'].''; + $row[__('Name')] = ''.$server_value['name'].''; + + $servers[$server_value['id_server'].'-'.$server_value['name']] = $row; + } + + $meta_servers = metaconsole_get_servers(); + + if ($meta_servers === false) { + $meta_servers = []; + } + + foreach ($meta_servers as $server) { + if (metaconsole_connect($server) != NOERR) { + continue; + } + + $servers_info = servers_get_info(); + $total += (int) count(servers_get_info()); + + foreach ($servers_info as $server_value) { + $image_status = ui_print_status_image(STATUS_SERVER_OK, '', true); + if ($server_value['status'] == -1) { + $image_status = ui_print_status_image( + STATUS_SERVER_CRASH, + __('Server has crashed.'), + true + ); + } else if ($server_value['status'] == 0) { + $image_status = ui_print_status_image( + STATUS_SERVER_DOWN, + __('Server is stopped.'), + true + ); + } + + // $row[__('Status')] = ''.$server_value['status'].''; + $row[__('Status')] = ''.$image_status.''; + $row[__('Image')] = ''.$server_value['img'].''; + $row[__('Name')] = ''.$server_value['name'].''; + + $servers[$server_value['id_server']] = $row; + } + + metaconsole_restore_db(); + } + } else { + $servers_info = servers_get_info(-1, $sql_limit); + $total = count(servers_get_info()); + + foreach ($servers_info as $server_value) { + $image_status = ui_print_status_image(STATUS_SERVER_OK, '', true); + if ($server_value['status'] == -1) { + $image_status = ui_print_status_image( + STATUS_SERVER_CRASH, + __('Server has crashed.'), + true + ); + } else if ($server_value['status'] == 0) { + $image_status = ui_print_status_image( + STATUS_SERVER_DOWN, + __('Server is stopped.'), + true + ); + } + + // $row[__('Status')] = ''.$server_value['status'].''; + $row[__('Status')] = ''.$image_status.''; + $row[__('Image')] = ''.$server_value['img'].''; + $row[__('Name')] = ''.$server_value['name'].''; + + $servers[$server_value['id_server']] = $row; + } + } + + return [ + 'servers' => $servers, + 'total' => $total, + ]; + } + + + public function listServersHtml($page=0, $return=false) + { + $system = System::getInstance(); + $ui = Ui::getInstance(); + + $listServers = $this->getListServers($page); + if ($listServers['total'] == 0) { + $html = '

    '.__('No servers').'

    '; + if (!$return) { + $ui->contentAddHtml($html); + } else { + return $html; + } + } else { + if (!$return) { + $table = new Table(); + $table->id = 'list_servers'; + $table->importFromHash($listServers['servers']); + + $ui->contentAddHtml('
    '); + $ui->contentAddHtml($table->getHTML()); + + if ($this->all_servers === true) { + if ($system->getPageSize() < $listServers['total']) { + $ui->contentAddHtml( + '
    '.html_print_image('images/spinner.gif', true, false, false, false, false, true).' '.__('Loading...').'
    ' + ); + + $this->addJavascriptAddBottom(); + } + } + + $ui->contentAddHtml('
    '); + } else { + $table = new Table(); + $table->id = 'list_servers_status'; + + $table->importFromHash($listServers['servers']); + + $html = $table->getHTML(); + + return $html; + } + } + + $ui->contentAddLinkListener('list_servers'); + } + + + private function addJavascriptAddBottom() + { + $ui = Ui::getInstance(); + + $ui->contentAddHtml( + "" + ); + } + + + private function filterServersGetString() + { + if ($this->default) { + return __('(Default)'); + } else { + $filters_to_serialize = []; + + if (!$this->default_filters['group']) { + $filters_to_serialize[] = sprintf( + __('Group: %s'), + groups_get_name($this->group, true) + ); + } + + if (!$this->default_filters['module_group']) { + $module_group = db_get_value( + 'name', + 'tmodule_group', + 'id_mg', + $this->module_group + ); + $module_group = io_safe_output($module_group); + + $filters_to_serialize[] = sprintf( + __('Module group: %s'), + $module_group + ); + } + + if (!$this->default_filters['status']) { + $filters_to_serialize[] = sprintf( + __('Status: %s'), + $this->list_status[$this->status] + ); + } + + if (!$this->default_filters['free_search']) { + $filters_to_serialize[] = sprintf( + __('Free Search: %s'), + $this->free_search + ); + } + + if (!$this->default_filters['tag']) { + $tag_name = tags_get_name($this->tag); + $filters_to_serialize[] = sprintf( + __('Tag: %s'), + $tag_name + ); + } + + $string = '('.implode(' - ', $filters_to_serialize).')'; + + return $string; + } + } + + +} diff --git a/pandora_console/mobile/operation/services.php b/pandora_console/mobile/operation/services.php new file mode 100644 index 0000000000..fd1fba0dce --- /dev/null +++ b/pandora_console/mobile/operation/services.php @@ -0,0 +1,541 @@ +checkACL($this->acl)) { + $this->correct_acl = true; + + $this->services = enterprise_hook('services_get_services'); + } else { + $this->correct_acl = false; + } + + if ($system->checkEnterprise() === false) { + $this->show_fail_enterprise(); + } + } + + + public function show() + { + if (!$this->correct_acl) { + $this->show_fail_acl(); + } else { + $this->show_services(); + } + } + + + private function show_fail_acl() + { + $error['type'] = 'onStart'; + $error['title_text'] = __('You don\'t have access to this page'); + $error['content_text'] = System::getDefaultACLFailText(); + if (class_exists('HomeEnterprise')) { + $home = new HomeEnterprise(); + } else { + $home = new Home(); + } + + $home->show($error); + } + + + private function show_fail_enterprise() + { + $error['type'] = 'onStart'; + $error['title_text'] = __('You don\'t have access to this page'); + $error['content_text'] = System::getDefaultLicenseFailText(); + if (class_exists('HomeEnterprise')) { + $home = new HomeEnterprise(); + } else { + $home = new Home(); + } + + $home->show($error); + } + + + public function ajax($parameter2=false) + { + $system = System::getInstance(); + + if (!$this->correct_acl) { + return; + } else { + switch ($parameter2) { + case 'get_services': + $this->serviceId = $system->getRequest('service_id', 0); + $rows = $this->getListServices(); + + $this->rows = $rows; + $table = $this->getTable(); + + echo $table; + break; + } + } + } + + + private function show_services() + { + $ui = Ui::getInstance(); + + $ui->createPage(); + $ui->createDefaultHeader( + __('Services'), + $ui->createHeaderButton( + [ + 'icon' => 'ui-icon-back', + 'pos' => 'left', + 'text' => __('Back'), + 'href' => 'index.php?page=home', + 'class' => 'header-button-left', + ] + ) + ); + $ui->showFooter(false); + $ui->beginContent(); + + if (empty($this->services)) { + $ui->contentAddHtml( + ''.__('No services found').'' + ); + } + + $ui->contentAddHtml('
    '); + $count = 0; + $url_agent = 'index.php?page=agents&group=%s&status=%s'; + $url_modules = 'index.php?page=modules&group=%s&status=%s'; + + foreach ($this->services as $service) { + switch ($service['status']) { + case SERVICE_STATUS_NORMAL: + $color = COL_NORMAL; + break; + + case SERVICE_STATUS_CRITICAL: + $color = COL_CRITICAL; + break; + + case SERVICE_STATUS_WARNING: + $color = COL_WARNING; + break; + + case SERVICE_STATUS_UNKNOWN: + default: + $color = COL_UNKNOWN; + break; + } + + $group_icon = ui_print_group_icon($service['id_group'], true, '../images/groups_small_white', '', false); + + $ui->contentAddHtml( + ' + + ' + ); + $ui->contentAddHtml('
    '); + $arrow = ''; + $ui->contentAddHtml('

    '.$arrow.$group_icon.' '.$service['name'].'

    '); + + $spinner = ' +
    + + + + +
    + '; + + $ui->contentAddHtml($spinner); + $ui->contentAddHtml('
    '); + + $count++; + } + + $ui->contentAddHtml('
    '); + $this->addJavascriptAddBottom(); + + $ui->endContent(); + $ui->showPage(); + } + + + public function getListServices() + { + $ui = Ui::getInstance(); + $this->idTable = 'service-table-'.$this->serviceId; + $rows = []; + + $elements_list = new Service($this->serviceId); + $elements = $elements_list->getElements(true); + + if (empty($elements) === false) { + foreach ($elements as $item) { + $name = ''; + // Icon. + switch ($item->type()) { + case SERVICE_ELEMENT_AGENT: + $element_icon = html_print_image( + 'images/agents@svg.svg', + true, + [ + 'title' => __('Agent'), + 'class' => 'main_menu_icon', + ] + ); + + if ($item->exists() !== true) { + $name .= ''.__('Nonexistent. This element should be deleted').''; + } else { + $url = ui_get_full_url('mobile/index.php?page=agent&id='.$item->agent()->id_agente()); + $name = ''; + if (((bool) $item->agent()->disabled()) === true) { + $disabled_element = true; + if (is_metaconsole() === true) { + $name .= ''; + } else { + $name .= ''; + } + } + + if (is_metaconsole() + && ((int) $item->id_server_meta()) !== 0 + ) { + $name .= $item->nodeName().' » '; + } + + $name .= $item->agent()->alias(); + $name .= ''; + + if (((bool) $item->agent()->disabled()) === true) { + $name .= ui_print_help_tip( + __('This element does not affect service weigth because is disabled.'), + true + ).''; + } + } + break; + + case SERVICE_ELEMENT_SERVICE: + $element_icon = html_print_image( + 'images/item-service.svg', + true, + [ + 'title' => __('Service'), + 'class' => 'main_menu_icon', + ] + ); + if ($item->exists() !== true) { + $name .= ''.__('Nonexistent. This element should be deleted').''; + } else { + if (is_metaconsole() + && (((int) $item->id_server_meta()) !== 0 ) + ) { + $server = db_get_row( + 'tmetaconsole_setup', + 'id', + $item->id_server_meta() + ); + + $url = ui_meta_get_url_console_child( + $server, + 'estado', + 'enterprise/operation/services/services', + [ + 'tab' => 'service', + 'action' => 'view', + 'id_service' => $item->id_service_child(), + ] + ); + } else { + $url = ui_get_full_url( + 'index.php?sec=network&sec2=enterprise/operation/services/services&tab=service&action=view&id_service='.$item->id_service_child() + ); + } + + $name = ''; + if (((bool) $item->service()->disabled()) === true) { + $disabled_element = true; + if (is_metaconsole() === true) { + $name .= ''; + } else { + $name .= ''; + } + } + + if (is_metaconsole() + && ((int) $item->id_server_meta()) !== 0 + ) { + $name .= $item->nodeName().' » '; + } + + $name .= $item->service()->name(); + $name .= ''; + + if (((bool) $item->service()->disabled()) === true) { + $name .= ui_print_help_tip( + __('This element does not affect service weigth because is disabled.'), + true + ).''; + } + } + break; + + case SERVICE_ELEMENT_MODULE: + $element_icon = html_print_image( + 'images/modules@svg.svg', + true, + [ + 'title' => __('Module'), + 'class' => 'main_menu_icon', + ] + ); + + if ($item->exists() !== true) { + $name .= ''.__('Nonexistent. This element should be deleted').''; + } else { + $url = ui_get_full_url('mobile/index.php?page=agent&id='.$item->agent()->id_agente()); + $name = ''; + + if (((bool) $item->module()->disabled()) === true) { + $disabled_element = true; + if (is_metaconsole()) { + $name .= ''; + } else { + $name .= ''; + } + } + + if (is_metaconsole() + && ((int) $item->id_server_meta()) !== 0 + ) { + $name .= $item->nodeName().' » '; + } + + $name .= $item->module()->agent()->alias(); + $name .= ' » '.$item->module()->nombre(); + + if (((bool) $item->module()->disabled()) === true) { + $name .= ui_print_help_tip( + __('This element does not affect service weigth because is disabled.'), + true + ).''; + } + + $name .= ''; + } + break; + + case SERVICE_ELEMENT_DYNAMIC: + $element_icon = html_print_image( + 'images/modules-group@svg.svg', + true, + [ + 'title' => __('Dynamic element'), + 'class' => 'main_menu_icon', + ] + ); + + try { + if (empty($item->getMatches(true)) === true) { + ui_print_warning_message( + __( + 'Dynamic element (%d) \'%s\' does not match any target', + $item->id(), + $item->description() + ) + ); + } + } catch (Exception $e) { + ui_print_warning_message( + __( + 'Dynamic element (%d) \'%s\' causes an error: %s', + $item->id(), + $item->description(), + $e->getMessage() + ) + ); + } + + if ($item->rules()->dynamic_type === 'agent') { + $name = ''.__( + 'agents like "%s"', + $item->rules()->agent_name + ).''; + } else if ($item->rules()->dynamic_type === 'module') { + $name = ''.__( + 'modules like "%s"', + $item->rules()->module_name + ).''; + } + break; + + default: + $element_icon = ''; + break; + } + + // Status. + switch ($item->lastStatus(true)) { + case SERVICE_STATUS_NORMAL: + case AGENT_STATUS_NORMAL: + case AGENT_MODULE_STATUS_NORMAL: + $status_element = STATUS_MODULE_OK; + $title_element = __('NORMAL'); + break; + + case SERVICE_STATUS_CRITICAL: + case AGENT_MODULE_STATUS_CRITICAL_ALERT: + case AGENT_MODULE_STATUS_CRITICAL_BAD: + case AGENT_STATUS_CRITICAL: + $status_element = STATUS_MODULE_CRITICAL; + $title_element = __('CRITICAL'); + break; + + case SERVICE_STATUS_WARNING: + case AGENT_MODULE_STATUS_WARNING: + case AGENT_MODULE_STATUS_WARNING_ALERT: + case AGENT_STATUS_WARNING: + $status_element = STATUS_MODULE_WARNING; + $title_element = __('WARNING'); + break; + + case SERVICE_STATUS_ALERT: + case AGENT_MODULE_STATUS_NOT_INIT: + case AGENT_STATUS_NOT_INIT: + $status_element = STATUS_MODULE_NO_DATA; + $title_element = __('NOT INITIALIZED'); + break; + + case AGENT_MODULE_STATUS_UNKNOWN: + case SERVICE_STATUS_UNKNOWN: + case AGENT_STATUS_UNKNOWN: + default: + $status_element = STATUS_MODULE_UNKNOWN; + $title_element = __('UNKNOWN'); + break; + } + + $row = []; + $row[0] = $element_icon; + $row[1] = $name; + $row[2] = ui_print_status_image($status_element, $title_element, true); + + array_push($rows, $row); + } + } + + return $rows; + } + + + public function getTable() + { + $html = ''; + + $html = "
    ".__('Status')."\" + module[5] + \"".__('Interval')."\" + module[4] + \"".__('Timestamp')."\" + module[6] + \"".__('Data').'" + module[7] + "
    ".__('Data')."\" + module[7] + \"
    serviceId."' data-mode='reflow' class='ui-responsive table-stroke'>"; + + // $html .= ''; + // $html .= ''; + // $html .= ''; + // $html .= ''; + // $html .= ''; + // $html .= ''; + // $html .= ''; + $html .= ''; + foreach ($this->rows as $key => $row) { + $html .= ""; + + foreach ($row as $key_cell => $cell) { + $html .= "'; + } + + $html .= ''; + } + + $html .= ''; + $html .= '
    '.__('Type').''.__('Name').''.__('Status').'
    ".$cell.'
    '; + + return $html; + } + + + private function addJavascriptAddBottom() + { + $ui = Ui::getInstance(); + + $ui->contentAddHtml( + "" + ); + } + + +} diff --git a/pandora_console/mobile/operation/tactical.php b/pandora_console/mobile/operation/tactical.php index 3651187833..f12bb56120 100755 --- a/pandora_console/mobile/operation/tactical.php +++ b/pandora_console/mobile/operation/tactical.php @@ -164,8 +164,8 @@ class Tactical $data['mobile'] = true; - $formatted_data = reporting_get_stats_indicators($data, 100, 10, false); - $formatted_data_untiny = reporting_get_stats_indicators($data, 140, 15, false); + $formatted_data = reporting_get_stats_indicators_mobile($data, 100, 10, false); + $formatted_data_untiny = reporting_get_stats_indicators_mobile($data, 140, 15, false); $overview = ' @@ -193,8 +193,8 @@ class Tactical $agents_monitors = reporting_get_stats_agents_monitors($data); $alerts_stats = reporting_get_stats_alerts($data); - $overview .= "
    \n".$agents_monitors; - $overview .= "
    \n".$alerts_stats; + $overview .= "
    \n".$agents_monitors; + $overview .= "
    \n".$alerts_stats; $ui->contentGridAddCell($overview, 'tactical1'); @@ -216,6 +216,7 @@ class Tactical $ui->contentBeginCollapsible(__('Last activity')); $table = new Table(); + $table->id = 'last-activity'; $table->importFromHash($this->getLastActivity()); $ui->contentCollapsibleAddItem($table->getHTML()); $ui->contentEndCollapsible(); @@ -236,7 +237,7 @@ class Tactical } function ajax_load_status_pie() { - $('#status_pie').html('
    ".__('Loading...')."
    '); + $('#status_pie').html('
    ".__('Loading...')."
    '); var pie_width = $('#tactical2').width() * 0.9; @@ -346,10 +347,9 @@ class Tactical } $data[__('Action')] = ui_print_session_action_icon($session['accion'], true); - $data[__('User')] = $session_id_usuario; - $data[__('Date')] = human_time_comparation($session['utimestamp'], 'tiny'); - $data[__('Source IP')] = $session_ip_origen; - $data[__('Description')] = io_safe_output($session['descripcion']); + $data[__('User')] = $session_id_usuario.' - '.ui_print_truncate_text(io_safe_output($session['descripcion']), 40, false); + $data[__('Date')] = ''.human_time_comparation($session['utimestamp'], 'tiny').''; + $data[__('Source IP')] = ''.$session_ip_origen.''; $return[] = $data; } diff --git a/pandora_console/mobile/operation/visualmaps.php b/pandora_console/mobile/operation/visualmaps.php index 258c1bd94a..07869726ad 100644 --- a/pandora_console/mobile/operation/visualmaps.php +++ b/pandora_console/mobile/operation/visualmaps.php @@ -241,7 +241,7 @@ class Visualmaps 'pos' => 'right', 'text' => __('All visual consoles'), 'href' => 'index.php?page=visualmaps&favourite=0', - 'class' => '', + 'class' => 'visual-console-button', ] ) ); @@ -253,14 +253,16 @@ class Visualmaps 'pos' => 'right', 'text' => __('Favourite visual consoles'), 'href' => 'index.php?page=visualmaps&favourite=1', - 'class' => '', + 'class' => 'visual-console-button', ] ) ); } + $ui->contentAddHtml('
    '); + if (empty($visualmaps) === true) { - $ui->contentAddHtml('

    '.__('No maps defined').'

    '); + $ui->contentAddHtml('

    '.__('There are no favorite maps to show').'

    '); } else { $table = new Table(); // Without header jquery.mobile crashes. @@ -282,7 +284,9 @@ class Visualmaps $table->addRow([ $map['id'].' flex-center' => $row]); } + $ui->contentAddHtml('
    '); $ui->contentAddHtml($table->getHTML()); + $ui->contentAddHtml('
    '); $ui->contentAddLinkListener('list_visualmaps'); } }