";
-$output .= '';
-$output .= "".__('Name').' | ';
-$output .= " 'width:50%']);
+$output .= ' | ';
$own_info = get_user_info($config['id_user']);
@@ -140,9 +138,9 @@ if (users_can_manage_group_all('RW') === false
$return_all_group = false;
}
-$output .= ''.__('Group').' | ';
+$output .= ' | ';
if (check_acl($config['id_user'], 0, 'RW')) {
- $output .= html_print_input(
+ $inputGroup = html_print_input(
[
'type' => 'select_groups',
'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')) {
- $output .= html_print_input(
+ $inputGroup = html_print_input(
[
'type' => 'select_groups',
'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 .= ' |
';
-$output .= '';
-$output .= "".__('Description').' | ';
-$output .= "';
-$output .= ' |
';
-if ($stacked == CUSTOM_GRAPH_GAUGE) {
- $hidden = ' class="invisible" ';
-} else {
- $hidden = '';
-}
-
-$output .= '';
-$output .= "";
-$output .= ''.__('Period').' | ';
-$output .= "";
-$output .= html_print_extended_select_for_time(
- 'period',
- $period,
- '',
- '',
- '0',
- 10,
- true
+$output .= ' |
';
+$output .= '';
+$graphInTgraph['description'] = (isset($graphInTgraph['description']) === true) ? $graphInTgraph['description'] : '';
+$output .= html_print_label_input_block(
+ __('Description'),
+ html_print_textarea('description', 10, 5, $graphInTgraph['description'], '', true)
);
-$output .= " | ";
-$output .= ''.__('Type of graph').' | ';
-$output .= " ";
+$output .= ' | ';
+$output .= '
';
+$output .= "";
+$output .= html_print_label_input_block(
+ __('Period'),
+ html_print_extended_select_for_time(
+ 'period',
+ $period,
+ '',
+ '',
+ '0',
+ false,
+ true,
+ false,
+ false,
+ 'w100p'
+ )
+);
+$output .= " | ";
require_once $config['homedir'].'/include/functions_graph.php';
@@ -221,90 +215,116 @@ $stackeds = [
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
CUSTOM_GRAPH_PIE => __('Pie'),
];
-$output .= html_print_select($stackeds, 'stacked', $stacked, '', '', 0, true);
-
-$output .= ' |
';
-
-$output .= '';
-$output .= "";
-$output .= __('Equalize maximum thresholds');
-$output .= ' | ';
-$output .= "";
-$output .= html_print_checkbox(
- 'threshold',
- CUSTOM_GRAPH_BULLET_CHART_THRESHOLD,
- $check,
- true,
- false,
- '',
- false
+$output .= html_print_label_input_block(
+ __('Type of graph'),
+ html_print_select(
+ $stackeds,
+ 'stacked',
+ $stacked,
+ '',
+ '',
+ 0,
+ true
+ )
);
$output .= ' |
';
-$output .= "";
-$output .= __('Percentil');
-$output .= ' | ';
-$output .= "";
-$output .= html_print_checkbox(
- 'percentil',
- 1,
- $percentil,
- true
+$output .= ' |
';
+$output .= "";
+$output .= html_print_label_input_block(
+ __('Equalize maximum thresholds'),
+ html_print_checkbox(
+ 'threshold',
+ CUSTOM_GRAPH_BULLET_CHART_THRESHOLD,
+ $check,
+ true,
+ false,
+ '',
+ false
+ )
+);
+$output .= ' | ';
+
+$output .= '';
+$output .= html_print_label_input_block(
+ __('Percentil'),
+ html_print_checkbox(
+ 'percentil',
+ 1,
+ $percentil,
+ true
+ )
);
$output .= ' | ';
$output .= '
';
-$output .= "";
-$output .= __('Add summatory series');
-$output .= ' | ';
-$output .= "";
-$output .= html_print_checkbox(
- 'summatory_series',
- 1,
- $summatory_series,
- true
+$output .= ' |
';
+$output .= html_print_label_input_block(
+ __('Add summatory series'),
+ html_print_checkbox(
+ 'summatory_series',
+ 1,
+ $summatory_series,
+ true
+ )
);
-$output .= " | ";
-$output .= __('Add average series');
-$output .= ' | ';
-$output .= "";
-$output .= html_print_checkbox(
- 'average_series',
- 1,
- $average_series,
- true
+$output .= " | ";
+$output .= html_print_label_input_block(
+ __('Add average series'),
+ html_print_checkbox(
+ 'average_series',
+ 1,
+ $average_series,
+ true
+ )
);
$output .= ' |
';
-$output .= "";
-$output .= __('Modules and series');
-$output .= ' | ';
-$output .= "";
-$output .= html_print_checkbox('modules_series', 1, $modules_series, true);
+$output .= ' |
';
+$output .= html_print_label_input_block(
+ __('Modules and series'),
+ html_print_checkbox('modules_series', 1, $modules_series, true)
+);
$output .= ' | ';
-$output .= "";
-$output .= __('Show full scale graph (TIP)');
-$output .= ' | ';
-$output .= "";
-$output .= html_print_checkbox('fullscale', 1, $fullscale, true);
+$output .= " | ";
+$output .= html_print_label_input_block(
+ __('Show full scale graph (TIP)'),
+ html_print_checkbox('fullscale', 1, $fullscale, true)
+);
$output .= ' | ';
$output .= '
';
-
+$output .= '';
$output .= '
';
+$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(
[
'class' => 'action-buttons',
- 'content' => html_print_submit_button(
- ($edit_graph === true) ? __('Update') : __('Create'),
- 'store',
- false,
- [ 'icon' => 'next' ],
- true
- ).html_print_go_back_button(
- 'index.php?sec=reporting&sec2=godmode/reporting/graphs',
- [],
- true
- ),
+ 'content' => html_print_action_buttons(implode('', $ActionButtons), ['type' => 'form_action'], true),
],
true
);
diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php
index b5c3524d93..302bb0c80f 100644
--- a/pandora_console/godmode/reporting/graphs.php
+++ b/pandora_console/godmode/reporting/graphs.php
@@ -222,218 +222,310 @@ $graphs = custom_graphs_get_user($config['id_user'], false, true, $access);
$offset = (int) get_parameter('offset');
$table_aux = new stdClass();
- $table_aux->width = '100%';
- $table_aux->class = 'databox filters';
- $table_aux->cellpadding = 0;
- $table_aux->cellspacing = 0;
+$table_aux->width = '100%';
+if (is_metaconsole() === true) {
+ $table_aux->class = 'databox filters';
+ $table_aux->cellpadding = 0;
+ $table_aux->cellspacing = 0;
+ $table_aux->colspan[0][0] = 4;
+ $table_aux->data[0][0] = '