From e80e54fd4d9a2b2dc0466fca0b8f3e8dfa115d97 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 3 Jun 2010 20:26:02 +0000 Subject: [PATCH] - user web: add "Application info" link in host page, linking to new page showing host_app_versions for this host - scheduler: message tweaks svn path=/trunk/boinc/; revision=21690 --- checkin_notes | 14 ++++++++ html/inc/host.inc | 5 +-- html/user/host_app_versions.php | 57 +++++++++++++++++++++++++++++++++ sched/sched_result.cpp | 5 ++- sched/sched_version.cpp | 4 +-- 5 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 html/user/host_app_versions.php diff --git a/checkin_notes b/checkin_notes index fb2e010c31..0ade7b3d59 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4100,3 +4100,17 @@ David 3 Jun 2010 sched/ sched_send.cpp + +David 3 Jun 2010 + - user web: add "Application info" link in host page, + linking to new page showing host_app_versions for this host + - scheduler: message tweaks + + html/ + inc/ + host.inc + user/ + host_app_versions.php + sched/ + sched_version.cpp + sched_result.cpp diff --git a/html/inc/host.inc b/html/inc/host.inc index a6b79790f0..d43c7f6ea2 100644 --- a/html/inc/host.inc +++ b/html/inc/host.inc @@ -161,8 +161,9 @@ function show_host($host, $user, $ipprivate) { } $x = $host->avg_turnaround/86400; row2(tra("Average turnaround time"), tra("%1 days", round($x, 2))); - $mrd= $host->max_results_day; - row2(tra("Maximum daily WU quota per CPU"), tra("%1/day", $mrd)); + row2(tra("Application details"), + "id>".tra("Show")."" + ); $config = get_config(); if (parse_bool($config, "show_results")) { $nresults = host_nresults($host); diff --git a/html/user/host_app_versions.php b/html/user/host_app_versions.php new file mode 100644 index 0000000000..70b56dedb1 --- /dev/null +++ b/html/user/host_app_versions.php @@ -0,0 +1,57 @@ += 1000000) { + $appid = (int)($gavid/1000000); + $app = BoincApp::lookup_id($appid); + if (!$app) return "Anonymous platform, missing app"; + $rsc_type = $gavid % 1000000; + $r = rsc_name($rsc_type); + return "$app->user_friendly_name (anonymous platform, $r)"; + + } else { + $av = BoincAppVersion::lookup_id($gavid); + if (!$av) return "Missing app version"; + $app = BoincApp::lookup_id($av->appid); + if (!$app) return "Missing app"; + $pc = (strlen($av->plan_class))?"($av->plan_class)":""; + $v = number_format($av->version_num/100, 2); + return "$app->user_friendly_name $v $pc"; + } +} + +function show_hav($hav) { + row1(av_desc($hav->app_version_id)); + row2("Number of tasks completed", $hav->pfc_n); + row2("Max tasks per day", $hav->max_jobs_per_day); + row2("Number of tasks today", $hav->n_jobs_today); + row2("Consecutive valid tasks", $hav->consecutive_valid); + $x = number_format($hav->turnaround_avg/86400, 2); + row2("Average turnaround time", "$x days"); +} + +$hostid = get_int('hostid'); + +$havs = BoincHostAppVersion::enum("host_id=$hostid"); + +page_head("Application info for host $hostid"); +start_table(); +foreach ($havs as $hav) { + if (!$hav->pfc_n) continue; + show_hav($hav); +} +end_table; + +page_footer(); +?> diff --git a/sched/sched_result.cpp b/sched/sched_result.cpp index 073c5406fb..f67ff1eac3 100644 --- a/sched/sched_result.cpp +++ b/sched/sched_result.cpp @@ -335,7 +335,10 @@ int handle_results() { if (config.debug_handle_results) { log_messages.printf(MSG_NORMAL, - "[handle] cpu time %f credit/sec %f, claimed credit %f\n", srip->cpu_time, g_reply->host.claimed_credit_per_cpu_sec, srip->claimed_credit + "[handle] [RESULT#%d] cpu time %f credit/sec %f, claimed credit %f\n", + srip->id, srip->cpu_time, + g_reply->host.claimed_credit_per_cpu_sec, + srip->claimed_credit ); } srip->server_state = RESULT_SERVER_STATE_OVER; diff --git a/sched/sched_version.cpp b/sched/sched_version.cpp index a07c38f63f..372e0561c6 100644 --- a/sched/sched_version.cpp +++ b/sched/sched_version.cpp @@ -34,8 +34,8 @@ inline void dont_need_message( if (avp) { APP* app = ssp->lookup_app(avp->appid); log_messages.printf(MSG_NORMAL, - "[version] Don't need %s jobs, skipping version %d for %s (%s)\n", - p, avp->version_num, app->name, avp->plan_class + "[version] [AV#%d] Don't need %s jobs, skipping\n", + avp->id, p ); } else if (cavp) { log_messages.printf(MSG_NORMAL,