"; } else { $output = "
"; } $output .= ""; $output .= ''; $output .= ''; $graphInTgraph['name'] = (isset($graphInTgraph['name']) === true) ? $graphInTgraph['name'] : ''; $output .= ''; $own_info = get_user_info($config['id_user']); $return_all_group = true; if (users_can_manage_group_all('RW') === false && users_can_manage_group_all('RM') === false ) { $return_all_group = false; } $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= "'; $output .= ''; $output .= "'; $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= "'; $output .= ''; $output .= ''; $output .= '
'; $output .= html_print_label_input_block(__('Name'), html_print_input_text('name', $graphInTgraph['name'], '', '', 255, true), ['style' => 'width:50%']); $output .= ''; if (check_acl($config['id_user'], 0, 'RW')) { $inputGroup = 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')) { $inputGroup = 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 .= html_print_label_input_block(__('Group'), $inputGroup); $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 .= html_print_label_input_block( __('Period'), html_print_extended_select_for_time( 'period', $period, 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')', '', '0', false, true, false, false, 'w100p', false, false, '', false, 0, null, 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')' ) ); $output .= ""; 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_label_input_block( __('Type of graph'), html_print_select( $stackeds, 'stacked', $stacked, '', '', 0, true ) ); $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 .= html_print_label_input_block( __('Percentil'), html_print_checkbox( 'percentil', 1, $percentil, true ) ); $output .= '
'; $output .= html_print_label_input_block( __('Add summatory series'), html_print_checkbox( 'summatory_series', 1, $summatory_series, true ) ); $output .= ""; $output .= html_print_label_input_block( __('Add average series'), html_print_checkbox( 'average_series', 1, $average_series, true ) ); $output .= '
'; $output .= html_print_label_input_block( __('Modules and series'), html_print_checkbox('modules_series', 1, $modules_series, true) ); $output .= '"; $output .= html_print_label_input_block( __('Show full scale graph (TIP)'), html_print_checkbox('fullscale', 1, $fullscale, true) ); $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_action_buttons(implode('', $ActionButtons), ['type' => 'form_action'], true), ], true ); $output .= '
'; echo $output; ?>