5 require('WebStone-common.pl');
14 <FORM METHOD="POST" ACTION="$wd/bin/write-testbed.pl">
23 <P><INPUT TYPE="SUBMIT" VALUE="Write Configuration">
27 <FORM METHOD="POST" ACTION="$wd/bin/move-filelist.pl">
28 <H3>Choose a Web site model:</H3>
33 for $key (sort(keys %filelist)) {
34 print CLIENT
"<DD><INPUT TYPE=RADIO NAME=filelist ";
35 if ($key eq "filelist") {
36 print CLIENT
" CHECKED ";
38 print CLIENT
" VALUE=\"$wd/conf/$key\"> $key: $filelist{$key}";
43 <INPUT TYPE="SUBMIT" VALUE="Set Workload">
53 open(TESTBED
, "$wd/conf/testbed");
55 if (/^\#|^(\w)*$/) { # do nothing
58 ( $textvalue, $thevalue ) = split( '=', $_ );
59 ( $thevalue ) = split( '#', $thevalue);
60 $testbed{$textvalue} = $thevalue;
61 push(@keylist, $textvalue);
66 open(HELPFILE
, "$wd/doc/testbed.help");
68 ( $key, $textvalue ) = split( ':', $_ );
69 $helptext{$key} = $textvalue;
73 foreach $key (@keylist) {
74 print CLIENT
"<P><DT>$helptext{$key}";
75 $thesize = length($testbed{$key}) + 5;
76 print CLIENT
"<DD>$key <INPUT TYPE=TEXT NAME=$key ";
77 print CLIENT
"SIZE=$thesize VALUE=$testbed{$key}>\n";
82 opendir(CONF
, "$wd/conf") || die "open $wd/conf: $!";
84 foreach $file (sort readdir(CONF
)) {
85 if ( $file =~ /^filelist.*/ ) {
86 $headtext = `head -1 $wd/conf/$file`;
88 ( $headtext ) = split(':', $headtext);
89 $filelist{$file} = $headtext;