diff --git a/checkin_notes b/checkin_notes index e269bf1bea..eef1e3a399 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5857,3 +5857,16 @@ Rom 18 July 2008 win_build/installerv2/redist/Windows/src/boinccas/ CAShutdownBOINCManager.cpp + +David 18 July 2008 + - web: fiddle around with style2.css and sample front page; + change font, etc. + + html/ + project.sample/ + project.inc + user/ + sample_index.php + style2.css + weak_auth.php + white.css diff --git a/db/bossa_constraints.sql b/db/bossa_constraints.sql index f307b8ecc1..8761c206bb 100644 --- a/db/bossa_constraints.sql +++ b/db/bossa_constraints.sql @@ -3,8 +3,7 @@ alter table bossa_app add unique(short_name); alter table bossa_job - add unique(name), - add index bj_conf_needed(app_id, conf_needed); + add index bj_conf_needed(app_id, calibration, priority_0); alter table bossa_job_inst add index bji_job(job_id), diff --git a/db/bossa_schema.sql b/db/bossa_schema.sql index 48421cf748..f7b78fbe05 100644 --- a/db/bossa_schema.sql +++ b/db/bossa_schema.sql @@ -46,8 +46,9 @@ create table bossa_user ( category integer not null, flags integer not null, -- debug, show_all - info text + info text, -- Project-dependent info about users ability and performance. + primary key(user_id) ) engine = InnoDB; create table bossa_batch ( diff --git a/doc/boinc_news.php b/doc/boinc_news.php index 79790bc875..d614610f24 100644 --- a/doc/boinc_news.php +++ b/doc/boinc_news.php @@ -1,6 +1,15 @@ GPUGRID.net project + from the Barcelona Biomedical Research Park (PRBB) + uses CUDA-capable NVIDIA chips + to create an infrastructure for biomolecular simulations. + (Currently available for Linux64; other platforms to follow soon. + To participate, follow the instructions on the web site)." +), array("July 10, 2008", "BOINC-logo merchandise (T-shirts, mouse pads) is now available." ), diff --git a/html/inc/bossa_example3.inc b/html/inc/bossa_example3.inc index 05929143b9..8ecdade1f0 100644 --- a/html/inc/bossa_example3.inc +++ b/html/inc/bossa_example3.inc @@ -26,7 +26,6 @@ define("PROB_LIMIT", 1e-3); function job_show($job, $inst, $user) { $info = $job->get_info($job); $path = $info->path; - echo "JOB SHOW"; echo "

Find the Ellipse!

@@ -41,7 +40,6 @@ function job_show($job, $inst, $user) { } function job_issued($job, $inst, $user) { - echo "JOB ISSUED"; $insts = $job->get_instances(); if (count($insts) > 1) { $job->set_priority(0); @@ -60,8 +58,16 @@ function job_finished($job, $inst, $user) { $inst->update_info($response); if ($job->calibration) { + $b = $user->bossa; $info = $job->get_info(); $answer = $info->answer; + $u = $b->get_info(); + if (!$u) { + $u->npos = 0; + $u->npos_err = 0; + $u->nneg = 0; + $u->nneg_err = 0; + } if (compatible($response, $answer)) { if ($answer->have_ellipse) { $u->npos++; @@ -77,8 +83,7 @@ function job_finished($job, $inst, $user) { $u->nneg_err++; } } - $b = $user->bossa; - $b->update_info($info); + $b->update_info($u); return; } @@ -159,7 +164,7 @@ function job_timed_out($job, $inst, $user) { function show_job_summary($job) { $info = $job->get_info(); - echo "path>View image"; + echo "path>(view image)"; } function show_instance_summary($inst) { @@ -172,6 +177,25 @@ function show_instance_summary($inst) { } function show_user_summary($user) { + $b = $user->bossa; + $info = $b->get_info(); + if ($info) { + if ($info->npos) { + $pos_err = $info->npos_err/$info->npos; + } else { + $pos_err = "---"; + } + if ($info->nneg) { + $neg_err = $info->nneg_err/$info->nneg; + } else { + $neg_err = "---"; + } + echo "error rate: positive $pos_err ($info->npos_err/$info->npos), + negative $neg_err ($info->nneg_err/$info->nneg) + "; + } else { + echo "No data"; + } } ?> diff --git a/html/inc/bossa_impl.inc b/html/inc/bossa_impl.inc index 63540fcbae..39e8daf1ec 100644 --- a/html/inc/bossa_impl.inc +++ b/html/inc/bossa_impl.inc @@ -5,7 +5,6 @@ function show_next_job($app, $user) { if ($inst) { $job = BossaJob::lookup_id($inst->job_id); $file = "../inc/$app->short_name.inc"; - echo "reading $file\n"; require_once($file); job_issued($job, $inst, $user); page_head("Bossa job"); diff --git a/html/ops/bossa_admin.php b/html/ops/bossa_admin.php index 1f81a9f77c..2bea6da577 100644 --- a/html/ops/bossa_admin.php +++ b/html/ops/bossa_admin.php @@ -102,8 +102,8 @@ function show_all() { page_tail(); } -function show_instances($job_id) { - $insts = BossaJobInst::enum("job_id=$job_id"); +function show_instances($job) { + $insts = BossaJobInst::enum("job_id=$job->id"); if (!count($insts)) { echo "---"; return; @@ -122,7 +122,7 @@ function show_instances($job_id) { $d = "---"; }; echo " - id>$user->name + app_id&user_id=$user->id>$user->name $t $d @@ -149,7 +149,7 @@ function show_batch($batch_id) { $s = job_state_string($job->state); echo " - id>$job->id
+ $job->id id>(details)
"; show_job_summary($job); echo " @@ -158,7 +158,7 @@ function show_batch($batch_id) { $s "; - show_instances($job->id); + show_instances($job); echo " @@ -170,23 +170,19 @@ function show_batch($batch_id) { function show_batches($app_id) { $batches = BossaBatch::enum("app_id = $app_id"); - page_head("Batches"); + $app = BossaApp::lookup_id($app_id); + page_head("Batches ($app->name)"); start_table(); table_header("ID", "Name", "Calibration?", "Created", "Jobs", "Completed"); foreach ($batches as $batch) { - $n = BossaJob::count("batch_id=$batch->id"); - $c = BossaJob::count("batch_id=$batch->id and state=2"); - $t = time_str($batch->create_time); - $cal = $batch->calibration?"yes":"no"; - echo " - id>$batch->id - $batch->name - $cal - $t - $n - $c - - "; + table_row( + "$batch->id id>(show jobs)", + "$batch->name", + $batch->calibration?"yes":"no", + time_str($batch->create_time), + BossaJob::count("batch_id=$batch->id"), + BossaJob::count("batch_id=$batch->id and state=2") + ); } end_table(); page_tail(); @@ -196,10 +192,26 @@ function show_insts($job_id) { $job = BossaJob::lookup_id($job_id); include_app_file($job->app_id); page_head("Instances of job $job_id"); - show_instances($job_id); + show_instances($job); page_tail(); } +function show_user() { + $user_id = get_int('user_id'); + $app_id = get_int('app_id'); + $user = BoincUser::lookup_id("$user_id"); + BossaUser::lookup($user); + $app = BossaApp::lookup_id($app_id); + + include_app_file($app_id); + page_head("Bossa user ($app->name)"); + show_user_summary($user); + $insts = BossaJobInst::enum("user_id=$user_id"); + foreach ($insts as $inst) { + + } + page_tail(); +} $user = get_logged_in_user(); @@ -219,7 +231,7 @@ mysql $db_name < bossa_schema.sql Then reload this page. "; page_tail(); - exit(); + exit; } } @@ -250,7 +262,7 @@ case 'add_app': $course->update("bossa_app_id=$app_id"); } Header('Location: bossa_admin.php'); - exit(); + exit; case 'update_user': $flags = 0; if (get_str('show_all', true)) $flags |= BOLT_FLAGS_SHOW_ALL; @@ -258,19 +270,22 @@ case 'update_user': $user->bossa->update("flags=$flags"); $user->bossa->flags = $flags; Header('Location: bossa_admin.php'); - exit(); + exit; +case 'show_user': + show_user(); + exit; case 'show_batches': $app_id = $_GET['app_id']; show_batches($app_id); - exit(); + exit; case 'show_batch': $batch_id = $_GET['batch_id']; show_batch($batch_id); - exit(); + exit; case 'show_insts': $job_id = $_GET['job_id']; show_insts($job_id); - exit(); + exit; case 'hide': $app_id = get_int('app_id'); $app = BossaApp::lookup_id($app_id); @@ -285,7 +300,7 @@ case 'unhide': break; case '': show_all(); - exit(); + exit; default: error_page("unknown action $action"); } diff --git a/html/project.sample/project.inc b/html/project.sample/project.inc index ac19f3402b..1f2f1b7890 100644 --- a/html/project.sample/project.inc +++ b/html/project.sample/project.inc @@ -28,11 +28,10 @@ function project_banner($title, $prefix) { // Put your project title and logo here // If you include any links, prepend URL with $prefix - echo " - - -

$title

-
+ echo " +

+ $title +

"; } @@ -44,7 +43,8 @@ function project_footer($show_return, $show_date, $prefix) { } echo "

Copyright © ".date("Y ").COPYRIGHT_HOLDER."\n"; if ($show_date) { - echo "Generated ",time_str(time()),"\n"; + $t = time_str(time()); + echo "Generated $t\n"; } } @@ -75,25 +75,24 @@ function show_profile_question2() { } function project_workunit($wu){ - //echo "This is displayed on the workunit page"; + // shown in the workunit page } function project_user_summary($user){ - //echo "Text here will go to the user summary page"; + // shown in the user summary page } function project_user_page_private($user){ - //echo "Whatever is here is added to the private account page"; + // shown in the private account page } function project_user_credit($user){ - //echo "Whatever is here is added to the private account page"; + // shown in the the private account page, credit area } function project_forum_post_rules() { - // Add

  • entries for additional forum post rules - return " - "; + // additional forum post rules + return ""; } ?> diff --git a/html/user/home.php b/html/user/home.php index 3efca5fe5b..6da869b940 100644 --- a/html/user/home.php +++ b/html/user/home.php @@ -33,7 +33,7 @@ if ($init) { page_head("Your account"); } -start_table(); +start_table_noborder(); echo ""; start_table(); show_user_info_private($user); diff --git a/html/user/sample_index.php b/html/user/sample_index.php index d31be9b8c8..f46d0135da 100644 --- a/html/user/sample_index.php +++ b/html/user/sample_index.php @@ -78,10 +78,10 @@ echo " ".PROJECT." - + -

    ".PROJECT."

    + ".PROJECT."
    "; diff --git a/html/user/style2.css b/html/user/style2.css index d0accd6f4b..851b3a1ff2 100644 --- a/html/user/style2.css +++ b/html/user/style2.css @@ -1,325 +1,327 @@ a:link, a:visited, a:active { - color: #FF5C00; - text-decoration: none; + color: #FF5C00; + text-decoration: none; } a:hover { - text-decoration: underline; - color: #00A0E3; + text-decoration: underline; + color: #00A0E3; } body { - background-color: #F0F8FF; - font-family: Verdana; - font-size: 11px; - margin: 5px 40px; - color: black; - background-image: url(img/blue_gradient.png); - background-repeat: repeat-x; + background-color: #F0F8FF; + font-family: "Trebuchet MS", Verdana, Arial, Sans Serif; + font-size: 13px; + margin: 10px 30px; + color: black; + background-image: url(img/blue_gradient.png); + background-repeat: repeat-x; } input, select { - border: 1px solid grey; - background-color: #eeeeee; - padding: 3px; - font-size: 11px; - margin: 2px; + border: 1px solid grey; + background-color: #eeeeee; + padding: 3px; + font-size: 11px; + margin: 2px; } input:hover, input:active, select:hover { - border: 1px solid #FF5C00; + border: 1px solid #FF5C00; } input.btn { - margin: 3px 0px; - padding: 2px 5px; + margin: 3px 0px; + padding: 2px 5px; } h1 { - font-size: x-large; - font-weight: bold; - margin: 0px; - color: white; + font-size: x-large; + font-weight: bold; + color: white; } h2 { - font-size: large; - font-weight: bold; - margin: 0px; + font-size: large; + font-weight: bold; + margin: 4px; } h3, h4 { - font-size: small; - font-weight: bold; + font-size: small; + font-weight: bold; } img { - border: 0px; + border: 0px; } table { - border: 1px solid black; - background-color: white; - font-family: Verdana; - font-size: 11px; - margin: 6px 0px; - padding: 2px; + border: 1px solid black; + background-color: white; + margin: 6px 0px; + padding: 2px; } th { - border: 1px solid darkgrey; - background-color: #c8c8c8; - font-weight: bold; + border: 1px solid darkgrey; + background-color: #c8c8c8; + font-weight: bold; } td { - padding: 4px; - border: 0px; - margin-bottom: 0px; - vertical-align: top; + padding: 4px; + border: 0px; + margin-bottom: 0px; + vertical-align: top; } td.bordered { - border: 1px solid gray; + border: 1px solid gray; } td.indent { - border-left: 4px solid white; + border-left: 4px solid white; } td.heading { - background-color: #D8D8D8; - font-weight: bold; + background-color: #D8D8D8; + font-weight: bold; } td.heading2 { - font-weight: bold; - background-color: #eeeeee; - border: 1px solid grey; + font-weight: bold; + background-color: #eeeeee; + border: 1px solid grey; } td.fieldname { - background-color: #eeeeee; - text-align: right; + background-color: #eeeeee; + text-align: right; } td.fieldvalue { - font-weight: bold; + font-weight: bold; } td.fieldname_error { - background-color: #ff8888; - text-align: right; + background-color: #ff8888; + text-align: right; } td.fieldvalue_error { - background-color: #ff8888; - font-weight: bold; + background-color: #ff8888; + font-weight: bold; } td.category { - background-color: #dddddd; + background-color: #dddddd; } td.navbar { - border: 0px; - text-align: center; + border: 0px; + text-align: center; } a.navbar:link, a.navbar:visited { - color: #ff9711; - text-decoration: none; + color: #ff9711; + text-decoration: none; } a.navbar:hover { - color: #ffc060; - text-decoration: underline; + color: #ffc060; + text-decoration: underline; } tr.row1 { - text-align: left; + text-align: left; } tr.row0 td { - background-color: #eeeeee; - text-align: left; + background-color: #eeeeee; + text-align: left; } tr.row0 td.postheader { - background-color: #F0F8FF; + background-color: #F0F8FF; } tr.row0 td.postbody { - background-color: white; + background-color: white; } tr.row0 .authorcol input { - background-color: white; + background-color: white; } tr.row_hd0 { - background-color: #CFFACF; + background-color: #CFFACF; } tr.row_hd1 { - background-color: #DEFADE; + background-color: #DEFADE; } tr.subtitle { - background-color: #eeeeee; - font-weight: bold; + background-color: #eeeeee; + font-weight: bold; } tr.message { - background-color:#E0E0EF; + background-color:#E0E0EF; } .title { - font-size: 12px; - font-weight: bold; + font-size: 12px; + font-weight: bold; } .description { - font-size: 80%; - font-weight: normal; + font-size: 80%; + font-weight: normal; } .authorcol { - width: 125px; - overflow: hidden; - padding: 2px; + width: 125px; + overflow: hidden; + padding: 2px; } .authorcol img { - margin: 3px 0px; + margin: 3px 0px; } .cellwrap { - width: 100%; - overflow: auto; + width: 100%; + overflow: auto; } blockquote.postbody { - border-left: 2px solid #00A0E3; - background-color: #F0F8FF; - padding: 4px 8px; - margin-bottom: 0px; - margin-left: 20px; - margin-right: 60px; - font-style: italic; + border-left: 2px solid #00A0E3; + background-color: #F0F8FF; + padding: 4px 8px; + margin-bottom: 0px; + margin-left: 20px; + margin-right: 60px; + font-style: italic; } #thread { - width: 100%; - table-layout: fixed; - overflow: overflow; + width: 100%; + table-layout: fixed; + overflow: overflow; } #threadauthor input { - background-color: white; + background-color: white; } td.lastpost { - background-color: white; + background-color: white; } .sigdelim { - width: 60%; - height: 1px; - background-color: black; - color: black; - border: 0; - margin-right: 100%; + width: 60%; + height: 1px; + background-color: black; + color: black; + border: 0; + margin-right: 100%; } td.postheader { - background-color: #F0F8FF; - border-bottom: 1px solid #00A0E3; - border-left: 1px solid #00A0E3; - border-right: none; - padding-left: 6px; + background-color: #F0F8FF; + border-bottom: 1px solid #00A0E3; + border-left: 1px solid #00A0E3; + border-right: none; + padding-left: 6px; } td.postbody { - font-size: 9pt; - border-left: 1px solid #00A0E3; - padding-left: 8px; - padding-bottom: 6px; + font-size: 9pt; + border-left: 1px solid #00A0E3; + padding-left: 8px; + padding-bottom: 6px; } td.postfooter{ - background-color: #EEEEEE; - border-top: 1px solid #00A0E3; - border-left: none; - border-right: none; - border-bottom: none; - padding-left: 6px; + background-color: #EEEEEE; + border-top: 1px solid #00A0E3; + border-left: none; + border-right: none; + border-bottom: none; + padding-left: 6px; } tr.helpdeskseperator{ - height: 10pt; + height: 10pt; } tr.postseperator td{ - border-top: 1px solid #AAAAAA; - border-bottom: 1px solid #AAAAAA; - background-color: #D3D3D3; + border-top: 1px solid #AAAAAA; + border-bottom: 1px solid #AAAAAA; + background-color: #D3D3D3; } td.threadline { - text-align: left; - color: #0074A4; + text-align: left; + color: #0074A4; } td.threadline a, tr.row1 em a { - color: #005477; - font-weight: bold; + color: #005477; + font-weight: bold; } td.threadline a:hover, tr.row1 em a:hover { - text-decoration: underline; - color: #00A0E3; + text-decoration: underline; + color: #00A0E3; } td.running { - background-color: #00ff00; + background-color: #00ff00; } td.notrunning { - background-color: #ff0000; + background-color: #ff0000; } td.disabled { - background-color: #ff8800; + background-color: #ff8800; } +span.page_title { + font-size: 24px; + color: white; + margin: 20px; +} + span.note{ - font-weight: normal; - font-size: 0.9em; - font-family: padding + font-weight: normal; + font-size: 0.9em; } span.news_date { - color: #191970; - font-size: 0.9em; + color: #191970; + font-size: 0.9em; } span.news_title { - font-size: 0.9em; - font-weight: bold; + font-size: 0.9em; + font-weight: bold; } .code { - font-family: "Consolas", "Courier New", courier, monospaace; - display: block; - margin-top: 3px; - margin-left: 5em; - border-left: 3px solid #00A0E3; - padding-left: 1em; - padding-top: 4px; - white-space: nowrap; - overflow: auto; - background-color: #F0F8FF; + font-family: "Consolas", "Courier New", courier, monospaace; + display: block; + margin-top: 3px; + margin-left: 5em; + border-left: 3px solid #00A0E3; + padding-left: 1em; + padding-top: 4px; + white-space: nowrap; + overflow: auto; + background-color: #F0F8FF; } * html body .code { @@ -328,69 +330,67 @@ span.news_title { } #news { - background-color: #E8F8FF; - vertical-align: top; - text-align: justify; - padding: 10px; - border: 1px solid grey; + background-color: #eeeeee; + text-align: justify; + padding: 10px; + border: 1px solid grey; } #news h2, #uotd h2, #mainnav h2 { - font-size: 1.2em; - font-weight: bold; + font-size: 1.2em; + font-weight: bold; } #news h3 { - font-size: 1em; - margin: 2px 0px; + font-size: 1em; + margin: 2px 0px; } #news p { - margin-top: 0px; + margin-top: 0px; } #uotd { - background-color: #FAF0E6; - vertical-align: top; - padding: 10px; - border: 1px solid grey; + background-color: #eeeeee; + padding: 10px; + border: 1px solid grey; } .smalltext { - font-size: 0.8em; + font-size: 0.8em; } .error { - color: #ff0000; - font-weight: bold; - font-size: 1.1em; + color: #ff0000; + font-weight: bold; + font-size: 1.1em; } .notice { - color: #009900; - font-weight: bold; - font-size: 1.1em; + color: #009900; + font-weight: bold; + font-size: 1.1em; } #preview { - border: 2px solid #cccccc; - background-color: #eeeeee; - margin: 1em; - padding: 0.2em; + border: 2px solid #cccccc; + background-color: #eeeeee; + margin: 1em; + padding: 0.2em; } #preview .header { - font-weight: bold; - font-size: 1.3em; - border-bottom: 1px solid #cccccc; + font-weight: bold; + font-size: 1.3em; + border-bottom: 1px solid #cccccc; } #mainnav { - text-align: justfy; - padding: 6px; + text-align: justfy; + padding: 6px; } hr { - size: 0px; - border-top: 1px dashed black; + size: 0px; + border-top: 1px dashed black; } diff --git a/html/user/weak_auth.php b/html/user/weak_auth.php index 466ceee37b..6e17c8adad 100644 --- a/html/user/weak_auth.php +++ b/html/user/weak_auth.php @@ -10,21 +10,18 @@ page_head("Weak account key"); $weak_auth = weak_auth($user); -//this is somewhat a rewrite of escape_url_readable from str_util.C - maybe it -//should be moved into its own function instead of inline here +// figure out the name of this project's account file. -//cut off the http:// +// strip http:// $idx = strpos($url, '://'); -if ($idx !== FALSE) { +if ($idx) { $url = substr($url, $idx+strlen('://')); } + //convert invalid characters into underscores for ($i=0; $i