diff --git a/html/ops/manage_apps.php b/html/ops/manage_apps.php index bf753b0f06..05899bbf44 100644 --- a/html/ops/manage_apps.php +++ b/html/ops/manage_apps.php @@ -34,6 +34,9 @@ function do_updates() { $n = post_int("homogeneous_redundancy"); $app->update("homogeneous_redundancy=$n"); + $n = post_int("target_nresults"); + $app->update("target_nresults=$n"); + $n = post_str("homogeneous_app_version", true)?1:0; $app->update("homogeneous_app_version=$n"); @@ -73,11 +76,21 @@ function add_app() { "; } -function show_form() { +function show_form($show_deprecated) { echo "

Edit applications

"; + $app_clause="deprecated=0"; + $action_url="manage_apps.php"; + if($show_deprecated) { + $app_clause = ""; + $action_url="manage_apps.php?show_deprecated=1"; + echo "hide deprecated apps"; + } else { + echo "show deprecated apps"; + } + start_table(); table_header( "ID", @@ -86,6 +99,7 @@ function show_form() { "weight

details

", "shmem items", "HR type

details

", + "Adaptive replication

details

", "homogeneous app version?

details

", "deprecated?", "Non-CPU-intensive?", @@ -100,7 +114,7 @@ function show_form() { $swi = 100; } - $apps = BoincApp::enum(""); + $apps = BoincApp::enum($app_clause); $i = 0; foreach ($apps as $app) { // grey-out deprecated versions @@ -109,7 +123,7 @@ function show_form() { $f1 = ""; $f2 = ""; } - echo "
"; + echo ""; $i = 1-$i; echo "id>"; echo " $f1 $app->id $f2\n"; @@ -133,6 +147,11 @@ function show_form() { "; + $v = $app->target_nresults; + echo " + + "; + $v = ''; if ($app->homogeneous_app_version) $v=' CHECKED '; echo " @@ -162,8 +181,11 @@ function show_form() { echo " "; - - echo ""; + if (!in_rops()) { + echo ""; + } else { + echo " "; + } echo "
"; } @@ -179,7 +201,7 @@ function show_form() { ('user friendly name') below. You can then edit the application when it appears in the table above.

-

+ "; start_table("align='center' "); @@ -199,12 +221,14 @@ function show_form() { admin_page_head("Manage applications"); +$show_deprecated = get_int('show_deprecated', true); + if (post_str('add_app', true)) { add_app(); } else if (post_str('submit', true)) { do_updates(); } -show_form(false); +show_form($show_deprecated); admin_page_tail(); ?>