mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round
This commit is contained in:
commit
154c97d653
@ -140,25 +140,26 @@ function quickShell()
|
|||||||
ui_print_error_message(__('WebService engine has not been started, please check documentation.'));
|
ui_print_error_message(__('WebService engine has not been started, please check documentation.'));
|
||||||
$wiz->printForm(
|
$wiz->printForm(
|
||||||
[
|
[
|
||||||
'form' => [
|
'form' => [
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'action' => '#',
|
'action' => '#',
|
||||||
],
|
'id' => 'retry_form',
|
||||||
'inputs' => [
|
|
||||||
[
|
|
||||||
'class' => 'w100p',
|
|
||||||
'arguments' => [
|
|
||||||
'name' => 'submit',
|
|
||||||
'label' => __('Retry'),
|
|
||||||
'type' => 'submit',
|
|
||||||
'attributes' => ['icon' => 'next'],
|
|
||||||
'return' => true,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
html_print_submit_button(
|
||||||
|
__('Retry'),
|
||||||
|
'submit',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'next',
|
||||||
|
'form' => 'retry_form',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,6 +169,7 @@ function quickShell()
|
|||||||
'action' => '#',
|
'action' => '#',
|
||||||
'class' => 'wizard',
|
'class' => 'wizard',
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
|
'id' => 'connect_form',
|
||||||
],
|
],
|
||||||
'inputs' => [
|
'inputs' => [
|
||||||
[
|
[
|
||||||
@ -198,19 +200,24 @@ function quickShell()
|
|||||||
'script' => "p=22; if(this.value == 'telnet') { p=23; } $('#text-port').val(p);",
|
'script' => "p=22; if(this.value == 'telnet') { p=23; } $('#text-port').val(p);",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'arguments' => [
|
|
||||||
'type' => 'submit',
|
|
||||||
'label' => __('Connect'),
|
|
||||||
'attributes' => ['icon' => 'cog'],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
html_print_submit_button(
|
||||||
|
__('Connect'),
|
||||||
|
'submit',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'cog',
|
||||||
|
'form' => 'connect_form',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3283,12 +3283,19 @@ function reporting_html_alert_report_actions($table, $item, $pdf=0)
|
|||||||
function get_alert_table($data)
|
function get_alert_table($data)
|
||||||
{
|
{
|
||||||
$table = new StdCLass();
|
$table = new StdCLass();
|
||||||
$table->width = '100%';
|
$table->width = '99%';
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
$table->head = [];
|
$table->head = [];
|
||||||
$table->headstyle = [];
|
$table->headstyle = [];
|
||||||
$table->cellstyle = [];
|
$table->cellstyle = [];
|
||||||
$table->headstyle[0] = 'text-align:left;';
|
$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);
|
$head = reset($data);
|
||||||
foreach (array_reverse(array_keys($head)) as $name) {
|
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);
|
$table->data['alerts']['cell'] = html_print_table($table1, true);
|
||||||
if ($pdf) {
|
if ($pdf) {
|
||||||
$table1->class = 'pdf_alert_table';
|
$table1->class = 'info_table';
|
||||||
return html_print_table($table1, true);
|
return html_print_table($table1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3691,7 +3698,7 @@ function reporting_html_agent_configuration(
|
|||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = $item['data']['name'];
|
$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['address'] = $item['data']['os_icon'];
|
||||||
$row['os'] = $item['data']['address'];
|
$row['os'] = $item['data']['address'];
|
||||||
$row['description'] = $item['data']['description'];
|
$row['description'] = $item['data']['description'];
|
||||||
@ -3732,36 +3739,21 @@ function reporting_html_agent_configuration(
|
|||||||
$table1->width = '99%';
|
$table1->width = '99%';
|
||||||
$table1->head = [];
|
$table1->head = [];
|
||||||
$table1->head['name'] = __('Name');
|
$table1->head['name'] = __('Name');
|
||||||
$table1->head['type'] = __('Type');
|
|
||||||
$table1->head['warning_critical'] = __('Warning<br/>Critical');
|
|
||||||
$table1->head['threshold'] = __('Threshold');
|
$table1->head['threshold'] = __('Threshold');
|
||||||
$table1->head['group_icon'] = __('Group');
|
|
||||||
$table1->head['description'] = __('Description');
|
$table1->head['description'] = __('Description');
|
||||||
$table1->head['interval'] = __('Interval');
|
$table1->head['interval'] = __('Interval');
|
||||||
$table1->head['unit'] = __('Unit');
|
$table1->head['unit'] = __('Unit');
|
||||||
$table1->head['status'] = __('Status');
|
$table1->head['status'] = __('Status');
|
||||||
$table1->head['tags'] = __('Tags');
|
$table1->head['tags'] = __('Tags');
|
||||||
$table1->align = [];
|
$table1->align = [];
|
||||||
$table1->align['name'] = 'left';
|
$table1->align[] = '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->data = [];
|
$table1->data = [];
|
||||||
|
|
||||||
foreach ($item['data']['modules'] as $module) {
|
foreach ($item['data']['modules'] as $module) {
|
||||||
$row = [];
|
$row = [];
|
||||||
|
|
||||||
$row['name'] = $module['name'];
|
$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['threshold'] = $module['threshold'];
|
||||||
$row['group_icon'] = ui_print_group_icon($item['data']['group'], true);
|
|
||||||
$row['description'] = $module['description'];
|
$row['description'] = $module['description'];
|
||||||
$row['interval'] = $module['interval'];
|
$row['interval'] = $module['interval'];
|
||||||
$row['unit'] = $module['unit'];
|
$row['unit'] = $module['unit'];
|
||||||
|
@ -76,9 +76,9 @@ if ($fields === false) {
|
|||||||
$data[0] = '<b>'.$field['name'].'</b>';
|
$data[0] = '<b>'.$field['name'].'</b>';
|
||||||
|
|
||||||
if ($field['display_on_front']) {
|
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 {
|
} 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(
|
$custom_value = db_get_all_rows_sql(
|
||||||
|
@ -314,7 +314,7 @@ if ($start_date != $current) {
|
|||||||
|
|
||||||
if ($combined) {
|
if ($combined) {
|
||||||
// Pass the $modules before the ajax call.
|
// 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 {
|
} else {
|
||||||
foreach ($modules as $id_module) {
|
foreach ($modules as $id_module) {
|
||||||
$title = modules_get_agentmodule_name($id_module);
|
$title = modules_get_agentmodule_name($id_module);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user