mirror of https://github.com/BOINC/boinc.git
project-specific HTML
svn path=/trunk/boinc/; revision=898
This commit is contained in:
parent
a9dfdeeb0c
commit
6bb44f573a
|
@ -3204,3 +3204,23 @@ David Feb 12 2003
|
|||
start_servers.C
|
||||
test/
|
||||
test.inc
|
||||
|
||||
David Feb 12 2003
|
||||
- changed user HTML so that all project-specific stuff
|
||||
(intro, banner, etc.) is in a separate file.
|
||||
Can specify this file in test scripts.
|
||||
- added test scripts to make dummy SETI@home and Astropulse projects,
|
||||
and made project-specific HTML files for them
|
||||
|
||||
html_user/
|
||||
index.php
|
||||
project.inc (new)
|
||||
project_ap.inc (new)
|
||||
project_sah.inc (new)
|
||||
sched/
|
||||
start_servers.C
|
||||
test/
|
||||
make_project.php
|
||||
make_project_ap.php (new)
|
||||
make_project_sah.php (new)
|
||||
test.inc
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
<?php
|
||||
require_once("util.inc");
|
||||
require_once("db.inc");
|
||||
require_once("project.inc");
|
||||
|
||||
init_session();
|
||||
page_head("Home page");
|
||||
?>
|
||||
|
||||
The Astropulse project, based at UC Berkeley,
|
||||
uses the idle time of thousands of computers to
|
||||
analyze radio telescope signals.
|
||||
project_intro();
|
||||
|
||||
|
||||
<h3>How to join Astropulse</h3>
|
||||
echo "
|
||||
<h3>How to join ".PROJECT." </h3>
|
||||
<p>
|
||||
<a href=create_account_form.php>Create an account</a>.
|
||||
</ul>
|
||||
|
@ -21,20 +19,20 @@ analyze radio telescope signals.
|
|||
<li><a href=login_form.php>Log in</a>
|
||||
<li><a href=home.php>User page</a> - view stats, modify preferences
|
||||
<li><a href=team.php>Teams</a> - create or join a team
|
||||
<li><a href=download.php>Download the BOINC client</a>
|
||||
<li><a href=download.php>Download BOINC</a>
|
||||
<li><a href=bug_report_form.php>Report problems</a>
|
||||
<li><a href=top_users.php>Top users</a>
|
||||
<li><a href=top_hosts.php>Top hosts</a>
|
||||
<li><a href=top_teams.php>Top teams</a>
|
||||
</ul>
|
||||
|
||||
<!--
|
||||
<?php
|
||||
";
|
||||
|
||||
|
||||
include 'schedulers.txt';
|
||||
?>
|
||||
-->
|
||||
|
||||
<?php
|
||||
page_tail();
|
||||
?>
|
||||
echo "-->\n";
|
||||
|
||||
page_tail();
|
||||
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
define("PROJECT", "Astropulse");
|
||||
define("MASTER_URL", "http://maggie.ssl.berkeley.edu/ap/");
|
||||
|
||||
function project_intro() {
|
||||
echo"
|
||||
The Astropulse project, based at UC Berkeley,
|
||||
uses the idle time of thousands of computers to
|
||||
analyze radio telescope signals.
|
||||
";
|
||||
}
|
||||
|
||||
function project_banner($user) {
|
||||
// Put your project title and logo here
|
||||
|
||||
echo "<table width=100%><tr><td><h2>".PROJECT."</h2></td><td align=right>\n";
|
||||
if ($user) {
|
||||
echo "Logged in as $user->name";
|
||||
} else {
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr></table><hr>\n";
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
define("PROJECT", "Astropulse");
|
||||
define("MASTER_URL", "http://maggie.ssl.berkeley.edu/apt/");
|
||||
|
||||
function project_intro() {
|
||||
echo"
|
||||
The Astropulse project, based at UC Berkeley,
|
||||
uses the idle time of thousands of computers to
|
||||
analyze radio telescope signals.
|
||||
";
|
||||
}
|
||||
|
||||
function project_banner($user) {
|
||||
echo "<table cellspacing=0 border=0 cellpadding=10 width=100%><tr>
|
||||
<td background=http://setiathome.berkeley.edu/images/outrspc3.gif>
|
||||
<font color=ffffff size=8 face='helvetica'>Astropulse</font>
|
||||
</td>
|
||||
<td valign=bottom align=right background=http://setiathome.berkeley.edu/images/outrspc3.gif>
|
||||
<font size=-1 color=ffffff>\n
|
||||
";
|
||||
if ($user) {
|
||||
echo "Logged in as $user->name";
|
||||
} else {
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr></table><hr>\n";
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
define("PROJECT", "SETI@home");
|
||||
define("MASTER_URL", "http://maggie.ssl.berkeley.edu/sah/");
|
||||
|
||||
function project_intro() {
|
||||
echo"
|
||||
The SETI@home project, based at UC Berkeley,
|
||||
uses the idle time of thousands of computers to
|
||||
search for extraterrestrial intelligence.
|
||||
";
|
||||
}
|
||||
|
||||
function project_banner($user) {
|
||||
echo "<table width=100%><tr><td>
|
||||
<img src=http://setiathome.berkeley.edu/images/better_banner.jpg>
|
||||
</td><td align=right>\n";
|
||||
if ($user) {
|
||||
echo "Logged in as $user->name";
|
||||
} else {
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr></table><hr>\n";
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once("db.inc");
|
||||
require_once("project.inc");
|
||||
|
||||
define("EMAIL_EXISTS", -1);
|
||||
define("EMAIL_UPDATED", 1);
|
||||
|
@ -21,8 +22,6 @@ define("BG_COLOR", " bgcolor=ffffff ");
|
|||
define("TITLE_COLOR", " bgcolor=000000 ");
|
||||
define("TITLE_FONT", " <font color=ffffff> ");
|
||||
define("BODY_COLOR", " bgcolor=ffffff ");
|
||||
define("PROJECT", "Astropulse");
|
||||
define("MASTER_URL", "http://maggie.ssl.berkeley.edu/ap/");
|
||||
|
||||
// Sends the authenticator to the given email address
|
||||
//
|
||||
|
@ -82,15 +81,8 @@ function show_login($user) {
|
|||
function page_head($title, $user=null) {
|
||||
echo "<head><title>$title</title><body ".BG_COLOR.">\n";
|
||||
|
||||
// Put your project title and logo here
|
||||
project_banner($user);
|
||||
|
||||
echo "<table width=100%><tr><td><h2>".PROJECT."</h2></td><td align=right>\n";
|
||||
if ($user) {
|
||||
echo "Logged in as $user->name";
|
||||
} else {
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr></table><hr>\n";
|
||||
}
|
||||
|
||||
function page_tail() {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
int main() {
|
||||
CONFIG config;
|
||||
int retval;
|
||||
int i, retval;
|
||||
char* p;
|
||||
|
||||
retval = config.parse_file();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
$project = new Project;
|
||||
$project->name = "project_name_here";
|
||||
|
||||
$platform = new Platform("windows_intelx86", "Windows 95/98/2000/ME/XP on X86");
|
||||
$platform = new Platform("windows_intelx86", "Windows");
|
||||
|
||||
$app = new App("Astropulse");
|
||||
$app_version = new App_Version($app);
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
#! /usr/local/bin/php
|
||||
<?php
|
||||
// This script creates a BOINC project.
|
||||
// You just need to plug in an application,
|
||||
// and back-end systems for creating work and validating results
|
||||
|
||||
include_once("test.inc");
|
||||
|
||||
$project = new Project;
|
||||
$project->name = "apt";
|
||||
|
||||
$platform = new Platform("windows_intelx86", "Windows");
|
||||
|
||||
$app = new App("Astropulse");
|
||||
$app_version = new App_Version($app);
|
||||
$app_version->platform = $platform;
|
||||
$app_version->exec_dir = "../apps";
|
||||
$app_version->exec_name = "ap_win_0.02.exe";
|
||||
|
||||
$core_app = new App("core client");
|
||||
$core_app_version = new App_Version($core_app);
|
||||
$core_app_version->platform = $platform;
|
||||
$core_app_version->exec_dir = "../apps";
|
||||
$core_app_version->exec_name = "BOINC_0.12.exe";
|
||||
|
||||
$project->add_app($app);
|
||||
$project->add_app_version($app_version);
|
||||
$project->add_app($core_app);
|
||||
$project->add_app_version($core_app_version);
|
||||
$project->start_assimilator = false;
|
||||
$project->start_feeder = true;
|
||||
$project->start_file_deleter = false;
|
||||
$project->start_make_work = true;
|
||||
$project->start_result_retry = false;
|
||||
$project->start_validate = false;
|
||||
$project->shmem_key = 0x31415927;
|
||||
$project->project_php_file = "project_ap.inc";
|
||||
|
||||
$project->install();
|
||||
|
||||
$work = new Work($app);
|
||||
$work->wu_template = "pulse_wu";
|
||||
$work->result_template = "pulse_result";
|
||||
$work->redundancy = 5;
|
||||
$work->delay_bound = 20000;
|
||||
array_push($work->input_files, "03au00ab_20575_00000.wu");
|
||||
$work->install($project);
|
||||
|
||||
PassThru( "cd /mydisks/a/users/boincadm/html/sah/; ln -s ../download/ ./download");
|
||||
|
||||
$project->start_feeder();
|
||||
?>
|
|
@ -0,0 +1,51 @@
|
|||
#! /usr/local/bin/php
|
||||
<?php
|
||||
// This script creates a BOINC project.
|
||||
// You just need to plug in an application,
|
||||
// and back-end systems for creating work and validating results
|
||||
|
||||
include_once("test.inc");
|
||||
|
||||
$project = new Project;
|
||||
$project->name = "sah";
|
||||
|
||||
$platform = new Platform("windows_intelx86", "Windows");
|
||||
|
||||
$app = new App("Astropulse");
|
||||
$app_version = new App_Version($app);
|
||||
$app_version->platform = $platform;
|
||||
$app_version->exec_dir = "../apps";
|
||||
$app_version->exec_name = "ap_win_0.02.exe";
|
||||
|
||||
$core_app = new App("core client");
|
||||
$core_app_version = new App_Version($core_app);
|
||||
$core_app_version->platform = $platform;
|
||||
$core_app_version->exec_dir = "../apps";
|
||||
$core_app_version->exec_name = "BOINC_0.12.exe";
|
||||
|
||||
$project->add_app($app);
|
||||
$project->add_app_version($app_version);
|
||||
$project->add_app($core_app);
|
||||
$project->add_app_version($core_app_version);
|
||||
$project->start_assimilator = false;
|
||||
$project->start_feeder = true;
|
||||
$project->start_file_deleter = false;
|
||||
$project->start_make_work = true;
|
||||
$project->start_result_retry = false;
|
||||
$project->start_validate = false;
|
||||
$project->shmem_key = 0x31415928;
|
||||
$project->project_php_file = "project_sah.inc";
|
||||
|
||||
$project->install();
|
||||
|
||||
$work = new Work($app);
|
||||
$work->wu_template = "pulse_wu";
|
||||
$work->result_template = "pulse_result";
|
||||
$work->redundancy = 5;
|
||||
$work->delay_bound = 20000;
|
||||
array_push($work->input_files, "03au00ab_20575_00000.wu");
|
||||
$work->install($project);
|
||||
|
||||
PassThru( "cd /mydisks/a/users/boincadm/html/sah/; ln -s ../download/ ./download");
|
||||
$project->start_server();
|
||||
?>
|
|
@ -139,6 +139,7 @@ class Project {
|
|||
var $start_make_work;
|
||||
var $start_result_retry;
|
||||
var $start_validate;
|
||||
var $project_php_file;
|
||||
|
||||
function Project() {
|
||||
$this->name = "test";
|
||||
|
@ -276,6 +277,9 @@ class Project {
|
|||
PassThru("cp -f $source_dir/html_user/* $this->project_dir/html_user");
|
||||
PassThru("cp -f $source_dir/tools/country_select $this->project_dir/html_user");
|
||||
PassThru("cp -f $source_dir/html_ops/* $this->project_dir/html_ops");
|
||||
if ($this->project_php_file) {
|
||||
PassThru("cp -f $source_dir/html_user/$this->project_php_file $this->project_dir/html_user/project.inc");
|
||||
}
|
||||
|
||||
// Copy the sched server in the cgi directory with the
|
||||
// cgi names given $source_dir/html_usr/schedulers.txt
|
||||
|
@ -327,19 +331,19 @@ class Project {
|
|||
fputs($f, "<start>assimilator >> assimilator.out 2>&1</start>\n");
|
||||
}
|
||||
if ($this->start_feeder) {
|
||||
fputs($f, "<start>feeder >> feeder.out 2>&1</start>\n");
|
||||
fputs($f, "<start>feeder -asynch >> feeder.out 2>&1</start>\n");
|
||||
}
|
||||
if ($this->start_file_deleter) {
|
||||
fputs($f, "<start>file_deleter >> file_deleter.out 2>&1</start>\n");
|
||||
fputs($f, "<start>file_deleter -asynch >> file_deleter.out 2>&1</start>\n");
|
||||
}
|
||||
if ($this->start_make_work) {
|
||||
fputs($f, "<start>make_work >> make_work.out 2>&1</start>\n");
|
||||
fputs($f, "<start>make_work -asynch -result_template $result_template_path -wu_name $work->wu_template >> make_work.out 2>&1</start>\n");
|
||||
}
|
||||
if ($this->start_result_retry) {
|
||||
fputs($f, "<start>result_retry >> result_retry.out 2>&1</start>\n");
|
||||
fputs($f, "<start>result_retry -asynch >> result_retry.out 2>&1</start>\n");
|
||||
}
|
||||
if ($this->start_validate) {
|
||||
fputs($f, "<start>validate >> validate.out 2>&1</start>\n");
|
||||
fputs($f, "<start>validate -asynch >> validate.out 2>&1</start>\n");
|
||||
}
|
||||
fputs($f, "</config>\n");
|
||||
fclose($f);
|
||||
|
@ -372,7 +376,9 @@ class Project {
|
|||
PassThru("rm -f $cgi_dir/$this->name");
|
||||
PassThru("ln -s $this->project_dir/cgi $cgi_dir/$this->name");
|
||||
PassThru("rm -f $html_dir/$this->name");
|
||||
PassThru("ln -s $this->project_dir $html_dir/$this->name");
|
||||
PassThru("ln -s $this->project_dir/html_user $html_dir/$this->name");
|
||||
$x = "ln -s $this->project_dir/html_ops ".$html_dir."/".$this->name."_admin";
|
||||
PassThru($x);
|
||||
|
||||
// show the URLs for user and admin sites
|
||||
//
|
||||
|
@ -433,6 +439,10 @@ class Project {
|
|||
PassThru("cp $this->source_dir/sched/file_upload_handler $this->project_dir/cgi/file_upload_handler$handler_num");
|
||||
}
|
||||
|
||||
function start_server(){
|
||||
PassThru("cd $this->project_dir/cgi; ./start_server >> start_server_out 2>&1");
|
||||
}
|
||||
|
||||
function start_feeder(){
|
||||
PassThru("cd $this->project_dir/cgi; ./feeder -asynch >> feeder_out 2>&1");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue