Merge branch 'ent-9662-second-round' into 'develop'
Ent 9662 second round See merge request artica/pandorafms!5594
This commit is contained in:
commit
92ab4c3ca8
|
@ -140,25 +140,26 @@ function quickShell()
|
|||
ui_print_error_message(__('WebService engine has not been started, please check documentation.'));
|
||||
$wiz->printForm(
|
||||
[
|
||||
'form' => [
|
||||
'form' => [
|
||||
'method' => 'POST',
|
||||
'action' => '#',
|
||||
],
|
||||
'inputs' => [
|
||||
[
|
||||
'class' => 'w100p',
|
||||
'arguments' => [
|
||||
'name' => 'submit',
|
||||
'label' => __('Retry'),
|
||||
'type' => 'submit',
|
||||
'attributes' => ['icon' => 'next'],
|
||||
'return' => true,
|
||||
],
|
||||
],
|
||||
'id' => 'retry_form',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Retry'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'icon' => 'next',
|
||||
'form' => 'retry_form',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -168,6 +169,7 @@ function quickShell()
|
|||
'action' => '#',
|
||||
'class' => 'wizard',
|
||||
'method' => 'post',
|
||||
'id' => 'connect_form',
|
||||
],
|
||||
'inputs' => [
|
||||
[
|
||||
|
@ -198,19 +200,24 @@ function quickShell()
|
|||
'script' => "p=22; if(this.value == 'telnet') { p=23; } $('#text-port').val(p);",
|
||||
],
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'type' => 'submit',
|
||||
'label' => __('Connect'),
|
||||
'attributes' => ['icon' => 'cog'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Connect'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'form' => 'connect_form',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,79 +61,110 @@ ui_print_warning_message(
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filter-table-adv mrgn_top_15px pdd_t_0px_important';
|
||||
$table->data = [];
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->head[0] = __('Agent position');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align:center';
|
||||
$table->style[0] = 'font-weight: bold; ';
|
||||
$table->style[2] = 'font-weight: bold; ';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[2] = '50%';
|
||||
|
||||
$table->data[1][0] = __('Latitude: ');
|
||||
$table->data[1][1] = html_print_input_text_extended(
|
||||
'latitude',
|
||||
$agentData['stored_latitude'],
|
||||
'text-latitude',
|
||||
'',
|
||||
20,
|
||||
20,
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'onchange' => 'setIgnoreGISDataEnabled()',
|
||||
'onkeyup' => 'setIgnoreGISDataEnabled()',
|
||||
],
|
||||
true
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Latitude: '),
|
||||
html_print_input_text_extended(
|
||||
'latitude',
|
||||
$agentData['stored_latitude'],
|
||||
'text-latitude',
|
||||
'',
|
||||
20,
|
||||
20,
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'onchange' => 'setIgnoreGISDataEnabled()',
|
||||
'onkeyup' => 'setIgnoreGISDataEnabled()',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[1][2] = __('Longitude: ');
|
||||
$table->data[1][3] = html_print_input_text_extended(
|
||||
'longitude',
|
||||
$agentData['stored_longitude'],
|
||||
'text-longitude',
|
||||
'',
|
||||
20,
|
||||
20,
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'onchange' => 'setIgnoreGISDataEnabled()',
|
||||
'onkeyup' => 'setIgnoreGISDataEnabled()',
|
||||
],
|
||||
true
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Longitude: '),
|
||||
html_print_input_text_extended(
|
||||
'longitude',
|
||||
$agentData['stored_longitude'],
|
||||
'text-longitude',
|
||||
'',
|
||||
20,
|
||||
20,
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'onchange' => 'setIgnoreGISDataEnabled()',
|
||||
'onkeyup' => 'setIgnoreGISDataEnabled()',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Altitude: ');
|
||||
$table->data[2][1] = html_print_input_text_extended(
|
||||
'altitude',
|
||||
$agentData['stored_altitude'],
|
||||
'text-altitude',
|
||||
'',
|
||||
10,
|
||||
10,
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'onchange' => 'setIgnoreGISDataEnabled()',
|
||||
'onkeyup' => 'setIgnoreGISDataEnabled()',
|
||||
],
|
||||
true
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Altitude: '),
|
||||
html_print_input_text_extended(
|
||||
'altitude',
|
||||
$agentData['stored_altitude'],
|
||||
'text-altitude',
|
||||
'',
|
||||
10,
|
||||
10,
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'onchange' => 'setIgnoreGISDataEnabled()',
|
||||
'onkeyup' => 'setIgnoreGISDataEnabled()',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][2] = __('Ignore new GIS data:');
|
||||
$table->data[2][3] = __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true);
|
||||
$table->data[2][3] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true);
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Ignore new GIS data: '),
|
||||
'<div class="flex mrgn_top_5px">'.__('Yes').' '.html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
0,
|
||||
'',
|
||||
$updateGisData,
|
||||
false,
|
||||
'',
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
).__('No').' '.html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
1,
|
||||
'',
|
||||
$updateGisData,
|
||||
false,
|
||||
'',
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente;
|
||||
echo "<form method='post' action='".$url."' onsubmit ='return validateFormFields();'>";
|
||||
echo "<form method='post' action='".$url."' onsubmit ='return validateFormFields();' class='max_floating_element_size'>";
|
||||
html_print_input_hidden('update_gis', 1);
|
||||
html_print_table($table);
|
||||
|
||||
echo '<div class="action-buttons float-left" style="width: '.$table->width.';">';
|
||||
html_print_submit_button(__('Update'), '', false, 'class="sub upd"');
|
||||
echo '</div>';
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'',
|
||||
false,
|
||||
['icon' => 'wand'],
|
||||
true
|
||||
)
|
||||
);
|
||||
echo '</form>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -196,29 +196,52 @@ foreach ($nps as $row) {
|
|||
|
||||
$filterTable = new stdClass();
|
||||
$filterTable->width = '100%';
|
||||
$filterTable->class = 'fixed_filter_bar';
|
||||
$filterTable->class = 'filter-table-adv';
|
||||
$filterTable->size[0] = '100%';
|
||||
$filterTable->data = [];
|
||||
$filterTable->data[0][0] = __('Module templates');
|
||||
$filterTable->data[1][0] = html_print_select($select, 'template_id', '', '', '', 0, true, false, true, '', false, 'max-width: 200px !important');
|
||||
$filterTable->data[1][1] = html_print_div(
|
||||
|
||||
$filterTable->data[0][0] = html_print_label_input_block(
|
||||
__('Module templates'),
|
||||
html_print_select(
|
||||
$select,
|
||||
'template_id',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 250px '
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[1][0] = html_print_submit_button(
|
||||
__('Assign'),
|
||||
'crt',
|
||||
false,
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Assign'),
|
||||
'crt',
|
||||
false,
|
||||
[
|
||||
'icon' => 'wand',
|
||||
'mode' => 'secondary mini',
|
||||
],
|
||||
true
|
||||
),
|
||||
'class' => 'float-right',
|
||||
'icon' => 'wand',
|
||||
'mode' => 'mini',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$outputFilterTable = '<form style="border:0" class="fixed_filter_bar" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">';
|
||||
$outputFilterTable .= html_print_table($filterTable, true);
|
||||
$outputFilterTable = '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">';
|
||||
$outputFilterTable .= ui_toggle(
|
||||
html_print_table($filterTable, true),
|
||||
'<span class="subsection_header_title">'.__('Assign').'</span>',
|
||||
__('Assign'),
|
||||
'assign',
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
'white-box-content no_border',
|
||||
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
$outputFilterTable .= '</form>';
|
||||
|
||||
echo $outputFilterTable;
|
||||
|
|
|
@ -808,7 +808,7 @@ if ($id_agente) {
|
|||
$pure = (int) get_parameter('pure');
|
||||
if ($pure === 0) {
|
||||
ui_print_standard_header(
|
||||
__('Agent setup view'),
|
||||
__('Agent setup view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
|
||||
'images/agent.png',
|
||||
false,
|
||||
$helper,
|
||||
|
|
|
@ -180,14 +180,26 @@ if ($load_inventory_module) {
|
|||
$form_buttons = '';
|
||||
if ($load_inventory_module) {
|
||||
$form_buttons .= html_print_input_hidden('id_agent_module_inventory', $id_agent_module_inventory, true);
|
||||
$form_buttons .= html_print_submit_button(__('Update'), 'update_inventory_module', false, 'class="sub next"', true);
|
||||
$form_buttons .= html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_inventory_module',
|
||||
false,
|
||||
['icon' => 'wand'],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$form_buttons .= html_print_submit_button(__('Add'), 'add_inventory_module', false, 'class="sub next"', true);
|
||||
$form_buttons .= html_print_submit_button(
|
||||
__('Add'),
|
||||
'add_inventory_module',
|
||||
false,
|
||||
['icon' => 'wand'],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
echo ui_get_inventory_module_add_form(
|
||||
'index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente,
|
||||
$form_buttons,
|
||||
html_print_action_buttons($form_buttons, [], true),
|
||||
$load_inventory_module,
|
||||
$id_os,
|
||||
$target,
|
||||
|
@ -213,10 +225,10 @@ if (db_get_num_rows($sql) == 0) {
|
|||
} else {
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox info_trable';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->styleTable = 'margin-top: 20px;';
|
||||
$table->styleTable = '';
|
||||
$table->head[0] = "<span title='".__('Policy')."'>".__('P.').'</span>';
|
||||
$table->head[1] = __('Name');
|
||||
$table->head[2] = __('Description');
|
||||
|
|
|
@ -302,92 +302,122 @@ foreach ($pre_fields as $key => $value) {
|
|||
|
||||
// Filter table.
|
||||
$filterTable = new stdClass();
|
||||
$filterTable->class = 'fixed_filter_bar';
|
||||
$filterTable->class = 'filter-table-adv w100p';
|
||||
$filterTable->size[0] = '20%';
|
||||
$filterTable->size[1] = '20%';
|
||||
$filterTable->size[2] = '20%';
|
||||
$filterTable->size[3] = '20%';
|
||||
$filterTable->size[4] = '20%';
|
||||
$filterTable->data = [];
|
||||
$filterTable->cellstyle[0][0] = 'width:0';
|
||||
$filterTable->cellstyle[0][1] = 'width:0';
|
||||
$filterTable->cellstyle[0][2] = 'width:0';
|
||||
$filterTable->cellstyle[0][3] = 'width:0';
|
||||
|
||||
$filterTable->data[0][0] = __('Group');
|
||||
$filterTable->data[1][0] = html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
$return_all_group,
|
||||
'ag_group',
|
||||
$ag_group,
|
||||
'this.form.submit();',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$filterTable->data[0][0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
$return_all_group,
|
||||
'ag_group',
|
||||
$ag_group,
|
||||
'this.form.submit();',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[0][1] = __('Recursion');
|
||||
$filterTable->data[1][1] = html_print_checkbox_switch(
|
||||
'recursion',
|
||||
1,
|
||||
$recursion,
|
||||
true,
|
||||
false,
|
||||
'this.form.submit()'
|
||||
$filterTable->data[0][1] = html_print_label_input_block(
|
||||
__('Recursion'),
|
||||
'<div class="mrgn_top_10px">'.html_print_checkbox_switch(
|
||||
'recursion',
|
||||
1,
|
||||
$recursion,
|
||||
true,
|
||||
false,
|
||||
'this.form.submit()'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$filterTable->data[0][2] = __('Show agents');
|
||||
$filterTable->data[1][2] = html_print_select(
|
||||
$showAgentFields,
|
||||
'disabled',
|
||||
$disabled,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
$filterTable->data[0][2] = html_print_label_input_block(
|
||||
__('Show agents'),
|
||||
html_print_select(
|
||||
$showAgentFields,
|
||||
'disabled',
|
||||
$disabled,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[0][3] = __('Operating System');
|
||||
$filterTable->data[1][3] = html_print_select(
|
||||
$fields,
|
||||
'os',
|
||||
$os,
|
||||
'this.form.submit()',
|
||||
'All',
|
||||
0,
|
||||
true
|
||||
$filterTable->data[0][3] = html_print_label_input_block(
|
||||
__('Operating System'),
|
||||
html_print_select(
|
||||
$fields,
|
||||
'os',
|
||||
$os,
|
||||
'this.form.submit()',
|
||||
'All',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[0][4] = __('Free search');
|
||||
$filterTable->data[0][4] .= ui_print_help_tip(
|
||||
__('Search filter by alias, name, description, IP address or custom fields content'),
|
||||
true
|
||||
);
|
||||
$filterTable->data[1][4] = html_print_input_text(
|
||||
'search',
|
||||
$search,
|
||||
'',
|
||||
12,
|
||||
255,
|
||||
true
|
||||
$filterTable->data[0][4] = html_print_label_input_block(
|
||||
__('Free search').ui_print_help_tip(
|
||||
__('Search filter by alias, name, description, IP address or custom fields content'),
|
||||
true
|
||||
),
|
||||
html_print_input_text(
|
||||
'search',
|
||||
$search,
|
||||
'',
|
||||
12,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->cellstyle[1][5] = 'vertical-align: bottom';
|
||||
$filterTable->data[1][5] = html_print_submit_button(
|
||||
$filterTable->colspan[1][0] = 5;
|
||||
$filterTable->data[1][0] = html_print_submit_button(
|
||||
__('Filter'),
|
||||
'srcbutton',
|
||||
false,
|
||||
[
|
||||
'icon' => 'search',
|
||||
'class' => 'float-right',
|
||||
'mode' => 'secondary mini',
|
||||
'class' => 'float-right mrgn_right_10px',
|
||||
'mode' => 'mini',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Print filter table.
|
||||
echo '<form method=\'post\' action=\'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente\'>';
|
||||
html_print_table($filterTable);
|
||||
ui_toggle(
|
||||
html_print_table($filterTable, true),
|
||||
'<span class="subsection_header_title">'.__('Filter').'</span>',
|
||||
__('Filter'),
|
||||
'filter',
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content no_border',
|
||||
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
echo '</form>';
|
||||
|
||||
// Data table.
|
||||
|
|
|
@ -675,7 +675,7 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[2] .= ' <a class="template_details patatas"
|
||||
href="'.ui_get_full_url(false, false, false, false).'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$alert['id_alert_template'].'">';
|
||||
$data[2] .= html_print_image(
|
||||
'images/zoom.png',
|
||||
'images/details.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'template-details-'.$alert['id_alert_template'],
|
||||
|
@ -753,7 +753,7 @@ foreach ($simple_alerts as $alert) {
|
|||
'delete',
|
||||
'images/delete.svg',
|
||||
1,
|
||||
'padding:0px; margin-left:5px; margin-right:5px;',
|
||||
'padding:0px; margin-left:5px; margin-right:5px; width: 22px;',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete action'),
|
||||
|
@ -913,7 +913,7 @@ foreach ($simple_alerts as $alert) {
|
|||
'enable',
|
||||
'images/lightbulb_off.png',
|
||||
1,
|
||||
'padding:0px',
|
||||
'padding:0px; width: 22px; height: 22px;',
|
||||
true,
|
||||
['class' => 'filter_none main_menu_icon']
|
||||
);
|
||||
|
@ -923,7 +923,7 @@ foreach ($simple_alerts as $alert) {
|
|||
'disable',
|
||||
'images/lightbulb.png',
|
||||
1,
|
||||
'padding:0px;',
|
||||
'padding:0px; width: 22px; height: 22px;',
|
||||
true,
|
||||
['class' => 'main_menu_icon']
|
||||
);
|
||||
|
@ -941,7 +941,7 @@ foreach ($simple_alerts as $alert) {
|
|||
'standby_off',
|
||||
'images/bell.png',
|
||||
1,
|
||||
'padding:0px;',
|
||||
'padding:0px; width: 22px; height: 22px;',
|
||||
true,
|
||||
['class' => 'invert_filter main_menu_icon']
|
||||
);
|
||||
|
@ -951,7 +951,7 @@ foreach ($simple_alerts as $alert) {
|
|||
'standby_on',
|
||||
'images/bell_pause.png',
|
||||
1,
|
||||
'padding:0px;',
|
||||
'padding:0px; width: 22px; height: 22px;',
|
||||
true,
|
||||
['class' => 'invert_filter main_menu_icon']
|
||||
);
|
||||
|
|
|
@ -484,7 +484,7 @@ if (is_metaconsole() === false) {
|
|||
$buttons = [
|
||||
'list' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/load@svg.svg', true, ['title' => __('List alerts'), 'class' => 'main_menu_icon invert_filter']).'</a>',
|
||||
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('List alerts'), 'class' => 'main_menu_icon invert_filter']).'</a>',
|
||||
],
|
||||
'builder' => [
|
||||
'active' => false,
|
||||
|
@ -497,44 +497,46 @@ if (is_metaconsole() === false) {
|
|||
$buttons = '';
|
||||
}
|
||||
|
||||
if ($tab === 'list') {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
if ($tab !== 'alert') {
|
||||
if ($tab === 'list') {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('List'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('List'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Create'),
|
||||
],
|
||||
]
|
||||
);
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Create'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alerts_meta_print_header();
|
||||
|
|
|
@ -262,10 +262,7 @@ if ($is_management_allowed === true) {
|
|||
[ 'icon' => 'next' ],
|
||||
true
|
||||
),
|
||||
[
|
||||
'type' => 'form_action',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
[ 'right_content' => $tablePagination ]
|
||||
);
|
||||
|
||||
echo '</form>';
|
||||
|
|
|
@ -389,7 +389,7 @@ if (empty($create) === false || empty($view) === false) {
|
|||
$disabled = ($locked === true) ? 'readonly="readonly"' : '';
|
||||
|
||||
if (empty($create) === true) {
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&update_plugin=$plugin_id&pure='.$config['pure'];
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&update_plugin='.$plugin_id.'&pure='.$config['pure'];
|
||||
} else {
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create_plugin=1&pure='.$config['pure'];
|
||||
}
|
||||
|
@ -403,69 +403,61 @@ if (empty($create) === false || empty($view) === false) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->id = 'table-form';
|
||||
$table->class = 'floating_form';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->style = [];
|
||||
$table->data['plugin_name_captions'] = $data;
|
||||
$table->style[0] = 'vertical-align: top';
|
||||
$table->style[1] = 'vertical-align: top';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->data = [];
|
||||
// General title.
|
||||
$generalTitleContent = [];
|
||||
$generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
|
||||
$generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('General')], true);
|
||||
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true);
|
||||
$data[0] = html_print_div([ 'class' => 'section_table_title', 'content' => __('General')], true);
|
||||
$table->data['general_title'] = $data;
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Name');
|
||||
$data[0] = html_print_label_input_block(
|
||||
__('Name'),
|
||||
html_print_input_text('form_name', $form_name, '', 100, 255, true, false, false, '')
|
||||
);
|
||||
$table->data['plugin_name_captions'] = $data;
|
||||
|
||||
$data = [];
|
||||
$data[0] = html_print_input_text('form_name', $form_name, '', 100, 255, true, false, false, '', 'w100p');
|
||||
$table->data['plugin_name_inputs'] = $data;
|
||||
$table->colspan['plugin_name_inputs'][0] = 3;
|
||||
|
||||
$data[0] = html_print_label_input_block(
|
||||
__('Plugin type'),
|
||||
html_print_select($formPluginType, 'form_plugin_type', $form_plugin_type, '', '', 0, true, false, true, '', false, 'width: 100%')
|
||||
);
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Plugin type');
|
||||
$data[1] = __('Max. timeout');
|
||||
$table->data['plugin_type_timeout_captions'] = $data;
|
||||
// $table->colspan['plugin_type'][1] = 3;
|
||||
$data = [];
|
||||
$data[0] = html_print_select($formPluginType, 'form_plugin_type', $form_plugin_type, '', '', 0, true);
|
||||
$timeoutContent = [];
|
||||
$timeoutContent[] = '<div>'.html_print_extended_select_for_time('form_max_timeout', $form_max_timeout, '', '', '0', false, true).'</div>';
|
||||
$timeoutContent[] = ui_print_input_placeholder(__('This value only will be applied if is minor than the server general configuration plugin timeout').'<br>'.__('If you set a 0 seconds timeout, the server plugin timeout will be used'), true);
|
||||
$data[1] = html_print_div(
|
||||
[
|
||||
'class' => 'flex flex_column',
|
||||
'content' => implode('', $timeoutContent),
|
||||
],
|
||||
true
|
||||
$data[1] = html_print_label_input_block(
|
||||
__('Max. timeout'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'flex flex_column',
|
||||
'content' => implode('', $timeoutContent),
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
$table->data['plugin_type_timeout_inputs'] = $data;
|
||||
|
||||
$table->data['plugin_type_timeout'] = $data;
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Description');
|
||||
$table->data['plugin_desc_captions'] = $data;
|
||||
$data[0] = html_print_label_input_block(
|
||||
__('Description'),
|
||||
html_print_textarea('form_description', 4, 50, $form_description, '', true)
|
||||
);
|
||||
|
||||
$data = [];
|
||||
$data[0] = html_print_textarea('form_description', 4, 50, $form_description, '', true, 'w100p');
|
||||
$table->colspan['plugin_desc_inputs'][0] = 3;
|
||||
$table->colspan['plugin_desc_inputs'][0] = 2;
|
||||
$table->data['plugin_desc_inputs'] = $data;
|
||||
|
||||
// Command title.
|
||||
$commandTitleContent = [];
|
||||
$commandTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
|
||||
$commandTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Command')], true);
|
||||
$data = [];
|
||||
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $commandTitleContent) ], true);
|
||||
$table->data['command_title'] = $data;
|
||||
|
||||
// Command title.
|
||||
$data = [];
|
||||
$data[0] = __('Plugin command').ui_print_help_tip(__('Specify interpreter and plugin path. The server needs permissions to run it.'), true);
|
||||
$table->data['plugin_command_caption'] = $data;
|
||||
$data[0] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Command')], true);
|
||||
$table->data['command_title'] = $data;
|
||||
|
||||
$data = [];
|
||||
$formExecuteContent = [];
|
||||
|
@ -480,45 +472,53 @@ if (empty($create) === false || empty($view) === false) {
|
|||
true
|
||||
);
|
||||
|
||||
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $formExecuteContent)], true);
|
||||
$data[0] = html_print_label_input_block(
|
||||
__('Plugin command'),
|
||||
html_print_div(['class' => 'flex-row-center', 'content' => implode('', $formExecuteContent)], true).ui_print_input_placeholder(
|
||||
__('Specify interpreter and plugin path. The server needs permissions to run it.'),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
// $data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $formExecuteContent)], true);
|
||||
$table->data['plugin_command_inputs'] = $data;
|
||||
$table->colspan['plugin_command_inputs'][0] = 2;
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Plug-in parameters');
|
||||
$table->data['plugin_parameters_caption'] = $data;
|
||||
|
||||
$data = [];
|
||||
$data[0] = html_print_input_text(
|
||||
'form_parameters',
|
||||
$parameters,
|
||||
'',
|
||||
100,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'command_component command_advanced_conf text_input w100p'
|
||||
$data[0] = html_print_label_input_block(
|
||||
__('Plug-in parameters'),
|
||||
html_print_input_text(
|
||||
'form_parameters',
|
||||
$parameters,
|
||||
'',
|
||||
100,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'command_component command_advanced_conf text_input'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['plugin_parameters_inputs'] = $data;
|
||||
$table->colspan['plugin_parameters_inputs'][0] = 2;
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Command preview');
|
||||
$table->data['plugin_preview_captions'] = $data;
|
||||
$data = [];
|
||||
|
||||
$data[0] = html_print_div(['id' => 'command_preview', 'class' => 'mono'], true);
|
||||
// $data[0] = __('Command preview');
|
||||
// $table->data['plugin_preview_captions'] = $data;
|
||||
// $data = [];
|
||||
// $data[0] = html_print_div(['id' => 'command_preview', 'class' => 'mono'], true);
|
||||
$data[0] = html_print_label_input_block(
|
||||
__('Command preview'),
|
||||
html_print_div(['id' => 'command_preview', 'class' => 'mono'], true)
|
||||
);
|
||||
$table->data['plugin_preview_inputs'] = $data;
|
||||
$table->colspan['plugin_preview_inputs'][0] = 2;
|
||||
|
||||
// Parameters macros title.
|
||||
$macrosTitleContent = [];
|
||||
$macrosTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
|
||||
$macrosTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Parameters macros')], true);
|
||||
$data = [];
|
||||
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $macrosTitleContent) ], true);
|
||||
$data[0] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Parameters macros')], true);
|
||||
$table->data['parameters_macros_title'] = $data;
|
||||
|
||||
$macros = json_decode($macros, true);
|
||||
|
@ -563,53 +563,59 @@ if (empty($create) === false || empty($view) === false) {
|
|||
}
|
||||
|
||||
$datam = [];
|
||||
$datam[0] = __('Description')."<span class='normal_weight'> ($macro_name)</span>";
|
||||
$datam[0] = html_print_label_input_block(
|
||||
__('Description').'<span class="normal_weight">('.$macro_name.')</span>',
|
||||
html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, false, '', "class='command_macro text_input'", true)
|
||||
);
|
||||
$datam[0] .= html_print_input_hidden($macro_name_name, $macro_name, true);
|
||||
$datam[1] = html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, false, '', "class='command_macro text_input'", true);
|
||||
|
||||
$datam[2] = __('Default value')."<span class='normal_weight'> ($macro_name)</span>";
|
||||
$datam[3] = html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, false, '', "class='command_component command_macro text_input'", true);
|
||||
$datam[1] = html_print_label_input_block(
|
||||
__('Default value').'<span class="normal_weight">('.$macro_name.')</span>',
|
||||
html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, false, '', "class='command_component command_macro text_input'", true)
|
||||
);
|
||||
|
||||
$table->data['plugin_'.$next_name_number] = $datam;
|
||||
|
||||
$next_name_number++;
|
||||
|
||||
$table->colspan['plugin_'.$next_name_number][1] = 3;
|
||||
$table->colspan['plugin_'.$next_name_number][1] = 2;
|
||||
|
||||
$datam = [];
|
||||
$datam[0] = __('Hide value').ui_print_help_tip(
|
||||
__('This field will show up as dots like a password'),
|
||||
true
|
||||
);
|
||||
$datam[1] = html_print_checkbox_extended(
|
||||
$macro_hide_value_name,
|
||||
1,
|
||||
$macro_hide_value_value,
|
||||
0,
|
||||
'',
|
||||
['class' => 'command_macro'],
|
||||
true,
|
||||
'checkbox-'.$macro_hide_value_name
|
||||
$datam = html_print_label_input_block(
|
||||
__('Hide value'),
|
||||
html_print_checkbox_switch(
|
||||
$macro_hide_value_name,
|
||||
1,
|
||||
$macro_hide_value_value,
|
||||
0,
|
||||
'',
|
||||
['class' => 'command_macro'],
|
||||
true,
|
||||
'checkbox-'.$macro_hide_value_name
|
||||
).ui_print_input_placeholder(
|
||||
__('This field will show up as dots like a password'),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['plugin_'.$next_name_number] = $datam;
|
||||
$next_name_number++;
|
||||
|
||||
$table->colspan['plugin_'.$next_name_number][1] = 3;
|
||||
|
||||
// $table->colspan['plugin_'.$next_name_number][1] = 3;
|
||||
$datam = [];
|
||||
$datam[0] = __('Help')."<span class='normal_weight'> ($macro_name)</span><br><br><br>";
|
||||
$datam[1] = html_print_textarea(
|
||||
$macro_help_name,
|
||||
6,
|
||||
100,
|
||||
$macro_help_value,
|
||||
'class="command_macro" class="w97p"',
|
||||
true
|
||||
$datam[0] = html_print_label_input_block(
|
||||
__('Help').'<span class="normal_weight"> ('.$macro_name.')</span>',
|
||||
html_print_textarea(
|
||||
$macro_help_name,
|
||||
6,
|
||||
100,
|
||||
$macro_help_value,
|
||||
'class="command_macro" class="w97p"',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$datam[1] .= '<br><br><br>';
|
||||
|
||||
$table->colspan['plugin_'.$next_name_number][0] = 2;
|
||||
$table->data['plugin_'.$next_name_number] = $datam;
|
||||
$next_name_number++;
|
||||
$i++;
|
||||
|
@ -617,7 +623,7 @@ if (empty($create) === false || empty($view) === false) {
|
|||
|
||||
// Add/Delete buttons
|
||||
$datam = [];
|
||||
|
||||
$buttons = '';
|
||||
if (!$locked) {
|
||||
$datam[0] = '<a id="add_macro_btn" href="javascript:;">'.'<span class="bolder">'.__('Add macro').'</span>'.' '.html_print_image(
|
||||
'images/add.png',
|
||||
|
@ -627,20 +633,55 @@ if (empty($create) === false || empty($view) === false) {
|
|||
$datam[0] .= '<div id="next_macro" class="invisible">'.$i.'</div>';
|
||||
$datam[0] .= '<div id="next_row" class="invisible">'.$next_name_number.'</div>';
|
||||
|
||||
$buttons = html_print_anchor(
|
||||
[
|
||||
'id' => 'add_macro_btn',
|
||||
'href' => 'javascript:;',
|
||||
'content' => html_print_image(
|
||||
'images/plus@svg.svg',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$buttons .= html_print_div(['id' => 'next_macro', 'class' => 'invisible', 'content' => $i], true);
|
||||
$buttons .= html_print_div(['id' => 'next_row', 'class' => 'invisible', 'content' => $next_name_number], true);
|
||||
|
||||
$delete_macro_style = '';
|
||||
if ($i <= 2) {
|
||||
$delete_macro_style = 'display:none;';
|
||||
}
|
||||
|
||||
$datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.' '.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>'.'</div>';
|
||||
// $datam[1] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.' '.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>'.'</div>';
|
||||
$buttons .= html_print_anchor(
|
||||
[
|
||||
'id' => 'delete_macro_button',
|
||||
'style' => $delete_macro_style,
|
||||
'href' => 'javascript:;',
|
||||
'content' => html_print_image(
|
||||
'images/delete.svg',
|
||||
true,
|
||||
['class' => 'main_menu_icon invert_filter']
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$datam[0] = html_print_div(
|
||||
[
|
||||
'style' => 'flex-direction: row-reverse;justify-content: flex-start;',
|
||||
'content' => $buttons,
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->colspan['plugin_action'][0] = 2;
|
||||
$table->colspan['plugin_action'][2] = 2;
|
||||
} else {
|
||||
$table->colspan['plugin_action'][0] = 4;
|
||||
// $table->colspan['plugin_action'][0] = 4;
|
||||
}
|
||||
|
||||
$table->rowstyle['plugin_action'] = 'text-align:center';
|
||||
// $table->rowstyle['plugin_action'] = 'text-align:center';
|
||||
$table->data['plugin_action'] = $datam;
|
||||
|
||||
|
||||
|
|
|
@ -251,69 +251,69 @@ if (enterprise_installed()) {
|
|||
switch ($section) {
|
||||
case 'general':
|
||||
$buttons['general']['active'] = true;
|
||||
$subpage = ' » '.__('General');
|
||||
$subpage = __('General');
|
||||
$help_header = 'setup_general_tab';
|
||||
break;
|
||||
|
||||
case 'auth':
|
||||
$buttons['auth']['active'] = true;
|
||||
$subpage = ' » '.__('Authentication');
|
||||
$subpage = __('Authentication');
|
||||
break;
|
||||
|
||||
case 'perf':
|
||||
$buttons['perf']['active'] = true;
|
||||
$subpage = ' » '.__('Performance');
|
||||
$subpage = __('Performance');
|
||||
$help_header = '';
|
||||
break;
|
||||
|
||||
case 'vis':
|
||||
$buttons['vis']['active'] = true;
|
||||
$subpage = ' » '.__('Visual styles');
|
||||
$subpage = __('Visual styles');
|
||||
break;
|
||||
|
||||
case 'net':
|
||||
$buttons['net']['active'] = true;
|
||||
$subpage = ' » '.__('Netflow');
|
||||
$subpage = __('Netflow');
|
||||
$help_header = 'setup_netflow_tab';
|
||||
break;
|
||||
|
||||
case 'ehorus':
|
||||
$buttons['ehorus']['active'] = true;
|
||||
$subpage = ' » '.__('eHorus');
|
||||
$subpage = __('eHorus');
|
||||
$help_header = 'setup_ehorus_tab';
|
||||
break;
|
||||
|
||||
case 'integria':
|
||||
$buttons['integria']['active'] = true;
|
||||
$subpage = ' » '.__('Integria IMS');
|
||||
$subpage = __('Integria IMS');
|
||||
$help_header = 'setup_integria_tab';
|
||||
break;
|
||||
|
||||
case 'module_library':
|
||||
$buttons['module_library']['active'] = true;
|
||||
$subpage = ' » '.__('Module Library');
|
||||
$subpage = __('Module Library');
|
||||
$help_header = 'setup_module_library_tab';
|
||||
break;
|
||||
|
||||
case 'gis':
|
||||
$buttons['gis']['active'] = true;
|
||||
$subpage = ' » '.__('Map conections GIS');
|
||||
$subpage = __('Map conections GIS');
|
||||
break;
|
||||
|
||||
case 'notifications':
|
||||
$buttons['notifications']['active'] = true;
|
||||
$subpage = ' » '.__('Notifications');
|
||||
$subpage = __('Notifications');
|
||||
break;
|
||||
|
||||
case 'websocket_engine':
|
||||
$buttons['websocket_engine']['active'] = true;
|
||||
$subpage = ' » '.__('Pandora Websocket Engine');
|
||||
$subpage = __('Pandora Websocket Engine');
|
||||
$help_header = 'quickshell_settings';
|
||||
break;
|
||||
|
||||
case 'external_tools':
|
||||
$buttons['external_tools']['active'] = true;
|
||||
$subpage = ' » '.__('External Tools');
|
||||
$subpage = __('External Tools');
|
||||
$help_header = '';
|
||||
break;
|
||||
|
||||
|
@ -327,39 +327,49 @@ switch ($section) {
|
|||
}
|
||||
|
||||
$buttons['welcome_tips']['active'] = true;
|
||||
$subpage = ' » '.$title;
|
||||
$subpage = $title;
|
||||
$help_header = '';
|
||||
break;
|
||||
|
||||
case 'enterprise':
|
||||
$buttons['enterprise']['active'] = true;
|
||||
$subpage = ' » '.__('Enterprise');
|
||||
$subpage = __('Enterprise');
|
||||
$help_header = 'setup_enterprise_tab';
|
||||
break;
|
||||
|
||||
case 'hist_db':
|
||||
$buttons['hist_db']['active'] = true;
|
||||
$subpage = __('Historical database');
|
||||
$help_header = '';
|
||||
break;
|
||||
|
||||
case 'pass':
|
||||
$buttons['pass']['active'] = true;
|
||||
$subpage = __('Password policies');
|
||||
$help_header = '';
|
||||
break;
|
||||
|
||||
default:
|
||||
$subpage = 'seccion: '.$section;
|
||||
// Default.
|
||||
break;
|
||||
}
|
||||
|
||||
// Put header inside div for special sizing.(No right margin).
|
||||
echo '<div id="header_configuration" style="width: calc(100%);">';
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
__('Configuration').$subpage,
|
||||
ui_print_standard_header(
|
||||
$subpage,
|
||||
'',
|
||||
false,
|
||||
$help_header,
|
||||
true,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Setup'),
|
||||
],
|
||||
]
|
||||
);
|
||||
echo '</div>';
|
||||
|
||||
if (isset($config['error_config_update_config'])) {
|
||||
if ($config['error_config_update_config']['correct'] == false) {
|
||||
|
|
|
@ -873,7 +873,7 @@ class DiscoveryTaskList extends HTML
|
|||
'100%',
|
||||
1.9,
|
||||
// Color.
|
||||
'#82b92e',
|
||||
'#ececec',
|
||||
// Return.
|
||||
true,
|
||||
// Text.
|
||||
|
@ -1218,12 +1218,12 @@ class DiscoveryTaskList extends HTML
|
|||
$result .= progress_circular_bar(
|
||||
$task['id_rt'],
|
||||
($task['status'] < 0) ? 100 : $task['status'],
|
||||
200,
|
||||
200,
|
||||
'#7eb641',
|
||||
150,
|
||||
150,
|
||||
'#3A3A3A',
|
||||
'%',
|
||||
'',
|
||||
'#3A3A3A',
|
||||
'#ececec',
|
||||
0
|
||||
);
|
||||
|
||||
|
@ -1288,12 +1288,12 @@ class DiscoveryTaskList extends HTML
|
|||
$result .= progress_circular_bar(
|
||||
$task['id_rt'].'_detail',
|
||||
$task['stats']['c_network_percent'],
|
||||
200,
|
||||
200,
|
||||
'#7eb641',
|
||||
150,
|
||||
150,
|
||||
'#3A3A3A',
|
||||
'%',
|
||||
'',
|
||||
'#3A3A3A',
|
||||
'#ececec',
|
||||
0
|
||||
);
|
||||
$result .= '</div></div>';
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;}
|
||||
.st1{fill:#000000;}
|
||||
</style>
|
||||
|
||||
<g id="Dark-/-20-/-delete-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group" transform="translate(10.000000, 10.000000) rotate(0.000000) translate(-10.000000, -10.000000) translate(4.000000, 4.000000)" fill="#3F3F3F">
|
||||
<path d="M6,0 C6.51283584,0 6.93550716,0.38604019 6.99327227,0.883378875 L7,1 L7,5 L11,5 C11.5522847,5 12,5.44771525 12,6 C12,6.51283584 11.6139598,6.93550716 11.1166211,6.99327227 L11,7 L7,7 L7,11 C7,11.5522847 6.55228475,12 6,12 C5.48716416,12 5.06449284,11.6139598 5.00672773,11.1166211 L5,11 L5,7 L1,7 C0.44771525,7 0,6.55228475 0,6 C0,5.48716416 0.38604019,5.06449284 0.883378875,5.00672773 L1,5 L5,5 L5,1 C5,0.44771525 5.44771525,0 6,0 Z" id="Path-7"></path>
|
||||
</g>
|
||||
<path d="M10,0 C4.4771525,0 0,4.4771525 0,10 C0,15.5228475 4.4771525,20 10,20 C15.5228475,20 20,15.5228475 20,10 C20,4.4771525 15.5228475,0 10,0 Z M10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 Z" id="Oval" fill="#3F3F3F"></path>
|
||||
</g>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -25,6 +25,8 @@ if ((bool) is_metaconsole() === true) {
|
|||
|
||||
if ($networkmap) {
|
||||
$networkmap_id = get_parameter('networkmap_id', 0);
|
||||
$dashboard = get_parameter('dashboard', 0);
|
||||
$size = get_parameter('size', []);
|
||||
$x_offset = get_parameter('x_offset', 0);
|
||||
$y_offset = get_parameter('y_offset', 0);
|
||||
$zoom_dash = get_parameter('zoom_dash', 0.5);
|
||||
|
@ -62,6 +64,15 @@ if ($networkmap) {
|
|||
global $id_networkmap;
|
||||
$id_networkmap = $networkmap['id'];
|
||||
$tab = 'radial_dynamic';
|
||||
if (empty($size) === false) {
|
||||
if ($size['width'] > $size['height']) {
|
||||
$width = $size['height'];
|
||||
$height = ($size['height'] - 10);
|
||||
} else {
|
||||
$width = $size['width'];
|
||||
$height = ($size['width'] + 50);
|
||||
}
|
||||
}
|
||||
|
||||
include_once 'operation/agentes/networkmap.dinamic.php';
|
||||
} else {
|
||||
|
|
|
@ -1573,7 +1573,7 @@ if (check_login()) {
|
|||
$value['thresholds']
|
||||
);
|
||||
|
||||
$resultData = '<span style="color:'.$status['color'].'">';
|
||||
$resultData = '<span class="widget-module-tabs-data" style="color:'.$status['color'].'">';
|
||||
if ($vdata !== null && $vdata !== '' && $vdata !== false) {
|
||||
if (isset($formatData) === true
|
||||
&& (bool) $formatData === true
|
||||
|
|
|
@ -601,6 +601,7 @@ class AgentWizard extends HTML
|
|||
'action' => $this->sectionUrl,
|
||||
'id' => 'form-main-wizard',
|
||||
'method' => 'POST',
|
||||
'class' => 'white_box pdd_20px filter-list-adv',
|
||||
];
|
||||
|
||||
// Inputs.
|
||||
|
@ -829,24 +830,22 @@ class AgentWizard extends HTML
|
|||
];
|
||||
}
|
||||
|
||||
$inputs[] = [
|
||||
'arguments' => [
|
||||
'label' => $this->actionLabel,
|
||||
'name' => 'sub-protocol',
|
||||
'type' => 'submit',
|
||||
'attributes' => [
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
$this->actionLabel,
|
||||
'sub-protocol',
|
||||
false,
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'onclick' => '$(\'#form-main-wizard\').submit();',
|
||||
'onclick' => '$("#form-main-wizard").submit();',
|
||||
],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
// Prints main form.
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'white_box',
|
||||
'style' => 'padding: 20px',
|
||||
'content' => $this->printForm(
|
||||
[
|
||||
'form' => $form,
|
||||
|
@ -5980,7 +5979,7 @@ class AgentWizard extends HTML
|
|||
});
|
||||
|
||||
// Loading.
|
||||
$('#submit-sub-protocol').click(function() {
|
||||
$('#button-sub-protocol').click(function() {
|
||||
$('.wizard-result').remove();
|
||||
$('#form-create-modules').remove();
|
||||
$('.textodialogo').remove();
|
||||
|
|
|
@ -1831,7 +1831,7 @@ class Diagnostics extends Wizard
|
|||
|
||||
if ($items[$key]['status'] === 2) {
|
||||
$items[$key]['value'] = html_print_image(
|
||||
'images/icono-warning.png',
|
||||
'images/alert-yellow@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Warning'),
|
||||
|
@ -1840,7 +1840,7 @@ class Diagnostics extends Wizard
|
|||
);
|
||||
} else if ($items[$key]['status'] === 1) {
|
||||
$items[$key]['value'] = html_print_image(
|
||||
'images/exito.png',
|
||||
'images/validate.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Successfully'),
|
||||
|
@ -1849,7 +1849,7 @@ class Diagnostics extends Wizard
|
|||
);
|
||||
} else {
|
||||
$items[$key]['value'] = html_print_image(
|
||||
'images/error_1.png',
|
||||
'images/fail@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Error'),
|
||||
|
|
|
@ -181,113 +181,47 @@ class SnmpConsole extends HTML
|
|||
|
||||
$default_refr = 300;
|
||||
|
||||
if (!isset($config['pure']) || $config['pure'] === false) {
|
||||
$statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure='.$config['pure'].'">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Statistics'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['text'] = '<a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&pure=0">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['active'] = true;
|
||||
$statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure='.$config['pure'].'">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Statistics'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['text'] = '<a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&pure=0">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['active'] = true;
|
||||
|
||||
$screen['text'] = '<a href="#" onClick="javascript:fullscreen(1)">'.html_print_image(
|
||||
'images/fullscreen@svg.svg',
|
||||
true,
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'snmp_console',
|
||||
false,
|
||||
[
|
||||
$screen,
|
||||
$list,
|
||||
$statistics,
|
||||
],
|
||||
[
|
||||
[
|
||||
'title' => __('View in full screen'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'snmp_console',
|
||||
false,
|
||||
[
|
||||
$screen,
|
||||
$list,
|
||||
$statistics,
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
echo '<div id="dashboard-controls">';
|
||||
|
||||
echo '<div id="menu_tab">';
|
||||
echo '<ul class="mn">';
|
||||
// Normal view button.
|
||||
echo '<li class="nomn">';
|
||||
|
||||
echo '<a href="#" onClick="javascript:fullscreen(0)">';
|
||||
echo html_print_image(
|
||||
'images/exit_fullscreen@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Exit fullscreen'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
);
|
||||
echo '</a>';
|
||||
echo '</li>';
|
||||
|
||||
// Auto refresh control.
|
||||
echo '<li class="nomn">';
|
||||
echo '<div class="dashboard-refr mrgn_top_6px">';
|
||||
echo '<div class="dashboard-countdown display_in"></div>';
|
||||
$normal_url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view';
|
||||
|
||||
echo '<form id="refr-form" method="get" action="'.$normal_url.'" >';
|
||||
echo __('Refresh every').':';
|
||||
echo html_print_select(get_refresh_time_array(), 'refresh', $this->refr, '', '', 0, true, false, false);
|
||||
echo '</form>';
|
||||
echo '</li>';
|
||||
|
||||
html_print_input_hidden('sec', 'snmpconsole');
|
||||
html_print_input_hidden('sec2', 'operation/snmpconsole/snmp_view');
|
||||
html_print_input_hidden('pure', 1);
|
||||
html_print_input_hidden('refresh', (($this->refr > 0) ? $this->refr : $default_refr));
|
||||
|
||||
// Dashboard name.
|
||||
echo '<li class="nomn">';
|
||||
echo '<div class="dashboard-title">'.__('SNMP Traps').'</div>';
|
||||
echo '</li>';
|
||||
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/');
|
||||
ui_require_css_file('pandora_dashboard', ENTERPRISE_DIR.'/include/styles/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
|
||||
ui_require_jquery_file('countdown');
|
||||
ui_require_javascript_file('pandora_dashboard', ENTERPRISE_DIR.'/include/javascript/');
|
||||
ui_require_javascript_file('wz_jsgraphics');
|
||||
ui_require_javascript_file('pandora_visual_console');
|
||||
}
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Datatables list.
|
||||
try {
|
||||
|
|
|
@ -842,7 +842,7 @@ if (is_ajax()) {
|
|||
$fragmentation_status = '';
|
||||
if ($db_fragmentation->data->tablesFragmentationStatus->status === 1) {
|
||||
$fragmentation_status = html_print_image(
|
||||
'images/exito.png',
|
||||
'images/validate.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Successfully'),
|
||||
|
@ -851,7 +851,7 @@ if (is_ajax()) {
|
|||
);
|
||||
} else {
|
||||
$fragmentation_status = html_print_image(
|
||||
'images/error_1.png',
|
||||
'images/fail@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Error'),
|
||||
|
|
|
@ -68,10 +68,10 @@ function network_print_explorer_header(
|
|||
$cell = '<div class="flex_center">';
|
||||
$cell .= $title;
|
||||
$cell .= html_print_link_with_params(
|
||||
'images/arrow-down-white.png',
|
||||
'images/arrow@svg.svg',
|
||||
array_merge($hidden_data, ['order_by' => $order]),
|
||||
'image',
|
||||
($selected === $order) ? 'opacity: 0.5' : ''
|
||||
'rotate: 270deg; width: 20px; margin-top: 4px;'.(($selected === $order) ? '' : 'opacity: 0.5')
|
||||
);
|
||||
$cell .= '</div>';
|
||||
|
||||
|
|
|
@ -3283,12 +3283,19 @@ function reporting_html_alert_report_actions($table, $item, $pdf=0)
|
|||
function get_alert_table($data)
|
||||
{
|
||||
$table = new StdCLass();
|
||||
$table->width = '100%';
|
||||
$table->width = '99%';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->headstyle = [];
|
||||
$table->cellstyle = [];
|
||||
$table->headstyle[0] = 'text-align:left;';
|
||||
$table->size[0] = '25%';
|
||||
$table->size[1] = '12%';
|
||||
$table->size[2] = '12%';
|
||||
$table->size[3] = '12%';
|
||||
$table->size[4] = '12%';
|
||||
$table->size[5] = '12%';
|
||||
$table->size[6] = '12%';
|
||||
|
||||
$head = reset($data);
|
||||
foreach (array_reverse(array_keys($head)) as $name) {
|
||||
|
@ -3527,7 +3534,7 @@ function reporting_html_alert_report($table, $item, $pdf=0)
|
|||
|
||||
$table->data['alerts']['cell'] = html_print_table($table1, true);
|
||||
if ($pdf) {
|
||||
$table1->class = 'pdf_alert_table';
|
||||
$table1->class = 'info_table';
|
||||
return html_print_table($table1, true);
|
||||
}
|
||||
}
|
||||
|
@ -3691,7 +3698,7 @@ function reporting_html_agent_configuration(
|
|||
|
||||
$row = [];
|
||||
$row['name'] = $item['data']['name'];
|
||||
$row['group'] = $item['data']['group_icon'];
|
||||
$row['group'] = groups_get_name($item['data']['group'], true);
|
||||
$row['address'] = $item['data']['os_icon'];
|
||||
$row['os'] = $item['data']['address'];
|
||||
$row['description'] = $item['data']['description'];
|
||||
|
@ -3732,36 +3739,21 @@ function reporting_html_agent_configuration(
|
|||
$table1->width = '99%';
|
||||
$table1->head = [];
|
||||
$table1->head['name'] = __('Name');
|
||||
$table1->head['type'] = __('Type');
|
||||
$table1->head['warning_critical'] = __('Warning<br/>Critical');
|
||||
$table1->head['threshold'] = __('Threshold');
|
||||
$table1->head['group_icon'] = __('Group');
|
||||
$table1->head['description'] = __('Description');
|
||||
$table1->head['interval'] = __('Interval');
|
||||
$table1->head['unit'] = __('Unit');
|
||||
$table1->head['status'] = __('Status');
|
||||
$table1->head['tags'] = __('Tags');
|
||||
$table1->align = [];
|
||||
$table1->align['name'] = 'left';
|
||||
$table1->align['type'] = 'center';
|
||||
$table1->align['warning_critical'] = 'right';
|
||||
$table1->align['threshold'] = 'right';
|
||||
$table1->align['group_icon'] = 'center';
|
||||
$table1->align['description'] = 'left';
|
||||
$table1->align['interval'] = 'right';
|
||||
$table1->align['unit'] = 'left';
|
||||
$table1->align['status'] = 'center';
|
||||
$table1->align['tags'] = 'left';
|
||||
$table1->align[] = 'left';
|
||||
$table1->data = [];
|
||||
|
||||
foreach ($item['data']['modules'] as $module) {
|
||||
$row = [];
|
||||
|
||||
$row['name'] = $module['name'];
|
||||
$row['type'] = $module['type_icon'];
|
||||
$row['warning_critical'] = $module['max_warning'].' / '.$module['min_warning'].'<br>'.$module['max_critical'].' / '.$module['min_critical'];
|
||||
$row['threshold'] = $module['threshold'];
|
||||
$row['group_icon'] = ui_print_group_icon($item['data']['group'], true);
|
||||
$row['description'] = $module['description'];
|
||||
$row['interval'] = $module['interval'];
|
||||
$row['unit'] = $module['unit'];
|
||||
|
|
|
@ -727,8 +727,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||
false,
|
||||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'white_table_flex margin-bottom-10 border-bottom-gray'
|
||||
'white-box-content mrgn_top_0 mrgn_btn_0px',
|
||||
'white_table_flex'
|
||||
);
|
||||
|
||||
if ($config['agentaccess']) {
|
||||
|
@ -747,8 +747,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content border-bottom-gray',
|
||||
'white_table_flex margin-top-10 margin-bottom-10'
|
||||
'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
|
||||
'white_table_flex'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -920,8 +920,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content border-bottom-gray',
|
||||
'white_table_flex margin-top-10 margin-bottom-10'
|
||||
'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
|
||||
'white_table_flex'
|
||||
);
|
||||
|
||||
if (empty($server_data) === false && is_metaconsole() === true) {
|
||||
|
|
|
@ -385,7 +385,12 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
|
|||
$messageCreated = html_print_table($messageTable, true);
|
||||
$autocloseTime = ((int) $config['notification_autoclose_time'] * 1000);
|
||||
|
||||
$classes[] = 'info_box_container';
|
||||
if (empty($message['div_class']) === false) {
|
||||
$classes[] = $message['div_class'];
|
||||
} else {
|
||||
$classes[] = 'info_box_container';
|
||||
}
|
||||
|
||||
$classes[] = (($autoclose === true) && ($autocloseTime > 0)) ? ' info_box_autoclose' : '';
|
||||
|
||||
// This session var is defined in index.
|
||||
|
@ -3873,6 +3878,29 @@ function ui_print_datatable(array $parameters)
|
|||
}';
|
||||
}
|
||||
|
||||
$js .= 'if ($("#'.$table_id.' tr td").length == 1) {
|
||||
$("div[id^=info_box_]").show();
|
||||
$("div[id^=info_box_]").removeClass(\'invisible_important\');
|
||||
$("table#'.$table_id.'").hide();
|
||||
$("div.dataTables_paginate").hide();
|
||||
$("div.dataTables_info").hide();
|
||||
$("div.dataTables_length").hide();
|
||||
|
||||
if (dt_'.$table_id.'.page.info().pages > 1) {
|
||||
$(".dataTables_paginate.paging_simple_numbers").show()
|
||||
}
|
||||
} else {
|
||||
$("div[id^=info_box_]").hide();
|
||||
$("table#'.$table_id.'").show();
|
||||
$("div.dataTables_paginate").show();
|
||||
$("div.dataTables_info").show();
|
||||
$("div.dataTables_length").show();
|
||||
|
||||
if (dt_'.$table_id.'.page.info().pages == 1) {
|
||||
$(".dataTables_paginate.paging_simple_numbers").hide()
|
||||
}
|
||||
}';
|
||||
|
||||
if (isset($parameters['drawCallback'])) {
|
||||
$js .= $parameters['drawCallback'];
|
||||
}
|
||||
|
@ -3996,8 +4024,13 @@ function ui_print_datatable(array $parameters)
|
|||
$js .= '</script>';
|
||||
|
||||
// Order.
|
||||
$info_msg_arr = [];
|
||||
$info_msg_arr['message'] = $emptyTable;
|
||||
$info_msg_arr['div_class'] = 'info_box_container invisible_important';
|
||||
|
||||
$info_msg = '<div>'.ui_print_info_message($info_msg_arr).'</div>';
|
||||
$err_msg = '<div id="error-'.$table_id.'"></div>';
|
||||
$output = $err_msg.$filter.$extra.$table.$js;
|
||||
$output = $info_msg.$err_msg.$filter.$extra.$table.$js;
|
||||
if (is_ajax() === false) {
|
||||
ui_require_css_file('datatables.min', 'include/styles/js/');
|
||||
ui_require_css_file('tables');
|
||||
|
@ -4327,7 +4360,10 @@ function ui_toggle(
|
|||
$image_a = html_print_image(
|
||||
$img_a,
|
||||
true,
|
||||
[ 'style' => 'rotate: '.$rotateA ],
|
||||
[
|
||||
'class' => 'mrgn_right_10px',
|
||||
'style' => 'rotate: '.$rotateA,
|
||||
],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
|
@ -4338,7 +4374,10 @@ function ui_toggle(
|
|||
$image_b = html_print_image(
|
||||
$img_b,
|
||||
true,
|
||||
[ 'style' => 'rotate: '.$rotateB ],
|
||||
[
|
||||
'class' => 'mrgn_right_10px',
|
||||
'style' => 'margin-right:10px; rotate: '.$rotateB,
|
||||
],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
|
@ -4401,7 +4440,7 @@ function ui_toggle(
|
|||
$original,
|
||||
true,
|
||||
[
|
||||
'class' => 'float-left main_menu_icon',
|
||||
'class' => 'float-left main_menu_icon mrgn_right_10px',
|
||||
'style' => 'object-fit: contain; margin-right:10px; rotate:'.$imageRotate,
|
||||
'title' => $title,
|
||||
'id' => 'image_'.$uniqid,
|
||||
|
@ -4433,7 +4472,7 @@ function ui_toggle(
|
|||
$original,
|
||||
true,
|
||||
[
|
||||
'class' => 'main_menu_icon',
|
||||
'class' => 'main_menu_icon mrgn_right_10px',
|
||||
'style' => 'object-fit: contain; float:right; margin-right:10px; rotate:'.$imageRotate,
|
||||
'title' => $title,
|
||||
'id' => 'image_'.$uniqid,
|
||||
|
@ -5044,6 +5083,8 @@ function ui_print_page_header(
|
|||
$breadcrumbs='',
|
||||
$hide_left_small=false
|
||||
) {
|
||||
global $config;
|
||||
|
||||
$title = io_safe_input_html($title);
|
||||
if (($icon == '') && ($godmode == true)) {
|
||||
$icon = 'images/gm_setup.png';
|
||||
|
@ -5057,13 +5098,18 @@ function ui_print_page_header(
|
|||
$type = 'view';
|
||||
$type2 = 'menu_tab_frame_view';
|
||||
$separator_class = 'separator';
|
||||
$div_style = '';
|
||||
} else {
|
||||
$type = 'view';
|
||||
$type2 = 'menu_tab_frame_view';
|
||||
$separator_class = 'separator_view';
|
||||
$div_style = '';
|
||||
if ($config['pure'] === true) {
|
||||
$div_style = 'top:0px;';
|
||||
}
|
||||
}
|
||||
|
||||
$buffer = '<div id="'.$type2.'" >';
|
||||
$buffer = '<div id="'.$type2.'" style="'.$div_style.'" >';
|
||||
|
||||
if (!empty($breadcrumbs)) {
|
||||
$buffer .= '<div class="menu_tab_left_bc">';
|
||||
|
@ -7267,22 +7313,22 @@ function ui_get_inventory_module_add_form(
|
|||
$table = new stdClass();
|
||||
$table->id = 'inventory-module-form';
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->style['module-title'] = 'font-weight: bold;';
|
||||
$table->style['interval-title'] = 'font-weight: bold;';
|
||||
$table->style['target-title'] = 'font-weight: bold;';
|
||||
$table->style['chkbx-custom-fields-title'] = 'font-weight: bold;';
|
||||
$table->style['username-title'] = 'font-weight: bold;';
|
||||
$table->style['password-title'] = 'font-weight: bold;';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
$table->size['module'] = '50%';
|
||||
$table->size['interval'] = '50%';
|
||||
$table->size['target'] = '50%';
|
||||
$table->size['chkbx-custom-fields'] = '50%';
|
||||
$table->size['username'] = '50%';
|
||||
$table->size['password'] = '50%';
|
||||
$table->rowstyle = [];
|
||||
$table->rowstyle['hidden-custom-field-row'] = 'display: none;';
|
||||
$table->colspan = [];
|
||||
$table->colspan['custom-fields-row'] = [];
|
||||
$table->colspan['custom-fields-row']['custom-fields-column'] = 4;
|
||||
$table->rowstyle['custom-fields-button'] = 'display: none;';
|
||||
// $table->colspan = [];
|
||||
// $table->colspan['custom-fields-row'] = [];
|
||||
// $table->colspan['custom-fields-row']['custom-fields-column'] = 2;
|
||||
$table->data = [];
|
||||
|
||||
$row = [];
|
||||
$row['module-title'] = __('Module');
|
||||
if (empty($inventory_module_id)) {
|
||||
if (empty($os_id)) {
|
||||
$sql = 'SELECT mi.id_module_inventory AS id, mi.name AS name, co.name AS os
|
||||
|
@ -7314,33 +7360,111 @@ function ui_get_inventory_module_add_form(
|
|||
}
|
||||
}
|
||||
|
||||
$row['module-input'] = html_print_select($inventory_modules, 'id_module_inventory', 0, '', __('Select inventory module'), 0, true, false, false);
|
||||
$row['module'] = html_print_label_input_block(
|
||||
__('Module'),
|
||||
html_print_select(
|
||||
$inventory_modules,
|
||||
'id_module_inventory',
|
||||
0,
|
||||
'',
|
||||
__('Select inventory module'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w100p',
|
||||
false,
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$row['module-input'] = db_get_sql('SELECT name FROM tmodule_inventory WHERE id_module_inventory = '.$inventory_module_id);
|
||||
$row['module'] = html_print_label_input_block(
|
||||
__('Module'),
|
||||
db_get_sql('SELECT name FROM tmodule_inventory WHERE id_module_inventory = '.$inventory_module_id)
|
||||
);
|
||||
}
|
||||
|
||||
$row['interval-title'] = __('Interval');
|
||||
$row['interval-input'] = html_print_extended_select_for_time('interval', $interval, '', '', '', false, true);
|
||||
$row['interval'] = html_print_label_input_block(
|
||||
__('Interval'),
|
||||
html_print_extended_select_for_time(
|
||||
'interval',
|
||||
$interval,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['first-row'] = $row;
|
||||
|
||||
$row = [];
|
||||
|
||||
if ($target !== false) {
|
||||
$row['target-title'] = __('Target');
|
||||
$row['target-input'] = html_print_input_text('target', $target, '', 25, 40, true);
|
||||
$row['target'] = html_print_label_input_block(
|
||||
__('Target'),
|
||||
html_print_input_text(
|
||||
'target',
|
||||
$target,
|
||||
'',
|
||||
25,
|
||||
40,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$row['chkbx-custom-fields-title'] = __('Use custom fields');
|
||||
$row['chkbx-custom-fields-input'] = html_print_checkbox('custom_fields_enabled', 1, $custom_fields_enabled, true);
|
||||
$row['chkbx-custom-fields'] = html_print_label_input_block(
|
||||
__('Use custom fields'),
|
||||
html_print_checkbox(
|
||||
'custom_fields_enabled',
|
||||
1,
|
||||
$custom_fields_enabled,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['second-row'] = $row;
|
||||
|
||||
$row = [];
|
||||
$row['username-title'] = __('Username');
|
||||
$row['username-input'] = html_print_input_text('username', $username, '', 25, 40, true);
|
||||
$row['password-title'] = __('Password');
|
||||
$row['password-input'] = html_print_input_password('password', $password, '', 25, 40, true);
|
||||
$row['username'] = html_print_label_input_block(
|
||||
__('Username'),
|
||||
html_print_input_text(
|
||||
'username',
|
||||
$username,
|
||||
'',
|
||||
25,
|
||||
40,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
$row['password'] = html_print_label_input_block(
|
||||
__('Password'),
|
||||
html_print_input_password(
|
||||
'password',
|
||||
$password,
|
||||
'',
|
||||
25,
|
||||
40,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['userpass-row'] = $row;
|
||||
|
||||
|
@ -7348,8 +7472,18 @@ function ui_get_inventory_module_add_form(
|
|||
$row['hidden-title'] = '';
|
||||
$row['hidden-input'] = html_print_input_hidden('hidden-custom-field-name', '', true);
|
||||
$row['hidden-input'] .= html_print_input_hidden('hidden-custom-field-is-secure', 0, true);
|
||||
$row['hidden-input'] .= html_print_input_text('hidden-custom-field-input', '', '', 25, 40, true);
|
||||
$row['hidden-input'] .= '<span> </span>';
|
||||
$row['hidden-input'] .= html_print_input_text(
|
||||
'hidden-custom-field-input',
|
||||
'',
|
||||
'',
|
||||
25,
|
||||
40,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w93p'
|
||||
);
|
||||
$row['hidden-input'] .= html_print_image(
|
||||
'images/delete.svg',
|
||||
true,
|
||||
|
@ -7414,13 +7548,48 @@ function ui_get_inventory_module_add_form(
|
|||
}
|
||||
|
||||
$row = [];
|
||||
$row['custom-fields-column'] = '<b>'.__('Field name').'</b>'.' '.html_print_input_text('field-name', '', '', 25, 40, true).' '.html_print_checkbox('field-is-password', 1, false, true).__("It's a password").' '.html_print_button(__('Add field'), 'add-field', false, '', 'class="sub add"', true);
|
||||
$row['custom-fields-column'] = html_print_label_input_block(
|
||||
__('Field name'),
|
||||
'<div class="flex">'.html_print_input_text(
|
||||
'field-name',
|
||||
'',
|
||||
'',
|
||||
25,
|
||||
40,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w60p mrgn_right_10px'
|
||||
).html_print_checkbox(
|
||||
'field-is-password',
|
||||
1,
|
||||
false,
|
||||
true
|
||||
).' '.__("It's a password").'</div>'
|
||||
);
|
||||
|
||||
$table->data['custom-fields-row'] = $row;
|
||||
|
||||
$row = [];
|
||||
$row['custom-fields-button-title'] = '';
|
||||
$row['custom-fields-button'] = html_print_button(
|
||||
__('Add field'),
|
||||
'add-field',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'class' => 'mini float-right',
|
||||
'icon' => 'plus',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$table->data['custom-fields-button'] = $row;
|
||||
|
||||
ob_start();
|
||||
|
||||
echo '<form name="modulo" method="post" action="'.$form_action.'">';
|
||||
echo '<form name="modulo" method="post" action="'.$form_action.'" class="max_floating_element_size">';
|
||||
echo html_print_table($table);
|
||||
echo '<div class="action-buttons w100p">';
|
||||
echo $form_buttons;
|
||||
|
|
|
@ -696,7 +696,7 @@ function get_build_setup_charts($type, $options, $data)
|
|||
$legend->setAlign($legendAlign);
|
||||
|
||||
// Defaults fonts legends.
|
||||
$legend->labels()->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
|
||||
$legend->labels()->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$legend->labels()->getFonts()->setStyle('normal');
|
||||
$legend->labels()->getFonts()->setWeight(600);
|
||||
$legend->labels()->getFonts()->setSize(((int) $config['font_size'] + 2));
|
||||
|
@ -835,7 +835,7 @@ function get_build_setup_charts($type, $options, $data)
|
|||
$dataLabel->setFormatter($dataLabelFormatter);
|
||||
|
||||
// Defaults fonts datalabel.
|
||||
$dataLabel->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
|
||||
$dataLabel->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$dataLabel->getFonts()->setStyle('normal');
|
||||
$dataLabel->getFonts()->setWeight(600);
|
||||
$dataLabel->getFonts()->setSize(((int) $config['font_size'] + 2));
|
||||
|
@ -944,14 +944,14 @@ function get_build_setup_charts($type, $options, $data)
|
|||
|
||||
// Defaults scalesFont X.
|
||||
$scalesXFonts = $scales->getX()->ticks()->getFonts();
|
||||
$scalesXFonts->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
|
||||
$scalesXFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$scalesXFonts->setStyle('normal');
|
||||
$scalesXFonts->setWeight(600);
|
||||
$scalesXFonts->setSize(((int) $config['font_size'] + 2));
|
||||
|
||||
// Defaults scalesFont Y.
|
||||
$scalesYFonts = $scales->getY()->ticks()->getFonts();
|
||||
$scalesYFonts->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
|
||||
$scalesYFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$scalesYFonts->setStyle('normal');
|
||||
$scalesYFonts->setWeight(600);
|
||||
$scalesYFonts->setSize(((int) $config['font_size'] + 2));
|
||||
|
|
|
@ -2167,7 +2167,7 @@ function print_circular_progress_bar(
|
|||
|
||||
var numberText = circle
|
||||
.append("text")
|
||||
.attr("fill", label_color)
|
||||
.attr("fill", "#333333")
|
||||
.style("font-weight", "bold")
|
||||
.style("font-size", numberSize)
|
||||
.attr("text-anchor", "middle")
|
||||
|
@ -2175,7 +2175,7 @@ function print_circular_progress_bar(
|
|||
|
||||
var percentText = circle
|
||||
.append("text")
|
||||
.attr("fill", label_color)
|
||||
.attr("fill", "#333333")
|
||||
.style("font-weight", "bold")
|
||||
.style("font-size", unitSize)
|
||||
.text(unit)
|
||||
|
|
|
@ -806,7 +806,9 @@ function dashboardLoadNetworkMap(settings) {
|
|||
auth_hash: settings.auth_hash,
|
||||
id_user: settings.id_user,
|
||||
ignore_acl: 1,
|
||||
node: settings.node
|
||||
node: settings.node,
|
||||
dashboard: 1,
|
||||
size: settings.size
|
||||
},
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
|
|
|
@ -520,7 +520,7 @@ class DataMatrix extends Widget
|
|||
[
|
||||
'id' => $tableId,
|
||||
'class' => 'info_table',
|
||||
'style' => 'width: 100%',
|
||||
'style' => 'width: 99%',
|
||||
'columns' => $columns,
|
||||
'column_names' => $column_names,
|
||||
'ajax_url' => 'include/ajax/module',
|
||||
|
@ -539,6 +539,7 @@ class DataMatrix extends Widget
|
|||
'direction' => 'desc',
|
||||
],
|
||||
'csv' => 0,
|
||||
'dom_elements' => 'frtilp',
|
||||
]
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
|
@ -643,7 +644,14 @@ class DataMatrix extends Widget
|
|||
}
|
||||
|
||||
$columns_sort[] = ($key + 1);
|
||||
$column_names[] = $name;
|
||||
$column_names[] = \ui_print_truncate_text(
|
||||
\io_safe_output($name),
|
||||
'agent_small',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'...'
|
||||
);
|
||||
}
|
||||
|
||||
$data = [
|
||||
|
|
|
@ -424,9 +424,9 @@ class AgentModuleWidget extends Widget
|
|||
array $visualData,
|
||||
array $allModules
|
||||
):string {
|
||||
$style = 'display:flex; width:96%; margin-top: 10px;';
|
||||
$style = 'display:flex; width:100%; margin-top: 10px;';
|
||||
$table_data = '<div style="'.$style.'">';
|
||||
$table_data .= '<table class="widget_agent_module transparent mrgn_0px" cellpadding="1" cellspacing="0" border="0">';
|
||||
$table_data .= '<table class="info_table transparent" cellpadding="1" cellspacing="0" border="0">';
|
||||
|
||||
if (empty($visualData) === false) {
|
||||
$table_data .= '<th>'.__('Agents').' / '.__('Modules').'</th>';
|
||||
|
@ -450,29 +450,24 @@ class AgentModuleWidget extends Widget
|
|||
switch ($row['agent_status']) {
|
||||
case AGENT_STATUS_ALERT_FIRED:
|
||||
$rowcolor = COL_ALERTFIRED;
|
||||
$textcolor = '#000';
|
||||
break;
|
||||
|
||||
case AGENT_STATUS_CRITICAL:
|
||||
$rowcolor = COL_CRITICAL;
|
||||
$textcolor = '#FFF';
|
||||
break;
|
||||
|
||||
case AGENT_STATUS_WARNING:
|
||||
$rowcolor = COL_WARNING;
|
||||
$textcolor = '#000';
|
||||
break;
|
||||
|
||||
case AGENT_STATUS_NORMAL:
|
||||
$rowcolor = COL_NORMAL;
|
||||
$textcolor = '#FFF';
|
||||
break;
|
||||
|
||||
case AGENT_STATUS_UNKNOWN:
|
||||
case AGENT_STATUS_ALL:
|
||||
default:
|
||||
$rowcolor = COL_UNKNOWN;
|
||||
$textcolor = '#FFF';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -484,8 +479,10 @@ class AgentModuleWidget extends Widget
|
|||
false,
|
||||
'...'
|
||||
);
|
||||
$table_data .= "<td style='background-color: ".$rowcolor.";'>";
|
||||
$table_data .= '<td>';
|
||||
$table_data .= '<div class="flex"><div class="div-state-agent" style="background-color: '.$rowcolor.';"></div>';
|
||||
$table_data .= $file_name;
|
||||
$table_data .= '</div>';
|
||||
$table_data .= '</td>';
|
||||
|
||||
if ($row['modules'] === null) {
|
||||
|
@ -494,7 +491,7 @@ class AgentModuleWidget extends Widget
|
|||
|
||||
foreach ($row['modules'] as $module_name => $module) {
|
||||
if ($this->values['mTypeShow'] === '1') {
|
||||
$style = 'text-align: center;';
|
||||
$style = 'text-align: left;';
|
||||
$style .= ' background-color: transparent;';
|
||||
$table_data .= "<td style='".$style."'>";
|
||||
$table_data .= $module;
|
||||
|
@ -509,7 +506,7 @@ class AgentModuleWidget extends Widget
|
|||
continue;
|
||||
}
|
||||
} else {
|
||||
$style = 'text-align: center;';
|
||||
$style = 'text-align: left;';
|
||||
$style .= ' background-color: transparent;';
|
||||
$table_data .= "<td style='".$style."'>";
|
||||
switch ($module) {
|
||||
|
|
|
@ -521,7 +521,7 @@ class CustomGraphWidget extends Widget
|
|||
|
||||
$params = [
|
||||
'period' => $this->values['period'],
|
||||
'width' => ($size['width'] - 10),
|
||||
'width' => ($size['width']),
|
||||
'height' => $height,
|
||||
'only_image' => false,
|
||||
'homeurl' => $config['homeurl'],
|
||||
|
|
|
@ -663,7 +663,7 @@ class EventsListWidget extends Widget
|
|||
[
|
||||
'id' => $table_id,
|
||||
'class' => 'info_table events',
|
||||
'style' => 'width: 100%;',
|
||||
'style' => 'width: 99%;',
|
||||
'ajax_url' => 'operation/events/events',
|
||||
'ajax_data' => [
|
||||
'get_events' => 1,
|
||||
|
@ -697,6 +697,7 @@ class EventsListWidget extends Widget
|
|||
'ajax_return_operation_function' => 'process_buffers',
|
||||
'return' => true,
|
||||
'csv' => 0,
|
||||
'dom_elements' => 'frtilp',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -492,6 +492,7 @@ class NetworkMapWidget extends Widget
|
|||
'auth_class' => 'PandoraFMS\Dashboard\Manager',
|
||||
'auth_hash' => Manager::generatePublicHash(),
|
||||
'node' => $node,
|
||||
'size' => $size,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@ class ServiceViewWidget extends Widget
|
|||
'AR'
|
||||
);
|
||||
|
||||
$output .= '<div class="white_box mgn_btt_20px mrgn_top_20px pddng_50px services_table" >';
|
||||
$output .= '<div class="services_table" >';
|
||||
$output .= '<div id="table_services_dashboard">';
|
||||
foreach ($services as $service) {
|
||||
switch ($service['status']) {
|
||||
|
@ -404,40 +404,6 @@ class ServiceViewWidget extends Widget
|
|||
</div>
|
||||
</a>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
$output .= '<table cellspacing="0" cellpadding="0">';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td>';
|
||||
$output .= '<div class="service_status" style=" background: '.COL_UNKNOWN.';"></div>';
|
||||
$output .= '</td>';
|
||||
$output .= '<td>';
|
||||
$output .= '<div class="service_status" style="background: '.COL_NORMAL.';"></div>';
|
||||
$output .= '</td>';
|
||||
$output .= '<td>';
|
||||
$output .= '<div class="service_status" style="background: '.COL_WARNING.';"></div>';
|
||||
$output .= '</td>';
|
||||
$output .= '<td>';
|
||||
$output .= '<div class="service_status" style="background: '.COL_CRITICAL.';"></div>';
|
||||
$output .= '</td>';
|
||||
|
||||
$output .= '</tr><tr>';
|
||||
|
||||
$output .= '<td>';
|
||||
$output .= '<div class="pdd_r_15px"><span class="font_12px">Unknown</span></div>';
|
||||
$output .= '</td>';
|
||||
$output .= '<td >';
|
||||
$output .= '<div class="pdd_r_15px"><span class="font_12px">Normal</span></div>';
|
||||
$output .= '</div>';
|
||||
$output .= '<td>';
|
||||
$output .= '<div class="pdd_r_15px"><span class="font_12px">Warning</span></div>';
|
||||
$output .= '</td>';
|
||||
$output .= '<td>';
|
||||
$output .= '<div><span class="font_12px">Critical</span></div>';
|
||||
$output .= '</td>';
|
||||
$output .= '</tr>';
|
||||
$output .= '</table>';
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
|
|
@ -477,7 +477,7 @@ class SystemGroupStatusWidget extends Widget
|
|||
$this->values['groupId'] = $selected_groups;
|
||||
$this->values['status'] = explode(',', $this->values['status'][0]);
|
||||
|
||||
$style = 'font-size: 12px; text-align: center;';
|
||||
$style = 'font-size: 1.5em; font-weight: bolder;text-align: center;';
|
||||
|
||||
$table = new \stdClass();
|
||||
$table->class = 'group_modules_status_box';
|
||||
|
|
|
@ -364,21 +364,6 @@ class WuxWidget extends Widget
|
|||
}
|
||||
|
||||
$output .= '<div>';
|
||||
$output .= '<div>';
|
||||
$output .= "<p class='font_20px'>";
|
||||
if ($have_errors === true) {
|
||||
$output .= __('Global status').': ';
|
||||
$output .= "<span class='color: #e63c52; font_20px'>";
|
||||
$output .= __('Failed');
|
||||
$output .= '</span>';
|
||||
} else {
|
||||
$output .= __('Global status').': ';
|
||||
$output .= "<span class='pandora_green_bg font_20px'>";
|
||||
$output .= __('Ok');
|
||||
$output .= '</span>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
$output .= '<div>';
|
||||
$output .= \ux_console_phases_donut(
|
||||
|
|
|
@ -127,6 +127,8 @@ h1 {
|
|||
.grid-stack-item .grid-stack-item-content .header-widget div:first-child {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-family: "lato-bold";
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.grid-stack-item .grid-stack-item-content .header-widget div:not(:first-child) {
|
||||
|
@ -791,3 +793,45 @@ form.modal-dashboard
|
|||
.select2-selection__rendered {
|
||||
max-height: 75px !important;
|
||||
}
|
||||
|
||||
.content-widget .info_table {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.div-state-agent {
|
||||
width: 5px;
|
||||
height: 20px;
|
||||
border-radius: 3px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.dataTables_length > label > select {
|
||||
height: 30px;
|
||||
min-height: 30px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.dataTables_paginate.paging_simple_numbers {
|
||||
margin-top: 10px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.info_table.events tr > td {
|
||||
height: 1em !important;
|
||||
text-align: initial;
|
||||
}
|
||||
|
||||
.event.flex-row.h100p.nowrap .mini-criticity {
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.tree-controller-recipient {
|
||||
width: -webkit-fill-available !important;
|
||||
}
|
||||
|
||||
.services_table {
|
||||
padding: 0px;
|
||||
background-color: #fff;
|
||||
border: 0px;
|
||||
width: 90%;
|
||||
}
|
||||
|
|
|
@ -3809,7 +3809,7 @@ div.div_groups_status {
|
|||
background-color: white;
|
||||
border: 1px solid #ececec;
|
||||
border-radius: 5px;
|
||||
margin: 20px;
|
||||
margin: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
@ -5843,6 +5843,7 @@ div.switch_radio_button label {
|
|||
margin-right: -1px;
|
||||
border: 1px solid #cbcbcb;
|
||||
transition: all 0.1s ease-in-out;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
div.switch_radio_button label:first-of-type {
|
||||
|
@ -6547,6 +6548,7 @@ table.table_modal_alternate tr td:first-child {
|
|||
.flot-text .flot-x-axis div {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/*Font header feedback*/
|
||||
|
@ -10531,6 +10533,11 @@ button div.preview {
|
|||
-webkit-mask: url(../../images/eye.png) no-repeat center / contain;
|
||||
}
|
||||
|
||||
button div.plus {
|
||||
mask: url(../../images/plus-black.svg) no-repeat center / contain;
|
||||
-webkit-mask: url(../../images/plus-black.svg) no-repeat center / contain;
|
||||
}
|
||||
|
||||
button div.cog.rotation {
|
||||
animation: rotation 4s infinite linear;
|
||||
}
|
||||
|
@ -11239,8 +11246,8 @@ input.main_menu_icon[src$=".svg"] {
|
|||
}
|
||||
|
||||
.header_help_icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
}
|
||||
.main_menu_icon.arrow_up {
|
||||
transform: rotate(90deg);
|
||||
|
@ -11263,12 +11270,17 @@ span.subsection_header_title {
|
|||
height: 18px;
|
||||
}
|
||||
|
||||
.agent_details_header span.subsection_header_title {
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
.subsection_header_title.secondary {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
span.subsection_header_title.secondary {
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.regular_font {
|
||||
|
@ -11634,3 +11646,21 @@ ul.tag-editor {
|
|||
padding-left: 5px !important;
|
||||
font-size: 20px !important;
|
||||
}
|
||||
|
||||
div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget {
|
||||
background-color: var(--primary-color);
|
||||
color: #fff;
|
||||
border: 1px solid var(--primary-color);
|
||||
border-radius: 8px;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget:hover {
|
||||
background-color: #1d7873;
|
||||
border-color: #1d7873;
|
||||
}
|
||||
|
||||
div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget:active {
|
||||
background-color: #0d312f;
|
||||
border-color: #0d312f;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ table.header_table tr td {
|
|||
}
|
||||
|
||||
table thead tr th {
|
||||
background-color: #919191;
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
|
||||
table thead tr th.title_table_pdf {
|
||||
|
|
|
@ -1116,6 +1116,7 @@ select,
|
|||
border: 1px solid #707070;
|
||||
background-color: #222 !important;
|
||||
color: #fff !important;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.white_table_graph {
|
||||
|
@ -1248,8 +1249,7 @@ a.pandora_pagination:hover {
|
|||
background-color: #555 !important;
|
||||
}
|
||||
.dt-button.buttons-csv.buttons-html5 {
|
||||
filter: invert(100%);
|
||||
background-color: transparent;
|
||||
box-shadow: 0px 3px 6px #111;
|
||||
}
|
||||
|
||||
.info_table.events > tbody > tr > td {
|
||||
|
@ -1480,13 +1480,6 @@ span.select2-dropdown.select2-dropdown--below {
|
|||
z-index: 1200;
|
||||
}
|
||||
|
||||
div.fixed_filter_bar,
|
||||
div.white_table_graph_header {
|
||||
border-radius: 0;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
div.white_table_graph {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
@ -1500,10 +1493,25 @@ div.white_box.white_box_opened.no_border {
|
|||
border-radius: 0px;
|
||||
}
|
||||
|
||||
table.filter-table-adv td > div label {
|
||||
table.filter-table-adv td > div label:not(.inputFile) {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
#principal_action_buttons {
|
||||
background: #111111;
|
||||
}
|
||||
div.fixed-bottom-box,
|
||||
div.fixed-bottom-box
|
||||
> div.fixed-bottom-box-head
|
||||
> div.fixed-bottom-box-head-body {
|
||||
background-color: #111111 !important;
|
||||
}
|
||||
|
||||
.filter_table,
|
||||
.white_table_graph_fixed table {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
span.select2 {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
|
|
@ -798,3 +798,11 @@ div[id^="auto-os-"] > img {
|
|||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.dataTables_paginate.paging_simple_numbers {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ div.subtitle {
|
|||
}
|
||||
|
||||
div.subtitle span {
|
||||
font-size: 1.9em;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
div.subtitle div.manage {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
border-radius: 5px;
|
||||
}
|
||||
.ui-dialog .tips_header.ui-dialog-titlebar {
|
||||
display: flex;
|
||||
display: flex !important;
|
||||
padding: 0px 20px;
|
||||
justify-content: space-between;
|
||||
height: fit-content;
|
||||
|
|
|
@ -1491,7 +1491,7 @@ ui_require_javascript_file('connection_check');
|
|||
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/fail@svg.svg');
|
||||
|
||||
if ($config['pure'] == 0) {
|
||||
echo '</div>';
|
||||
|
|
|
@ -76,9 +76,9 @@ if ($fields === false) {
|
|||
$data[0] = '<b>'.$field['name'].'</b>';
|
||||
|
||||
if ($field['display_on_front']) {
|
||||
$data[1] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
$data[1] = html_print_image('images/validate.svg', true, ['class' => 'invert_filter']);
|
||||
} else {
|
||||
$data[1] = html_print_image('images/delete.png', true, ['class' => 'invert_filter']);
|
||||
$data[1] = html_print_image('images/delete.svg', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
$custom_value = db_get_all_rows_sql(
|
||||
|
|
|
@ -164,8 +164,8 @@ $table_status->width = '100%';
|
|||
$table_status->cellspacing = 0;
|
||||
$table_status->cellpadding = 0;
|
||||
$table_status->class = 'floating_form';
|
||||
$table_status->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end;';
|
||||
$table_status->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter';
|
||||
$table_status->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end; vertical-align: top';
|
||||
$table_status->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter; vertical-align: top';
|
||||
|
||||
$agentStatusGraph = html_print_div(
|
||||
[
|
||||
|
@ -386,8 +386,8 @@ $table_contact->width = '100%';
|
|||
$table_contact->cellspacing = 0;
|
||||
$table_contact->cellpadding = 0;
|
||||
$table_contact->class = 'floating_form';
|
||||
$table_contact->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end;';
|
||||
$table_contact->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter';
|
||||
$table_contact->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end; vertical-align: top';
|
||||
$table_contact->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter; vertical-align: top';
|
||||
|
||||
$agentContactCaption = html_print_div(
|
||||
[
|
||||
|
|
|
@ -314,7 +314,7 @@ if ($start_date != $current) {
|
|||
|
||||
if ($combined) {
|
||||
// Pass the $modules before the ajax call.
|
||||
echo '<div class="combined-graph-container center w100p"'.'data-period="'.$period.'"'.'data-stacked="'.CUSTOM_GRAPH_LINE.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>';
|
||||
echo '<div class="combined-graph-container center w100p white_box"'.'data-period="'.$period.'"'.'data-stacked="'.CUSTOM_GRAPH_LINE.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>';
|
||||
} else {
|
||||
foreach ($modules as $id_module) {
|
||||
$title = modules_get_agentmodule_name($id_module);
|
||||
|
|
|
@ -131,24 +131,18 @@ if ($pure == 1) {
|
|||
}
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
io_safe_output($networkmap['name']),
|
||||
'images/bricks.png',
|
||||
false,
|
||||
'network_map_enterprise_list',
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
$config['item_title_size_text']
|
||||
);
|
||||
|
||||
global $width;
|
||||
global $height;
|
||||
|
||||
if (_id_ != '_id_') {
|
||||
$width = [];
|
||||
$height = [];
|
||||
if ($dashboard != 1) {
|
||||
ui_print_page_header(
|
||||
io_safe_output($networkmap['name']),
|
||||
'images/bricks.png',
|
||||
false,
|
||||
'network_map_enterprise_list',
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
$config['item_title_size_text']
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($width)) {
|
||||
|
|
|
@ -275,7 +275,7 @@ if ($not_found) {
|
|||
} else {
|
||||
if ($disabled_source === false) {
|
||||
echo '<div id="map_loading" style="width: 98%;height: 1000px; background-color: rgba(245, 245, 245, .3);position: absolute;display: flex;justify-content: center;align-items: center;flex-direction: column-reverse;">';
|
||||
echo html_print_image('images/spinner.gif', true, 'width: 50px;height: 50px;');
|
||||
echo html_print_image('images/spinner.gif', true, ['width' => '50px', 'height' => '50px']);
|
||||
echo '<div>'.__('Creating map...').'</div>';
|
||||
echo '</div>';
|
||||
$info1 = __('To create a network map that visually recreates link-level (L2) relationships, you must first discover these relationships with Discovery Server. Network maps only reflect relationships that have already been discovered.');
|
||||
|
|
|
@ -97,7 +97,7 @@ ui_print_message_dialog(
|
|||
$conn_title,
|
||||
$conn_text,
|
||||
'connection',
|
||||
'/images/error_1.png'
|
||||
'/images/fail@svg.svg'
|
||||
);
|
||||
|
||||
?>
|
||||
|
|
|
@ -1921,7 +1921,7 @@ switch ($tab) {
|
|||
|
||||
if ((bool) $config['pure'] === false) {
|
||||
ui_print_standard_header(
|
||||
__('Agent main view'),
|
||||
__('Agent main view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
|
||||
$icon,
|
||||
false,
|
||||
($help_header ?? ''),
|
||||
|
|
|
@ -173,7 +173,7 @@ ui_print_message_dialog(
|
|||
$conn_title,
|
||||
$conn_text,
|
||||
'connection',
|
||||
'/images/error_1.png'
|
||||
'/images/fail@svg.svg'
|
||||
);
|
||||
|
||||
$inputs = [];
|
||||
|
|
|
@ -278,7 +278,7 @@ if ($layers != false) {
|
|||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_require_javascript_file('connection_check');
|
||||
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/fail@svg.svg');
|
||||
}
|
||||
|
||||
// Resize GIS map on fullscreen
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
<?php
|
||||
/**
|
||||
* Network explorer
|
||||
* Netflow Explorer
|
||||
*
|
||||
* @package Operations.
|
||||
* @subpackage Netflow explorer view.
|
||||
* @category Netflow
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 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
|
||||
* as published by the Free Software Foundation; version 2
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
global $config;
|
||||
|
|
|
@ -101,7 +101,7 @@ $max_aggregates = (int) get_parameter('max_aggregates', 10);
|
|||
$update_date = (int) get_parameter('update_date', 0);
|
||||
$connection_name = get_parameter('connection_name', '');
|
||||
$interval_length = get_parameter('interval_length', NETFLOW_RES_MEDD);
|
||||
$address_resolution = (int) get_parameter('address_resolution', $config['netflow_get_ip_hostname']);
|
||||
$address_resolution = (int) get_parameter('address_resolution', ($config['netflow_get_ip_hostname'] ?? ''));
|
||||
$filter_selected = (int) get_parameter('filter_selected', 0);
|
||||
|
||||
// Read time values.
|
||||
|
@ -127,13 +127,23 @@ $update = get_parameter('update_button', '');
|
|||
|
||||
if (is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Netflow live view'),
|
||||
'images/op_netflow.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
[]
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Network'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$is_windows = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN';
|
||||
|
@ -202,22 +212,9 @@ if (isset($config['netflow_disable_custom_lvfilters'])) {
|
|||
$netflow_disable_custom_lvfilters = $config['netflow_disable_custom_lvfilters'];
|
||||
}
|
||||
|
||||
$class = 'databox filters';
|
||||
|
||||
echo '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=operation/netflow/nf_live_view&pure='.$pure.'">';
|
||||
|
||||
echo "<table class='".$class."' width='100%'>";
|
||||
if (is_metaconsole()) {
|
||||
echo '<thead>
|
||||
<tr>
|
||||
<th align=center colspan=6>
|
||||
'.__('Draw live filter').'
|
||||
</th>
|
||||
</tr>
|
||||
</thead>';
|
||||
|
||||
// Add nodes list.
|
||||
if (is_metaconsole() === true) {
|
||||
$list_servers = [];
|
||||
|
||||
$servers = db_get_all_rows_sql(
|
||||
'SELECT *
|
||||
FROM tmetaconsole_setup'
|
||||
|
@ -244,62 +241,245 @@ if (is_metaconsole()) {
|
|||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td><b>'.__('Connection').'</b></td>';
|
||||
echo '<td>'.html_print_select(
|
||||
$list_servers,
|
||||
'connection_name',
|
||||
$connection_name,
|
||||
$nodeListInput = html_print_label_input_block(
|
||||
__('Connection'),
|
||||
html_print_select(
|
||||
$list_servers,
|
||||
'connection_name',
|
||||
$connection_name,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$nodeListInput = '';
|
||||
}
|
||||
|
||||
$class_not_period = ($is_period === true) ? 'nf_hidden' : 'nf_display';
|
||||
$class_period = ($is_period === true) ? 'nf_display' : 'nf_hidden';
|
||||
|
||||
$max_values = [
|
||||
'2' => '2',
|
||||
'5' => '5',
|
||||
'10' => '10',
|
||||
'15' => '15',
|
||||
'20' => '20',
|
||||
'25' => '25',
|
||||
'50' => '50',
|
||||
$max_aggregates => $max_aggregates,
|
||||
];
|
||||
|
||||
$aggregate_list = [];
|
||||
$aggregate_list = [
|
||||
'srcip' => __('Src Ip Address'),
|
||||
'dstip' => __('Dst Ip Address'),
|
||||
'srcport' => __('Src Port'),
|
||||
'dstport' => __('Dst Port'),
|
||||
];
|
||||
|
||||
$advanced_toggle = '<table style="width:100%">';
|
||||
$advanced_toggle .= '<tr>';
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= '<td><b>'.__('Filter').'</b></td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.__('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'style="margin-right: 40px;"', true).__('Custom').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'style="margin-right: 40px;"', true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '<td><b>'.__('Load filter').'</b></td>';
|
||||
$user_groups = users_get_groups($config['id_user'], 'AR', $own_info['is_admin'], true);
|
||||
$user_groups[0] = 0;
|
||||
// Add all groups.
|
||||
$sql = 'SELECT *
|
||||
FROM tnetflow_filter
|
||||
WHERE id_group IN ('.implode(',', array_keys($user_groups)).')';
|
||||
$advanced_toggle .= "<td colspan='3'>".html_print_select_from_sql($sql, 'filter_id', $filter_id, '', __('Select a filter'), 0, true);
|
||||
$advanced_toggle .= html_print_input_hidden('filter_selected', $filter_selected, false);
|
||||
$advanced_toggle .= '</td>';
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= "<tr class='filter_normal'>";
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Dst Ip').ui_print_help_tip(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('ip_dst', $filter['ip_dst'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Src Ip').ui_print_help_tip(__('Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('ip_src', $filter['ip_src'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= "<tr class='filter_normal'>";
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Dst Port').ui_print_help_tip(__('Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('dst_port', $filter['dst_port'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Src Port').ui_print_help_tip(__('Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('src_port', $filter['src_port'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= "<tr class='filter_advance' style='display: none;'>";
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= '<td>'.ui_print_help_icon('pcap_filter', true).'</td>';
|
||||
$advanced_toggle .= "<td colspan='5'>".html_print_textarea('advanced_filter', 4, 40, $filter['advanced_filter'], "style='min-height: 0px; width: 90%;'", true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
$advanced_toggle .= '<tr>';
|
||||
|
||||
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
|
||||
$radio_buttons = __('Yes').' '.html_print_radio_button_extended(
|
||||
'address_resolution',
|
||||
1,
|
||||
'',
|
||||
$address_resolution,
|
||||
false,
|
||||
$onclick,
|
||||
'',
|
||||
true
|
||||
).' ';
|
||||
$radio_buttons .= __('No').' '.html_print_radio_button(
|
||||
'address_resolution',
|
||||
0,
|
||||
'',
|
||||
$address_resolution,
|
||||
true
|
||||
);
|
||||
$advanced_toggle .= '<td><b>'.__('IP address resolution').'</b>'.ui_print_help_tip(__('Resolve the IP addresses to get their hostnames.'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.$radio_buttons.'</td>';
|
||||
|
||||
$advanced_toggle .= '<td><b>'.__('Source ip').'</b></td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('router_ip', $filter['router_ip'], false, 40, 80, true).'</td>';
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= '</table>';
|
||||
|
||||
// Read filter type.
|
||||
if (empty($filter['advanced_filter']) === false) {
|
||||
$filter_type = 1;
|
||||
} else {
|
||||
$filter_type = 0;
|
||||
}
|
||||
|
||||
$filterTable = new stdClass();
|
||||
$filterTable->id = '';
|
||||
$filterTable->class = 'filter-table-adv';
|
||||
$filterTable->size = [];
|
||||
$filterTable->size[0] = '33%';
|
||||
$filterTable->size[1] = '33%';
|
||||
$filterTable->size[2] = '33%';
|
||||
$filterTable->data = [];
|
||||
|
||||
if (empty($nodeListInput) === false) {
|
||||
$filterTable->data[-1][] = $nodeListInput;
|
||||
}
|
||||
|
||||
$filterTable->data[0][0] = html_print_label_input_block(
|
||||
__('Interval'),
|
||||
html_print_extended_select_for_time(
|
||||
'period',
|
||||
$period,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
).'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
true
|
||||
),
|
||||
[ 'div_id' => 'period_container' ]
|
||||
);
|
||||
|
||||
echo '<tr>';
|
||||
|
||||
$class_not_period = ($is_period) ? 'nf_hidden' : 'nf_display';
|
||||
$class_period = ($is_period) ? 'nf_display' : 'nf_hidden';
|
||||
echo '<td>';
|
||||
echo '<b class="'.$class_period.'">'.__('Interval').'</b>';
|
||||
echo '<b class="'.$class_not_period.'">'.__('Start date').'</b>';
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo html_print_extended_select_for_time('period', $period, '', '', 0, false, true, false, true, $class_period);
|
||||
echo html_print_input_text('date_lower', $date_lower, false, 13, 10, true, false, false, '', $class_not_period);
|
||||
echo html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
$filterTable->data[0][0] .= html_print_label_input_block(
|
||||
__('Start date'),
|
||||
html_print_div(
|
||||
[
|
||||
'alt' => 'calendar',
|
||||
'class' => $class_not_period,
|
||||
]
|
||||
).html_print_input_text('time_lower', $time_lower, false, 10, 8, true, false, false, '', $class_not_period);
|
||||
echo html_print_checkbox(
|
||||
'is_period',
|
||||
1,
|
||||
($is_period === true) ? 1 : 0,
|
||||
true,
|
||||
false,
|
||||
'nf_view_click_period(event)'
|
||||
);
|
||||
echo ui_print_help_tip(__('Select this checkbox to write interval instead a date.'), true);
|
||||
echo '</td>';
|
||||
'class' => '',
|
||||
'content' => html_print_input_text(
|
||||
'date_lower',
|
||||
$date_lower,
|
||||
false,
|
||||
13,
|
||||
10,
|
||||
true
|
||||
).html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
[
|
||||
'alt' => 'calendar',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).html_print_input_text(
|
||||
'time_lower',
|
||||
$time_lower,
|
||||
false,
|
||||
10,
|
||||
8,
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
[ 'div_id' => 'end_date_container' ]
|
||||
);
|
||||
|
||||
echo '<td><b>'.__('End date').'</b></td>';
|
||||
echo '<td>'.html_print_input_text('date', $date, false, 13, 10, true).html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
['alt' => 'calendar']
|
||||
).html_print_input_text('time', $time, false, 10, 8, true);
|
||||
echo '</td>';
|
||||
$filterTable->data[0][1] = html_print_label_input_block(
|
||||
__('End date'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => html_print_input_text(
|
||||
'date',
|
||||
$date,
|
||||
false,
|
||||
13,
|
||||
10,
|
||||
true
|
||||
).html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
['alt' => 'calendar']
|
||||
).html_print_input_text(
|
||||
'time',
|
||||
$time,
|
||||
false,
|
||||
10,
|
||||
8,
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '<td><b>'.__('Resolution').ui_print_help_tip(__('The interval will be divided in chunks the length of the resolution.'), true).'</b></td>';
|
||||
echo '<td>'.html_print_select(
|
||||
$filterTable->data[0][2] = html_print_label_input_block(
|
||||
__('Resolution'),
|
||||
html_print_select(
|
||||
netflow_resolution_select_params(),
|
||||
'interval_length',
|
||||
$interval_length,
|
||||
|
@ -309,13 +489,27 @@ if (is_metaconsole()) {
|
|||
true,
|
||||
false,
|
||||
false
|
||||
).'</td>';
|
||||
).ui_print_input_placeholder(
|
||||
__('The interval will be divided in chunks the length of the resolution.'),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
$filterTable->data[1][] = html_print_label_input_block(
|
||||
__('Defined period'),
|
||||
html_print_checkbox_switch(
|
||||
'is_period',
|
||||
1,
|
||||
($is_period === true) ? 1 : 0,
|
||||
true,
|
||||
false,
|
||||
'nf_view_click_period(event)'
|
||||
)
|
||||
);
|
||||
|
||||
echo '<td><b>'.__('Type').'</b></td>';
|
||||
echo '<td>'.html_print_select(
|
||||
$filterTable->data[1][] = html_print_label_input_block(
|
||||
__('Type'),
|
||||
html_print_select(
|
||||
netflow_get_chart_types(),
|
||||
'chart_type',
|
||||
$chart_type,
|
||||
|
@ -323,224 +517,157 @@ if (is_metaconsole()) {
|
|||
'',
|
||||
0,
|
||||
true
|
||||
).'</td>';
|
||||
)
|
||||
);
|
||||
|
||||
echo '<td><b>'.__('Max. values').'</b></td>';
|
||||
$max_values = [
|
||||
'2' => '2',
|
||||
'5' => '5',
|
||||
'10' => '10',
|
||||
'15' => '15',
|
||||
'20' => '20',
|
||||
'25' => '25',
|
||||
'50' => '50',
|
||||
$max_aggregates => $max_aggregates,
|
||||
];
|
||||
echo '<td>'.html_print_select($max_values, 'max_aggregates', $max_aggregates, '', '', 0, true).'<a id="max_values" href="#" onclick="javascript: edit_max_value();">'.html_print_image('images/edit.svg', true, ['id' => 'pencil', 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td><b>'.__('Aggregate by').'</b></td>';
|
||||
$aggregate_list = [];
|
||||
$aggregate_list = [
|
||||
'srcip' => __('Src Ip Address'),
|
||||
'dstip' => __('Dst Ip Address'),
|
||||
'srcport' => __('Src Port'),
|
||||
'dstport' => __('Dst Port'),
|
||||
];
|
||||
echo '<td>'.html_print_select($aggregate_list, 'aggregate', $filter['aggregate'], '', '', 0, true, false, true, '', false).'</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
// Read filter type.
|
||||
if ($filter['advanced_filter'] != '') {
|
||||
$filter_type = 1;
|
||||
} else {
|
||||
$filter_type = 0;
|
||||
}
|
||||
|
||||
echo "<tr class='filter_save' style='display: none;'>";
|
||||
|
||||
echo "<td colspan='6'>".ui_print_error_message('Define a name for the filter and click on Save as new filter again', '', true).'</td>';
|
||||
|
||||
echo '</tr>';
|
||||
echo "<tr class='filter_save' style='display: none;'>";
|
||||
|
||||
echo '<td><span id="filter_name_color"><b>'.__('Name').'</b></span></td>';
|
||||
echo "<td colspan='2'>".html_print_input_text(
|
||||
'name',
|
||||
$filter['id_name'],
|
||||
false,
|
||||
20,
|
||||
80,
|
||||
true
|
||||
).'</td>';
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
echo '<td><span id="filter_group_color"><b>'.__('Group').'</b></span></td>';
|
||||
echo "<td colspan='2'>".html_print_select_groups($config['id_user'], 'AR', $own_info['is_admin'], 'assign_group', $filter['id_group'], '', '', -1, true, false, false).'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
$advanced_toggle = '<table style="width:100%">';
|
||||
|
||||
$advanced_toggle .= '<tr>';
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= '<td><b>'.__('Filter').'</b></td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.__('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'style="margin-right: 40px;"', true).__('Custom').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'style="margin-right: 40px;"', true).'</td>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$advanced_toggle .= '<td><b>'.__('Load filter').'</b></td>';
|
||||
$user_groups = users_get_groups($config['id_user'], 'AR', $own_info['is_admin'], true);
|
||||
$user_groups[0] = 0;
|
||||
// Add all groups.
|
||||
$sql = 'SELECT *
|
||||
FROM tnetflow_filter
|
||||
WHERE id_group IN ('.implode(',', array_keys($user_groups)).')';
|
||||
$advanced_toggle .= "<td colspan='3'>".html_print_select_from_sql($sql, 'filter_id', $filter_id, '', __('Select a filter'), 0, true);
|
||||
$advanced_toggle .= html_print_input_hidden('filter_selected', $filter_selected, false);
|
||||
$advanced_toggle .= '</td>';
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= "<tr class='filter_normal'>";
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Dst Ip').ui_print_help_tip(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('ip_dst', $filter['ip_dst'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Src Ip').ui_print_help_tip(__('Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('ip_src', $filter['ip_src'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= "<tr class='filter_normal'>";
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Dst Port').ui_print_help_tip(__('Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('dst_port', $filter['dst_port'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Src Port').ui_print_help_tip(__('Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('src_port', $filter['src_port'], false, 40, 80, true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= "<tr class='filter_advance' style='display: none;'>";
|
||||
if ($netflow_disable_custom_lvfilters) {
|
||||
$advanced_toggle .= '<td></td>';
|
||||
$advanced_toggle .= '<td></td>';
|
||||
} else {
|
||||
$advanced_toggle .= '<td>'.ui_print_help_icon('pcap_filter', true).'</td>';
|
||||
$advanced_toggle .= "<td colspan='5'>".html_print_textarea('advanced_filter', 4, 40, $filter['advanced_filter'], "style='min-height: 0px; width: 90%;'", true).'</td>';
|
||||
}
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
$advanced_toggle .= '<tr>';
|
||||
|
||||
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
|
||||
$radio_buttons = __('Yes').' '.html_print_radio_button_extended(
|
||||
'address_resolution',
|
||||
1,
|
||||
$filterTable->data[1][] = html_print_label_input_block(
|
||||
__('Aggregated by'),
|
||||
html_print_select(
|
||||
$aggregate_list,
|
||||
'aggregate',
|
||||
$filter['aggregate'],
|
||||
'',
|
||||
$address_resolution,
|
||||
false,
|
||||
$onclick,
|
||||
'',
|
||||
true
|
||||
).' ';
|
||||
$radio_buttons .= __('No').' '.html_print_radio_button(
|
||||
'address_resolution',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
$address_resolution,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[2][] = html_print_label_input_block(
|
||||
__('Max values'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => html_print_select(
|
||||
$max_values,
|
||||
'max_aggregates',
|
||||
$max_aggregates,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
).html_print_anchor(
|
||||
[
|
||||
'id' => 'max_values',
|
||||
'href' => '#',
|
||||
'onClick' => 'edit_max_value()',
|
||||
'content' => html_print_image(
|
||||
'images/edit.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'pencil',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$advanced_toggle .= '<td><b>'.__('IP address resolution').'</b>'.ui_print_help_tip(__('Resolve the IP addresses to get their hostnames.'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.$radio_buttons.'</td>';
|
||||
)
|
||||
);
|
||||
|
||||
$advanced_toggle .= '<td><b>'.__('Source ip').'</b></td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('router_ip', $filter['router_ip'], false, 40, 80, true).'</td>';
|
||||
|
||||
$advanced_toggle .= '</tr>';
|
||||
|
||||
$advanced_toggle .= '</table>';
|
||||
|
||||
echo '<tr><td colspan="6">';
|
||||
echo ui_toggle(
|
||||
$filterTable->colspan[3][0] = 3;
|
||||
$filterTable->data[3][0] = html_print_label_input_block(
|
||||
'',
|
||||
ui_toggle(
|
||||
$advanced_toggle,
|
||||
__('Advanced'),
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
'white_box white_box_opened',
|
||||
'no-border flex-row'
|
||||
);
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph'
|
||||
)
|
||||
);
|
||||
|
||||
echo "<table class='' width='100%' style='border: 0px; text-align:right;'><tr><td>";
|
||||
$buttons = html_print_submit_button(
|
||||
__('Draw'),
|
||||
'draw_button',
|
||||
false,
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
echo html_print_submit_button(__('Draw'), 'draw_button', false, 'class="sub upd"', true);
|
||||
|
||||
if (!$netflow_disable_custom_lvfilters) {
|
||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||
html_print_submit_button(__('Save as new filter'), 'save_button', false, 'style="margin-left: 5px;" class="sub upd" onClick="return defineFilterName();"');
|
||||
html_print_submit_button(__('Update current filter'), 'update_button', false, 'style="margin-left: 5px;" class="sub upd"');
|
||||
}
|
||||
if (!$netflow_disable_custom_lvfilters) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$buttons .= html_print_submit_button(__('Save as new filter'), 'save_button', false, ['icon' => 'load', 'onClick' => 'return defineFilterName();', 'mode' => 'mini secondary'], true);
|
||||
$buttons .= html_print_submit_button(__('Update current filter'), 'update_button', false, ['icon' => 'load', 'mode' => 'mini secondary'], true);
|
||||
}
|
||||
}
|
||||
|
||||
echo '</td></tr></table>';
|
||||
$filterInputTable = '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=operation/netflow/nf_live_view&pure='.$pure.'">';
|
||||
$filterInputTable .= html_print_table($filterTable, true);
|
||||
$filterInputTable .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => $buttons,
|
||||
],
|
||||
true
|
||||
);
|
||||
$filterInputTable .= '</form>';
|
||||
|
||||
echo '</form>';
|
||||
ui_toggle(
|
||||
$filterInputTable,
|
||||
'<span class="subsection_header_title">'.__('Filter').'</span>',
|
||||
__('Filter'),
|
||||
'search',
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content no_border',
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
if (empty($draw) === false) {
|
||||
// Draw.
|
||||
echo '<br/>';
|
||||
|
||||
// No filter selected.
|
||||
if ($netflow_disable_custom_lvfilters && $filter_selected == 0) {
|
||||
ui_print_error_message(__('No filter selected'));
|
||||
} else {
|
||||
// Hidden input for handle properly the text colors.
|
||||
html_print_input_hidden(
|
||||
'selected_style_theme',
|
||||
$config['style']
|
||||
);
|
||||
// Draw the netflow chart.
|
||||
echo netflow_draw_item(
|
||||
$start_date,
|
||||
$end_date,
|
||||
$interval_length,
|
||||
$chart_type,
|
||||
$filter,
|
||||
$max_aggregates,
|
||||
$connection_name,
|
||||
'HTML',
|
||||
$address_resolution
|
||||
);
|
||||
}
|
||||
if (empty($draw) === false) {
|
||||
// No filter selected.
|
||||
if ($netflow_disable_custom_lvfilters && $filter_selected == 0) {
|
||||
ui_print_error_message(__('No filter selected'));
|
||||
} else {
|
||||
// Hidden input for handle properly the text colors.
|
||||
html_print_input_hidden(
|
||||
'selected_style_theme',
|
||||
$config['style']
|
||||
);
|
||||
// Draw the netflow chart.
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'white_box',
|
||||
'content' => netflow_draw_item(
|
||||
$start_date,
|
||||
$end_date,
|
||||
$interval_length,
|
||||
$chart_type,
|
||||
$filter,
|
||||
$max_aggregates,
|
||||
$connection_name,
|
||||
'HTML',
|
||||
$address_resolution
|
||||
),
|
||||
]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ui_print_info_message(__('No data to show'));
|
||||
}
|
||||
|
||||
ui_include_time_picker();
|
||||
?>
|
||||
ui_include_time_picker();
|
||||
?>
|
||||
|
||||
<style>
|
||||
.parent_graph {
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function edit_max_value () {
|
||||
|
@ -722,6 +849,8 @@ if (is_metaconsole()) {
|
|||
});
|
||||
|
||||
$(document).ready( function() {
|
||||
// Update visibility of controls.
|
||||
nf_view_click_period();
|
||||
// Hide update filter button
|
||||
if ($("#filter_id").val() == 0) {
|
||||
$("#submit-update_button").hide();
|
||||
|
@ -758,13 +887,10 @@ if (is_metaconsole()) {
|
|||
|
||||
$.datepicker.regional["<?php echo get_user_language(); ?>"];
|
||||
|
||||
function nf_view_click_period(event) {
|
||||
$(".nf_display").toggle();
|
||||
$(".nf_hidden").toggle();
|
||||
function nf_view_click_period() {
|
||||
var is_period = document.getElementById('checkbox-is_period').checked;
|
||||
|
||||
document.getElementById('period_container').style.display = !is_period ? 'none' : 'flex';
|
||||
document.getElementById('end_date_container').style.display = is_period ? 'none' : 'flex';
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.nf_hidden {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
|
@ -1,23 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Network explorer
|
||||
* Netflow Report
|
||||
*
|
||||
* @package Operations.
|
||||
* @subpackage Network explorer view.
|
||||
* @category Netflow
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 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
|
||||
* as published by the Free Software Foundation; version 2
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
check_login();
|
||||
|
||||
// ACL Check.
|
||||
|
@ -257,6 +266,7 @@ unset($table);
|
|||
$table = new stdClass();
|
||||
$table->id = '';
|
||||
$table->width = '100%';
|
||||
$table->class = 'info_table';
|
||||
// Print the header.
|
||||
$table->head = [];
|
||||
$table->head['main'] = __('IP');
|
||||
|
@ -385,20 +395,31 @@ if (empty($data)) {
|
|||
'height' => 230,
|
||||
'legend' => [
|
||||
'display' => true,
|
||||
'position' => 'right',
|
||||
'align' => 'center',
|
||||
'position' => 'top',
|
||||
'align' => 'left',
|
||||
],
|
||||
'labels' => $labels,
|
||||
];
|
||||
// Results table.
|
||||
$resultsTable = html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'style' => 'flex: 75;margin-right: 5px;',
|
||||
'content' => html_print_table($table, true),
|
||||
],
|
||||
true
|
||||
);
|
||||
// Pie graph.
|
||||
html_print_div(
|
||||
$pieGraph = html_print_div(
|
||||
[
|
||||
'class' => 'databox netflow-pie-graph-container padding-2 white_box',
|
||||
'style' => 'flex: 25;margin-left: 5px;',
|
||||
'content' => pie_graph(
|
||||
$chart_data,
|
||||
$options
|
||||
),
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
// Print the filter remove link.
|
||||
if (empty($main_value) === false) {
|
||||
|
@ -418,7 +439,13 @@ if (empty($data)) {
|
|||
}
|
||||
|
||||
// Print results.
|
||||
html_print_table($table);
|
||||
html_print_div(
|
||||
[
|
||||
'style' => 'max-width: -webkit-fill-available; display: flex',
|
||||
'class' => '',
|
||||
'content' => $resultsTable.$pieGraph,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,24 +1,32 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Netflow functions
|
||||
* Netflow usage map.
|
||||
*
|
||||
* @package Netflow usage map.
|
||||
* @subpackage UI.
|
||||
* @category Netflow
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2021 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
|
||||
* as published by the Free Software Foundation; version 2
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
require_once $config['homedir'].'/include/functions_network.php';
|
||||
require_once $config['homedir'].'/include/class/NetworkMap.class.php';
|
||||
|
||||
|
@ -26,7 +34,25 @@ global $config;
|
|||
|
||||
check_login();
|
||||
|
||||
ui_print_page_header(__('Network usage map'));
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Network usage map'),
|
||||
'images/op_netflow.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Network'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// ACL Check.
|
||||
if (! check_acl($config['id_user'], 0, 'AR')) {
|
||||
|
@ -58,105 +84,180 @@ if (!$is_period) {
|
|||
$top = (int) get_parameter('top', 10);
|
||||
|
||||
$order_by = get_parameter('order_by', 'bytes');
|
||||
if (!in_array($order_by, ['bytes', 'pkts', 'flows'])) {
|
||||
if (in_array($order_by, ['bytes', 'pkts', 'flows']) === false) {
|
||||
$order_by = 'bytes';
|
||||
}
|
||||
|
||||
$style_end = ($is_period) ? 'display: none;' : '';
|
||||
$style_period = ($is_period) ? '' : 'display: none;';
|
||||
|
||||
// Build the table.
|
||||
$table = new stdClass();
|
||||
$table->class = 'databox filters';
|
||||
$table->styleTable = 'width: 100%';
|
||||
|
||||
$table->data['0']['0'] = '<div class="flex">';
|
||||
$table->data['0']['0'] .= '<div id="end_date_container" style="'.$style_end.'">';
|
||||
$table->data['0']['0'] .= __('Start date').' ';
|
||||
$table->data['0']['0'] .= html_print_input_text('date_lower', $date_lower, '', 10, 7, true);
|
||||
$table->data['0']['0'] .= ' ';
|
||||
$table->data['0']['0'] .= html_print_input_text('time_lower', $time_lower, '', 7, 8, true);
|
||||
$table->data['0']['0'] .= '</div>';
|
||||
|
||||
$table->data['0']['0'] .= '<div id="period_container" style="'.$style_period.'">';
|
||||
$table->data['0']['0'] .= __('Time Period').' ';
|
||||
$table->data['0']['0'] .= html_print_extended_select_for_time('period', $period, '', '', 0, false, true);
|
||||
$table->data['0']['0'] .= '</div>';
|
||||
$table->data['0']['0'] .= html_print_checkbox(
|
||||
'is_period',
|
||||
1,
|
||||
($is_period === true) ? 1 : 0,
|
||||
true,
|
||||
false,
|
||||
'network_report_click_period(event)'
|
||||
);
|
||||
$table->data['0']['0'] .= ui_print_help_tip(
|
||||
__('Select this checkbox to write interval instead a date.'),
|
||||
true
|
||||
);
|
||||
$table->data['0']['0'] .= '</div>';
|
||||
|
||||
$table->data['0']['1'] = __('End date').' ';
|
||||
$table->data['0']['1'] .= html_print_input_text('date_greater', $date_greater, '', 10, 7, true);
|
||||
$table->data['0']['1'] .= ' ';
|
||||
$table->data['0']['1'] .= html_print_input_text('time_greater', $time_greater, '', 7, 8, true);
|
||||
|
||||
$table->data['0']['2'] = __('Number of result to show').' ';
|
||||
$table->data['0']['2'] .= html_print_select(
|
||||
[
|
||||
'5' => 5,
|
||||
'10' => 10,
|
||||
'15' => 15,
|
||||
'20' => 20,
|
||||
'25' => 25,
|
||||
'50' => 50,
|
||||
'100' => 100,
|
||||
'250' => 250,
|
||||
],
|
||||
'top',
|
||||
$top,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data['1']['0'] = __('Data to show').' ';
|
||||
$table->data['1']['0'] .= html_print_select(
|
||||
network_get_report_actions(),
|
||||
'action',
|
||||
$action,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data['1']['1'] = '';
|
||||
|
||||
$netflow_button = '';
|
||||
if ((bool) $config['activate_netflow'] === true) {
|
||||
$netflow_button = html_print_submit_button(
|
||||
__('Show netflow map'),
|
||||
'update_netflow',
|
||||
false,
|
||||
'class="sub upd"',
|
||||
['icon' => 'update'],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$netflow_button = '';
|
||||
}
|
||||
|
||||
$table->data['1']['2'] .= implode(
|
||||
' ',
|
||||
[$netflow_button]
|
||||
|
||||
$filterTable = new stdClass();
|
||||
$filterTable->id = '';
|
||||
$filterTable->class = 'filter-table-adv';
|
||||
$filterTable->size = [];
|
||||
$filterTable->size[0] = '33%';
|
||||
$filterTable->size[1] = '33%';
|
||||
$filterTable->size[2] = '33%';
|
||||
$filterTable->data = [];
|
||||
|
||||
$filterTable->data[0][0] = html_print_label_input_block(
|
||||
__('Interval'),
|
||||
html_print_extended_select_for_time(
|
||||
'period',
|
||||
$period,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
false,
|
||||
true
|
||||
),
|
||||
[ 'div_id' => 'period_container' ]
|
||||
);
|
||||
|
||||
echo '<form method="post">';
|
||||
html_print_input_hidden('order_by', $order_by);
|
||||
$filterTable->data[0][0] .= html_print_label_input_block(
|
||||
__('Start date'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => html_print_input_text(
|
||||
'date_lower',
|
||||
$date_lower,
|
||||
false,
|
||||
13,
|
||||
10,
|
||||
true
|
||||
).html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
[
|
||||
'alt' => 'calendar',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).html_print_input_text(
|
||||
'time_lower',
|
||||
$time_lower,
|
||||
false,
|
||||
10,
|
||||
8,
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
[ 'div_id' => 'end_date_container' ]
|
||||
);
|
||||
|
||||
html_print_table($table);
|
||||
echo '</form>';
|
||||
$filterTable->data[0][1] = html_print_label_input_block(
|
||||
__('End date'),
|
||||
html_print_div(
|
||||
[
|
||||
'content' => html_print_input_text(
|
||||
'date',
|
||||
$date_greater,
|
||||
false,
|
||||
13,
|
||||
10,
|
||||
true
|
||||
).html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
['alt' => 'calendar']
|
||||
).html_print_input_text(
|
||||
'time',
|
||||
$time_greater,
|
||||
false,
|
||||
10,
|
||||
8,
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[0][2] = html_print_label_input_block(
|
||||
__('Defined period'),
|
||||
html_print_checkbox_switch(
|
||||
'is_period',
|
||||
1,
|
||||
($is_period === true) ? 1 : 0,
|
||||
true,
|
||||
false,
|
||||
'nf_view_click_period()'
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[1][] = html_print_label_input_block(
|
||||
__('Results to show'),
|
||||
html_print_select(
|
||||
[
|
||||
'5' => 5,
|
||||
'10' => 10,
|
||||
'15' => 15,
|
||||
'20' => 20,
|
||||
'25' => 25,
|
||||
'50' => 50,
|
||||
'100' => 100,
|
||||
'250' => 250,
|
||||
],
|
||||
'top',
|
||||
$top,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$filterTable->data[1][] = html_print_label_input_block(
|
||||
__('Data to show'),
|
||||
html_print_select(
|
||||
network_get_report_actions(),
|
||||
'action',
|
||||
$action,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$filterInputTable = '<form method="POST">';
|
||||
$filterInputTable .= html_print_input_hidden('order_by', $order_by);
|
||||
$filterInputTable .= html_print_table($filterTable, true);
|
||||
$filterInputTable .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => $netflow_button,
|
||||
],
|
||||
true
|
||||
);
|
||||
$filterInputTable .= '</form>';
|
||||
|
||||
ui_toggle(
|
||||
$filterInputTable,
|
||||
'<span class="subsection_header_title">'.__('Filter').'</span>',
|
||||
__('Filter'),
|
||||
'search',
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content no_border',
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
$has_data = false;
|
||||
$first_load = true;
|
||||
|
||||
if ((bool) get_parameter('update_netflow') === true) {
|
||||
$map_data = netflow_build_map_data(
|
||||
$utimestamp_lower,
|
||||
|
@ -165,18 +266,27 @@ if ((bool) get_parameter('update_netflow') === true) {
|
|||
($action === 'talkers') ? 'srcip' : 'dstip'
|
||||
);
|
||||
$has_data = !empty($map_data['nodes']);
|
||||
$first_load = false;
|
||||
}
|
||||
|
||||
if ($has_data === true) {
|
||||
$map_manager = new NetworkMap($map_data);
|
||||
$map_manager->printMap();
|
||||
} else if (!$first_load) {
|
||||
ui_print_info_message(__('No data retrieved'));
|
||||
} else {
|
||||
ui_print_info_message(__('No data to show'));
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
.networkconsole {
|
||||
min-height: calc(100vh - 280px) !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
nf_view_click_period();
|
||||
}
|
||||
);
|
||||
// Configure jQuery timepickers.
|
||||
$("#text-time_lower, #text-time_greater").timepicker({
|
||||
showSecond: true,
|
||||
|
@ -193,16 +303,13 @@ $("#text-time_lower, #text-time_greater").timepicker({
|
|||
$("#text-date_lower, #text-date_greater").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>"});
|
||||
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
|
||||
|
||||
function network_report_click_period(event) {
|
||||
var is_period = document.getElementById(event.target.id).checked;
|
||||
function nf_view_click_period() {
|
||||
var is_period = document.getElementById('checkbox-is_period').checked;
|
||||
|
||||
document.getElementById('period_container').style.display = !is_period
|
||||
? 'none'
|
||||
: 'block';
|
||||
document.getElementById('end_date_container').style.display = is_period
|
||||
? 'none'
|
||||
: 'block';
|
||||
document.getElementById('period_container').style.display = !is_period ? 'none' : 'flex';
|
||||
document.getElementById('end_date_container').style.display = is_period ? 'none' : 'flex';
|
||||
}
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
tspan {
|
||||
|
|
|
@ -57,16 +57,18 @@ if ($config['pure']) {
|
|||
).'</a>';
|
||||
}
|
||||
|
||||
// List
|
||||
$list = [];
|
||||
$list['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&pure='.$config['pure'].'&refresh='.$refr.'">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
if ($config['pure'] === false) {
|
||||
// List.
|
||||
$list = [];
|
||||
$list['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&pure='.$config['pure'].'&refresh='.$refr.'">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
}
|
||||
|
||||
// Statistics (This file)
|
||||
$statistics = [];
|
||||
|
@ -165,10 +167,9 @@ $water_mark = [
|
|||
// By SOURCE
|
||||
$table_source = new StdClass();
|
||||
$table_source->width = '100%';
|
||||
$table_source->class = 'databox data';
|
||||
$table_source->class = 'info_table';
|
||||
$table_source->head[] = __('Traps received by source').' - '.sprintf(__('Top %d'), 25);
|
||||
$table_source->head_colspan[] = 2;
|
||||
$table_source->headstyle[] = 'background-color: #82b92e';
|
||||
$table_source->size = [];
|
||||
$table_source->size['table'] = '50%';
|
||||
$table_source->size['graph'] = '50%';
|
||||
|
@ -182,6 +183,7 @@ $table_source_data->head = [];
|
|||
$table_source_data->head['source'] = __('Source IP');
|
||||
$table_source_data->head['num'] = __('Number');
|
||||
$table_source_data->data = [];
|
||||
$table_source_data->class = 'info_table';
|
||||
|
||||
$table_source_graph_data = [];
|
||||
$labels = [];
|
||||
|
@ -239,9 +241,9 @@ unset($table_source);
|
|||
// By OID
|
||||
$table_oid = new StdClass();
|
||||
$table_oid->width = '100%';
|
||||
$table_oid->class = 'info_table';
|
||||
$table_oid->head[] = __('Traps received by Enterprise String').' - '.sprintf(__('Top %d'), 25);
|
||||
$table_oid->head_colspan[] = 2;
|
||||
$table_oid->headstyle[] = 'background-color: #82b92e';
|
||||
$table_oid->size = [];
|
||||
$table_oid->size['table'] = '50%';
|
||||
$table_oid->size['graph'] = '50%';
|
||||
|
@ -255,6 +257,7 @@ $table_oid_data->head = [];
|
|||
$table_oid_data->head['oid'] = __('Trap Enterprise String');
|
||||
$table_oid_data->head['num'] = __('Number');
|
||||
$table_oid_data->data = [];
|
||||
$table_oid_data->class = 'info_table';
|
||||
|
||||
$table_oid_graph_data = [];
|
||||
$labels = [];
|
||||
|
|
|
@ -56,7 +56,7 @@ ui_require_javascript_file('connection_check', 'include/javascript/', true);
|
|||
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/fail@svg.svg');
|
||||
|
||||
require_once 'include/functions_visual_map.php';
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ ui_require_javascript_file('connection_check', 'include/javascript/', true);
|
|||
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/fail@svg.svg');
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
|
||||
|
|
|
@ -286,6 +286,9 @@ class FontVariables
|
|||
"unbatang" => [/* Korean */
|
||||
'R' => "UnBatang_0613.ttf",
|
||||
],
|
||||
"lato" => [/* lato */
|
||||
'R' => 'Lato-Regular.ttf',
|
||||
],
|
||||
],
|
||||
|
||||
// Add fonts to this array if they contain characters in the SIP or SMP Unicode planes
|
||||
|
@ -296,6 +299,7 @@ class FontVariables
|
|||
"dejavuserifcondensed",
|
||||
"dejavuserif",
|
||||
"dejavusansmono",
|
||||
"lato",
|
||||
],
|
||||
|
||||
// These next 3 arrays do two things:
|
||||
|
@ -321,6 +325,8 @@ class FontVariables
|
|||
'mono_fonts' => ['dejavusansmono', 'mono', 'monospace', 'freemono', 'liberationmono', 'courier', 'ocrb', 'ocr-b', 'lucidaconsole',
|
||||
'couriernew', 'monotypecorsiva'
|
||||
],
|
||||
|
||||
'lato' => ['lato'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -468,6 +468,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
|
|||
var $serif_fonts;
|
||||
var $mono_fonts;
|
||||
var $defaultSubsFont;
|
||||
var $lato;
|
||||
|
||||
// List of ALL available CJK fonts (incl. styles) (Adobe add-ons) hw removed
|
||||
var $available_CJK_fonts;
|
||||
|
@ -1478,15 +1479,31 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
|
|||
$default_font = $this->defaultCSS['BODY']['FONT-FAMILY'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($default_font) {
|
||||
$this->SetDefaultFont($default_font);
|
||||
}
|
||||
|
||||
if (!$default_font_size) {
|
||||
$mmsize = $this->sizeConverter->convert($this->defaultCSS['BODY']['FONT-SIZE']);
|
||||
$default_font_size = $mmsize * (Mpdf::SCALE);
|
||||
}
|
||||
|
||||
if ($default_font) {
|
||||
$this->SetDefaultFont($default_font);
|
||||
}
|
||||
if ($default_font_size) {
|
||||
if ($_SESSION['font_size_report']) {
|
||||
// DefaultCss.
|
||||
$this->defaultCSS['BODY']['FONT-SIZE'] = $_SESSION['font_size_report'].'px';
|
||||
$this->defaultCSS['TABLE']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
$this->defaultCSS['THEAD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
$this->defaultCSS['TH']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
$this->defaultCSS['TD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
// CssManager.
|
||||
$this->cssManager->CSS['BODY']['FONT-SIZE'] = $_SESSION['font_size_report'].'px';
|
||||
$this->cssManager->CSS['TABLE']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
$this->cssManager->CSS['THEAD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
$this->cssManager->CSS['TH']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
$this->cssManager->CSS['TD']['FONT-SIZE'] = $_SESSION['font_size_report'].'pt';
|
||||
|
||||
} elseif ($default_font_size) {
|
||||
$this->SetDefaultFontSize($default_font_size);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ if (empty($dashboards) === true) {
|
|||
$table->style['full_screen'] = 'text-align: center;';
|
||||
|
||||
$table->size = [];
|
||||
$table->size['name'] = '75%';
|
||||
$table->size['name'] = '40%';
|
||||
$table->size['full_screen'] = '30px';
|
||||
|
||||
$table->head = [];
|
||||
|
|
Loading…
Reference in New Issue