mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Reporting Custom Graphs change visual
This commit is contained in:
parent
a5e6e569e8
commit
dd1b58b83a
@ -15,9 +15,6 @@ global $config;
|
|||||||
check_login();
|
check_login();
|
||||||
ui_require_css_file('first_task');
|
ui_require_css_file('first_task');
|
||||||
?>
|
?>
|
||||||
<?php
|
|
||||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no custom graphs defined yet.') ]);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="new_task">
|
<div class="new_task">
|
||||||
<div class="image_task">
|
<div class="image_task">
|
||||||
@ -36,7 +33,17 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post">
|
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post">
|
||||||
<input type="submit" class="button_task" value="<?php echo __('Create Custom Graph'); ?>" />
|
<?php
|
||||||
|
html_print_action_buttons(
|
||||||
|
html_print_submit_button(
|
||||||
|
__('Create Custom Graph'),
|
||||||
|
'button_task',
|
||||||
|
false,
|
||||||
|
['icon' => 'wand'],
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -115,20 +115,18 @@ if ($edit_graph === true) {
|
|||||||
// -----------------------
|
// -----------------------
|
||||||
$url = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1';
|
$url = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1';
|
||||||
if ($edit_graph === true) {
|
if ($edit_graph === true) {
|
||||||
$output = "<form method='post' action='".$url.'&update_graph=1&id='.$id_graph."'>";
|
$output = "<form method='post' class='max_floating_element_size' action='".$url.'&update_graph=1&id='.$id_graph."'>";
|
||||||
} else {
|
} else {
|
||||||
$output = "<form method='post' action='".$url."&add_graph=1'>";
|
$output = "<form method='post' class='max_floating_element_size' action='".$url."&add_graph=1'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= "<table width='100%' cellpadding=4 cellspacing=4 class='databox filters'>";
|
$output .= "<table width='100%' cellpadding=4 cellspacing=4 class='filter-table-adv databox'>";
|
||||||
$output .= '<tr>';
|
$output .= '<tbody width="100%">';
|
||||||
$output .= "<td class='datos'><b>".__('Name').'</b></td>';
|
$output .= '<tr class="datos2">';
|
||||||
$output .= "<td class='datos'><input type='text' name='name' size='25' ";
|
$graphInTgraph['name'] = (isset($graphInTgraph['name']) === true) ? $graphInTgraph['name'] : '';
|
||||||
if ($edit_graph === true) {
|
$output .= '<td width="50%">';
|
||||||
$output .= "value='".$graphInTgraph['name']."' ";
|
$output .= html_print_label_input_block(__('Name'), html_print_input_text('name', $graphInTgraph['name'], '', '', 255, true), ['style' => 'width:50%']);
|
||||||
}
|
$output .= '</td>';
|
||||||
|
|
||||||
$output .= '>';
|
|
||||||
|
|
||||||
$own_info = get_user_info($config['id_user']);
|
$own_info = get_user_info($config['id_user']);
|
||||||
|
|
||||||
@ -140,9 +138,9 @@ if (users_can_manage_group_all('RW') === false
|
|||||||
$return_all_group = false;
|
$return_all_group = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= '<td><b>'.__('Group').'</b></td><td>';
|
$output .= '<td width="50%">';
|
||||||
if (check_acl($config['id_user'], 0, 'RW')) {
|
if (check_acl($config['id_user'], 0, 'RW')) {
|
||||||
$output .= html_print_input(
|
$inputGroup = html_print_input(
|
||||||
[
|
[
|
||||||
'type' => 'select_groups',
|
'type' => 'select_groups',
|
||||||
'id_user' => $config['id_user'],
|
'id_user' => $config['id_user'],
|
||||||
@ -158,7 +156,7 @@ if (check_acl($config['id_user'], 0, 'RW')) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else if (check_acl($config['id_user'], 0, 'RM')) {
|
} else if (check_acl($config['id_user'], 0, 'RM')) {
|
||||||
$output .= html_print_input(
|
$inputGroup = html_print_input(
|
||||||
[
|
[
|
||||||
'type' => 'select_groups',
|
'type' => 'select_groups',
|
||||||
'id_user' => $config['id_user'],
|
'id_user' => $config['id_user'],
|
||||||
@ -175,38 +173,34 @@ if (check_acl($config['id_user'], 0, 'RW')) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$output .= html_print_label_input_block(__('Group'), $inputGroup);
|
||||||
$output .= '</td></tr>';
|
$output .= '</td></tr>';
|
||||||
$output .= '<tr>';
|
$output .= '<tr class="datos2">';
|
||||||
$output .= "<td class='datos2'><b>".__('Description').'</b></td>';
|
$output .= '<td width="100%" colspan="2">';
|
||||||
$output .= "<td class='datos2' colspan=3><textarea name='description' class='height_45px' cols=55 rows=2>";
|
$graphInTgraph['description'] = (isset($graphInTgraph['description']) === true) ? $graphInTgraph['description'] : '';
|
||||||
if ($edit_graph === true) {
|
$output .= html_print_label_input_block(
|
||||||
$output .= $graphInTgraph['description'];
|
__('Description'),
|
||||||
}
|
html_print_textarea('description', 10, 5, $graphInTgraph['description'], '', true)
|
||||||
|
);
|
||||||
$output .= '</textarea>';
|
$output .= '</td>';
|
||||||
$output .= '</td></tr>';
|
$output .= '</tr><tr class="datos2">';
|
||||||
if ($stacked == CUSTOM_GRAPH_GAUGE) {
|
$output .= "<td class='datos' width='50%''>";
|
||||||
$hidden = ' class="invisible" ';
|
$output .= html_print_label_input_block(
|
||||||
} else {
|
__('Period'),
|
||||||
$hidden = '';
|
html_print_extended_select_for_time(
|
||||||
}
|
|
||||||
|
|
||||||
$output .= '<tr>';
|
|
||||||
$output .= "<td class='datos'>";
|
|
||||||
$output .= '<b>'.__('Period').'</b></td>';
|
|
||||||
$output .= "<td class='datos'>";
|
|
||||||
$output .= html_print_extended_select_for_time(
|
|
||||||
'period',
|
'period',
|
||||||
$period,
|
$period,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
10,
|
false,
|
||||||
true
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'w100p'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$output .= "</td><td class='datos2'>";
|
$output .= "</td><td class='datos2' width='50%'>";
|
||||||
$output .= '<b>'.__('Type of graph').'</b></td>';
|
|
||||||
$output .= "<td class='datos2'> <div class='left inline'>";
|
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/functions_graph.php';
|
require_once $config['homedir'].'/include/functions_graph.php';
|
||||||
|
|
||||||
@ -221,16 +215,25 @@ $stackeds = [
|
|||||||
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
|
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
|
||||||
CUSTOM_GRAPH_PIE => __('Pie'),
|
CUSTOM_GRAPH_PIE => __('Pie'),
|
||||||
];
|
];
|
||||||
$output .= html_print_select($stackeds, 'stacked', $stacked, '', '', 0, true);
|
$output .= html_print_label_input_block(
|
||||||
|
__('Type of graph'),
|
||||||
|
html_print_select(
|
||||||
|
$stackeds,
|
||||||
|
'stacked',
|
||||||
|
$stacked,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$output .= '</td></tr>';
|
||||||
|
|
||||||
$output .= '</div></td></tr>';
|
$output .= '<tr class="datos2">';
|
||||||
|
$output .= "<td class='datos2 thresholdDiv' width='50%'>";
|
||||||
$output .= '<tr>';
|
$output .= html_print_label_input_block(
|
||||||
$output .= "<td class='datos2 thresholdDiv'><b>";
|
__('Equalize maximum thresholds'),
|
||||||
$output .= __('Equalize maximum thresholds');
|
html_print_checkbox(
|
||||||
$output .= '</b></td>';
|
|
||||||
$output .= "<td class='datos2 thresholdDiv'>";
|
|
||||||
$output .= html_print_checkbox(
|
|
||||||
'threshold',
|
'threshold',
|
||||||
CUSTOM_GRAPH_BULLET_CHART_THRESHOLD,
|
CUSTOM_GRAPH_BULLET_CHART_THRESHOLD,
|
||||||
$check,
|
$check,
|
||||||
@ -238,73 +241,90 @@ $output .= html_print_checkbox(
|
|||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
false
|
false
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$output .= '</td></tr>';
|
$output .= '</td>';
|
||||||
|
|
||||||
$output .= "<tr><td class='datos2 sparse_graph '><b>";
|
$output .= '<td class="datos2 sparse_graph" width="50%">';
|
||||||
$output .= __('Percentil');
|
$output .= html_print_label_input_block(
|
||||||
$output .= '</b></td>';
|
__('Percentil'),
|
||||||
$output .= "<td class='datos2 sparse_graph'>";
|
html_print_checkbox(
|
||||||
$output .= html_print_checkbox(
|
|
||||||
'percentil',
|
'percentil',
|
||||||
1,
|
1,
|
||||||
$percentil,
|
$percentil,
|
||||||
true
|
true
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$output .= '</td>';
|
$output .= '</td>';
|
||||||
$output .= '</tr>';
|
$output .= '</tr>';
|
||||||
|
|
||||||
$output .= "<tr><td class='datos2 sparse_graph'><b>";
|
$output .= '<tr class="datos2"><td class="datos2 sparse_graph" width="50%">';
|
||||||
$output .= __('Add summatory series');
|
$output .= html_print_label_input_block(
|
||||||
$output .= '</b></td>';
|
__('Add summatory series'),
|
||||||
$output .= "<td class='datos2 sparse_graph'>";
|
html_print_checkbox(
|
||||||
$output .= html_print_checkbox(
|
|
||||||
'summatory_series',
|
'summatory_series',
|
||||||
1,
|
1,
|
||||||
$summatory_series,
|
$summatory_series,
|
||||||
true
|
true
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$output .= "</td><td class='datos2 sparse_graph'><b>";
|
$output .= "</td><td class='datos2 sparse_graph' width='50%'>";
|
||||||
$output .= __('Add average series');
|
$output .= html_print_label_input_block(
|
||||||
$output .= '</b></td>';
|
__('Add average series'),
|
||||||
$output .= "<td class='datos2 sparse_graph'>";
|
html_print_checkbox(
|
||||||
$output .= html_print_checkbox(
|
|
||||||
'average_series',
|
'average_series',
|
||||||
1,
|
1,
|
||||||
$average_series,
|
$average_series,
|
||||||
true
|
true
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$output .= '</td></tr>';
|
$output .= '</td></tr>';
|
||||||
$output .= "<tr><td class='datos2 sparse_graph'><b>";
|
$output .= '<tr class="datos2"><td class="datos2 sparse_graph" width="50%">';
|
||||||
$output .= __('Modules and series');
|
$output .= html_print_label_input_block(
|
||||||
$output .= '</b></td>';
|
__('Modules and series'),
|
||||||
$output .= "<td class='datos2 sparse_graph'>";
|
html_print_checkbox('modules_series', 1, $modules_series, true)
|
||||||
$output .= html_print_checkbox('modules_series', 1, $modules_series, true);
|
);
|
||||||
$output .= '</td>';
|
$output .= '</td>';
|
||||||
$output .= "<td class='datos2 sparse_graph'><b>";
|
$output .= "<td class='datos2 sparse_graph' width='50%'>";
|
||||||
$output .= __('Show full scale graph (TIP)');
|
$output .= html_print_label_input_block(
|
||||||
$output .= '</td>';
|
__('Show full scale graph (TIP)'),
|
||||||
$output .= "<td class='datos2 sparse_graph'>";
|
html_print_checkbox('fullscale', 1, $fullscale, true)
|
||||||
$output .= html_print_checkbox('fullscale', 1, $fullscale, true);
|
);
|
||||||
$output .= '</td>';
|
$output .= '</td>';
|
||||||
$output .= '</tr>';
|
$output .= '</tr>';
|
||||||
|
$output .= '</tbody>';
|
||||||
$output .= '</table>';
|
$output .= '</table>';
|
||||||
|
|
||||||
|
$labelButton = ($edit_graph === true) ? __('Update') : __('Create');
|
||||||
|
|
||||||
|
$ActionButtons[] = html_print_submit_button(
|
||||||
|
$labelButton,
|
||||||
|
'store',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'sub ok submitButton',
|
||||||
|
'icon' => 'next',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$ActionButtons[] = html_print_button(
|
||||||
|
__('Go back'),
|
||||||
|
'back',
|
||||||
|
false,
|
||||||
|
"window.location.href = 'index.php?sec=reporting&sec2=godmode/reporting/graphs'",
|
||||||
|
[
|
||||||
|
'class' => 'sub ok submitButton',
|
||||||
|
'icon' => 'back',
|
||||||
|
'mode' => 'secondary',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
$output .= html_print_div(
|
$output .= html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'action-buttons',
|
'class' => 'action-buttons',
|
||||||
'content' => html_print_submit_button(
|
'content' => html_print_action_buttons(implode('', $ActionButtons), ['type' => 'form_action'], true),
|
||||||
($edit_graph === true) ? __('Update') : __('Create'),
|
|
||||||
'store',
|
|
||||||
false,
|
|
||||||
[ 'icon' => 'next' ],
|
|
||||||
true
|
|
||||||
).html_print_go_back_button(
|
|
||||||
'index.php?sec=reporting&sec2=godmode/reporting/graphs',
|
|
||||||
[],
|
|
||||||
true
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
@ -223,34 +223,88 @@ $offset = (int) get_parameter('offset');
|
|||||||
$table_aux = new stdClass();
|
$table_aux = new stdClass();
|
||||||
|
|
||||||
$table_aux->width = '100%';
|
$table_aux->width = '100%';
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
$table_aux->class = 'databox filters';
|
$table_aux->class = 'databox filters';
|
||||||
$table_aux->cellpadding = 0;
|
$table_aux->cellpadding = 0;
|
||||||
$table_aux->cellspacing = 0;
|
$table_aux->cellspacing = 0;
|
||||||
|
|
||||||
$table_aux->colspan[0][0] = 4;
|
$table_aux->colspan[0][0] = 4;
|
||||||
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
|
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
|
||||||
|
|
||||||
$table_aux->data[0][1] = html_print_select_groups(false, $access, true, 'id_group', $id_group, '', '', '', true, false, true, '', false, '', false, false, 'id_grupo', $strict_user).'<br>';
|
$table_aux->data[0][1] = html_print_select_groups(false, $access, true, 'id_group', $id_group, '', '', '', true, false, true, '', false, '', false, false, 'id_grupo', $strict_user).'<br>';
|
||||||
|
|
||||||
$table_aux->data[0][2] = '<b>'.__('Free text for search: ').ui_print_help_tip(
|
$table_aux->data[0][2] = '<b>'.__('Free text for search: ').ui_print_help_tip(
|
||||||
__('Search by report name or description, list matches.'),
|
__('Search by report name or description, list matches.'),
|
||||||
true
|
true
|
||||||
).'</b>';
|
).'</b>';
|
||||||
$table_aux->data[0][3] = html_print_input_text('search', $search, '', 30, '', true);
|
$table_aux->data[0][3] = html_print_input_text('search', $search, '', 30, '', true);
|
||||||
|
|
||||||
$table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true);
|
$table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true);
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
|
||||||
$filter = "<form class ='' action='index.php?sec=reporting&sec2=godmode/reporting/graphs&id_group=$id_group&pure=$pure'
|
$filter = "<form class ='' action='index.php?sec=reporting&sec2=godmode/reporting/graphs&id_group=$id_group&pure=$pure'
|
||||||
method='post'>";
|
method='post'>";
|
||||||
$filter .= html_print_table($table_aux, true);
|
$filter .= html_print_table($table_aux, true);
|
||||||
$filter .= '</form>';
|
$filter .= '</form>';
|
||||||
ui_toggle($filter, __('Show Option'));
|
ui_toggle($filter, __('Show Option'));
|
||||||
} else {
|
} else {
|
||||||
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/graphs&id_group=$id_group&pure=$pure'
|
$table_aux->class = 'filter-table-adv';
|
||||||
method='post'>";
|
$table_aux->size[0] = '50%';
|
||||||
html_print_table($table_aux);
|
|
||||||
echo '</form>';
|
$table_aux->data[0][0] = html_print_label_input_block(
|
||||||
|
__('Group'),
|
||||||
|
html_print_select_groups(
|
||||||
|
false,
|
||||||
|
$access,
|
||||||
|
true,
|
||||||
|
'id_group',
|
||||||
|
$id_group,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'id_grupo',
|
||||||
|
$strict_user
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$table_aux->data[0][1] = html_print_label_input_block(
|
||||||
|
__('Free text for search: ').ui_print_help_tip(__('Search by report name or description, list matches.'), true),
|
||||||
|
html_print_input_text('search', $search, '', 30, '', true)
|
||||||
|
);
|
||||||
|
|
||||||
|
$searchForm .= '<form action="index.php?sec=reporting&sec2=godmode/reporting/graphs&id_group='.$id_group.'&pure='.$pure.'"method="post">';
|
||||||
|
$searchForm .= html_print_table($table_aux, true);
|
||||||
|
|
||||||
|
$searchForm .= html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'action-buttons',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('Filter'),
|
||||||
|
'search_submit',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'mode' => 'mini',
|
||||||
|
'icon' => 'search',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$searchForm .= '</form>';
|
||||||
|
|
||||||
|
ui_toggle(
|
||||||
|
$searchForm,
|
||||||
|
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||||
|
'filter_form',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'white-box-content',
|
||||||
|
'box-flat white_table_graph fixed_filter_bar'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show only selected groups.
|
// Show only selected groups.
|
||||||
@ -296,8 +350,6 @@ $table_aux = new stdClass();
|
|||||||
$graphs = custom_graphs_search($id_group, $search);
|
$graphs = custom_graphs_search($id_group, $search);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_pagination(count($graphs));
|
|
||||||
|
|
||||||
if (!empty($graphs)) {
|
if (!empty($graphs)) {
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
@ -351,9 +403,9 @@ $table_aux = new stdClass();
|
|||||||
$table->cellclass[][4] = 'table_action_buttons';
|
$table->cellclass[][4] = 'table_action_buttons';
|
||||||
if (($report_w || $report_m)) {
|
if (($report_w || $report_m)) {
|
||||||
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image(
|
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image(
|
||||||
'images/config.png',
|
'images/edit.svg',
|
||||||
true,
|
true,
|
||||||
['class' => 'invert_filter']
|
['class' => 'invert_filter main_menu_icon']
|
||||||
).'</a>';
|
).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,12 +413,12 @@ $table_aux = new stdClass();
|
|||||||
if (check_acl_restricted_all($config['id_user'], $graph['id_group'], 'RM')) {
|
if (check_acl_restricted_all($config['id_user'], $graph['id_group'], 'RM')) {
|
||||||
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
||||||
return false;">'.html_print_image(
|
return false;">'.html_print_image(
|
||||||
'images/cross.png',
|
'images/delete.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'alt' => __('Delete'),
|
'alt' => __('Delete'),
|
||||||
'title' => __('Delete'),
|
'title' => __('Delete'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter main_menu_icon',
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
@ -376,7 +428,11 @@ $table_aux = new stdClass();
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'class="check_delete mrgn_lft_2px"',
|
[
|
||||||
|
'class' => 'check_delete mrgn_lft_2px check_delete',
|
||||||
|
'form' => 'form_delete',
|
||||||
|
'data-value' => $graph['id_graph'],
|
||||||
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -384,7 +440,7 @@ $table_aux = new stdClass();
|
|||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
if (!empty($result_graphs)) {
|
if (!empty($result_graphs)) {
|
||||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
||||||
html_print_input_hidden('multiple_delete', 1);
|
html_print_input_hidden('multiple_delete', 1);
|
||||||
@ -402,6 +458,45 @@ $table_aux = new stdClass();
|
|||||||
html_print_submit_button(__('Create graph'), 'create', false, 'class="sub next mrgn_right_5px"');
|
html_print_submit_button(__('Create graph'), 'create', false, 'class="sub next mrgn_right_5px"');
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ($report_w || $report_m) {
|
||||||
|
$ActionButtons[] = '<form method="post" class="right mrgn_lft_10px" action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder">';
|
||||||
|
$ActionButtons[] = html_print_submit_button(
|
||||||
|
__('Create graph'),
|
||||||
|
'create',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'sub ok',
|
||||||
|
'icon' => 'next',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$ActionButtons[] = '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($result_graphs)) {
|
||||||
|
$ActionButtons[] = "<form method='post' id='form_delete' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
||||||
|
$ActionButtons[] = html_print_input_hidden('multiple_delete', 1, true);
|
||||||
|
$ActionButtons[] = html_print_submit_button(
|
||||||
|
__('Delete'),
|
||||||
|
'delete_btn',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'secondary',
|
||||||
|
'icon' => 'delete',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$ActionButtons[] = '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// FALTA METER EL PRINT TABLE.
|
||||||
|
html_print_table($table);
|
||||||
|
html_print_action_buttons(
|
||||||
|
implode('', $ActionButtons),
|
||||||
|
['type' => 'form_action']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
@ -416,23 +511,20 @@ $table_aux = new stdClass();
|
|||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
|
||||||
$('[id^=checkbox-delete_multiple]').change(function(){
|
$('[id^=checkbox-delete_multiple]').click(function(){
|
||||||
if($(this).parent().parent().hasClass('checkselected')){
|
if($(this).prop("checked") === false ){
|
||||||
$(this).parent().parent().removeClass('checkselected');
|
$(this).prop("checked", false);
|
||||||
}
|
} else {
|
||||||
else{
|
$(this).prop("checked", true);
|
||||||
$(this).parent().parent().addClass('checkselected');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[id^=checkbox-all_delete]').change(function(){
|
$('#checkbox-all_delete').click(function(){
|
||||||
if ($("#checkbox-all_delete").prop("checked")) {
|
if ($("#checkbox-all_delete").prop("checked") === true) {
|
||||||
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected');
|
$("[id^=checkbox-delete_multiple]").prop("checked", true);
|
||||||
$(".check_delete").prop("checked", true);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected');
|
$("[id^=checkbox-delete_multiple]").prop("checked", false);
|
||||||
$(".check_delete").prop("checked", false);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ switch ($action) {
|
|||||||
[
|
[
|
||||||
'class' => 'action-buttons',
|
'class' => 'action-buttons',
|
||||||
'content' => html_print_submit_button(
|
'content' => html_print_submit_button(
|
||||||
__('Search'),
|
__('Filter'),
|
||||||
'search_submit',
|
'search_submit',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
|
@ -198,10 +198,12 @@ if ($edit_filter > -2) {
|
|||||||
$table->id = 'filter_table';
|
$table->id = 'filter_table';
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = 'databox filters';
|
$table->class = 'databox filters';
|
||||||
|
$table->rowclass[0] = 'row-title-font-child';
|
||||||
|
$table->rowclass[1] = 'row-title-font-child';
|
||||||
$table->data[0][0] = __('Description');
|
$table->data[0][0] = __('Description');
|
||||||
$table->data[0][1] = html_print_input_text('description', $description, '', 60, 100, true);
|
$table->data[0][1] = html_print_input_text('description', $description, '', 60, 100, true);
|
||||||
$table->data[0][1] .= html_print_image(
|
$table->data[0][1] .= html_print_image(
|
||||||
'images/add.png',
|
'images/plus.png',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'id' => 'add_filter',
|
'id' => 'add_filter',
|
||||||
@ -243,7 +245,7 @@ if ($edit_filter > -2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
echo '<form action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters" method="post">';
|
echo '<form class="max_floating_element_size" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters" method="post">';
|
||||||
html_print_input_hidden('update_filter', $edit_filter);
|
html_print_input_hidden('update_filter', $edit_filter);
|
||||||
html_print_input_hidden('index_post', $index);
|
html_print_input_hidden('index_post', $index);
|
||||||
if ($edit_filter > -1) {
|
if ($edit_filter > -1) {
|
||||||
|
@ -77,7 +77,7 @@ if ($generate_trap) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$traps_generator = '<form method="POST" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_trap_generator">';
|
$traps_generator = '<form class="max_floating_element_size" method="POST" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_trap_generator">';
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = 'filter-table-adv databox';
|
$table->class = 'filter-table-adv databox';
|
||||||
$table->size = [];
|
$table->size = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user