mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-9662-second-round' into 'develop'
Ent 9662 second round See merge request artica/pandorafms!5639
This commit is contained in:
commit
48d72e2fbb
@ -259,6 +259,15 @@ function agents_modules_load_js()
|
|||||||
return results[1];
|
return results[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function select_selected () {
|
||||||
|
$('#id_agents2 option').each(function(){
|
||||||
|
if($(this).attr('selected') === 'selected'){
|
||||||
|
$(this).prop('selected', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -645,7 +654,7 @@ function mainAgentsModules()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($config['pure'] != 1) {
|
if ($config['pure'] != 1) {
|
||||||
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
|
$show_filters = '<form method="post" action="index.php?sec=view&sec2=extensions/agents_modules" class="w100p">';
|
||||||
$show_filters .= '<table class="filter-table-adv w100p no-border" cellpadding="4" cellspacing="4">';
|
$show_filters .= '<table class="filter-table-adv w100p no-border" cellpadding="4" cellspacing="4">';
|
||||||
$show_filters .= '<tr>';
|
$show_filters .= '<tr>';
|
||||||
$show_filters .= '<td width="33%">'.$filter_type.'</td>';
|
$show_filters .= '<td width="33%">'.$filter_type.'</td>';
|
||||||
@ -666,8 +675,9 @@ function mainAgentsModules()
|
|||||||
'srcbutton',
|
'srcbutton',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
'icon' => 'search',
|
'icon' => 'search',
|
||||||
'mode' => 'mini',
|
'mode' => 'mini',
|
||||||
|
'onclick' => 'select_selected()',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
@ -729,7 +739,7 @@ function mainAgentsModules()
|
|||||||
if (isset($modules_selected[0]) === true && $modules_selected[0]) {
|
if (isset($modules_selected[0]) === true && $modules_selected[0]) {
|
||||||
$all_modules = [];
|
$all_modules = [];
|
||||||
foreach ($modules_selected as $key => $value) {
|
foreach ($modules_selected as $key => $value) {
|
||||||
if (is_int($value)) {
|
if ((int) $value > 0) {
|
||||||
$name = modules_get_agentmodule_name($value);
|
$name = modules_get_agentmodule_name($value);
|
||||||
$sql = "SELECT id_agente_modulo
|
$sql = "SELECT id_agente_modulo
|
||||||
FROM tagente_modulo
|
FROM tagente_modulo
|
||||||
|
@ -267,7 +267,7 @@ if (db_get_num_rows($sql) == 0) {
|
|||||||
$data[5] .= '</b></a> ';
|
$data[5] .= '</b></a> ';
|
||||||
// Force refresh module
|
// Force refresh module
|
||||||
$data[5] .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&force_inventory_module='.$row['id_agent_module_inventory'].'">';
|
$data[5] .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&force_inventory_module='.$row['id_agent_module_inventory'].'">';
|
||||||
$data[5] .= html_print_image('images/change-active.svg', true, ['border' => '0', 'title' => __('Force'), 'class' => 'main_menu_icon invert_filter']).'</b></a>';
|
$data[5] .= html_print_image('images/force@svg.svg', true, ['border' => '0', 'title' => __('Force'), 'class' => 'main_menu_icon invert_filter']).'</b></a>';
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,7 +776,7 @@ if ($agents !== false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((bool) $agent['disabled'] === true) {
|
if ((bool) $agent['disabled'] === true) {
|
||||||
$additionalDataAgentName[] = ui_print_help_tip(__('Disabled'));
|
$additionalDataAgentName[] = ui_print_help_tip(__('Disabled'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((bool) $agent['quiet'] === true) {
|
if ((bool) $agent['quiet'] === true) {
|
||||||
@ -903,12 +903,12 @@ if ($agents !== false) {
|
|||||||
|
|
||||||
if ((bool) $agent['disabled'] === true) {
|
if ((bool) $agent['disabled'] === true) {
|
||||||
$agentDisableEnableTitle = __('Enable agent');
|
$agentDisableEnableTitle = __('Enable agent');
|
||||||
$agentDisableEnableAction = 'enable_agent';
|
$agentDisableEnableAction = 'enable';
|
||||||
$agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?');
|
$agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?');
|
||||||
$agentDisableEnableIcon = 'change-active.svg';
|
$agentDisableEnableIcon = 'change-active.svg';
|
||||||
} else {
|
} else {
|
||||||
$agentDisableEnableTitle = __('Disable agent');
|
$agentDisableEnableTitle = __('Disable agent');
|
||||||
$agentDisableEnableAction = 'disable_agent';
|
$agentDisableEnableAction = 'disable';
|
||||||
$agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?');
|
$agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?');
|
||||||
$agentDisableEnableIcon = 'change-pause.svg';
|
$agentDisableEnableIcon = 'change-pause.svg';
|
||||||
}
|
}
|
||||||
@ -1001,7 +1001,7 @@ if ($agents !== false) {
|
|||||||
true,
|
true,
|
||||||
'offset',
|
'offset',
|
||||||
false,
|
false,
|
||||||
'dataTables_paginate paging_simple_numbers'
|
'paging_simple_numbers'
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -30,6 +30,26 @@ if (! check_acl($config['id_user'], 0, 'AR')
|
|||||||
$update = get_parameter('upd_button', '');
|
$update = get_parameter('upd_button', '');
|
||||||
$default = (int) get_parameter('default', 0);
|
$default = (int) get_parameter('default', 0);
|
||||||
|
|
||||||
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
|
__('Monitor detail').$subpage,
|
||||||
|
'images/agent.png',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
$buttons,
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Monitoring'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Views'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
(empty($fav_menu) === true) ? [] : $fav_menu
|
||||||
|
);
|
||||||
|
|
||||||
if ($default != 0) {
|
if ($default != 0) {
|
||||||
$fields_selected = explode(',', $config['status_monitor_fields']);
|
$fields_selected = explode(',', $config['status_monitor_fields']);
|
||||||
@ -161,11 +181,11 @@ foreach ($fields_available as $key => $available) {
|
|||||||
|
|
||||||
// General title.
|
// General title.
|
||||||
$generalTitleContent = [];
|
$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([ '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' => __('Show monitor detail fields')], true);
|
$generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Show monitor detail fields')], true);
|
||||||
$titledata[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true);
|
$titledata[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true);
|
||||||
$table->data['general_title'] = $titledata;
|
$table->data['general_title'] = $titledata;
|
||||||
$table->data[0][0] = '<b>'.__('Fields available').'</b>';
|
$table->data[0][0] = '<span class="font-title-font">'.__('Fields available').'</span>';
|
||||||
$table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px');
|
$table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px');
|
||||||
$table->data[1][1] = '<a href="javascript:">'.html_print_image(
|
$table->data[1][1] = '<a href="javascript:">'.html_print_image(
|
||||||
'images/darrowright.png',
|
'images/darrowright.png',
|
||||||
@ -187,7 +207,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
|
|||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
$table->data[0][1] = '';
|
$table->data[0][1] = '';
|
||||||
$table->data[0][2] = '<b>'.__('Fields selected').'</b>';
|
$table->data[0][2] = '<span class="font-title-font">'.__('Fields selected').'</span>';
|
||||||
$table->data[1][2] = html_print_select(
|
$table->data[1][2] = html_print_select(
|
||||||
$result_selected,
|
$result_selected,
|
||||||
'fields_selected[]',
|
'fields_selected[]',
|
||||||
@ -203,7 +223,7 @@ $table->data[1][2] = html_print_select(
|
|||||||
'width: 300px'
|
'width: 300px'
|
||||||
);
|
);
|
||||||
|
|
||||||
echo '<form id="custom_status_monitor" method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor§ion=fields&pure='.$config['pure'].'">';
|
echo '<form id="custom_status_monitor" method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor§ion=fields&pure='.$config['pure'].'" class="max_floating_element_size">';
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
|
||||||
html_print_action_buttons(
|
html_print_action_buttons(
|
||||||
|
@ -54,12 +54,6 @@ $results = db_get_all_rows_in_table('tconsole');
|
|||||||
|
|
||||||
$message = '';
|
$message = '';
|
||||||
|
|
||||||
if ($results === false) {
|
|
||||||
$message = ui_print_info_message(
|
|
||||||
__('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
View::render(
|
View::render(
|
||||||
'consoles/list',
|
'consoles/list',
|
||||||
[
|
[
|
||||||
@ -67,3 +61,9 @@ View::render(
|
|||||||
'message' => $message,
|
'message' => $message,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($results === false) {
|
||||||
|
$message = ui_print_info_message(
|
||||||
|
__('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@ -208,7 +208,7 @@ foreach ($servers as $server) {
|
|||||||
if ($server['type'] === 'data') {
|
if ($server['type'] === 'data') {
|
||||||
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=0&server_reset_counts='.$server['id_server']).'">';
|
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=0&server_reset_counts='.$server['id_server']).'">';
|
||||||
$data[8] .= html_print_image(
|
$data[8] .= html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Reset module status and fired alert counts'),
|
'title' => __('Reset module status and fired alert counts'),
|
||||||
@ -219,7 +219,7 @@ foreach ($servers as $server) {
|
|||||||
} else if ($server['type'] === 'enterprise snmp') {
|
} else if ($server['type'] === 'enterprise snmp') {
|
||||||
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=0&server_reset_snmp_enterprise='.$server['id_server']).'">';
|
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=0&server_reset_snmp_enterprise='.$server['id_server']).'">';
|
||||||
$data[8] .= html_print_image(
|
$data[8] .= html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Claim back SNMP modules'),
|
'title' => __('Claim back SNMP modules'),
|
||||||
|
@ -764,10 +764,9 @@ html_print_table($userManagementTable);
|
|||||||
|
|
||||||
$vcard_data = [];
|
$vcard_data = [];
|
||||||
$vcard_data['version'] = '3.0';
|
$vcard_data['version'] = '3.0';
|
||||||
$vcard_data['firstName'] = $user_info['firstname'];
|
$vcard_data['firstName'] = $user_info['fullname'];
|
||||||
$vcard_data['lastName'] = $user_info['lastname'];
|
$vcard_data['lastName'] = '';
|
||||||
$vcard_data['middleName'] = ($user_info['middlename'] === '1') ? '' : $user_info['middlename'];
|
$vcard_data['middleName'] = '';
|
||||||
$vcard_data['nickname'] = $user_info['fullname'];
|
|
||||||
$vcard_data['workPhone'] = $user_info['phone'];
|
$vcard_data['workPhone'] = $user_info['phone'];
|
||||||
$vcard_data['email'] = $user_info['email'];
|
$vcard_data['email'] = $user_info['email'];
|
||||||
$vcard_data['organization'] = io_safe_output(get_product_name());
|
$vcard_data['organization'] = io_safe_output(get_product_name());
|
||||||
|
@ -673,7 +673,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
|
|
||||||
$data[0] .= ');" >';
|
$data[0] .= ');" >';
|
||||||
$data[0] .= html_print_image(
|
$data[0] .= html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force'),
|
'title' => __('Force'),
|
||||||
|
@ -810,10 +810,7 @@ class HostDevices extends Wizard
|
|||||||
'name' => 'interval_manual_defined',
|
'name' => 'interval_manual_defined',
|
||||||
'return' => true,
|
'return' => true,
|
||||||
],
|
],
|
||||||
'extra' => '<div id="interval_manual_container"><div class="time_selection_container mrgn_top_20px">'.ui_print_help_tip(
|
'extra' => '<div id="interval_manual_container"><div class="time_selection_container mrgn_top_20px">'.html_print_extended_select_for_time(
|
||||||
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
|
||||||
true
|
|
||||||
).html_print_extended_select_for_time(
|
|
||||||
'interval',
|
'interval',
|
||||||
$this->task['interval_sweep'],
|
$this->task['interval_sweep'],
|
||||||
'',
|
'',
|
||||||
|
@ -160,7 +160,7 @@ if ($load_filter_modal) {
|
|||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
'margin-left:5px; width:'.$filter_id_width.';'
|
'width:'.$filter_id_width.';'
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->rowclass[] = 'display-grid';
|
$table->rowclass[] = 'display-grid';
|
||||||
@ -169,8 +169,9 @@ if ($load_filter_modal) {
|
|||||||
'load_filter',
|
'load_filter',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
'class' => 'mini w25p',
|
'class' => 'mini w30p',
|
||||||
'style' => 'margin-left: 73%',
|
'icon' => 'load',
|
||||||
|
'style' => 'margin-left: 208px; width: 130px;',
|
||||||
'onclick' => 'load_filter_values();',
|
'onclick' => 'load_filter_values();',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -189,7 +190,7 @@ function show_filter() {
|
|||||||
draggable: true,
|
draggable: true,
|
||||||
modal: false,
|
modal: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
width: 500
|
width: 380
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,8 +294,9 @@ if ($save_filter_modal) {
|
|||||||
'save_filter',
|
'save_filter',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
'class' => 'mini w25p',
|
'class' => 'mini ',
|
||||||
'style' => 'margin-left: 56%',
|
'icon' => 'save',
|
||||||
|
'style' => 'margin-left: 175px; width: 125px;',
|
||||||
'onclick' => 'save_new_filter();',
|
'onclick' => 'save_new_filter();',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -330,8 +332,9 @@ if ($save_filter_modal) {
|
|||||||
'update_filter',
|
'update_filter',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
'class' => 'mini w25p',
|
'class' => 'mini ',
|
||||||
'style' => 'margin-left: 56%',
|
'icon' => 'save',
|
||||||
|
'style' => 'margin-left: 155px; width: 145px;',
|
||||||
'onclick' => 'save_update_filter();',
|
'onclick' => 'save_update_filter();',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
|
@ -45,73 +45,101 @@ if (is_ajax() === true) {
|
|||||||
$group = get_parameter('group', true);
|
$group = get_parameter('group', true);
|
||||||
|
|
||||||
echo '<form id="form_dialog" method="post">';
|
echo '<form id="form_dialog" method="post">';
|
||||||
echo '<div class="div-dialog">';
|
echo html_print_label_input_block(
|
||||||
echo '<p class="label-dialog">'.__('Refresh').'</p>';
|
__('Refresh'),
|
||||||
echo html_print_select(
|
html_print_select(
|
||||||
|
[
|
||||||
|
'30' => __('30 seconds'),
|
||||||
|
(string) SECONDS_1MINUTE => __('1 minute'),
|
||||||
|
'180' => __('3 minutes'),
|
||||||
|
(string) SECONDS_5MINUTES => __('5 minutes'),
|
||||||
|
],
|
||||||
|
'refresh',
|
||||||
|
$refresh,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%; margin-top: 10px;'
|
||||||
|
),
|
||||||
[
|
[
|
||||||
'30' => __('30 seconds'),
|
'label_class' => 'font-title-font',
|
||||||
(string) SECONDS_1MINUTE => __('1 minute'),
|
'div_class' => 'mrgn_top_10px',
|
||||||
'180' => __('3 minutes'),
|
]
|
||||||
(string) SECONDS_5MINUTES => __('5 minutes'),
|
|
||||||
],
|
|
||||||
'refresh',
|
|
||||||
$refresh,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
0,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
'margin-top: 3px;'
|
|
||||||
);
|
);
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="div-dialog">';
|
echo html_print_label_input_block(
|
||||||
echo '<p class="label-dialog">'.__('Search').'</p>';
|
__('Search'),
|
||||||
echo html_print_input_text('search', $search, '', 30, 255, true);
|
html_print_input_text(
|
||||||
echo '</div>';
|
'search',
|
||||||
|
$search,
|
||||||
echo '<div class="div-dialog">';
|
'',
|
||||||
echo '<p class="label-dialog">'.__('Type').'</p>';
|
30,
|
||||||
echo html_print_select(
|
255,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'w100p'
|
||||||
|
),
|
||||||
[
|
[
|
||||||
0 => __('Group agents'),
|
'label_class' => 'font-title-font',
|
||||||
1 => __('Group modules by tag'),
|
'div_class' => 'mrgn_top_10px',
|
||||||
2 => __('Group modules by module group'),
|
]
|
||||||
3 => __('Group modules by agents'),
|
|
||||||
],
|
|
||||||
'type',
|
|
||||||
$type,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
0,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
'margin-top: 3px;width:70%'
|
|
||||||
);
|
);
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="div-dialog">';
|
echo html_print_label_input_block(
|
||||||
echo '<p class="label-dialog">'.__('Show groups').'</p>';
|
__('Type'),
|
||||||
echo html_print_checkbox('group', 1, $group, true);
|
html_print_select(
|
||||||
echo '</div>';
|
[
|
||||||
|
0 => __('Group agents'),
|
||||||
|
1 => __('Group modules by tag'),
|
||||||
|
2 => __('Group modules by module group'),
|
||||||
|
3 => __('Group modules by agents'),
|
||||||
|
],
|
||||||
|
'type',
|
||||||
|
$type,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%; margin-top: 10px;'
|
||||||
|
),
|
||||||
|
[
|
||||||
|
'label_class' => 'font-title-font',
|
||||||
|
'div_class' => 'mrgn_top_10px',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
echo html_print_label_input_block(
|
||||||
|
__('Show groups'),
|
||||||
|
'<div class="w100p">'.html_print_checkbox('group', 1, $group, true).'</div>',
|
||||||
|
[
|
||||||
|
'label_class' => 'font-title-font',
|
||||||
|
'div_class' => 'mrgn_top_10px',
|
||||||
|
]
|
||||||
|
);
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($getFilterType === true) {
|
if ($getFilterType === true) {
|
||||||
$filter = get_parameter('filter', 0);
|
$filter = get_parameter('filter', 0);
|
||||||
echo '<div id="filter_type" class="div-dialog">';
|
$label = ' ';
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
echo '<p style="width:42%;font-weight: bold;">'.__('Group').'</p>';
|
$label = __('Group');
|
||||||
echo html_print_input(
|
$input = html_print_input(
|
||||||
[
|
[
|
||||||
'type' => 'select_groups',
|
'type' => 'select_groups',
|
||||||
'returnAllGroup' => true,
|
'returnAllGroup' => true,
|
||||||
@ -126,9 +154,9 @@ if (is_ajax() === true) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
echo '<p class="label-dialog">'.__('Tag').'</p>';
|
$label = __('Tag');
|
||||||
if (tags_has_user_acl_tags($config['id_user']) === false) {
|
if (tags_has_user_acl_tags($config['id_user']) === false) {
|
||||||
echo html_print_select_from_sql(
|
$input = html_print_select_from_sql(
|
||||||
'SELECT id_tag, name
|
'SELECT id_tag, name
|
||||||
FROM ttag
|
FROM ttag
|
||||||
WHERE id_tag
|
WHERE id_tag
|
||||||
@ -142,7 +170,7 @@ if (is_ajax() === true) {
|
|||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'width: 200px',
|
'width: 100%',
|
||||||
'5'
|
'5'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -150,7 +178,7 @@ if (is_ajax() === true) {
|
|||||||
if (!empty($user_tags)) {
|
if (!empty($user_tags)) {
|
||||||
$id_user_tags = array_keys($user_tags);
|
$id_user_tags = array_keys($user_tags);
|
||||||
|
|
||||||
echo html_print_select_from_sql(
|
$input = html_print_select_from_sql(
|
||||||
'SELECT id_tag, name
|
'SELECT id_tag, name
|
||||||
FROM ttag
|
FROM ttag
|
||||||
WHERE id_tag IN ('.implode(',', $id_user_tags).')
|
WHERE id_tag IN ('.implode(',', $id_user_tags).')
|
||||||
@ -164,11 +192,11 @@ if (is_ajax() === true) {
|
|||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'width: 200px',
|
'width: 100%',
|
||||||
'5'
|
'5'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
echo html_print_select_from_sql(
|
$input = html_print_select_from_sql(
|
||||||
'SELECT id_tag, name
|
'SELECT id_tag, name
|
||||||
FROM ttag
|
FROM ttag
|
||||||
WHERE id_tag
|
WHERE id_tag
|
||||||
@ -182,7 +210,7 @@ if (is_ajax() === true) {
|
|||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'width: 200px',
|
'width: 100%',
|
||||||
'5'
|
'5'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -190,8 +218,8 @@ if (is_ajax() === true) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
echo '<p class="label-dialog">'.__('Module group').'</p>';
|
$label = __('Module group');
|
||||||
echo html_print_select_from_sql(
|
$input = html_print_select_from_sql(
|
||||||
'SELECT id_mg, name FROM tmodule_group ORDER BY name',
|
'SELECT id_mg, name FROM tmodule_group ORDER BY name',
|
||||||
'filter[]',
|
'filter[]',
|
||||||
$filter,
|
$filter,
|
||||||
@ -202,7 +230,7 @@ if (is_ajax() === true) {
|
|||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
'width: 200px',
|
'width: 100%',
|
||||||
'5'
|
'5'
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -212,7 +240,14 @@ if (is_ajax() === true) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo html_print_label_input_block(
|
||||||
|
$label,
|
||||||
|
$input,
|
||||||
|
[
|
||||||
|
'label_class' => 'font-title-font',
|
||||||
|
'div_class' => 'mrgn_top_10px',
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($getInfo === true) {
|
if ($getInfo === true) {
|
||||||
|
@ -1279,7 +1279,7 @@ if (check_login()) {
|
|||||||
if ((int) $module['flag'] === 0) {
|
if ((int) $module['flag'] === 0) {
|
||||||
$additionalLinkAction = '&flag=1';
|
$additionalLinkAction = '&flag=1';
|
||||||
$linkCaption = __('Force checks');
|
$linkCaption = __('Force checks');
|
||||||
$imgaction = 'images/target.png';
|
$imgaction = 'images/force@svg.svg';
|
||||||
} else {
|
} else {
|
||||||
$additionalLinkAction = '';
|
$additionalLinkAction = '';
|
||||||
$linkCaption = __('Refresh');
|
$linkCaption = __('Refresh');
|
||||||
|
@ -4132,10 +4132,10 @@ class AgentWizard extends HTML
|
|||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = 'info_table';
|
$table->class = 'info_table';
|
||||||
// Subheaders for Warning and Critical columns.
|
// Subheaders for Warning and Critical columns.
|
||||||
$subheaders = '<span class=\'wizard-colum-levels font_w300 mrgn_lft_0.8em\'>Min.</span>';
|
$subheaders = '<span class=\'wizard-colum-levels font_w300 margin-left-1\'>Min.</span>';
|
||||||
$subheaders .= '<span class=\'wizard-colum-levels font_w300 mrgn_lft_1.6em\'>Max.</span>';
|
$subheaders .= '<span class=\'wizard-colum-levels font_w300 margin-left-1\'>Max.</span>';
|
||||||
$subheaders .= '<span class=\'wizard-colum-levels font_w300 mrgn_lft_2em\'>Inv.</span>';
|
$subheaders .= '<span class=\'wizard-colum-levels font_w300 margin-left-1\'>Inv.</span>';
|
||||||
$subheaders .= '<span class=\'wizard-colum-levels font_w300 mrgn_lft_2em\'>%.</span>';
|
$subheaders .= '<span class=\'wizard-colum-levels font_w300 margin-left-05\'>%.</span>';
|
||||||
|
|
||||||
// Warning header.
|
// Warning header.
|
||||||
$warning_header = html_print_div(
|
$warning_header = html_print_div(
|
||||||
@ -4352,8 +4352,7 @@ class AgentWizard extends HTML
|
|||||||
);
|
);
|
||||||
$data_warning .= html_print_div(
|
$data_warning .= html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'wizard-column-levels-check',
|
'class' => 'wizard-column-levels-check mrgn_top_10px',
|
||||||
'style' => 'margin-top: 0.3em;',
|
|
||||||
'content' => html_print_checkbox(
|
'content' => html_print_checkbox(
|
||||||
'module-warning-inv-'.$uniqueId,
|
'module-warning-inv-'.$uniqueId,
|
||||||
$module['inv_warning'],
|
$module['inv_warning'],
|
||||||
@ -4369,8 +4368,7 @@ class AgentWizard extends HTML
|
|||||||
);
|
);
|
||||||
$data_warning .= html_print_div(
|
$data_warning .= html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'wizard-column-levels-check',
|
'class' => 'wizard-column-levels-check mrgn_top_10px',
|
||||||
'style' => 'margin-top: 0.3em;',
|
|
||||||
'content' => html_print_checkbox(
|
'content' => html_print_checkbox(
|
||||||
'module-warning-perc-'.$uniqueId,
|
'module-warning-perc-'.$uniqueId,
|
||||||
$module['perc_warning'],
|
$module['perc_warning'],
|
||||||
@ -4436,8 +4434,7 @@ class AgentWizard extends HTML
|
|||||||
|
|
||||||
$data[4] .= html_print_div(
|
$data[4] .= html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'wizard-column-levels-check',
|
'class' => 'wizard-column-levels-check mrgn_top_10px',
|
||||||
'style' => 'margin-top: 0.3em;',
|
|
||||||
'content' => html_print_checkbox(
|
'content' => html_print_checkbox(
|
||||||
'module-critical-inv-'.$uniqueId,
|
'module-critical-inv-'.$uniqueId,
|
||||||
$module['inv_critical'],
|
$module['inv_critical'],
|
||||||
@ -4454,8 +4451,7 @@ class AgentWizard extends HTML
|
|||||||
|
|
||||||
$data[4] .= html_print_div(
|
$data[4] .= html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'wizard-column-levels-check',
|
'class' => 'wizard-column-levels-check mrgn_top_10px',
|
||||||
'style' => 'margin-top: 0.3em;',
|
|
||||||
'content' => html_print_checkbox(
|
'content' => html_print_checkbox(
|
||||||
'module-critical-perc-'.$uniqueId,
|
'module-critical-perc-'.$uniqueId,
|
||||||
$module['perc_critical'],
|
$module['perc_critical'],
|
||||||
@ -4490,7 +4486,7 @@ class AgentWizard extends HTML
|
|||||||
'',
|
'',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
'pdd_0px'
|
'pdd_0px mrgn_top-8px'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// WIP. Current value of this module.
|
// WIP. Current value of this module.
|
||||||
|
@ -771,7 +771,7 @@ class AgentsAlerts extends HTML
|
|||||||
$headerInputs = [];
|
$headerInputs = [];
|
||||||
|
|
||||||
$headerInputs[] = [
|
$headerInputs[] = [
|
||||||
'label' => __('Group'),
|
'label' => '<span class="font-title-font">'.__('Group').'</span>',
|
||||||
'id' => 'select-group-id',
|
'id' => 'select-group-id',
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
'name' => 'group-id',
|
'name' => 'group-id',
|
||||||
@ -788,8 +788,9 @@ class AgentsAlerts extends HTML
|
|||||||
];
|
];
|
||||||
|
|
||||||
$headerInputs[] = [
|
$headerInputs[] = [
|
||||||
'label' => __('Show modules without alerts'),
|
'label' => '<span class="font-title-font label-alert-agent">'.__('Show modules without alerts').'</span>',
|
||||||
'id' => 'txt-use-agent-ip',
|
'id' => 'txt-use-agent-ip',
|
||||||
|
'class' => 'display-grid mrgn_lft_15px mrgn_btn_5px',
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
'name' => 'show-modules-without-alerts',
|
'name' => 'show-modules-without-alerts',
|
||||||
'checked' => $this->showWithoutAlertModules,
|
'checked' => $this->showWithoutAlertModules,
|
||||||
|
@ -524,7 +524,7 @@ class CustomNetScan extends Wizard
|
|||||||
// Schedule.
|
// Schedule.
|
||||||
$form['inputs'][] = [
|
$form['inputs'][] = [
|
||||||
'label' => __('Interval').ui_print_help_tip(
|
'label' => __('Interval').ui_print_help_tip(
|
||||||
__('Manual interval means that it will be executed only On-demand'),
|
__('Manual interval means that it will be executed only On-demand').', '.__('The minimum recomended interval for Recon Task is 5 minutes'),
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
'class' => 'input-interval',
|
'class' => 'input-interval',
|
||||||
@ -549,9 +549,6 @@ class CustomNetScan extends Wizard
|
|||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false
|
false
|
||||||
).ui_print_help_tip(
|
|
||||||
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
|
||||||
true
|
|
||||||
).'</span>',
|
).'</span>',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -568,7 +568,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -623,7 +623,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -715,7 +715,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -751,7 +751,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -797,7 +797,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -839,7 +839,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
@ -873,7 +873,7 @@ function cron_list_table()
|
|||||||
$task['id']
|
$task['id']
|
||||||
),
|
),
|
||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force run'),
|
'title' => __('Force run'),
|
||||||
|
@ -4560,7 +4560,7 @@ function events_page_details($event, $server_id=0)
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Go to data overview'),
|
'title' => __('Go to data overview'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter main_menu_icon',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -4569,7 +4569,7 @@ function events_page_details($event, $server_id=0)
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Go to data overview'),
|
'title' => __('Go to data overview'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter main_menu_icon',
|
||||||
'style' => 'opacity: .5',
|
'style' => 'opacity: .5',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -814,6 +814,10 @@ function get_data_basic_info_sql($params, $count=false)
|
|||||||
$where .= sprintf(' AND id_agente = %d', $params['id_agent']);
|
$where .= sprintf(' AND id_agente = %d', $params['id_agent']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($params['id_group'] > 0) {
|
||||||
|
$where .= sprintf(' AND id_grupo = %d', $params['id_group']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($params['search'] > 0) {
|
if ($params['search'] > 0) {
|
||||||
$where .= sprintf(
|
$where .= sprintf(
|
||||||
' AND ( alias LIKE "%%%s%%" )',
|
' AND ( alias LIKE "%%%s%%" )',
|
||||||
|
@ -57,7 +57,7 @@ function menu_print_menu(&$menu)
|
|||||||
$sec = (string) get_parameter('sec');
|
$sec = (string) get_parameter('sec');
|
||||||
$sec2 = (string) get_parameter('sec2');
|
$sec2 = (string) get_parameter('sec2');
|
||||||
if ($sec2 === 'operation/agentes/ver_agente') {
|
if ($sec2 === 'operation/agentes/ver_agente') {
|
||||||
$sec2 = 'godmode/agentes/configurar_agente';
|
$sec2 = 'operation/agentes/estado_agente';
|
||||||
} else if ($sec2 === 'godmode/alerts/configure_alert_template') {
|
} else if ($sec2 === 'godmode/alerts/configure_alert_template') {
|
||||||
$sec2 = 'godmode/alerts/alert_templates';
|
$sec2 = 'godmode/alerts/alert_templates';
|
||||||
} else if ($sec2 === 'godmode/events/events') {
|
} else if ($sec2 === 'godmode/events/events') {
|
||||||
|
@ -97,7 +97,7 @@ function snmp_browser_get_html_tree(
|
|||||||
// Id used to expand leafs.
|
// Id used to expand leafs.
|
||||||
$sub_id = time().rand(0, getrandmax());
|
$sub_id = time().rand(0, getrandmax());
|
||||||
// Display the branch.
|
// Display the branch.
|
||||||
$output .= '<li id="li_'.$sub_id.'" class="'.$class.' mrgn_0px pdd_0px">';
|
$output .= '<li id="li_'.$sub_id.'" class="'.$class.' mrgn_0px pdd_0px flex_center">';
|
||||||
|
|
||||||
// Indent sub branches.
|
// Indent sub branches.
|
||||||
for ($i = 1; $i <= $depth; $i++) {
|
for ($i = 1; $i <= $depth; $i++) {
|
||||||
|
@ -3628,6 +3628,11 @@ function ui_print_datatable(array $parameters)
|
|||||||
$parameters['csv'] = 1;
|
$parameters['csv'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dom_elements = '"plfrtiB"';
|
||||||
|
if (isset($parameters['dom_elements'])) {
|
||||||
|
$dom_elements = '"'.$parameters['dom_elements'].'"';
|
||||||
|
}
|
||||||
|
|
||||||
$filter = '';
|
$filter = '';
|
||||||
// Datatable filter.
|
// Datatable filter.
|
||||||
if (isset($parameters['form']) && is_array($parameters['form'])) {
|
if (isset($parameters['form']) && is_array($parameters['form'])) {
|
||||||
@ -3790,6 +3795,34 @@ function ui_print_datatable(array $parameters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$table .= '</tr></thead>';
|
$table .= '</tr></thead>';
|
||||||
|
|
||||||
|
if (isset($parameters['data_element']) === true) {
|
||||||
|
$table .= '<tbody>';
|
||||||
|
foreach ($parameters['data_element'] as $row) {
|
||||||
|
$table .= '<tr>';
|
||||||
|
foreach ($row as $td_data) {
|
||||||
|
$table .= '<td>'.$td_data.'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$table .= '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$table .= '</tbody>';
|
||||||
|
|
||||||
|
$js = '<script>
|
||||||
|
$.fn.dataTable.ext.classes.sPageButton = "pandora_pagination mini-pandora-pagination"
|
||||||
|
var table = $("#'.$table_id.'").DataTable({
|
||||||
|
"dom": "'.$parameters['dom_elements'].'"
|
||||||
|
});
|
||||||
|
$("div.spinner-fixed").hide();
|
||||||
|
$("table#'.$table_id.'").removeClass("invisible");
|
||||||
|
$("#'.$table_id.'_filter > label > input").addClass("mini-search-input");
|
||||||
|
if (table.page.info().pages == 1) {
|
||||||
|
$("#'.$table_id.'_paginate").hide();
|
||||||
|
}
|
||||||
|
</script>';
|
||||||
|
}
|
||||||
|
|
||||||
$table .= '</table>';
|
$table .= '</table>';
|
||||||
|
|
||||||
$pagination_class = 'pandora_pagination';
|
$pagination_class = 'pandora_pagination';
|
||||||
@ -3813,279 +3846,276 @@ function ui_print_datatable(array $parameters)
|
|||||||
$export_columns = ',columns: \'th:not(:last-child)\'';
|
$export_columns = ',columns: \'th:not(:last-child)\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($parameters['ajax_url'])) {
|
if (isset($parameters['data_element']) === false) {
|
||||||
$type_data = 'ajax: {
|
if (isset($parameters['ajax_url'])) {
|
||||||
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
|
$type_data = 'ajax: {
|
||||||
type: "POST",
|
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
|
||||||
dataSrc: function (json) {
|
type: "POST",
|
||||||
if($("#'.$form_id.'_search_bt") != undefined) {
|
dataSrc: function (json) {
|
||||||
$("#'.$form_id.'_loading").remove();
|
if($("#'.$form_id.'_search_bt") != undefined) {
|
||||||
}
|
$("#'.$form_id.'_loading").remove();
|
||||||
|
}
|
||||||
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error(json.error);
|
console.error(json.error);
|
||||||
$("#error-'.$table_id.'").html(json.error);
|
$("#error-'.$table_id.'").html(json.error);
|
||||||
$("#error-'.$table_id.'").dialog({
|
$("#error-'.$table_id.'").dialog({
|
||||||
title: "Filter failed",
|
title: "Filter failed",
|
||||||
width: 630,
|
width: 630,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
modal: false,
|
modal: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
buttons: {
|
buttons: {
|
||||||
"Ok" : function () {
|
"Ok" : function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}).parent().addClass("ui-state-error");
|
||||||
}).parent().addClass("ui-state-error");
|
} else {';
|
||||||
} else {';
|
|
||||||
|
|
||||||
if (isset($parameters['ajax_return_operation']) === true
|
if (isset($parameters['ajax_return_operation']) === true
|
||||||
&& empty($parameters['ajax_return_operation']) === false
|
&& empty($parameters['ajax_return_operation']) === false
|
||||||
&& isset($parameters['ajax_return_operation_function']) === true
|
&& isset($parameters['ajax_return_operation_function']) === true
|
||||||
&& empty($parameters['ajax_return_operation_function']) === false
|
&& empty($parameters['ajax_return_operation_function']) === false
|
||||||
) {
|
) {
|
||||||
$type_data .= '
|
$type_data .= '
|
||||||
if (json.'.$parameters['ajax_return_operation'].' !== undefined) {
|
if (json.'.$parameters['ajax_return_operation'].' !== undefined) {
|
||||||
'.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].');
|
'.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].');
|
||||||
}
|
}
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($parameters['ajax_postprocess'])) {
|
||||||
|
$type_data .= '
|
||||||
|
if (json.data) {
|
||||||
|
json.data.forEach(function(item) {
|
||||||
|
'.$parameters['ajax_postprocess'].'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
json.data = {};
|
||||||
|
}';
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($parameters['ajax_postprocess'])) {
|
|
||||||
$type_data .= '
|
$type_data .= '
|
||||||
if (json.data) {
|
return json.data;
|
||||||
json.data.forEach(function(item) {
|
}
|
||||||
'.$parameters['ajax_postprocess'].'
|
},
|
||||||
|
data: function (data) {
|
||||||
|
if($("#button-'.$form_id.'_search_bt") != undefined) {
|
||||||
|
var loading = \''.html_print_image(
|
||||||
|
'images/spinner.gif',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'id' => $form_id.'_loading',
|
||||||
|
'class' => 'loading-search-datatables-button',
|
||||||
|
]
|
||||||
|
).'\';
|
||||||
|
$("#button-'.$form_id.'_search_bt").parent().append(loading);
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs = $("#'.$form_id.' :input");
|
||||||
|
|
||||||
|
values = {};
|
||||||
|
inputs.each(function() {
|
||||||
|
values[this.name] = $(this).val();
|
||||||
|
})
|
||||||
|
|
||||||
|
$.extend(data, {
|
||||||
|
filter: values,'."\n";
|
||||||
|
|
||||||
|
if (is_array($parameters['ajax_data'])) {
|
||||||
|
foreach ($parameters['ajax_data'] as $k => $v) {
|
||||||
|
$type_data .= $k.':'.json_encode($v).",\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$type_data .= 'page: "'.$parameters['ajax_url'].'"
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
json.data = {};
|
return data;
|
||||||
}';
|
}
|
||||||
|
},';
|
||||||
|
} else {
|
||||||
|
$type_data = 'data: '.json_encode($parameters['data_element']).',';
|
||||||
}
|
}
|
||||||
|
|
||||||
$type_data .= '
|
$serverside = 'true';
|
||||||
return json.data;
|
if (isset($parameters['data_element'])) {
|
||||||
}
|
$serverside = 'false';
|
||||||
},
|
}
|
||||||
data: function (data) {
|
|
||||||
if($("#button-'.$form_id.'_search_bt") != undefined) {
|
|
||||||
var loading = \''.html_print_image(
|
|
||||||
'images/spinner.gif',
|
|
||||||
true,
|
|
||||||
[
|
|
||||||
'id' => $form_id.'_loading',
|
|
||||||
'class' => 'loading-search-datatables-button',
|
|
||||||
]
|
|
||||||
).'\';
|
|
||||||
$("#button-'.$form_id.'_search_bt").parent().append(loading);
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs = $("#'.$form_id.' :input");
|
// Javascript controller.
|
||||||
|
$js = '<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
$.fn.dataTable.ext.errMode = "none";
|
||||||
|
$.fn.dataTable.ext.classes.sPageButton = "'.$pagination_class.'";
|
||||||
|
|
||||||
values = {};
|
var settings_datatable = {
|
||||||
inputs.each(function() {
|
drawCallback: function(settings) {';
|
||||||
values[this.name] = $(this).val();
|
|
||||||
})
|
|
||||||
|
|
||||||
$.extend(data, {
|
if (!isset($parameters['data_element'])) {
|
||||||
filter: values,'."\n";
|
$js .= 'if (dt_'.$table_id.'.page.info().pages > 1) {
|
||||||
|
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").show()
|
||||||
|
} else {
|
||||||
|
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").hide()
|
||||||
|
}';
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($parameters['ajax_data'])) {
|
$js .= 'if ($("#'.$table_id.' tr td").length == 1) {
|
||||||
foreach ($parameters['ajax_data'] as $k => $v) {
|
$(".datatable-msg-info-'.$table_id.'").show();
|
||||||
$type_data .= $k.':'.json_encode($v).",\n";
|
$(".datatable-msg-info-'.$table_id.'").removeClass(\'invisible_important\');
|
||||||
|
$("table#'.$table_id.'").hide();
|
||||||
|
$("div.dataTables_paginate").hide();
|
||||||
|
$("div.dataTables_info").hide();
|
||||||
|
$("div.dataTables_length").hide();
|
||||||
|
$("div.dt-buttons").hide();
|
||||||
|
|
||||||
|
if (dt_'.$table_id.'.page.info().pages > 1) {
|
||||||
|
$(".dataTables_paginate.paging_simple_numbers").show()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$(".datatable-msg-info-'.$table_id.'").hide();
|
||||||
|
$("table#'.$table_id.'").show();
|
||||||
|
$("div.dataTables_paginate").show();
|
||||||
|
$("div.dataTables_info").show();
|
||||||
|
$("div.dataTables_length").show();
|
||||||
|
$("div.dt-buttons").show();
|
||||||
|
|
||||||
|
if (dt_'.$table_id.'.page.info().pages == 1) {
|
||||||
|
$(".dataTables_paginate.paging_simple_numbers").hide()
|
||||||
|
}
|
||||||
|
}';
|
||||||
|
|
||||||
|
if (isset($parameters['drawCallback'])) {
|
||||||
|
$js .= $parameters['drawCallback'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$searching = 'false';
|
||||||
|
if (isset($parameters['searching']) && $parameters['searching'] === true) {
|
||||||
|
$searching = 'true';
|
||||||
|
}
|
||||||
|
|
||||||
|
$ordering = 'true';
|
||||||
|
if (isset($parameters['ordering']) && $parameters['ordering'] === false) {
|
||||||
|
$ordering = 'false';
|
||||||
|
}
|
||||||
|
|
||||||
|
$js .= '},';
|
||||||
|
|
||||||
|
$languaje = substr(get_user_language(), 0, 2);
|
||||||
|
|
||||||
|
$js .= '
|
||||||
|
processing: true,
|
||||||
|
serverSide: '.$serverside.',
|
||||||
|
paging: '.$parameters['paging'].',
|
||||||
|
pageLength: '.$parameters['default_pagination'].',
|
||||||
|
searching: '.$searching.',
|
||||||
|
responsive: true,
|
||||||
|
dom: '.$dom_elements.',
|
||||||
|
language: {
|
||||||
|
url: "/pandora_console/include/javascript/i18n/dataTables.'.$languaje.'.json",
|
||||||
|
processing:"'.$processing.'",
|
||||||
|
zeroRecords:"'.$zeroRecords.'",
|
||||||
|
emptyTable:"'.$emptyTable.'",
|
||||||
|
},
|
||||||
|
buttons: '.$parameters['csv'].'== 1 ? [
|
||||||
|
{
|
||||||
|
extend: "csv",
|
||||||
|
text : "'.__('Export current page to CSV').'",
|
||||||
|
titleAttr: "'.__('Export current page to CSV').'",
|
||||||
|
title: "export_'.$parameters['id'].'_current_page_'.date('Y-m-d').'",
|
||||||
|
fieldSeparator: "'.$config['csv_divider'].'",
|
||||||
|
action: function ( e, dt, node, config ) {
|
||||||
|
blockResubmit(node);
|
||||||
|
// Call the default csvHtml5 action method to create the CSV file
|
||||||
|
$.fn.dataTable.ext.buttons.csvHtml5.action.call(this, e, dt, node, config);
|
||||||
|
},
|
||||||
|
exportOptions : {
|
||||||
|
modifier : {
|
||||||
|
// DataTables core
|
||||||
|
order : "current",
|
||||||
|
page : "All",
|
||||||
|
search : "applied"
|
||||||
|
}'.$export_columns.'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
] : [],
|
||||||
|
lengthMenu: '.json_encode($pagination_options).',
|
||||||
|
columnDefs: [
|
||||||
|
{ className: "no-class", targets: "_all" },
|
||||||
|
{ bSortable: false, targets: '.$no_sortable_columns.' }
|
||||||
|
],
|
||||||
|
ordering: '.$ordering.',
|
||||||
|
initComplete: function(settings, json) {
|
||||||
|
// Move elements to table_action_buttons bar.
|
||||||
|
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
||||||
|
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
||||||
|
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
||||||
|
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
||||||
|
|
||||||
|
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers"));
|
||||||
|
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_length"));
|
||||||
|
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dt-buttons"));
|
||||||
|
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_filter"));
|
||||||
|
$("div.spinner-fixed").hide();
|
||||||
|
},
|
||||||
|
columns: [';
|
||||||
|
|
||||||
|
foreach ($parameters['datacolumns'] as $data) {
|
||||||
|
if (is_array($data)) {
|
||||||
|
$js .= '{data : "'.$data['text'].'",className: "'.$data['class'].'"},';
|
||||||
|
} else {
|
||||||
|
$js .= '{data : "'.$data.'",className: "no-class"},';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$type_data .= 'page: "'.$parameters['ajax_url'].'"
|
$js .= '
|
||||||
});
|
],
|
||||||
|
order: [[ '.$order.' ]],';
|
||||||
|
$js .= $type_data;
|
||||||
|
$js .= '
|
||||||
|
};
|
||||||
|
|
||||||
return data;
|
dt_'.$table_id.' = $("#'.$table_id.'").DataTable(settings_datatable);
|
||||||
}
|
|
||||||
},';
|
|
||||||
} else {
|
|
||||||
$type_data = 'data: '.json_encode($parameters['data_element']).',';
|
|
||||||
}
|
|
||||||
|
|
||||||
$serverside = 'true';
|
$("#button-'.$form_id.'_search_bt").click(function (){
|
||||||
if (isset($parameters['data_element'])) {
|
dt_'.$table_id.'.draw().page(0)
|
||||||
$serverside = 'false';
|
});
|
||||||
}
|
';
|
||||||
|
|
||||||
// Javascript controller.
|
if (isset($parameters['caption']) === true
|
||||||
$js = '<script type="text/javascript">
|
&& empty($parameters['caption']) === false
|
||||||
$(document).ready(function(){
|
) {
|
||||||
$.fn.dataTable.ext.errMode = "none";
|
$js .= '$("#'.$table_id.'").append("<caption>'.$parameters['caption'].'</caption>");';
|
||||||
$.fn.dataTable.ext.classes.sPageButton = "'.$pagination_class.'";
|
$js .= '$(".datatables_thead_tr").css("height", 0);';
|
||||||
|
}
|
||||||
|
|
||||||
var settings_datatable = {
|
if (isset($parameters['csv']) === true) {
|
||||||
drawCallback: function(settings) {';
|
$js."'$('#".$table_id."').on( 'buttons-processing', function ( e, indicator ) {
|
||||||
|
if ( indicator ) {
|
||||||
|
console.log('a');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('b');
|
||||||
|
}";
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($parameters['data_element'])) {
|
$js .= '$("table#'.$table_id.'").removeClass("invisible");
|
||||||
$js .= 'if (dt_'.$table_id.'.page.info().pages > 1) {
|
});';
|
||||||
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").show()
|
$js .= '
|
||||||
} else {
|
$(function() {
|
||||||
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").hide()
|
$(document).on("preInit.dt", function (ev, settings) {
|
||||||
}';
|
|
||||||
}
|
|
||||||
|
|
||||||
$js .= 'if ($("#'.$table_id.' tr td").length == 1) {
|
|
||||||
$(".datatable-msg-info-'.$table_id.'").show();
|
|
||||||
$(".datatable-msg-info-'.$table_id.'").removeClass(\'invisible_important\');
|
|
||||||
$("table#'.$table_id.'").hide();
|
|
||||||
$("div.dataTables_paginate").hide();
|
|
||||||
$("div.dataTables_info").hide();
|
|
||||||
$("div.dataTables_length").hide();
|
$("div.dataTables_length").hide();
|
||||||
$("div.dt-buttons").hide();
|
$("div.dt-buttons").hide();
|
||||||
|
});
|
||||||
if (dt_'.$table_id.'.page.info().pages > 1) {
|
|
||||||
$(".dataTables_paginate.paging_simple_numbers").show()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$(".datatable-msg-info-'.$table_id.'").hide();
|
|
||||||
$("table#'.$table_id.'").show();
|
|
||||||
$("div.dataTables_paginate").show();
|
|
||||||
$("div.dataTables_info").show();
|
|
||||||
$("div.dataTables_length").show();
|
|
||||||
$("div.dt-buttons").show();
|
|
||||||
|
|
||||||
if (dt_'.$table_id.'.page.info().pages == 1) {
|
|
||||||
$(".dataTables_paginate.paging_simple_numbers").hide()
|
|
||||||
}
|
|
||||||
}';
|
|
||||||
|
|
||||||
if (isset($parameters['drawCallback'])) {
|
|
||||||
$js .= $parameters['drawCallback'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$dom_elements = '"plfrtiB"';
|
|
||||||
if (isset($parameters['dom_elements'])) {
|
|
||||||
$dom_elements = '"'.$parameters['dom_elements'].'"';
|
|
||||||
}
|
|
||||||
|
|
||||||
$searching = 'false';
|
|
||||||
if (isset($parameters['searching']) && $parameters['searching'] === true) {
|
|
||||||
$searching = 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
$ordering = 'true';
|
|
||||||
if (isset($parameters['ordering']) && $parameters['ordering'] === false) {
|
|
||||||
$ordering = 'false';
|
|
||||||
}
|
|
||||||
|
|
||||||
$js .= '},';
|
|
||||||
|
|
||||||
$languaje = substr(get_user_language(), 0, 2);
|
|
||||||
|
|
||||||
$js .= '
|
|
||||||
processing: true,
|
|
||||||
serverSide: '.$serverside.',
|
|
||||||
paging: '.$parameters['paging'].',
|
|
||||||
pageLength: '.$parameters['default_pagination'].',
|
|
||||||
searching: '.$searching.',
|
|
||||||
responsive: true,
|
|
||||||
dom: '.$dom_elements.',
|
|
||||||
language: {
|
|
||||||
url: "/pandora_console/include/javascript/i18n/dataTables.'.$languaje.'.json",
|
|
||||||
processing:"'.$processing.'",
|
|
||||||
zeroRecords:"'.$zeroRecords.'",
|
|
||||||
emptyTable:"'.$emptyTable.'",
|
|
||||||
},
|
|
||||||
buttons: '.$parameters['csv'].'== 1 ? [
|
|
||||||
{
|
|
||||||
extend: "csv",
|
|
||||||
text : "'.__('Export current page to CSV').'",
|
|
||||||
titleAttr: "'.__('Export current page to CSV').'",
|
|
||||||
title: "export_'.$parameters['id'].'_current_page_'.date('Y-m-d').'",
|
|
||||||
fieldSeparator: "'.$config['csv_divider'].'",
|
|
||||||
action: function ( e, dt, node, config ) {
|
|
||||||
blockResubmit(node);
|
|
||||||
// Call the default csvHtml5 action method to create the CSV file
|
|
||||||
$.fn.dataTable.ext.buttons.csvHtml5.action.call(this, e, dt, node, config);
|
|
||||||
},
|
|
||||||
exportOptions : {
|
|
||||||
modifier : {
|
|
||||||
// DataTables core
|
|
||||||
order : "current",
|
|
||||||
page : "All",
|
|
||||||
search : "applied"
|
|
||||||
}'.$export_columns.'
|
|
||||||
},
|
|
||||||
}
|
|
||||||
] : [],
|
|
||||||
lengthMenu: '.json_encode($pagination_options).',
|
|
||||||
columnDefs: [
|
|
||||||
{ className: "no-class", targets: "_all" },
|
|
||||||
{ bSortable: false, targets: '.$no_sortable_columns.' }
|
|
||||||
],
|
|
||||||
ordering: '.$ordering.',
|
|
||||||
initComplete: function(settings, json) {
|
|
||||||
// Move elements to table_action_buttons bar.
|
|
||||||
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
|
||||||
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
|
||||||
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
|
||||||
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
|
|
||||||
|
|
||||||
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers"));
|
|
||||||
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_length"));
|
|
||||||
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dt-buttons"));
|
|
||||||
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_filter"));
|
|
||||||
$("div.spinner-fixed").hide();
|
|
||||||
},
|
|
||||||
columns: [';
|
|
||||||
|
|
||||||
foreach ($parameters['datacolumns'] as $data) {
|
|
||||||
if (is_array($data)) {
|
|
||||||
$js .= '{data : "'.$data['text'].'",className: "'.$data['class'].'"},';
|
|
||||||
} else {
|
|
||||||
$js .= '{data : "'.$data.'",className: "no-class"},';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$js .= '
|
|
||||||
],
|
|
||||||
order: [[ '.$order.' ]],';
|
|
||||||
$js .= $type_data;
|
|
||||||
$js .= '
|
|
||||||
};
|
|
||||||
|
|
||||||
dt_'.$table_id.' = $("#'.$table_id.'").DataTable(settings_datatable);
|
|
||||||
|
|
||||||
$("#button-'.$form_id.'_search_bt").click(function (){
|
|
||||||
dt_'.$table_id.'.draw().page(0)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
';
|
';
|
||||||
|
|
||||||
if (isset($parameters['caption']) === true
|
$js .= '</script>';
|
||||||
&& empty($parameters['caption']) === false
|
|
||||||
) {
|
|
||||||
$js .= '$("#'.$table_id.'").append("<caption>'.$parameters['caption'].'</caption>");';
|
|
||||||
$js .= '$(".datatables_thead_tr").css("height", 0);';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($parameters['csv']) === true) {
|
|
||||||
$js."'$('#".$table_id."').on( 'buttons-processing', function ( e, indicator ) {
|
|
||||||
if ( indicator ) {
|
|
||||||
console.log('a');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log('b');
|
|
||||||
}";
|
|
||||||
}
|
|
||||||
|
|
||||||
$js .= '$("table#'.$table_id.'").removeClass("invisible");
|
|
||||||
});';
|
|
||||||
$js .= '
|
|
||||||
$(function() {
|
|
||||||
$(document).on("preInit.dt", function (ev, settings) {
|
|
||||||
$("div.dataTables_length").hide();
|
|
||||||
$("div.dt-buttons").hide();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
';
|
|
||||||
|
|
||||||
$js .= '</script>';
|
|
||||||
|
|
||||||
// Order.
|
// Order.
|
||||||
$info_msg_arr = [];
|
$info_msg_arr = [];
|
||||||
$info_msg_arr['message'] = $emptyTable;
|
$info_msg_arr['message'] = $emptyTable;
|
||||||
|
@ -287,7 +287,7 @@ class Manager implements PublicLogin
|
|||||||
|
|
||||||
$this->dashboardId = (int) \get_parameter('dashboardId', 0);
|
$this->dashboardId = (int) \get_parameter('dashboardId', 0);
|
||||||
if ($this->slides === 1) {
|
if ($this->slides === 1) {
|
||||||
$this->slidesIds = (array) \get_parameter('slidesIds');
|
$this->slidesIds = (array) \get_parameter('slidesIds', [get_user_dashboards($config['id_user'])[0]['id']]);
|
||||||
$this->cellModeSlides = (int) \get_parameter(
|
$this->cellModeSlides = (int) \get_parameter(
|
||||||
'cellModeSlides',
|
'cellModeSlides',
|
||||||
0
|
0
|
||||||
|
@ -453,6 +453,7 @@ class ModulesByStatus extends Widget
|
|||||||
1000,
|
1000,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'dom_elements' => 'frtilp',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#menu_tab {
|
#menu_tab {
|
||||||
margin: 0px;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu_tab li.nomn.tab_operation img,
|
#menu_tab li.nomn.tab_operation img,
|
||||||
@ -426,12 +426,21 @@ li#search_input_widget {
|
|||||||
top: 2px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#dashboard-controls {
|
.select2-search--dropdown .select2-search__field {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#dashboard-controls-slides {
|
||||||
|
width: 720px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#dashboard-controls,
|
||||||
|
div#dashboard-controls-slides {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
width: 800px;
|
width: 450px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -443,27 +452,32 @@ div#dashboard-controls {
|
|||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#dashboard-controls div {
|
div#dashboard-controls div,
|
||||||
flex: 0.5;
|
div#dashboard-controls-slides div {
|
||||||
|
margin-left: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#dashboard-controls div#dashboard-slides-form-countdown {
|
div#dashboard-controls div#dashboard-slides-form-countdown,
|
||||||
|
div#dashboard-controls-slides div#dashboard-slides-form-countdown {
|
||||||
flex: 7;
|
flex: 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#dashboard-controls div#dashboard-slides-name {
|
div#dashboard-controls div#dashboard-slides-name,
|
||||||
|
div#dashboard-controls-slides div#dashboard-slides-name {
|
||||||
flex: 3;
|
flex: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#dashboard-controls div.dashboard-mode {
|
div#dashboard-controls div.dashboard-mode,
|
||||||
|
div#dashboard-controls-slides div.dashboard-mode {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#dashboard-controls div.dashboard-mode a {
|
div#dashboard-controls div.dashboard-mode a,
|
||||||
|
div#dashboard-controls-slides div.dashboard-mode a {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -805,6 +805,11 @@ select:-internal-list-box {
|
|||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_height85 {
|
||||||
|
height: 85px !important;
|
||||||
|
max-height: 85px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.no-text-imp {
|
.no-text-imp {
|
||||||
font-size: 0 !important;
|
font-size: 0 !important;
|
||||||
}
|
}
|
||||||
@ -7002,6 +7007,10 @@ div.graph div.legend table {
|
|||||||
margin-top: -2px !important;
|
margin-top: -2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mrgn_top-8px {
|
||||||
|
margin-top: -8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.mrgn_top-10px {
|
.mrgn_top-10px {
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
}
|
}
|
||||||
@ -10120,10 +10129,6 @@ select:focus {
|
|||||||
border-color: #8a96a6;
|
border-color: #8a96a6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_length > label > select {
|
|
||||||
min-height: 42px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataTables_length > label {
|
.dataTables_length > label {
|
||||||
font-size: 0px;
|
font-size: 0px;
|
||||||
}
|
}
|
||||||
@ -11859,3 +11864,7 @@ li.input-interval .extra-container-input .select2 {
|
|||||||
.scale-0-8 {
|
.scale-0-8 {
|
||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label:has(span.label-alert-agent) {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
@ -1600,3 +1600,7 @@ a.pandora_pagination,
|
|||||||
.info_table > tbody > tr > td {
|
.info_table > tbody > tr > td {
|
||||||
border-bottom: 1px solid #3f3f3f;
|
border-bottom: 1px solid #3f3f3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font-title-font {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
@ -313,7 +313,7 @@ table.dataTable.info_table.no-footer {
|
|||||||
|
|
||||||
a.pandora_pagination {
|
a.pandora_pagination {
|
||||||
background-color: #f6f7fb;
|
background-color: #f6f7fb;
|
||||||
padding: 11px;
|
padding: 9px;
|
||||||
color: #000;
|
color: #000;
|
||||||
border: 1px solid #cacaca;
|
border: 1px solid #cacaca;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
@ -362,7 +362,7 @@ a.pandora_pagination.current:hover {
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
height: 42px;
|
height: 38px;
|
||||||
/* height: 32px; */
|
/* height: 32px; */
|
||||||
width: 80px;
|
width: 80px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
@ -816,14 +816,6 @@ div[id^="auto-os-"] > img {
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_paginate {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataTables_paginate.paging_simple_numbers {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w22px {
|
.w22px {
|
||||||
width: 22px;
|
width: 22px;
|
||||||
}
|
}
|
||||||
@ -842,3 +834,13 @@ td.FF-thresholds-pdd {
|
|||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
padding-left: 13px !important;
|
padding-left: 13px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.grid-stack-item-content a.pandora_pagination,
|
||||||
|
a.mini-pandora-pagination {
|
||||||
|
padding: 7px;
|
||||||
|
font-size: 9pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.mini-search-input {
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
@ -109,44 +109,93 @@ $utimestampSelectValues = array_reduce(
|
|||||||
// Inventory module select.
|
// Inventory module select.
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = 'databox filters';
|
|
||||||
$table->size = [];
|
$table->size = [];
|
||||||
$table->data = [];
|
$table->size[0] = '33%';
|
||||||
|
$table->size[1] = '33%';
|
||||||
|
$table->size[2] = '33%';
|
||||||
|
$table->class = 'filter-table-adv';
|
||||||
|
|
||||||
$table->data[0][0] = __('Module');
|
$table->data[0][0] = html_print_label_input_block(
|
||||||
$table->data[0][1] = html_print_select_from_sql(
|
__('Module'),
|
||||||
$sqlModuleInventoryAgentView,
|
html_print_select_from_sql(
|
||||||
'module_inventory_agent_view',
|
$sqlModuleInventoryAgentView,
|
||||||
$module,
|
'module_inventory_agent_view',
|
||||||
'javascript:this.form.submit();',
|
$module,
|
||||||
__('All'),
|
'javascript:this.form.submit();',
|
||||||
0,
|
__('All'),
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'width:100%;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[0][1] = html_print_label_input_block(
|
||||||
|
__('Date'),
|
||||||
|
html_print_select(
|
||||||
|
$utimestampSelectValues,
|
||||||
|
'utimestamp',
|
||||||
|
$utimestamp,
|
||||||
|
'javascript:this.form.submit();',
|
||||||
|
__('Now'),
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width:100%;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[0][2] = html_print_label_input_block(
|
||||||
|
__('Search'),
|
||||||
|
html_print_input_text(
|
||||||
|
'search_string',
|
||||||
|
$search_string,
|
||||||
|
'',
|
||||||
|
25,
|
||||||
|
0,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$buttons = html_print_submit_button(
|
||||||
|
__('Filter'),
|
||||||
|
'search_button',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'search',
|
||||||
|
'mode' => 'mini',
|
||||||
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[0][2] = __('Date');
|
$searchForm = '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'">';
|
||||||
$table->data[0][3] = html_print_select(
|
$searchForm .= html_print_table($table, true);
|
||||||
$utimestampSelectValues,
|
$searchForm .= html_print_div(
|
||||||
'utimestamp',
|
[
|
||||||
$utimestamp,
|
'class' => 'action-buttons',
|
||||||
'javascript:this.form.submit();',
|
'content' => $buttons,
|
||||||
__('Now'),
|
],
|
||||||
0,
|
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$searchForm .= '</form>';
|
||||||
|
|
||||||
$table->data[0][4] = __('Search');
|
ui_toggle(
|
||||||
$table->data[0][5] = html_print_input_text('search_string', $search_string, '', 25, 0, true);
|
$searchForm,
|
||||||
$table->data[0][6] = html_print_submit_button(__('Search'), 'search_button', false, 'class="sub wand"', true);
|
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||||
|
'filter_form',
|
||||||
// Show filters table.
|
'',
|
||||||
echo sprintf(
|
true,
|
||||||
'<form method="post" action="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente=%s">%s</form>',
|
false,
|
||||||
$id_agente,
|
'',
|
||||||
html_print_table($table, true)
|
'white-box-content',
|
||||||
|
'box-flat white_table_graph fixed_filter_bar'
|
||||||
);
|
);
|
||||||
|
|
||||||
unset($table);
|
|
||||||
|
|
||||||
$idModuleInventory = null;
|
$idModuleInventory = null;
|
||||||
$rowTable = 1;
|
$rowTable = 1;
|
||||||
@ -181,7 +230,7 @@ foreach ($rows as $row) {
|
|||||||
$table->align = [];
|
$table->align = [];
|
||||||
$table->cellpadding = 4;
|
$table->cellpadding = 4;
|
||||||
$table->cellspacing = 4;
|
$table->cellspacing = 4;
|
||||||
$table->class = 'databox filters';
|
$table->class = 'info_table';
|
||||||
$table->head = [];
|
$table->head = [];
|
||||||
$table->head[0] = $row['name'].' - ('.date($config['date_format'], $row['utimestamp']).')';
|
$table->head[0] = $row['name'].' - ('.date($config['date_format'], $row['utimestamp']).')';
|
||||||
|
|
||||||
@ -210,7 +259,7 @@ foreach ($rows as $row) {
|
|||||||
|
|
||||||
foreach ($subHeadTitles as $titleData) {
|
foreach ($subHeadTitles as $titleData) {
|
||||||
$table->data[0][$iterator] = $titleData;
|
$table->data[0][$iterator] = $titleData;
|
||||||
$table->cellstyle[0][$iterator] = 'background: #373737; color: #FFF;';
|
$table->cellstyle[0][$iterator] = 'background: var(--primary-color); color: #FFF;';
|
||||||
|
|
||||||
$iterator++;
|
$iterator++;
|
||||||
}
|
}
|
||||||
|
@ -434,35 +434,39 @@ if ($agent_view_page === true) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true)) {
|
if (is_metaconsole() === false) {
|
||||||
if ($agent_view_page === true) {
|
if (((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true)) {
|
||||||
html_print_div(
|
if ($agent_view_page === true) {
|
||||||
[
|
html_print_div(
|
||||||
'class' => 'action-buttons pdd_b_10px pdd_r_5px w100p',
|
[
|
||||||
'content' => html_print_submit_button(
|
'class' => 'action-buttons pdd_b_10px pdd_r_5px w100p',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('Validate'),
|
||||||
|
'alert_validate',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'wand',
|
||||||
|
'mode' => 'secondary mini',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
html_print_action_buttons(
|
||||||
|
html_print_submit_button(
|
||||||
__('Validate'),
|
__('Validate'),
|
||||||
'alert_validate',
|
'alert_validate',
|
||||||
false,
|
false,
|
||||||
[
|
[ 'icon' => 'wand' ],
|
||||||
'icon' => 'wand',
|
|
||||||
'mode' => 'secondary mini',
|
|
||||||
],
|
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
]
|
['type' => 'form_action']
|
||||||
);
|
);
|
||||||
} else {
|
}
|
||||||
html_print_action_buttons(
|
|
||||||
html_print_submit_button(
|
|
||||||
__('Validate'),
|
|
||||||
'alert_validate',
|
|
||||||
false,
|
|
||||||
[ 'icon' => 'wand' ],
|
|
||||||
true
|
|
||||||
),
|
|
||||||
['type' => 'form_action']
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
html_print_action_buttons('');
|
||||||
}
|
}
|
||||||
|
|
||||||
$html_content = ob_get_clean();
|
$html_content = ob_get_clean();
|
||||||
|
@ -1301,7 +1301,7 @@ if (empty($tableAgents->data) === false) {
|
|||||||
true,
|
true,
|
||||||
'offset',
|
'offset',
|
||||||
false,
|
false,
|
||||||
'dataTables_paginate paging_simple_numbers'
|
'paging_simple_numbers'
|
||||||
);
|
);
|
||||||
|
|
||||||
unset($table);
|
unset($table);
|
||||||
|
@ -907,6 +907,9 @@ $tableFilter->data['second_line'][1] = html_print_label_input_block(
|
|||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
[],
|
[],
|
||||||
|
true,
|
||||||
|
0,
|
||||||
|
'30',
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -149,13 +149,13 @@ if ($is_ajax === false && $pure === false) {
|
|||||||
|
|
||||||
if ($is_ajax === false && $pure === true) {
|
if ($is_ajax === false && $pure === true) {
|
||||||
// Floating menu - Start.
|
// Floating menu - Start.
|
||||||
echo '<div id="heatmap-controls" class="zindex999">';
|
echo '<div id="heatmap-controls" class="zindex999" style="max-height: 85px">';
|
||||||
|
|
||||||
echo '<div id="menu_tab" method="post">';
|
echo '<div id="menu_tab" method="post">';
|
||||||
echo '<ul class="mn white-box-content box-shadow flex-row">';
|
echo '<ul class="mn white-box-content box-shadow flex-row">';
|
||||||
|
|
||||||
// Name.
|
// Name.
|
||||||
echo '<li class="nomn">';
|
echo '<li class="nomn mx_height85">';
|
||||||
|
|
||||||
html_print_div(
|
html_print_div(
|
||||||
[
|
[
|
||||||
@ -167,7 +167,7 @@ if ($is_ajax === false && $pure === true) {
|
|||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// Countdown.
|
// Countdown.
|
||||||
echo '<li class="nomn">';
|
echo '<li class="nomn mx_height85">';
|
||||||
echo '<div class="heatmap-refr">';
|
echo '<div class="heatmap-refr">';
|
||||||
|
|
||||||
echo '<div id="heatmap-refr-form">';
|
echo '<div id="heatmap-refr-form">';
|
||||||
@ -282,7 +282,7 @@ if ($is_ajax === true) {
|
|||||||
draggable: false,
|
draggable: false,
|
||||||
modal: true,
|
modal: true,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
height: 410,
|
height: 500,
|
||||||
width: 330,
|
width: 330,
|
||||||
title: '<?php echo __('Config'); ?>',
|
title: '<?php echo __('Config'); ?>',
|
||||||
position: {
|
position: {
|
||||||
|
@ -119,6 +119,7 @@ if (is_ajax() === true) {
|
|||||||
$length = (int) get_parameter('length', $config['block_size']);
|
$length = (int) get_parameter('length', $config['block_size']);
|
||||||
$order = get_datatable_order();
|
$order = get_datatable_order();
|
||||||
$id_agent = (int) get_parameter('id_agent', 0);
|
$id_agent = (int) get_parameter('id_agent', 0);
|
||||||
|
$id_group = (int) get_parameter('id_group', 0);
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
'search' => $filter['value'],
|
'search' => $filter['value'],
|
||||||
@ -126,6 +127,7 @@ if (is_ajax() === true) {
|
|||||||
'length' => $length,
|
'length' => $length,
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'id_agent' => $id_agent,
|
'id_agent' => $id_agent,
|
||||||
|
'id_group' => $id_group,
|
||||||
];
|
];
|
||||||
|
|
||||||
$data = get_data_basic_info_sql($params);
|
$data = get_data_basic_info_sql($params);
|
||||||
@ -753,295 +755,8 @@ if (is_metaconsole() === true) {
|
|||||||
$filteringFunction = '';
|
$filteringFunction = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_metaconsole === false) {
|
if ($inventory_module !== 'basic') {
|
||||||
// Single agent selected.
|
if (is_metaconsole() === true) {
|
||||||
if ($inventory_id_agent > 0 && isset($agents[$inventory_id_agent]) === true) {
|
|
||||||
$agents = [$inventory_id_agent => $agents[$inventory_id_agent]];
|
|
||||||
}
|
|
||||||
|
|
||||||
$agents_ids = array_keys($agents);
|
|
||||||
if (count($agents_ids) > 0) {
|
|
||||||
$rows = inventory_get_datatable(
|
|
||||||
$agents_ids,
|
|
||||||
$inventory_module,
|
|
||||||
$utimestamp,
|
|
||||||
$inventory_search_string,
|
|
||||||
$export,
|
|
||||||
false,
|
|
||||||
$order_by_agent
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($agents_ids) === 0 || (int) $rows === ERR_NODATA) {
|
|
||||||
ui_print_info_message(['no_close' => true, 'message' => __('No data found.') ]);
|
|
||||||
echo ' </td></tr><tr><td>';
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<div id='loading_url' style='display: none; width: ".$table->width."; text-align: right;'>".html_print_image('images/spinner.gif', true).'</div>';
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function get_csv_url(module, id_group, search_string, utimestamp, agent, order_by_agent) {
|
|
||||||
$("#url_csv").hide();
|
|
||||||
$("#loading_url").show();
|
|
||||||
$.ajax ({
|
|
||||||
method:'GET',
|
|
||||||
url:'ajax.php',
|
|
||||||
datatype:'html',
|
|
||||||
data:{
|
|
||||||
"page" : "operation/inventory/inventory",
|
|
||||||
"get_csv_url" : 1,
|
|
||||||
"module" : module,
|
|
||||||
"id_group" : id_group,
|
|
||||||
"search_string" : search_string,
|
|
||||||
"utimestamp" : utimestamp,
|
|
||||||
"agent" : agent,
|
|
||||||
"export": true,
|
|
||||||
"order_by_agent": order_by_agent
|
|
||||||
},
|
|
||||||
success: function (data, status) {
|
|
||||||
$("#url_csv").html(data);
|
|
||||||
$("#loading_url").hide();
|
|
||||||
$("#url_csv").show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
if ($inventory_module !== 'basic') {
|
|
||||||
if ($order_by_agent === true) {
|
|
||||||
foreach ($rows as $agent_rows) {
|
|
||||||
$data = [];
|
|
||||||
$modules = '';
|
|
||||||
foreach ($agent_rows['row'] as $key_row => $row) {
|
|
||||||
$columns = explode(';', io_safe_output($row['data_format']));
|
|
||||||
array_push($columns, 'Timestamp');
|
|
||||||
|
|
||||||
$data_rows = explode(PHP_EOL, $row['data']);
|
|
||||||
foreach ($data_rows as $data_row) {
|
|
||||||
// Exclude results don't match filter.
|
|
||||||
if ($inventory_search_string && preg_match('/'.io_safe_output($inventory_search_string).'/', ($data_row)) == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$column_data = explode(';', io_safe_output($data_row));
|
|
||||||
|
|
||||||
if ($column_data[0] !== '') {
|
|
||||||
$row_tmp = [];
|
|
||||||
foreach ($column_data as $key => $value) {
|
|
||||||
$row_tmp[$columns[$key]] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$row_tmp['Timestamp'] = $row['timestamp'];
|
|
||||||
array_push($data, (object) $row_tmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$id_table = 'id_'.$key_row.'_'.$row['id_module_inventory'].'_'.$row['id_agente'];
|
|
||||||
|
|
||||||
$table = ui_print_datatable(
|
|
||||||
[
|
|
||||||
'id' => $id_table,
|
|
||||||
'class' => 'info_table w100p',
|
|
||||||
'style' => 'width: 99%',
|
|
||||||
'columns' => $columns,
|
|
||||||
'column_names' => $columns,
|
|
||||||
'no_sortable_columns' => [],
|
|
||||||
'data_element' => $data,
|
|
||||||
'searching' => true,
|
|
||||||
'dom_elements' => 'ftip',
|
|
||||||
'order' => [
|
|
||||||
'field' => $columns[0],
|
|
||||||
'direction' => 'asc',
|
|
||||||
],
|
|
||||||
'zeroRecords' => __('No inventory found'),
|
|
||||||
'emptyTable' => __('No inventory found'),
|
|
||||||
'return' => true,
|
|
||||||
'default_pagination' => 10,
|
|
||||||
'no_sortable_columns' => [-1],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$modules .= ui_toggle(
|
|
||||||
$table,
|
|
||||||
'<span class="title-blue">'.$row['name'].'</span>',
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true,
|
|
||||||
true,
|
|
||||||
'',
|
|
||||||
'white-box-content w100p',
|
|
||||||
'box-shadow white_table_graph w100p',
|
|
||||||
'images/arrow_down_green.png',
|
|
||||||
'images/arrow_right_green.png',
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
false,
|
|
||||||
$id_table
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_toggle(
|
|
||||||
$modules,
|
|
||||||
$agent_rows['agent'],
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$count_rows = count($rows);
|
|
||||||
foreach ($rows as $module_rows) {
|
|
||||||
$agent = '';
|
|
||||||
$data = [];
|
|
||||||
|
|
||||||
foreach ($module_rows as $row) {
|
|
||||||
$columns = explode(';', io_safe_output($row['data_format']));
|
|
||||||
array_push($columns, 'Timestamp');
|
|
||||||
array_push($columns, 'Agent');
|
|
||||||
|
|
||||||
// Exclude results don't match filter.
|
|
||||||
if ($inventory_search_string && preg_match('/'.io_safe_output($inventory_search_string).'/', ($row['data'])) == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data_tmp = [];
|
|
||||||
if ($row['data'] !== '') {
|
|
||||||
$values_explode = explode(';', io_safe_output($row['data']));
|
|
||||||
|
|
||||||
foreach ($values_explode as $key => $value) {
|
|
||||||
$data_tmp[$columns[$key]] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data_tmp['Timestamp'] = $row['timestamp'];
|
|
||||||
$data_tmp['Agent'] = $row['name_agent'];
|
|
||||||
array_push($data, $data_tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$id_table = 'id_'.$row['id_module_inventory'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table = ui_print_datatable(
|
|
||||||
[
|
|
||||||
'id' => $id_table,
|
|
||||||
'class' => 'info_table w100p',
|
|
||||||
'style' => 'width: 99%',
|
|
||||||
'columns' => $columns,
|
|
||||||
'column_names' => $columns,
|
|
||||||
'no_sortable_columns' => [],
|
|
||||||
'data_element' => $data,
|
|
||||||
'searching' => true,
|
|
||||||
'dom_elements' => 'ftip',
|
|
||||||
'order' => [
|
|
||||||
'field' => $columns[0],
|
|
||||||
'direction' => 'asc',
|
|
||||||
],
|
|
||||||
'zeroRecords' => __('No inventory found'),
|
|
||||||
'emptyTable' => __('No inventory found'),
|
|
||||||
'return' => true,
|
|
||||||
'no_sortable_columns' => [],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($count_rows > 1) {
|
|
||||||
ui_toggle(
|
|
||||||
$table,
|
|
||||||
array_shift($module_rows)['name'],
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
echo $table;
|
|
||||||
|
|
||||||
html_print_action_buttons(
|
|
||||||
'',
|
|
||||||
['type' => 'form_action']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$id_agente = $inventory_id_agent;
|
|
||||||
$agentes = [];
|
|
||||||
$data = [];
|
|
||||||
$class = 'info_table';
|
|
||||||
$style = 'width: 99%';
|
|
||||||
$ordering = true;
|
|
||||||
$searching = false;
|
|
||||||
|
|
||||||
$columns = [
|
|
||||||
'alias',
|
|
||||||
'ip',
|
|
||||||
'secondoaryIp',
|
|
||||||
'group',
|
|
||||||
'secondaryGroups',
|
|
||||||
'description',
|
|
||||||
'os',
|
|
||||||
'interval',
|
|
||||||
'lastContact',
|
|
||||||
'lastStatusChange',
|
|
||||||
'customFields',
|
|
||||||
'valuesCustomFields',
|
|
||||||
];
|
|
||||||
|
|
||||||
$columns_names = [
|
|
||||||
__('Alias'),
|
|
||||||
__('IP'),
|
|
||||||
__('Secondary IP'),
|
|
||||||
__('Group'),
|
|
||||||
__('Secondary groups'),
|
|
||||||
__('Description'),
|
|
||||||
__('OS'),
|
|
||||||
__('Interval'),
|
|
||||||
__('Last contact'),
|
|
||||||
__('Last status change'),
|
|
||||||
__('Custom fields'),
|
|
||||||
__('Values Custom Fields'),
|
|
||||||
];
|
|
||||||
|
|
||||||
ui_print_datatable(
|
|
||||||
[
|
|
||||||
'id' => 'basic_info',
|
|
||||||
'class' => $class,
|
|
||||||
'style' => $style,
|
|
||||||
'columns' => $columns,
|
|
||||||
'column_names' => $columns_names,
|
|
||||||
'ordering' => $ordering,
|
|
||||||
'searching' => $searching,
|
|
||||||
'order' => [
|
|
||||||
'field' => $columns[0],
|
|
||||||
'direction' => 'asc',
|
|
||||||
],
|
|
||||||
'ajax_url' => 'operation/inventory/inventory',
|
|
||||||
'ajax_data' => [
|
|
||||||
'get_data_basic_info' => 1,
|
|
||||||
'id_agent' => $id_agente,
|
|
||||||
],
|
|
||||||
'zeroRecords' => __('Agent info not found'),
|
|
||||||
'emptyTable' => __('Agent info not found'),
|
|
||||||
'return' => false,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
html_print_action_buttons(
|
|
||||||
'',
|
|
||||||
['type' => 'form_action']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Metaconsole.
|
|
||||||
if ($inventory_module !== 'basic') {
|
|
||||||
if ($order_by_agent === true) {
|
if ($order_by_agent === true) {
|
||||||
$count_nodos_tmp = [];
|
$count_nodos_tmp = [];
|
||||||
foreach ($nodos as $count_value) {
|
foreach ($nodos as $count_value) {
|
||||||
@ -1266,73 +981,293 @@ if ($is_metaconsole === false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$id_agente = $inventory_id_agent;
|
// Single agent selected.
|
||||||
$agentes = [];
|
if ($inventory_id_agent > 0 && isset($agents[$inventory_id_agent]) === true) {
|
||||||
$data = [];
|
$agents = [$inventory_id_agent => $agents[$inventory_id_agent]];
|
||||||
$class = 'info_table';
|
}
|
||||||
$style = 'width: 99%';
|
|
||||||
$ordering = true;
|
|
||||||
$searching = false;
|
|
||||||
|
|
||||||
$columns = [
|
$agents_ids = array_keys($agents);
|
||||||
'alias',
|
if (count($agents_ids) > 0) {
|
||||||
'ip',
|
$rows = inventory_get_datatable(
|
||||||
'secondoaryIp',
|
$agents_ids,
|
||||||
'group',
|
$inventory_module,
|
||||||
'secondaryGroups',
|
$utimestamp,
|
||||||
'description',
|
$inventory_search_string,
|
||||||
'os',
|
$export,
|
||||||
'interval',
|
false,
|
||||||
'lastContact',
|
$order_by_agent
|
||||||
'lastStatusChange',
|
);
|
||||||
'customFields',
|
}
|
||||||
'valuesCustomFields',
|
|
||||||
];
|
|
||||||
|
|
||||||
$columns_names = [
|
if (count($agents_ids) === 0 || (int) $rows === ERR_NODATA) {
|
||||||
__('Alias'),
|
ui_print_info_message(
|
||||||
__('IP'),
|
[
|
||||||
__('Secondary IP'),
|
'no_close' => true,
|
||||||
__('Group'),
|
'message' => __('No data found.'),
|
||||||
__('Secondary groups'),
|
]
|
||||||
__('Description'),
|
);
|
||||||
__('OS'),
|
return;
|
||||||
__('Interval'),
|
}
|
||||||
__('Last contact'),
|
|
||||||
__('Last status change'),
|
|
||||||
__('Custom fields'),
|
|
||||||
__('Values Custom Fields'),
|
|
||||||
];
|
|
||||||
|
|
||||||
ui_print_datatable(
|
echo "<div id='loading_url' style='display: none; width: ".$table->width."; text-align: right;'>".html_print_image('images/spinner.gif', true).'</div>';
|
||||||
[
|
?>
|
||||||
'id' => 'basic_info',
|
<script type="text/javascript">
|
||||||
'class' => $class,
|
function get_csv_url(module, id_group, search_string, utimestamp, agent, order_by_agent) {
|
||||||
'style' => $style,
|
$("#url_csv").hide();
|
||||||
'columns' => $columns,
|
$("#loading_url").show();
|
||||||
'column_names' => $columns_names,
|
$.ajax ({
|
||||||
'ordering' => $ordering,
|
method:'GET',
|
||||||
'searching' => $searching,
|
url:'ajax.php',
|
||||||
'order' => [
|
datatype:'html',
|
||||||
'field' => $columns[0],
|
data:{
|
||||||
'direction' => 'asc',
|
"page" : "operation/inventory/inventory",
|
||||||
],
|
"get_csv_url" : 1,
|
||||||
'ajax_url' => 'operation/inventory/inventory',
|
"module" : module,
|
||||||
'ajax_data' => [
|
"id_group" : id_group,
|
||||||
'get_data_basic_info' => 1,
|
"search_string" : search_string,
|
||||||
'id_agent' => $id_agente,
|
"utimestamp" : utimestamp,
|
||||||
],
|
"agent" : agent,
|
||||||
'zeroRecords' => __('Agent info not found'),
|
"export": true,
|
||||||
'emptyTable' => __('Agent info not found'),
|
"order_by_agent": order_by_agent
|
||||||
'return' => false,
|
},
|
||||||
]
|
success: function (data, status) {
|
||||||
);
|
$("#url_csv").html(data);
|
||||||
|
$("#loading_url").hide();
|
||||||
|
$("#url_csv").show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
if ($order_by_agent === true) {
|
||||||
|
foreach ($rows as $agent_rows) {
|
||||||
|
$data = [];
|
||||||
|
$modules = '';
|
||||||
|
foreach ($agent_rows['row'] as $key_row => $row) {
|
||||||
|
$columns = explode(';', io_safe_output($row['data_format']));
|
||||||
|
array_push($columns, 'Timestamp');
|
||||||
|
|
||||||
html_print_action_buttons(
|
$data_rows = explode(PHP_EOL, $row['data']);
|
||||||
'',
|
foreach ($data_rows as $data_row) {
|
||||||
['type' => 'form_action']
|
// Exclude results don't match filter.
|
||||||
);
|
if ($inventory_search_string && preg_match('/'.io_safe_output($inventory_search_string).'/', ($data_row)) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$column_data = explode(';', io_safe_output($data_row));
|
||||||
|
|
||||||
|
if ($column_data[0] !== '') {
|
||||||
|
$row_tmp = [];
|
||||||
|
foreach ($column_data as $key => $value) {
|
||||||
|
$row_tmp[$columns[$key]] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$row_tmp['Timestamp'] = $row['timestamp'];
|
||||||
|
array_push($data, (object) $row_tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$id_table = 'id_'.$key_row.'_'.$row['id_module_inventory'].'_'.$row['id_agente'];
|
||||||
|
|
||||||
|
$table = ui_print_datatable(
|
||||||
|
[
|
||||||
|
'id' => $id_table,
|
||||||
|
'class' => 'info_table w100p',
|
||||||
|
'style' => 'width: 99%',
|
||||||
|
'columns' => $columns,
|
||||||
|
'column_names' => $columns,
|
||||||
|
'no_sortable_columns' => [],
|
||||||
|
'data_element' => $data,
|
||||||
|
'searching' => true,
|
||||||
|
'dom_elements' => 'ftip',
|
||||||
|
'order' => [
|
||||||
|
'field' => $columns[0],
|
||||||
|
'direction' => 'asc',
|
||||||
|
],
|
||||||
|
'zeroRecords' => __('No inventory found'),
|
||||||
|
'emptyTable' => __('No inventory found'),
|
||||||
|
'return' => true,
|
||||||
|
'default_pagination' => 10,
|
||||||
|
'no_sortable_columns' => [-1],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$modules .= ui_toggle(
|
||||||
|
$table,
|
||||||
|
'<span class="title-blue">'.$row['name'].'</span>',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
'white-box-content w100p',
|
||||||
|
'box-shadow white_table_graph w100p',
|
||||||
|
'images/arrow_down_green.png',
|
||||||
|
'images/arrow_right_green.png',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
false,
|
||||||
|
$id_table
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_toggle(
|
||||||
|
$modules,
|
||||||
|
$agent_rows['agent'],
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$count_rows = count($rows);
|
||||||
|
foreach ($rows as $module_rows) {
|
||||||
|
$agent = '';
|
||||||
|
$data = [];
|
||||||
|
|
||||||
|
foreach ($module_rows as $row) {
|
||||||
|
$columns = explode(';', io_safe_output($row['data_format']));
|
||||||
|
array_push($columns, 'Timestamp');
|
||||||
|
array_push($columns, 'Agent');
|
||||||
|
|
||||||
|
// Exclude results don't match filter.
|
||||||
|
if ($inventory_search_string && preg_match('/'.io_safe_output($inventory_search_string).'/', ($row['data'])) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data_tmp = [];
|
||||||
|
if ($row['data'] !== '') {
|
||||||
|
$values_explode = explode(';', io_safe_output($row['data']));
|
||||||
|
|
||||||
|
foreach ($values_explode as $key => $value) {
|
||||||
|
$data_tmp[$columns[$key]] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data_tmp['Timestamp'] = $row['timestamp'];
|
||||||
|
$data_tmp['Agent'] = $row['name_agent'];
|
||||||
|
array_push($data, $data_tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$id_table = 'id_'.$row['id_module_inventory'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$table = ui_print_datatable(
|
||||||
|
[
|
||||||
|
'id' => $id_table,
|
||||||
|
'class' => 'info_table w100p',
|
||||||
|
'style' => 'width: 99%',
|
||||||
|
'columns' => $columns,
|
||||||
|
'column_names' => $columns,
|
||||||
|
'no_sortable_columns' => [],
|
||||||
|
'data_element' => $data,
|
||||||
|
'searching' => true,
|
||||||
|
'dom_elements' => 'ftip',
|
||||||
|
'order' => [
|
||||||
|
'field' => $columns[0],
|
||||||
|
'direction' => 'asc',
|
||||||
|
],
|
||||||
|
'zeroRecords' => __('No inventory found'),
|
||||||
|
'emptyTable' => __('No inventory found'),
|
||||||
|
'return' => true,
|
||||||
|
'no_sortable_columns' => [],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($count_rows > 1) {
|
||||||
|
ui_toggle(
|
||||||
|
$table,
|
||||||
|
array_shift($module_rows)['name'],
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
echo $table;
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
'',
|
||||||
|
['type' => 'form_action']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$id_agente = $inventory_id_agent;
|
||||||
|
$agentes = [];
|
||||||
|
$data = [];
|
||||||
|
$class = 'info_table';
|
||||||
|
$style = 'width: 99%';
|
||||||
|
$ordering = true;
|
||||||
|
$searching = false;
|
||||||
|
|
||||||
|
$columns = [
|
||||||
|
'alias',
|
||||||
|
'ip',
|
||||||
|
'secondoaryIp',
|
||||||
|
'group',
|
||||||
|
'secondaryGroups',
|
||||||
|
'description',
|
||||||
|
'os',
|
||||||
|
'interval',
|
||||||
|
'lastContact',
|
||||||
|
'lastStatusChange',
|
||||||
|
'customFields',
|
||||||
|
'valuesCustomFields',
|
||||||
|
];
|
||||||
|
|
||||||
|
$columns_names = [
|
||||||
|
__('Alias'),
|
||||||
|
__('IP'),
|
||||||
|
__('Secondary IP'),
|
||||||
|
__('Group'),
|
||||||
|
__('Secondary groups'),
|
||||||
|
__('Description'),
|
||||||
|
__('OS'),
|
||||||
|
__('Interval'),
|
||||||
|
__('Last contact'),
|
||||||
|
__('Last status change'),
|
||||||
|
__('Custom fields'),
|
||||||
|
__('Values Custom Fields'),
|
||||||
|
];
|
||||||
|
|
||||||
|
ui_print_datatable(
|
||||||
|
[
|
||||||
|
'id' => 'basic_info',
|
||||||
|
'class' => $class,
|
||||||
|
'style' => $style,
|
||||||
|
'columns' => $columns,
|
||||||
|
'column_names' => $columns_names,
|
||||||
|
'ordering' => $ordering,
|
||||||
|
'searching' => $searching,
|
||||||
|
'order' => [
|
||||||
|
'field' => $columns[0],
|
||||||
|
'direction' => 'asc',
|
||||||
|
],
|
||||||
|
'ajax_url' => 'operation/inventory/inventory',
|
||||||
|
'ajax_data' => [
|
||||||
|
'get_data_basic_info' => 1,
|
||||||
|
'id_agent' => $id_agente,
|
||||||
|
'id_group' => $inventory_id_group,
|
||||||
|
],
|
||||||
|
'zeroRecords' => __('Agent info not found'),
|
||||||
|
'emptyTable' => __('Agent info not found'),
|
||||||
|
'return' => false,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
'',
|
||||||
|
['type' => 'form_action']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_require_jquery_file('pandora.controls');
|
ui_require_jquery_file('pandora.controls');
|
||||||
|
@ -118,10 +118,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||||
('custom_report_front_header', ''),
|
('custom_report_front_header', ''),
|
||||||
('custom_report_front_footer', ''),
|
('custom_report_front_footer', ''),
|
||||||
('MR', 61),
|
('MR', 62),
|
||||||
('identification_reminder', 1),
|
('identification_reminder', 1),
|
||||||
('identification_reminder_timestamp', 0),
|
('identification_reminder_timestamp', 0),
|
||||||
('current_package', 769),
|
('current_package', 770),
|
||||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||||
('custom_docs_logo', 'default_docs.png'),
|
('custom_docs_logo', 'default_docs.png'),
|
||||||
('custom_support_logo', 'default_support.png'),
|
('custom_support_logo', 'default_support.png'),
|
||||||
|
@ -216,7 +216,7 @@ $table_agent_header .= '<div class="icono_right">'.$status_img.'</div>';
|
|||||||
$table_agent_header .= ' ';
|
$table_agent_header .= ' ';
|
||||||
$table_agent_header .= '<a href="'.$model->url.'&op=force&id='.$cluster->id();
|
$table_agent_header .= '<a href="'.$model->url.'&op=force&id='.$cluster->id();
|
||||||
$table_agent_header .= '">'.html_print_image(
|
$table_agent_header .= '">'.html_print_image(
|
||||||
'images/change-active.svg',
|
'images/force@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Force cluster status calculation'),
|
'title' => __('Force cluster status calculation'),
|
||||||
|
@ -27,21 +27,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Header.
|
// Header.
|
||||||
\ui_print_page_header(
|
ui_print_standard_header(
|
||||||
// Title.
|
|
||||||
__('%s registered consoles', $config['rb_product_name']),
|
__('%s registered consoles', $config['rb_product_name']),
|
||||||
// Icon.
|
|
||||||
'',
|
'',
|
||||||
// Return.
|
|
||||||
false,
|
false,
|
||||||
// Help.
|
|
||||||
'',
|
'',
|
||||||
// Godmode.
|
|
||||||
true,
|
true,
|
||||||
// Options.
|
[],
|
||||||
''
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Servers'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if (empty($message) === false) {
|
if (empty($message) === false) {
|
||||||
echo $message;
|
echo $message;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ if ($public_dashboard_hash !== false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$comboRefreshCountdown['text'] = '<div class="dashboard-countdown display_in"></div>';
|
$comboRefreshCountdown['text'] = '<div class="dashboard-countdown display_in"></div>';
|
||||||
$comboRefresh['text'] = '<form id="refr-form" method="post" class="mrgn_top_13px" action="'.$urlRefresh.'">';
|
$comboRefresh['text'] = '<form id="refr-form" method="post" class="mrgn_top_13px" action="'.$urlRefresh.'">';
|
||||||
$comboRefresh['text'] .= __('Refresh').':';
|
$comboRefresh['text'] .= __('Refresh').':';
|
||||||
$comboRefresh['text'] .= html_print_select(
|
$comboRefresh['text'] .= html_print_select(
|
||||||
\get_refresh_time_array(),
|
\get_refresh_time_array(),
|
||||||
@ -284,7 +284,7 @@ if (isset($config['public_dashboard']) === true
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($publicLink === false) {
|
if ($config['pure'] === false) {
|
||||||
ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
$dashboardName,
|
$dashboardName,
|
||||||
'',
|
'',
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$output = '<div id="dashboard-controls">';
|
$output = '<div id="dashboard-controls-slides">';
|
||||||
|
|
||||||
// Normal view button.
|
// Normal view button.
|
||||||
$output .= '<div>';
|
$output .= '<div>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user