';
+ $out .= graph_events_agent_by_group($id_group, 300, 200, false, true, true);
+ $out .= '
';
+ echo $out;
+ return;
+ }
+
+
+ /**
+ * Draw in modal a agent info
+ *
+ * @return void
+ */
+ public static function loadInfoAgent()
+ {
+ $extradata = get_parameter('extradata', '');
+ echo '
';
+
+ if (empty($extradata) === false) {
+ $extradata = json_decode(io_safe_output($extradata), true);
+ $agent = agents_get_agent($extradata['idAgent']);
+
+ if (is_array($agent)) {
+ $status_img = agents_tree_view_status_img(
+ $agent['critical_count'],
+ $agent['warning_count'],
+ $agent['unknown_count'],
+ $agent['total_count'],
+ $agent['notinit_count']
+ );
+ $table = new \stdClass();
+ $table->class = 'table_modal_alternate';
+ $table->data = [
+ [
+ __('Id'),
+ $agent['id_agente'],
+ ],
+ [
+ __('Agent name'),
+ '
'.$agent['nombre'].'',
+ ],
+ [
+ __('Alias'),
+ $agent['alias'],
+ ],
+ [
+ __('Ip Address'),
+ $agent['direccion'],
+ ],
+ [
+ __('Status'),
+ $status_img,
+ ],
+ [
+ __('Group'),
+ groups_get_name($agent['id_grupo']),
+ ],
+ [
+ __('Interval'),
+ $agent['intervalo'],
+ ],
+ [
+ __('Operative system'),
+ get_os_name($agent['id_os']),
+ ],
+ [
+ __('Server name'),
+ $agent['server_name'],
+ ],
+ [
+ __('Description'),
+ $agent['comentarios'],
+ ],
+ ];
+
+ html_print_table($table);
+ }
+ }
+
+ echo '
';
+ }
+
+
+ /**
+ * Get agents by group for datatable.
+ *
+ * @return void
+ */
+ public static function getAgentsByGroup()
+ {
+ global $config;
+
+ $data = [];
+ $id_group = get_parameter('id_group', '');
+ $id_groups = [$id_group];
+ $groups = groups_get_children($id_group);
+
+ if (count($groups) > 0) {
+ $id_groups = [];
+ foreach ($groups as $key => $value) {
+ $id_groups[] = $value['id_grupo'];
+ }
+ }
+
+ $start = get_parameter('start', 0);
+ $length = get_parameter('length', $config['block_size']);
+ $orderDatatable = get_datatable_order(true);
+ $pagination = '';
+ $order = '';
+
+ try {
+ ob_start();
+ if (isset($orderDatatable)) {
+ switch ($orderDatatable['field']) {
+ case 'alerts':
+ $orderDatatable['field'] = 'fired_count';
+ break;
+
+ case 'status':
+ $orderDatatable['field'] = 'total_count';
+
+ default:
+ $orderDatatable['field'] = $orderDatatable['field'];
+ break;
+ }
+
+ $order = sprintf(
+ ' ORDER BY %s %s',
+ $orderDatatable['field'],
+ $orderDatatable['direction']
+ );
+ }
+
+ if (isset($length) && $length > 0
+ && isset($start) && $start >= 0
+ ) {
+ $pagination = sprintf(
+ ' LIMIT %d OFFSET %d ',
+ $length,
+ $start
+ );
+ }
+
+ $sql = sprintf(
+ 'SELECT id_agente,
+ alias,
+ critical_count,
+ warning_count,
+ unknown_count,
+ total_count,
+ notinit_count,
+ ultimo_contacto_remoto,
+ fired_count
+ FROM tagente t
+ WHERE disabled = 0 AND
+ total_count <> notinit_count AND
+ id_grupo IN (%s)
+ %s %s',
+ implode(',', $id_groups),
+ $order,
+ $pagination
+ );
+
+ $data = db_get_all_rows_sql($sql);
+
+ $sql = sprintf(
+ 'SELECT
+ id_agente,
+ alias,
+ critical_count,
+ warning_count,
+ unknown_count,
+ total_count,
+ notinit_count,
+ ultimo_contacto_remoto,
+ fired_count
+ FROM tagente t
+ WHERE disabled = 0 AND
+ total_count <> notinit_count AND
+ id_grupo IN (%s)
+ %s',
+ implode(',', $id_groups),
+ $order,
+ );
+
+ $count_agents = db_get_num_rows($sql);
+
+ foreach ($data as $key => $agent) {
+ $status_img = agents_tree_view_status_img(
+ $agent['critical_count'],
+ $agent['warning_count'],
+ $agent['unknown_count'],
+ $agent['total_count'],
+ $agent['notinit_count']
+ );
+ $data[$key]['alias'] = '
'.$agent['alias'].'';
+ $data[$key]['status'] = $status_img;
+ $data[$key]['alerts'] = agents_tree_view_alert_img($agent['fired_count']);
+ }
+
+ if (empty($data) === true) {
+ $total = 0;
+ $data = [];
+ } else {
+ $total = $count_agents;
+ }
+
+ echo json_encode(
+ [
+ 'data' => $data,
+ 'recordsTotal' => $total,
+ 'recordsFiltered' => $total,
+ ]
+ );
+ // Capture output.
+ $response = ob_get_clean();
+ } catch (\Exception $e) {
+ echo json_encode(['error' => $e->getMessage()]);
+ exit;
+ }
+
+ json_decode($response);
+ if (json_last_error() === JSON_ERROR_NONE) {
+ echo $response;
+ } else {
+ echo json_encode(
+ [
+ 'success' => false,
+ 'error' => $response,
+ ]
+ );
+ }
+
+ exit;
+ }
+
+
}
diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css
index 24915928ab..8033a8a7fe 100644
--- a/pandora_console/include/styles/alert.css
+++ b/pandora_console/include/styles/alert.css
@@ -354,3 +354,35 @@ div#rules.show {
.note-special-day div a.tip > img {
margin: 0px;
}
+
+form#icalendar-special-days.calendar-upload-form {
+ border: 0px;
+ padding: 0px;
+}
+
+form#icalendar-special-days.calendar-upload-form > ul {
+ align-items: flex-start !important;
+}
+
+form#icalendar-special-days.calendar-upload-form > ul > li > label {
+ font-size: 13px;
+ line-height: 16px;
+ margin-bottom: 10px;
+}
+
+.special-days-thead > thead > tr > th:not(.header) {
+ border: 1px solid #e2e2e2;
+}
+
+.special-days-thead > thead > tr > th.header {
+ border: 0px;
+ border-bottom: 1px solid #878787;
+}
+
+.special-days-thead > thead > tr > th.c0 {
+ border-left: 1px solid #e2e2e2;
+}
+
+.special-days-thead > thead > tr > th.c6 {
+ border-right: 1px solid #e2e2e2;
+}
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 11ee3b067f..a12f61c780 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -647,6 +647,10 @@ select:-internal-list-box {
width: 20%;
}
+.w21p {
+ width: 21%;
+}
+
.w22p {
width: 22%;
}
@@ -671,6 +675,14 @@ select:-internal-list-box {
width: 40%;
}
+.w45p {
+ width: 45%;
+}
+
+.w48p {
+ width: 48%;
+}
+
.w47p {
width: 47%;
}
@@ -5805,10 +5817,10 @@ div.label_select_child_left > span {
overflow: hidden;
}
-.switch_radio_button label {
+div.switch_radio_button label {
background-color: #fff;
color: rgba(0, 0, 0, 0.6);
- line-height: 9pt;
+ line-height: 6px !important;
text-align: center;
padding: 14px 10px;
margin-right: -1px;
@@ -5816,14 +5828,14 @@ div.label_select_child_left > span {
transition: all 0.1s ease-in-out;
}
-.switch_radio_button label:first {
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
+div.switch_radio_button label:first-of-type {
+ border-top-left-radius: 4px !important;
+ border-bottom-left-radius: 4px !important;
}
-.switch_radio_button label:last-child {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
+div.switch_radio_button label:last-of-type {
+ border-top-right-radius: 4px !important;
+ border-bottom-right-radius: 4px !important;
margin-right: 0px;
}
@@ -11013,14 +11025,14 @@ pre.external_tools_output {
.tag-editor .tag-editor-tag {
padding: 5px !important;
color: #fff !important;
- background: #82b92e !important;
+ background: var(--primary-color) !important;
border-radius: 0 2px 2px 0 !important;
}
.tag-editor .tag-editor-delete {
padding: 5px !important;
line-height: 16px !important;
- background: #82b92e !important;
+ background: var(--primary-color) !important;
border-radius: 2px 0 0 2px !important;
}
@@ -11194,6 +11206,10 @@ table.table_modal_alternate
height: 20px;
}
+.header_help_icon {
+ width: 16px;
+ height: 16px;
+}
.main_menu_icon.arrow_up {
transform: rotate(90deg);
}
@@ -11508,6 +11524,15 @@ div[role="dialog"] {
/* font-weight: bold; */
}
+.font-title-font {
+ font-size: 13px;
+ line-height: 16px;
+ color: #161628;
+ text-align: left;
+ margin-bottom: 10px;
+ font-weight: bold;
+}
+
.preimage_container span {
font-size: 11pt;
line-height: 28px;
@@ -11543,3 +11568,21 @@ table.alert-template-fields > tbody > tr > td > div > textarea {
table.alert-template-fields > tbody > tr > td[id^="template-label_fields"] {
text-align: center;
}
+
+ul.tag-editor {
+ list-style-type: none;
+ padding: 0.5em !important;
+ margin: 0;
+ overflow: hidden;
+ border: 2px solid #c0ccdc;
+ border-radius: 6px;
+ cursor: text;
+ font: normal 14px sans-serif;
+ color: #333333;
+ background: #f6f7fb;
+ line-height: 20px;
+}
+
+.max-width-100p {
+ max-width: 100% !important;
+}
diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css
index 7fbf593d16..4383e02ea5 100644
--- a/pandora_console/include/styles/tables.css
+++ b/pandora_console/include/styles/tables.css
@@ -235,7 +235,8 @@
.table_action_buttons > a,
.table_action_buttons > img,
-.table_action_buttons > button {
+.table_action_buttons > button,
+.table_action_buttons > form {
visibility: hidden;
}
.info_table > tbody > tr:hover {
@@ -246,7 +247,8 @@
.info_table > tbody > tr:hover .table_action_buttons > a,
.info_table > tbody > tr:hover .table_action_buttons > img,
-.info_table > tbody > tr:hover .table_action_buttons > button {
+.info_table > tbody > tr:hover .table_action_buttons > button,
+.info_table > tbody > tr:hover .table_action_buttons > form {
visibility: visible;
}
diff --git a/pandora_console/include/styles/tactical_groups.css b/pandora_console/include/styles/tactical_groups.css
new file mode 100644
index 0000000000..383e9ef37f
--- /dev/null
+++ b/pandora_console/include/styles/tactical_groups.css
@@ -0,0 +1,31 @@
+.tactical_group_left_column {
+ vertical-align: top;
+ min-width: 30em;
+ width: 30%;
+ padding-top: 0px;
+}
+.tactical_group_right_column {
+ width: 40%;
+ vertical-align: top;
+ min-width: 30em;
+ padding-top: 0px;
+}
+rect {
+ cursor: pointer;
+}
+.info-agent {
+ width: 100%;
+ max-height: 400px;
+}
+.info-agent table {
+ width: 100%;
+}
+#modal-info-agent {
+ display: none;
+}
+#list_agents_tactical_wrapper {
+ max-height: 600px;
+}
+.graph-distribution-so {
+ margin-top: 55px;
+}
diff --git a/pandora_console/include/styles/wizard.css b/pandora_console/include/styles/wizard.css
index ab5d011f70..c7c37a8143 100644
--- a/pandora_console/include/styles/wizard.css
+++ b/pandora_console/include/styles/wizard.css
@@ -46,7 +46,6 @@ ul.wizard li > label:not(.p-switch):first-of-type {
}
ul.wizard li > textarea {
- width: 600px;
height: 15em;
display: inline-block;
}
@@ -130,6 +129,12 @@ ul.wizard li > textarea {
background: #e63c52;
}
+.wizard .tag-editor li,
+.wizard .tag-editor li:focus,
+.wizard .tag-editor li:hover {
+ border: 0;
+ padding: 0;
+}
.wizard .time_selection_container {
display: flex;
align-items: baseline;
@@ -200,6 +205,7 @@ li#textarea-create-site > textarea {
width: 100%;
}
+form.alert-correlation > ul.wizard > li > label,
form#create_site > ul.wizard > li > label {
font-size: 13px;
line-height: 16px;
@@ -210,3 +216,23 @@ form#create_site > ul.wizard > li > label {
select[multiple] {
min-height: 20em;
}
+
+form.alert-correlation > div > ul,
+form.alert-correlation > ul {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
+
+form.alert-correlation > div > ul > li.flex-flex-end {
+ display: flex;
+ align-items: flex-end;
+}
+
+form.alert-correlation > div > ul > li.flex-flex-end > input {
+ width: 150px !important;
+}
+
+form.alert-correlation > div > ul > li.flex-flex-end > label {
+ width: 50px !important;
+}
diff --git a/pandora_console/index.php b/pandora_console/index.php
index 78de0734b4..a78d97d926 100755
--- a/pandora_console/index.php
+++ b/pandora_console/index.php
@@ -1524,17 +1524,6 @@ require 'include/php_to_js_values.php';
}
}
- //$('.button_collapse').on('click', menuActionButtonResizing());
-
- // Cursor change for show a spinner. Experimental.
- /*
- $('.buttonButton').not('.dialog_opener').on('click', function(){
- $('*').css('cursor', 'wait');
- });
- $('.submitButton').not('.dialog_opener').on('click', function(){
- $('*').css('cursor', 'wait');
- });
-*/
// When the user scrolls down 400px from the top of the document, show the
// button.
window.onscroll = function() {
@@ -1545,10 +1534,6 @@ require 'include/php_to_js_values.php';
scrollFunction()
};
- function menuActionButtonResizing() {
- $('.action_buttons_right_content').attr('style', 'left: '+($('#menu_full').width())+'px;');
- }
-
function first_time_identification() {
jQuery.post("ajax.php", {
"page": "general/register",
diff --git a/pandora_console/install.php b/pandora_console/install.php
index e7026a9169..68d69a23d6 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -130,8 +130,8 @@
';
}
@@ -1254,12 +1254,12 @@ foreach ($agents as $agent) {
$fb64 = base64_encode(json_encode($agent_event_filter));
$data[11] = '
'.html_print_image(
- 'images/lightning.png',
+ 'images/event.svg',
true,
[
'align' => 'middle',
'title' => __('Agent events'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'';
diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php
index 3e5584fe42..8aaa7ed60a 100755
--- a/pandora_console/operation/agentes/estado_generalagente.php
+++ b/pandora_console/operation/agentes/estado_generalagente.php
@@ -106,7 +106,12 @@ $agentIconGroup = ((bool) $config['show_group_name'] === false) ? ui_print_group
$agent['id_grupo'],
true,
'',
- 'padding-right: 6px;'
+ 'padding-right: 6px;',
+ true,
+ false,
+ false,
+ '',
+ true
) : '';
$agentIconStatus = agents_detail_view_status_img(
@@ -396,7 +401,7 @@ $buttonsRefreshAgent = html_print_button(
__('Refresh data'),
'refresh_data',
false,
- 'window.location.assign(\'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&refr=60\')',
+ 'window.location.assign("index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&refr=60")',
[ 'mode' => 'link' ],
true
);
@@ -406,7 +411,7 @@ if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
__('Force checks'),
'force_checks',
false,
- 'window.location.assign(\'index.php?sec=estado&sec2=operation/agentes/ver_agente&flag_agent=1&id_agente='.$id_agente.'\')',
+ 'window.location.assign("index.php?sec=estado&sec2=operation/agentes/ver_agente&flag_agent=1&id_agente='.$id_agente.'")',
[ 'mode' => 'link' ],
true
);
@@ -488,7 +493,7 @@ $data = [];
$data[0] = '
'.__('Group').'';
$data[1] = html_print_anchor(
[
- 'href' => 'index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$agent['id_grupo'],
+ 'href' => 'index.php?sec=gagente&sec2=godmode/groups/tactical&id_group='.$agent['id_grupo'],
'content' => groups_get_name($agent['id_grupo']),
],
true
diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php
index 604131d888..910a46acb2 100644
--- a/pandora_console/operation/agentes/exportdata.php
+++ b/pandora_console/operation/agentes/exportdata.php
@@ -1,10 +1,10 @@
'',
+ 'label' => __('Tools'),
+ ],
+ [
+ 'link' => '',
+ 'label' => __('Export data'),
+ ],
+ ]
+);
$group = get_parameter_post('group', 0);
$agentName = get_parameter_post('agent', 0);
@@ -220,48 +242,10 @@ if (!empty($export_btn) && !empty($module)) {
}
if (empty($export_btn) || $show_form) {
- echo '
';
diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php
index 3e602658df..f2ebbedbcf 100644
--- a/pandora_console/operation/agentes/group_view.php
+++ b/pandora_console/operation/agentes/group_view.php
@@ -289,12 +289,12 @@ if (empty($result_groups) === false) {
echo "
";
if (!isset($data['_is_tag_']) && check_acl($config['id_user'], $data['_id_'], 'AW')) {
echo ''.html_print_image(
- 'images/target.png',
+ 'images/change-active.svg',
true,
[
'border' => '0',
'title' => __('Force'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'';
}
diff --git a/pandora_console/operation/heatmap.php b/pandora_console/operation/heatmap.php
index a9ab10ed47..1f7337aa39 100644
--- a/pandora_console/operation/heatmap.php
+++ b/pandora_console/operation/heatmap.php
@@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
- * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
+ * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -64,11 +64,11 @@ if ($group_sent === true) {
$is_ajax = is_ajax();
if ($is_ajax === false && $pure === false) {
$viewtab['config'] = ''.html_print_image(
- 'images/setup.png',
+ 'images/configuration@svg.svg',
true,
[
'title' => __('Config'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'';
@@ -81,11 +81,11 @@ if ($is_ajax === false && $pure === false) {
);
$viewtab['full_screen'] = ''.html_print_image(
- 'images/full_screen.png',
+ 'images/fullscreen@svg.svg',
true,
[
'title' => __('Full screen'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'';
@@ -208,11 +208,11 @@ if ($is_ajax === false && $pure === true) {
echo '';
echo html_print_image(
- 'images/normal_screen.png',
+ 'images/exit_fullscreen@svg.svg',
true,
[
'title' => __('Back to normal mode'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
);
echo '';
diff --git a/pandora_console/operation/messages/message_edit.php b/pandora_console/operation/messages/message_edit.php
index 105a9560de..0e232788e7 100644
--- a/pandora_console/operation/messages/message_edit.php
+++ b/pandora_console/operation/messages/message_edit.php
@@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
- * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
+ * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -52,7 +52,7 @@ $buttons['message_list'] = [
true,
[
'title' => __('Received messages'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'',
];
@@ -64,7 +64,7 @@ $buttons['sent_messages'] = [
true,
[
'title' => __('Sent messages'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'',
];
@@ -76,7 +76,7 @@ $buttons['create_message'] = [
true,
[
'title' => __('Create message'),
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
).'',
];
@@ -218,11 +218,8 @@ if ($read_message) {
true
);
- html_print_div(
- [
- 'class' => 'action-buttons',
- 'content' => $outputButtons,
- ],
+ html_print_action_buttons(
+ $outputButtons
);
return;
@@ -264,18 +261,6 @@ if ($send_mes === true) {
// User info.
$own_info = get_user_info($config['id_user']);
-$table = new stdClass();
-$table->width = '100%';
-$table->class = 'databox filters';
-
-$table->data = [];
-
-$table->data[0][0] = __('Sender');
-
-$table->data[0][1] = (empty($own_info['fullname']) === false) ? $own_info['fullname'] : $config['id_user'];
-
-$table->data[1][0] = __('Destination');
-
$is_admin = (bool) db_get_value(
'is_admin',
'tusuario',
@@ -305,15 +290,29 @@ foreach ($users_full as $user_id => $user_info) {
$users[$user_info['id_user']] = (empty($user_info['fullname']) === true) ? $user_info['id_user'] : $user_info['fullname'];
}
+$table = new stdClass();
+$table->id = 'send_message_table';
+$table->width = '100%';
+$table->class = 'databox max_floating_element_size filter-table-adv';
+$table->style = [];
+$table->style[0] = 'width: 30%';
+$table->style[1] = 'width: 70%';
+$table->data = [];
+
+$table->data[0][] = html_print_label_input_block(
+ __('Sender'),
+ ''.((empty($own_info['fullname']) === false) ? $own_info['fullname'] : $config['id_user']).''
+);
+
// Check if the user to reply is in the list, if not add reply user.
if ($reply === true) {
- $table->data[1][1] = (array_key_exists($dst_user, $users) === true) ? $users[$dst_user] : $dst_user;
- $table->data[1][1] .= html_print_input_hidden(
+ $destinationInputs = (array_key_exists($dst_user, $users) === true) ? $users[$dst_user] : $dst_user;
+ $destinationInputs .= html_print_input_hidden(
'dst_user',
$dst_user,
true
);
- $table->data[1][1] .= html_print_input_hidden(
+ $destinationInputs .= html_print_input_hidden(
'replied',
'1',
true
@@ -324,21 +323,27 @@ if ($reply === true) {
$groups = users_get_groups($config['id_user'], 'AR');
// Get a list of all groups.
- $table->data[1][1] = html_print_select(
- $users,
- 'dst_user',
- $dst_user,
- 'changeStatusOtherSelect(\'dst_user\', \'dst_group\')',
- __('Select user'),
- false,
- true,
- false,
- ''
- );
- $table->data[1][1] .= ' '.__('OR').' ';
- $table->data[1][1] .= html_print_div(
+ $destinationInputs = html_print_div(
[
- 'class' => 'w250px inline',
+ 'class' => 'select_users mrgn_right_5px',
+ 'content' => html_print_select(
+ $users,
+ 'dst_user',
+ $dst_user,
+ 'changeStatusOtherSelect(\'dst_user\', \'dst_group\')',
+ __('Select user'),
+ false,
+ true,
+ false,
+ ''
+ ),
+ ],
+ true
+ );
+ $destinationInputs .= __('OR');
+ $destinationInputs .= html_print_div(
+ [
+ 'class' => 'mrgn_lft_5px',
'content' => html_print_select_groups(
$config['id_user'],
'AR',
@@ -355,24 +360,41 @@ if ($reply === true) {
);
}
-$table->data[2][0] = __('Subject');
-$table->data[2][1] = html_print_input_text(
- 'subject',
- $subject,
- '',
- 50,
- 70,
- true
+$table->data[0][] = html_print_label_input_block(
+ __('Destination'),
+ html_print_div(
+ [
+ 'class' => 'flex-content-left',
+ 'content' => $destinationInputs,
+ ],
+ true
+ )
);
-$table->data[3][0] = __('Message');
-$table->data[3][1] = html_print_textarea(
- 'message',
- 15,
- 255,
- $message,
- '',
- true
+$table->colspan[1][] = 2;
+$table->data[1][] = html_print_label_input_block(
+ __('Subject'),
+ html_print_input_text(
+ 'subject',
+ $subject,
+ '',
+ 50,
+ 70,
+ true
+ )
+);
+
+$table->colspan[2][] = 2;
+$table->data[2][] = html_print_label_input_block(
+ __('Message'),
+ html_print_textarea(
+ 'message',
+ 15,
+ 50,
+ $message,
+ '',
+ true
+ )
);
$jsOutput = '';
@@ -396,17 +418,14 @@ echo '';
- html_print_div(
- [
- 'class' => 'action-buttons',
- 'content' => $outputButton,
- ]
+ html_print_action_buttons(
+ $outputButton
);
?>
diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php
index 5c3ce7a73b..26e16c7f37 100755
--- a/pandora_console/operation/reporting/reporting_viewer.php
+++ b/pandora_console/operation/reporting/reporting_viewer.php
@@ -226,77 +226,52 @@ ui_print_standard_header(
// ------------------- END HEADER ---------------------------------------
// ------------------------ INIT FORM -----------------------------------
-$table = new stdClass();
-$table->id = 'controls_table';
-$table->width = '100%';
-$table->class = 'filter-table-adv';
+$table2 = new stdClass();
+$table2->id = 'controls_table';
+$table2->size[2] = '50%';
+$table2->size[3] = '50%';
+$table2->style[0] = 'text-align:center';
+$table2->style[1] = 'text-align:center';
+$table2->styleTable = 'border:none';
+
if (defined('METACONSOLE')) {
- $table->width = '100%';
- $table->class = 'databox filters';
+ $table2->width = '100%';
+ $table2->class = 'databox filters';
- $table->head[0] = __('View Report');
- $table->head_colspan[0] = 5;
- $table->headstyle[0] = 'text-align: center';
+ $table2->head[0] = __('View Report');
+ $table2->head_colspan[0] = 5;
+ $table2->headstyle[0] = 'text-align: center';
}
-$table->style = [];
-$table->style[0] = 'vertical-align: middle';
-$table->rowspan[0][0] = 2;
-
// Set initial conditions for these controls, later will be modified by javascript
if (!$enable_init_date) {
- $table->style[1] = 'display: none';
- $table->style[2] = 'display: flex;align-items: baseline;';
$display_to = 'none';
$display_item = '';
} else {
- $table->style[1] = 'display: "block"';
- $table->style[2] = 'display: flex;align-items: baseline;';
$display_to = '';
$display_item = 'none';
}
-$table->size = [];
-$table->colspan[0][1] = 2;
-$table->data = [];
-$table->data[0][0] = html_print_image(
- 'images/reporting32.png',
- true,
- [
- 'width' => '32',
- 'height' => '32',
- ]
-);
-
-if (reporting_get_description($id_report)) {
- $table->data[0][1] = ' '.reporting_get_description($id_report).' ';
-} else {
- $table->data[0][1] = ''.reporting_get_name($id_report).' ';
-}
-
-$table->data[0][1] .= ''.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true).'';
-
$html_menu_export = enterprise_hook('reporting_print_button_export');
if ($html_menu_export === ENTERPRISE_NOT_HOOK) {
$html_menu_export = '';
}
-$table->data[0][1] .= ' ';
-$table->data[0][1] .= $html_menu_export;
+$table2->data[0][2] = ''.__('Set initial date').' '.html_print_checkbox_switch('enable_init_date', 1, $enable_init_date, true).' ';
+$table2->data[0][2] .= ''.__('From').': ';
+$table2->data[0][2] .= html_print_input_text('date_init', $date_init, '', 12, 10, true).' ';
+$table2->data[0][2] .= html_print_input_text('time_init', $time_init, '', 10, 7, true).' ';
+$table2->data[0][2] .= ' '.__('Items period before').': ';
+$table2->data[0][2] .= ''.__('to').': ';
+$table2->data[0][2] .= html_print_input_text('date', $date, '', 12, 10, true).' ';
+$table2->data[0][2] .= html_print_input_text('time', $time, '', 10, 7, true).' ';
+$table2->data[0][3] = $html_menu_export;
-$table->data[1][1] = ''.__('From').': ';
-$table->data[1][1] .= html_print_input_text('date_init', $date_init, '', 12, 10, true).' ';
-$table->data[1][1] .= html_print_input_text('time_init', $time_init, '', 10, 7, true).' ';
-$table->data[1][2] = ''.__('Items period before').': ';
-$table->data[1][2] .= ''.__('to').': ';
-$table->data[1][2] .= html_print_input_text('date', $date, '', 12, 10, true).' ';
-$table->data[1][2] .= html_print_input_text('time', $time, '', 10, 7, true).' ';
-
$searchForm = ' |