Example #1
0
function show_batch($user)
{
    $batch_id = get_int('batch_id');
    $batch = BoincBatch::lookup_id($batch_id);
    if (!$batch || $batch->user_id != $user->id) {
        error_page("no batch");
    }
    page_head("Batch {$batch->id}");
    $results = BoincResult::enum("batch={$batch->id} order by workunitid");
    $i = 0;
    result_table_start(true, true, null);
    foreach ($results as $result) {
        show_result_row($result, true, true, true, $i++);
    }
    end_table();
    page_tail();
}
Example #2
0
if ($wu->canonical_resultid) {
    row2('canonical result', '<a href="result.php?resultid=$wu->canonical_resultid">$wu->canonical_resultid</a>');
    row2("granted credit", format_credit($wu->canonical_credit));
}
// if app is using adaptive replication and no canonical result yet,
// don't show anything more
// (so that bad guys can't tell if they have an unreplicated job)
if ($app->target_nresults > 0 && !$wu->canonical_resultid) {
    row2("Tasks in progress", "suppressed pending completion");
    end_table();
} else {
    row2("minimum quorum", $wu->min_quorum);
    row2("initial replication", $wu->target_nresults);
    row2("max # of error/total/success tasks", "{$wu->max_error_results}, {$wu->max_total_results}, {$wu->max_success_results}");
    if ($wu->error_mask) {
        row2("errors", wu_error_mask_str($wu->error_mask));
    }
    if ($wu->need_validate) {
        row2("validation", "Pending");
    }
    end_table();
    project_workunit($wu);
    result_table_start(false, true, null);
    $results = BoincResult::enum("workunitid={$wuid}");
    $i = 0;
    foreach ($results as $result) {
        show_result_row($result, false, true, false, $i++);
    }
    echo "</table>\n";
}
page_tail();
Example #3
0
            error_page(tra("No access"));
        }
        $clause = "userid={$userid}";
        page_head(tra("Tasks for {$user->name}"));
    } else {
        error_page(tra("Missing user ID or host ID"));
    }
}
$clause2 = $clause . $state_clause[$state];
$query = "{$clause2} order by id desc limit {$offset}," . ($results_per_page + 1);
$results = BoincResult::enum($query);
$info = null;
$info->number_of_results = count($results);
$info->clause = $clause;
$info->results_per_page = $results_per_page;
$info->offset = $offset;
$info->show_names = $show_names;
$info->state = $state;
echo show_result_navigation($info);
result_table_start(true, false, $info);
$i = 0;
foreach ($results as $result) {
    if ($i >= $results_per_page) {
        break;
    }
    show_result_row($result, true, false, $show_names, $i);
    $i++;
}
end_table();
echo show_result_navigation($info);
page_tail();
Example #4
0
    $clause2 .= ' AND appid=' . $appid;
}
$query = "{$clause2} order by id desc limit {$offset}," . ($results_per_page + 1);
$results = BoincResult::enum($query);
$info = new stdClass();
$info->number_of_results = count($results);
$info->clause = $clause;
$info->results_per_page = $results_per_page;
$info->offset = $offset;
$info->show_names = $show_names;
$info->state = $state;
$info->appid = $appid;
$nav = result_navigation($info, $clause);
if (count($results)) {
    echo $nav;
    result_table_start(true, $show_host_link, $info);
    $i = 0;
    foreach ($results as $result) {
        if ($i >= $results_per_page) {
            break;
        }
        show_result_row($result, true, $show_host_link, $show_names, $i);
        $i++;
    }
    echo "</table>\n";
} else {
    start_table();
    row1(tra("No tasks to display"));
    end_table();
}
echo $nav;