"; } else { $output = "
"; } $output .= ""; $output .= ''; $output .= "'; $output .= "'; $output .= ''; $output .= "'; $output .= "'; if ($stacked == CUSTOM_GRAPH_GAUGE) { $hidden = ' class="invisible" '; } else { $hidden = ''; } $output .= ''; $output .= "'; $output .= "'; $output .= "'; $output .= ''; $output .= "'; $output .= "'; $output .= "'; $output .= "'; $output .= ''; $output .= "'; $output .= "'; $output .= "'; $output .= "'; $output .= "'; $output .= "'; $output .= "'; $output .= ''; $output .= '
".__('Name').''; if (check_acl($config['id_user'], 0, 'RW')) { $output .= html_print_input( [ 'type' => 'select_groups', 'id_user' => $config['id_user'], 'privilege' => 'RW', 'returnAllGroup' => $return_all_group, 'name' => 'graph_id_group', 'selected' => $id_group, 'script' => '', 'nothing' => '', 'nothing_value' => '', 'return' => true, 'required' => true, ] ); } else if (check_acl($config['id_user'], 0, 'RM')) { $output .= html_print_input( [ 'type' => 'select_groups', 'id_user' => $config['id_user'], 'privilege' => 'RM', 'returnAllGroup' => $return_all_group, 'name' => 'graph_id_group', 'selected' => $id_group, 'script' => '', 'nothing' => '', 'nothing_value' => '', 'return' => true, 'required' => true, ] ); } $output .= '
".__('Description').''; $output .= '
"; $output .= ''.__('Period').'"; $output .= html_print_extended_select_for_time( 'period', $period, '', '', '0', 10, true ); $output .= ""; $output .= ''.__('Type of graph').'
"; require_once $config['homedir'].'/include/functions_graph.php'; $stackeds = [ CUSTOM_GRAPH_AREA => __('Area'), CUSTOM_GRAPH_STACKED_AREA => __('Stacked area'), CUSTOM_GRAPH_LINE => __('Line'), CUSTOM_GRAPH_STACKED_LINE => __('Stacked line'), CUSTOM_GRAPH_BULLET_CHART => __('Bullet chart'), CUSTOM_GRAPH_GAUGE => __('Gauge'), CUSTOM_GRAPH_HBARS => __('Horizontal bars'), CUSTOM_GRAPH_VBARS => __('Vertical bars'), CUSTOM_GRAPH_PIE => __('Pie'), ]; $output .= html_print_select($stackeds, 'stacked', $stacked, '', '', 0, true); $output .= '
"; $output .= __('Equalize maximum thresholds'); $output .= '"; $output .= html_print_checkbox( 'threshold', CUSTOM_GRAPH_BULLET_CHART_THRESHOLD, $check, true, false, '', false ); $output .= '
"; $output .= __('Percentil'); $output .= '"; $output .= html_print_checkbox( 'percentil', 1, $percentil, true ); $output .= '
"; $output .= __('Add summatory series'); $output .= '"; $output .= html_print_checkbox( 'summatory_series', 1, $summatory_series, true ); $output .= ""; $output .= __('Add average series'); $output .= '"; $output .= html_print_checkbox( 'average_series', 1, $average_series, true ); $output .= '
"; $output .= __('Modules and series'); $output .= '"; $output .= html_print_checkbox('modules_series', 1, $modules_series, true); $output .= '"; $output .= __('Show full scale graph (TIP)'); $output .= '"; $output .= html_print_checkbox('fullscale', 1, $fullscale, true); $output .= '
'; $stringButton = ($edit_graph === true) ? __('Update') : __('Create'); $output .= html_print_div( [ 'class' => 'w100p', 'content' => "", ], true ); $output .= html_print_div( [ 'class' => 'w100p', 'content' => html_print_button( __('Go back'), 'go_back', false, 'window.location.href = \'index.php?sec=reporting&sec2=godmode/reporting/graphs\'', 'class="sub cancel right"', true ), ], true ); $output .= '
'; echo $output; ?>