*** empty log message ***

svn path=/trunk/boinc/; revision=12242
This commit is contained in:
David Anderson 2007-03-19 00:10:36 +00:00
parent c11dd81232
commit cf4ed3d546
5 changed files with 75 additions and 36 deletions

View File

@ -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

View File

@ -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/.
<li> Windows: get proxy config info directly from the OS
<li> 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().

View File

@ -21,14 +21,15 @@ echo "
<li> <a href=#edit_forum_preferences_action>Set forum preferences</a>
<li> <a href=#forum_get_user_posts>Get last user's posts from the forum</a>
<li> <a href=#forum_get_user_threads>Get last user's threads from the forum</a>
<li> <a href=#apps>Get list of applications and versions</a>
</ul>
<a name=overview></a>
<h3>Overview</h3>
<p>
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
<a href=acct_mgt.php>account management systems</a> 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 "
<a name=\"apps\"></a>
<h3>Get list of application versions</h3>
";
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();
?>

View File

@ -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)."<br><br>
";
$xml = $_GET['xml'];
if ($xml) {
require_once('../inc/xml.inc');
xml_header();
echo "<app_versions>\n";
} else {
page_head(tr(APPS_TITLE));
echo tr(APPS_DESCRIPTION)."<br><br>
";
start_table();
}
$result = mysql_query("select * from app where deprecated=0");
start_table();
while ($app = mysql_fetch_object($result)) {
echo "<tr><th colspan=3>$app->user_friendly_name</th></tr>\n";
if (0) { // this is too inefficient
$nunsent = nresults($app, 2);
$ninprogress = nresults($app, 4);
$ndone = nresults($app, 5);
echo "<tr><td colspan=3>
$nunsent results unsent
<br> $ninprogress results in progress
<br> $ndone results done
</td></tr>
";
}
echo "<tr><th>".tr(APPS_PLATFORM)."</th><th>".tr(APPS_VERSION)."</th><th>".tr(APPS_INSTALLTIME)."</th></tr>\n";
if ($xml) {
echo "<application>\n";
echo " <name>$app->user_friendly_name</name>\n";
} else {
echo "
<tr><th colspan=3>$app->user_friendly_name</th></tr>
<tr><th>".tr(APPS_PLATFORM)."</th><th>".tr(APPS_VERSION)."</th><th>".tr(APPS_INSTALLTIME)."</th></tr>\n
";
}
for ($i=0; $i<sizeof($platforms); $i++) {
$platform = $platforms[$i];
$newest = null;
@ -55,18 +50,33 @@ if (0) { // this is too inefficient
}
}
if ($newest) {
$x = sprintf("%0.2f", $newest->version_num/100);
$y = pretty_time_str($newest->create_time);
echo "<tr>
<td>$platform->user_friendly_name</td>
<td>$x</td>
<td>$y</td>
</tr>
";
if ($xml) {
echo " <version>\n";
echo " <platform>$platform->user_friendly_name</platform>\n";
echo " <version_num>$newest->version_num</version_num>\n";
echo " <date>$y</date>\n";
echo " </version>\n";
} else {
$x = sprintf("%0.2f", $newest->version_num/100);
echo "<tr>
<td>$platform->user_friendly_name</td>
<td>$x</td>
<td>$y</td>
</tr>
";
}
}
}
if ($xml) {
echo " </application>\n";
}
}
end_table();
mysql_free_result($result);
page_tail();
if ($xml) {
echo "</app_versions>\n";
} else {
end_table();
page_tail();
}
?>

View File

@ -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;