cluster view
This commit is contained in:
parent
8a7b60e983
commit
17ba51d2bf
|
@ -259,7 +259,10 @@ class SnmpConsole extends HTML
|
|||
'class' => 'snmp-td',
|
||||
],
|
||||
'alert',
|
||||
'action',
|
||||
[
|
||||
'text' => 'action',
|
||||
'class' => 'table_action_buttons w120px',
|
||||
],
|
||||
[
|
||||
'text' => 'm',
|
||||
'class' => 'mw60px pdd_0px',
|
||||
|
|
|
@ -8144,7 +8144,7 @@ div.graph div.legend table {
|
|||
overflow: hidden;
|
||||
background-color: var(--secondary-color);
|
||||
min-height: calc(100vh - 200px);
|
||||
border: 1px solid #cacaca;
|
||||
/* border: 1px solid #cacaca; */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -187,7 +187,7 @@ html_print_div(
|
|||
'class' => 'agent_details_line',
|
||||
'content' => ui_toggle(
|
||||
$html_toggle,
|
||||
'<span class="subsection_header_title">'.__('List of modules').'</span>'.$help_not_init.ui_print_help_tip(
|
||||
__('List of modules').' '.$help_not_init.ui_print_help_tip(
|
||||
__('To see the list of modules paginated, enable this option in the Styles Configuration.'),
|
||||
true
|
||||
).reporting_tiny_stats(
|
||||
|
@ -201,9 +201,9 @@ html_print_div(
|
|||
false,
|
||||
false,
|
||||
true,
|
||||
'box-flat agent_details_col',
|
||||
'',
|
||||
'white-box-content',
|
||||
'width_available'
|
||||
'box-flat white_table_graph w100p'
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -543,58 +543,83 @@ function print_form_filter_monitors(
|
|||
$form_text = '';
|
||||
$table = new stdClass();
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->id = 'module_filter_agent_view';
|
||||
$table->styleTable = 'border-radius: 0;padding: 0;margin: 0 0 10px;';
|
||||
// $table->id = 'module_filter_agent_view';
|
||||
// $table->styleTable = 'border-radius: 0;padding: 0;margin: 0 0 10px;';
|
||||
$table->width = '100%';
|
||||
$table->cellstyle[0][0] = 'width: 0';
|
||||
$table->cellstyle[0][1] = 'width: 0';
|
||||
$table->cellstyle[0][2] = 'width: 0';
|
||||
$table->size[0] = '25%';
|
||||
$table->size[1] = '25%';
|
||||
$table->size[2] = '25%';
|
||||
$table->size[3] = '25%';
|
||||
// Captions.
|
||||
$table->data[0][0] = html_print_input_hidden('filter_monitors', 1, true);
|
||||
$table->data[0][0] .= html_print_input_hidden('monitors_change_filter', 1, true);
|
||||
$table->data[0][0] .= __('Status:');
|
||||
$table->data[0][1] = __('Free text for search (*):').ui_print_help_tip(
|
||||
__('Search by module name, list matches.'),
|
||||
true
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
html_print_input_hidden('filter_monitors', 1, true).html_print_input_hidden(
|
||||
'monitors_change_filter',
|
||||
1,
|
||||
true
|
||||
).__('Status:'),
|
||||
html_print_select(
|
||||
$status_list,
|
||||
'status_filter_monitor',
|
||||
$status_filter_monitor,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$table->data[0][2] = __('Module group');
|
||||
$table->data[0][3] = __('Show in hierachy mode');
|
||||
// Inputs.
|
||||
$table->data[1][0] = html_print_select(
|
||||
$status_list,
|
||||
'status_filter_monitor',
|
||||
$status_filter_monitor,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Free text for search (*):').ui_print_help_tip(
|
||||
__('Search by module name, list matches.'),
|
||||
true
|
||||
),
|
||||
html_print_input_text(
|
||||
'status_text_monitor',
|
||||
$status_text_monitor,
|
||||
'',
|
||||
'',
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
$table->data[1][1] = html_print_input_text(
|
||||
'status_text_monitor',
|
||||
$status_text_monitor,
|
||||
'',
|
||||
'',
|
||||
100,
|
||||
true
|
||||
|
||||
$table->data[0][2] = html_print_label_input_block(
|
||||
__('Module group'),
|
||||
html_print_select(
|
||||
$rows_select,
|
||||
'status_module_group',
|
||||
$status_module_group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$table->data[1][2] = html_print_select(
|
||||
$rows_select,
|
||||
'status_module_group',
|
||||
$status_module_group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data[1][3] = html_print_switch(
|
||||
[
|
||||
'name' => 'status_hierachy_mode',
|
||||
'value' => $all_events_24h,
|
||||
'onchange' => 'change_module_filter()',
|
||||
'id' => 'checkbox-status_hierachy_mode',
|
||||
]
|
||||
|
||||
$table->data[0][3] = html_print_label_input_block(
|
||||
__('Show in hierachy mode'),
|
||||
html_print_switch(
|
||||
[
|
||||
'name' => 'status_hierachy_mode',
|
||||
'value' => $all_events_24h,
|
||||
'onchange' => 'change_module_filter()',
|
||||
'id' => 'checkbox-status_hierachy_mode',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$form_text = html_print_table($table, true);
|
||||
|
||||
$filtersButtons = [];
|
||||
|
||||
$filtersButtons[] = html_print_button(
|
||||
|
@ -603,8 +628,9 @@ function print_form_filter_monitors(
|
|||
false,
|
||||
'filter_modules();',
|
||||
[
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary mini',
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary mini',
|
||||
'style' => 'margin-left: 15px',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
@ -621,16 +647,6 @@ function print_form_filter_monitors(
|
|||
true
|
||||
);
|
||||
|
||||
$table->data[1][4] = html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => implode('', $filtersButtons),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$form_text .= html_print_table($table, true);
|
||||
|
||||
// TODO. Unused code.
|
||||
if ($status_filter_monitor === -1 && empty($status_text_monitor) === true && $status_module_group === -1) {
|
||||
$filter_hidden = true;
|
||||
|
@ -639,4 +655,10 @@ function print_form_filter_monitors(
|
|||
}
|
||||
|
||||
echo $form_text;
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons-right-forced',
|
||||
'content' => implode('', $filtersButtons),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -94,6 +94,19 @@ if (!empty($table->data)) {
|
|||
echo '<div id="log_sources_status" class="w100p">';
|
||||
html_print_table($table);
|
||||
echo '</div>';
|
||||
$html_content = ob_get_clean();
|
||||
// Create controlled toggle content.
|
||||
ui_toggle(
|
||||
$html_content,
|
||||
__('Log sources status'),
|
||||
'log_sources_status',
|
||||
!$log_sources_defined,
|
||||
false,
|
||||
'',
|
||||
'white_table_graph_content no-padding-imp',
|
||||
'white-box-content',
|
||||
'box-flat white_thable_graph mrgn_top_30px'
|
||||
);
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No log sources found') ]);
|
||||
$log_sources_defined = false;
|
||||
|
@ -109,18 +122,6 @@ html_print_input_hidden('redirect_search', 1, false);
|
|||
|
||||
echo '</form>';
|
||||
|
||||
$html_content = ob_get_clean();
|
||||
|
||||
// Create controlled toggle content.
|
||||
ui_toggle(
|
||||
$html_content,
|
||||
__('Log sources status'),
|
||||
'log_sources_status',
|
||||
!$log_sources_defined,
|
||||
false,
|
||||
'',
|
||||
'white_table_graph_content no-padding-imp'
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ try {
|
|||
'known_status',
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'action_buttons',
|
||||
'class' => 'table_action_buttons',
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -102,6 +102,7 @@ try {
|
|||
],
|
||||
],
|
||||
],
|
||||
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
|
||||
]
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
|
@ -109,24 +110,20 @@ try {
|
|||
}
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||
HTML::printForm(
|
||||
$buttons[] = html_print_submit_button(
|
||||
__('New cluster'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'form' => [
|
||||
'method' => 'POST',
|
||||
'action' => ui_get_full_url($model->url.'&op=new'),
|
||||
],
|
||||
'inputs' => [
|
||||
[
|
||||
'class' => 'w100p',
|
||||
'arguments' => [
|
||||
'name' => 'submit',
|
||||
'label' => __('New cluster'),
|
||||
'type' => 'submit',
|
||||
'attributes' => 'class="sub next"',
|
||||
'return' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
'class' => 'sub ok',
|
||||
'icon' => 'next',
|
||||
],
|
||||
true
|
||||
);
|
||||
echo '<form action="'.ui_get_full_url($model->url.'&op=new').'" method="POST">';
|
||||
html_print_action_buttons(
|
||||
implode('', $buttons),
|
||||
['type' => 'form_action']
|
||||
);
|
||||
echo '</form>';
|
||||
}
|
||||
|
|
|
@ -358,17 +358,13 @@ $map_manager = new NetworkMap(
|
|||
*
|
||||
*/
|
||||
|
||||
$table_events = '<div class="white_table_graph" id="table_events">';
|
||||
$table_events .= '<div class="white_table_graph_header">';
|
||||
$table_events .= html_print_image(
|
||||
'images/arrow_down_green.png',
|
||||
true
|
||||
);
|
||||
$table_events .= '<span>';
|
||||
$table_events = '<div class="white_table_graph" id="table_events" style="width:100%">';
|
||||
$table_events .= '<div class="agent_details_header">';
|
||||
$table_events .= '<b><span style="font-size: medium;font-weight:bold">';
|
||||
$table_events .= __('Events (Last 24h)');
|
||||
$table_events .= '</span>';
|
||||
$table_events .= '</span></b>';
|
||||
$table_events .= '</div>';
|
||||
$table_events .= '<div class="white_table_graph_content white-table-graph-content">';
|
||||
$table_events .= '<div class="white-table-graph-content">';
|
||||
$table_events .= graph_graphic_agentevents(
|
||||
$cluster->agent()->id_agente(),
|
||||
95,
|
||||
|
@ -384,29 +380,34 @@ $table_events .= '</div>';
|
|||
|
||||
?>
|
||||
<div id="agent_details_first_row" class="w100p cluster-agent-data">
|
||||
<div class="box-flat agent_details_col agent_details_col_left">
|
||||
<div class="agent_details_header">
|
||||
<?php echo $table_agent_header; ?>
|
||||
</div>
|
||||
<div class="agent_details_content">
|
||||
<div class="agent_details_graph">
|
||||
<?php echo $table_agent_graph; ?>
|
||||
<div class="agent_details_bullets">
|
||||
<?php echo $table_agent_count_modules; ?>
|
||||
<div class="flex">
|
||||
<div class="box-flat agent_details_col agent_details_col_left" style="width:50%">
|
||||
<div class="agent_details_header">
|
||||
<?php echo $table_agent_header; ?>
|
||||
</div>
|
||||
<div class="agent_details_content">
|
||||
<div class="agent_details_graph">
|
||||
<?php echo $table_agent_graph; ?>
|
||||
<div class="agent_details_bullets">
|
||||
<?php echo $table_agent_count_modules; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="agent_details_info">
|
||||
<?php
|
||||
echo $alive_animation;
|
||||
echo $table_agent_os;
|
||||
echo $table_agent_ip;
|
||||
echo $table_agent_version;
|
||||
echo $table_agent_description;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="agent_details_info">
|
||||
<?php
|
||||
echo $alive_animation;
|
||||
echo $table_agent_os;
|
||||
echo $table_agent_ip;
|
||||
echo $table_agent_version;
|
||||
echo $table_agent_description;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-flat agent_details_col" style="width:50%">
|
||||
<?php echo $table_events; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-flat agent_details_col agent_details_col_right">
|
||||
<div class="cluster-map">
|
||||
<?php $map_manager->printMap(); ?>
|
||||
|
@ -414,10 +415,6 @@ $table_events .= '</div>';
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w100p cluster-events-graph">
|
||||
<?php echo $table_events; ?>
|
||||
</div>
|
||||
|
||||
<div id='cluster-modules' class="w100p modules">
|
||||
<?php
|
||||
$id_agente = $cluster->agent()->id_agente();
|
||||
|
@ -427,28 +424,22 @@ require_once $config['homedir'].'/operation/agentes/estado_monitores.php';
|
|||
|
||||
|
||||
<?php
|
||||
HTML::printForm(
|
||||
$buttons[] = html_print_submit_button(
|
||||
__('Reload'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'form' => [
|
||||
'action' => $model->url.'&op=view&id='.$cluster->id(),
|
||||
'method' => 'POST',
|
||||
],
|
||||
'inputs' => [
|
||||
[
|
||||
'arguments' => [
|
||||
'name' => 'submit',
|
||||
'label' => __('Reload'),
|
||||
'type' => 'submit',
|
||||
'attributes' => 'class="sub cancel"',
|
||||
'return' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
'class' => 'sub ok',
|
||||
'icon' => 'next',
|
||||
],
|
||||
false
|
||||
true
|
||||
);
|
||||
|
||||
echo '<br/>';
|
||||
echo '<form action="'.$model->url.'&op=view&id='.$cluster->id().'" method="POST">';
|
||||
html_print_action_buttons(
|
||||
implode('', $buttons),
|
||||
['type' => 'form_action']
|
||||
);
|
||||
echo '</form>';
|
||||
|
||||
// Print always go back button.
|
||||
HTML::printForm($model->getGoBackForm(), false);
|
||||
|
|
Loading…
Reference in New Issue