diff --git a/checkin_notes b/checkin_notes index ff6eb96c16..4e3f620da4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/html/user/index.php b/html/user/index.php index 8a04991095..04f475ddab 100644 --- a/html/user/index.php +++ b/html/user/index.php @@ -1,17 +1,15 @@ -The Astropulse project, based at UC Berkeley, -uses the idle time of thousands of computers to -analyze radio telescope signals. + project_intro(); - -

How to join Astropulse

+ echo " +

How to join ".PROJECT."

Create an account. @@ -21,20 +19,20 @@ analyze radio telescope signals.

  • Log in
  • User page - view stats, modify preferences
  • Teams - create or join a team -
  • Download the BOINC client +
  • Download BOINC
  • Report problems
  • Top users
  • Top hosts
  • Top teams - - +echo "-->\n"; +page_tail(); + +?> diff --git a/html/user/project.inc b/html/user/project.inc new file mode 100755 index 0000000000..47d8945cea --- /dev/null +++ b/html/user/project.inc @@ -0,0 +1,26 @@ +

    ".PROJECT."

    \n"; + if ($user) { + echo "Logged in as $user->name"; + } else { + echo "
    "; + } + echo "
    \n"; +} + +?> diff --git a/html/user/project_ap.inc b/html/user/project_ap.inc new file mode 100755 index 0000000000..1867c1f8a0 --- /dev/null +++ b/html/user/project_ap.inc @@ -0,0 +1,30 @@ + + + Astropulse + + + \n + "; + if ($user) { + echo "Logged in as $user->name"; + } else { + echo "
    "; + } + echo "
    \n"; +} + +?> diff --git a/html/user/project_sah.inc b/html/user/project_sah.inc new file mode 100644 index 0000000000..ccf3eaf7cb --- /dev/null +++ b/html/user/project_sah.inc @@ -0,0 +1,26 @@ + + + \n"; + if ($user) { + echo "Logged in as $user->name"; + } else { + echo "
    "; + } + echo "
    \n"; +} + +?> diff --git a/html/user/util.inc b/html/user/util.inc index 2299ac8460..fc361b7fb4 100644 --- a/html/user/util.inc +++ b/html/user/util.inc @@ -1,6 +1,7 @@ "); 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 "$title\n"; - // Put your project title and logo here + project_banner($user); - echo "

    ".PROJECT."

    \n"; - if ($user) { - echo "Logged in as $user->name"; - } else { - echo "
    "; - } - echo "

    \n"; } function page_tail() { diff --git a/sched/start_servers.C b/sched/start_servers.C index 55f771b117..0ded261ff7 100644 --- a/sched/start_servers.C +++ b/sched/start_servers.C @@ -24,7 +24,7 @@ int main() { CONFIG config; - int retval; + int i, retval; char* p; retval = config.parse_file(); diff --git a/test/make_project.php b/test/make_project.php index 375f680ffc..417dd8fee0 100644 --- a/test/make_project.php +++ b/test/make_project.php @@ -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); diff --git a/test/make_project_ap.php b/test/make_project_ap.php new file mode 100644 index 0000000000..e2f89919b5 --- /dev/null +++ b/test/make_project_ap.php @@ -0,0 +1,52 @@ +#! /usr/local/bin/php +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(); +?> diff --git a/test/make_project_sah.php b/test/make_project_sah.php new file mode 100644 index 0000000000..8895fbf69a --- /dev/null +++ b/test/make_project_sah.php @@ -0,0 +1,51 @@ +#! /usr/local/bin/php +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(); +?> diff --git a/test/test.inc b/test/test.inc index efe00433ee..aeba617564 100644 --- a/test/test.inc +++ b/test/test.inc @@ -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, "assimilator >> assimilator.out 2>&1\n"); } if ($this->start_feeder) { - fputs($f, "feeder >> feeder.out 2>&1\n"); + fputs($f, "feeder -asynch >> feeder.out 2>&1\n"); } if ($this->start_file_deleter) { - fputs($f, "file_deleter >> file_deleter.out 2>&1\n"); + fputs($f, "file_deleter -asynch >> file_deleter.out 2>&1\n"); } if ($this->start_make_work) { - fputs($f, "make_work >> make_work.out 2>&1\n"); + fputs($f, "make_work -asynch -result_template $result_template_path -wu_name $work->wu_template >> make_work.out 2>&1\n"); } if ($this->start_result_retry) { - fputs($f, "result_retry >> result_retry.out 2>&1\n"); + fputs($f, "result_retry -asynch >> result_retry.out 2>&1\n"); } if ($this->start_validate) { - fputs($f, "validate >> validate.out 2>&1\n"); + fputs($f, "validate -asynch >> validate.out 2>&1\n"); } fputs($f, "\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"); }