[Bio] / FigWebServices / subsys.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/subsys.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.88, Sat Jul 9 21:46:15 2005 UTC revision 1.89, Sun Jul 10 02:01:44 2005 UTC
# Line 93  Line 93 
93              if ($j && $j->running())              if ($j && $j->running())
94              {              {
95                  push(@$html, "Subsystem extension is already running as job number $curpid. <br>",                  push(@$html, "Subsystem extension is already running as job number $curpid. <br>",
96                       "Click <a href=\"seed_ctl.cgi\">here</a> to see currently running jobs and their status");                       "Click <a href=\"seed_ctl.cgi?user=$user\">here</a> to see currently running jobs and their status");
97                  last;                  last;
98              }              }
99          }          }
# Line 102  Line 102 
102    
103          push(@$html,          push(@$html,
104               "Subsystem extension started as background job number $pid <br>\n",               "Subsystem extension started as background job number $pid <br>\n",
105               "Click <a href=\"seed_ctl.cgi\">here</a> to see currently running jobs and their status");               "Click <a href=\"seed_ctl.cgi?user=$user\">here</a> to see currently running jobs and their status");
106    
107          $sub->set_current_extend_pid($pid);          $sub->set_current_extend_pid($pid);
108      }      }
# Line 233  Line 233 
233                   my $job = $fig->index_subsystems(@ss);                   my $job = $fig->index_subsystems(@ss);
234                   push @$html, "<h2>ReIndexing these subsystems...</h2>\n<ul>", map {"<li>$_</li>"} @ss;                   push @$html, "<h2>ReIndexing these subsystems...</h2>\n<ul>", map {"<li>$_</li>"} @ss;
235                   push @$html, "</ul>\n<p>... is running in the background with job id $job. You may check it in the ",                   push @$html, "</ul>\n<p>... is running in the background with job id $job. You may check it in the ",
236                     "<a href=\"seed_ctl.cgi\">SEED Control Panel</a></p>\n";                     "<a href=\"seed_ctl.cgi?user=$user\">SEED Control Panel</a></p>\n";
237           &show_initial($fig,$cgi,$html);           &show_initial($fig,$cgi,$html);
238      }      }
239      elsif ($user && ($request eq "new_ssa") && ($cgi->param('copy_from1')) && (! $cgi->param('cols_to_take1')))      elsif ($user && ($request eq "new_ssa") && ($cgi->param('copy_from1')) && (! $cgi->param('cols_to_take1')))
# Line 285  Line 285 
285                      $cgi->end_form                      $cgi->end_form
286               );               );
287      }      }
288        elsif ($user && ($request eq "new_ssa") && ($cgi->param('move_from')))
289        {
290            my $user = $cgi->param('user');
291            my $name = $cgi->param('ssa_name');
292            $name=$fig->clean_spaces($name);
293            $name=~s/ /_/g;
294            my $move_from = $cgi->param('move_from');
295            if (-d "$FIG_Config::data/Subsystems/$move_from" && !(-e "$FIG_Config::data/Subsystems/$name")) {
296             my $res=`mv $FIG_Config::data/Subsystems/$move_from $FIG_Config::data/Subsystems/$name`;
297             my $job = $fig->index_subsystems($name);
298             push @$html, "<p>The subsystem <b>$move_from</b> was moved to <b>$name</b> and got the result $res. The new subsystem is being indexed with job id $job\n",
299              "(check the <a href=\"seed_ctl.cgi?user=$user\">SEED control panel</a> for more information</p>\n";
300            }
301            elsif (-e "$FIG_Config::data/Subsystems/$name")
302            {
303             push @$html, "<p>The subsystem <b>$move_from</b> was <b><i>NOT</i></b> moved because the subsystem $name already exists</p>";
304            }
305            else {
306             push @$html, "<p>The subsystem <b>$move_from</b> was not found. Sorry</p>";
307            }
308            &show_initial($fig,$cgi,$html);
309        }
310      elsif ($request eq "new_ssa")      elsif ($request eq "new_ssa")
311      {      {
312          &new_ssa($fig,$cgi,$html);          &new_ssa($fig,$cgi,$html);
# Line 330  Line 352 
352                   $cgi->textfield(-name => "copy_from2", -size => 50),                   $cgi->textfield(-name => "copy_from2", -size => 50),
353                   $cgi->br,                   $cgi->br,
354    
355                     "Move from (leave blank to start from scratch): ",
356                     $cgi->textfield(-name => "move_from", -size => 50),
357                     $cgi->br,
358    
359                   $cgi->submit('start new subsystem'),                   $cgi->submit('start new subsystem'),
360                   $cgi->end_form,                   $cgi->end_form,
361                   "<br>You can start a subsystem from scratch, in which case you should leave these two \"copy from\"                   "<br>You can start a subsystem from scratch, in which case you should leave these two \"copy from\"

Legend:
Removed from v.1.88  
changed lines
  Added in v.1.89

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3