From cf4ed3d546c3a1db8b93c7464861404b87e4ded6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 19 Mar 2007 00:10:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=12242 --- checkin_notes | 10 ++++++ doc/boinc_dev.php | 1 + doc/web_rpc.php | 19 +++++++++-- html/user/apps.php | 78 +++++++++++++++++++++++++------------------- sched/sched_config.C | 3 ++ 5 files changed, 75 insertions(+), 36 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3c5ebd6722..3bce241873 100755 --- a/checkin_notes +++ b/checkin_notes @@ -2583,3 +2583,13 @@ Rom 17 Mar 2007 ProjectListCtrl.cpp, .h (Added) win_build/ boincmgr_curl_2003.vcproj + +David 18 Mar 2007 + - user web: make an XML variant of apps.php + - scheduler: parse uldl_pid etc. in config file + to avoid XML parse warnings (from David Braun) + + html/user/ + apps.php + sched/ + sched_config.C diff --git a/doc/boinc_dev.php b/doc/boinc_dev.php index 30add58ba7..e7b7f427e0 100644 --- a/doc/boinc_dev.php +++ b/doc/boinc_dev.php @@ -93,6 +93,7 @@ identical results across processors and throttle CPU if it goes too high. Open-source software for this (on Linux) is at http://www.lm-sensors.org/. +
  • Windows: get proxy config info directly from the OS
  • After an applications exits (for whatever reason) make sure (after a few second delay) that its subprocesses are gone too. Unix: use process groups and killpg(). diff --git a/doc/web_rpc.php b/doc/web_rpc.php index e82001ffdb..828357f880 100644 --- a/doc/web_rpc.php +++ b/doc/web_rpc.php @@ -21,14 +21,15 @@ echo "
  • Set forum preferences
  • Get last user's posts from the forum
  • Get last user's threads from the forum +
  • Get list of applications and versions

    Overview

    BOINC projects export a number of Web RPCs -that can be used to create, query and update -accounts and host records. +for creating, querying and updating accounts and host records, +and miscellaneous other purposes. These can be used for account management systems and credit statistics web sites. @@ -93,6 +94,7 @@ This RPC is documented "; list_start(); +list_bar('Create account'); list_item("URL", "project_url/create_account.php"); list_item( "input", @@ -550,6 +552,19 @@ list_item('action', 'Get last user\'s threads from the forums.' ); list_end(); +echo " + +

    Get list of application versions

    +"; +list_start(); +list_item('URL', + 'project/apps.php' +); +list_item('output', + 'List of applications and application versions; + this shows what platforms are supported by the project.' +); +list_end(); page_tail(); ?> diff --git a/html/user/apps.php b/html/user/apps.php index d4e8b81eb6..799082bb7e 100644 --- a/html/user/apps.php +++ b/html/user/apps.php @@ -4,13 +4,6 @@ require_once("../inc/db.inc"); require_once("../inc/util.inc"); require_once("../inc/translation.inc"); -function nresults($app, $state) { - $r = mysql_query("select count(*) as nresults from result where appid=$app->id and server_state=$state"); - $foobar = mysql_fetch_object($r); - mysql_free_result($r); - return $foobar->nresults; -} - init_session(); db_init(); @@ -22,28 +15,30 @@ while ($platform = mysql_fetch_object($r2)) { } mysql_free_result($r2); -page_head(tr(APPS_TITLE)); -echo tr(APPS_DESCRIPTION)."

    -"; +$xml = $_GET['xml']; +if ($xml) { + require_once('../inc/xml.inc'); + xml_header(); + echo "\n"; +} else { + page_head(tr(APPS_TITLE)); + echo tr(APPS_DESCRIPTION)."

    + "; + start_table(); +} $result = mysql_query("select * from app where deprecated=0"); -start_table(); while ($app = mysql_fetch_object($result)) { - echo "$app->user_friendly_name\n"; -if (0) { // this is too inefficient - $nunsent = nresults($app, 2); - $ninprogress = nresults($app, 4); - $ndone = nresults($app, 5); - echo " - $nunsent results unsent -
    $ninprogress results in progress -
    $ndone results done - - "; -} - - echo "".tr(APPS_PLATFORM)."".tr(APPS_VERSION)."".tr(APPS_INSTALLTIME)."\n"; + if ($xml) { + echo "\n"; + echo " $app->user_friendly_name\n"; + } else { + echo " + $app->user_friendly_name + ".tr(APPS_PLATFORM)."".tr(APPS_VERSION)."".tr(APPS_INSTALLTIME)."\n + "; + } for ($i=0; $iversion_num/100); $y = pretty_time_str($newest->create_time); - echo " - $platform->user_friendly_name - $x - $y - - "; + if ($xml) { + echo " \n"; + echo " $platform->user_friendly_name\n"; + echo " $newest->version_num\n"; + echo " $y\n"; + echo " \n"; + } else { + $x = sprintf("%0.2f", $newest->version_num/100); + echo " + $platform->user_friendly_name + $x + $y + + "; + } } } + if ($xml) { + echo " \n"; + } } -end_table(); mysql_free_result($result); -page_tail(); +if ($xml) { + echo "
    \n"; +} else { + end_table(); + page_tail(); +} ?> diff --git a/sched/sched_config.C b/sched/sched_config.C index 3bed3f30b0..7562a7ef5d 100644 --- a/sched/sched_config.C +++ b/sched/sched_config.C @@ -135,6 +135,9 @@ int SCHED_CONFIG::parse(FILE* f) { else if (xp.parse_str(tag, "min_passwd_length", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "disable_account_creation", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "no_forum_rating", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "uldl_pid", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "sched_pid", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "min_core_client_version_announced", temp, sizeof(temp))) continue; else fprintf(stderr, "unknown tag: %s\n", tag); } return ERR_XML_PARSE;