Ejemplo n.º 1
0
$valuec = get_parameter("c", 0);
$lite = get_parameter("lite", 0);
$date_from = get_parameter("date_from", 0);
$date_to = get_parameter("date_to", 0);
$mode = get_parameter("mode", 1);
$percent = get_parameter("percent", 0);
$days = get_parameter("days", 0);
$type = get_parameter("type", "");
$background = get_parameter("background", "#ffffff");
$id_incident = get_parameter("id_incident");
$period = get_parameter("period");
$ajax = get_parameter("is_ajax");
if ($type == "incident_a") {
    incident_peruser($width, $height);
} elseif ($type == "workunit_task") {
    graph_workunit_task($width, $height, $id_task);
} elseif ($type == "workunit_user") {
    graph_workunit_user($width, $height, $id_user, $date_from);
} elseif ($type == "workunit_project_user") {
    graph_workunit_project_user($width, $height, $id_user, $date_from, $date_to);
} elseif ($type == "project_tree") {
    project_tree($id_project, $id_user);
} elseif ($type == "all_project_tree") {
    all_project_tree($id_user, $completion, $project_kind);
} elseif ($type == "sla_slicebar") {
    if ($ajax) {
        echo graph_sla_slicebar($id_incident, $period, $width, $height);
    } else {
        graph_sla_slicebar($id_incident, $period, $width, $height);
    }
}
Ejemplo n.º 2
0
$a = round ($hours);
$b = round (get_task_workunit_hours ($id_task));

$image = histogram_2values($a, $b, $labela, $labelb);
$table_advanced->data[0][1] = print_label (__('Estimated hours'), '', '', true, $image);

$labela = __('Total');
$labelb = __('Imp');
$a = round (task_workunit_cost ($id_task, 0));
$b = round (task_workunit_cost ($id_task, 1));
$image = histogram_2values($a, $b, $labela, $labelb);
$table_advanced->data[0][1] .= print_label (__('Imputable estimation'), '', '', true, $image);	

$labela = __('Est.');
$labelb = __('Real');
$a = $estimated_cost;
$b = round (task_workunit_cost ($id_task, 1));
$image = histogram_2values($a, $b, $labela, $labelb);
$table_advanced->data[0][1] .= print_label (__('Cost estimation'), '', '', true, $image);	

//Workload distribution chart
$image = graph_workunit_task (200, 170, $id_task, true);
$image = '<div class="graph_frame">' . $image . '</div>';
$table_advanced->data[0][2] = print_label (__('Workunit distribution'), '', '', true, $image);

$table->colspan['row_task_stats'][0] = 3;
$table->data['row_task_stats'][0] = print_container_div('task_stats', __('Task statitics'), print_table($table_advanced, true), 'open', true, true);	

print_table ($table);

?>