Changeset 25366 for trunk/DataStoreServer/web/cgi/dsgetindex
- Timestamp:
- Sep 14, 2009, 9:10:07 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/DataStoreServer/web/cgi/dsgetindex (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStoreServer/web/cgi/dsgetindex
r24175 r25366 140 140 # 'text/plain' format 141 141 print header('text/plain', '404 ERROR'); 142 #print header('text/plain', '200 OK'); 142 # print header('text/plain', '410 GONE'); 143 # print header('text/plain', '200 OK'); 143 144 print @$stderr_buf; 144 145 print STDERR @$stderr_buf; 146 # exit 410; 145 147 } 146 148 } … … 172 174 # 173 175 174 sub print_free_space {175 use Filesys::Df;176 # get free space177 my $ref = df($DS_ROOT);178 printf '<p>Free space: %.2f G (%.1f%%)</p>',179 $ref->{bfree}/(1024*1024),180 100.0*$ref->{bfree}/$ref->{blocks};181 print "\n";182 }176 #sub print_free_space { 177 # use Filesys::Df; 178 # # get free space 179 # my $ref = df($DS_ROOT); 180 # printf '<p>Free space: %.2f G (%.1f%%)</p>', 181 # $ref->{bfree}/(1024*1024), 182 # 100.0*$ref->{bfree}/$ref->{blocks}; 183 # print "\n"; 184 #} 183 185 sub pprint_pre { 184 186 185 187 print header('text/html', '200 OK'); 186 print start_html('Data Store'); 188 my $name; 189 # note $fileset is not so we look at the name of the index script to determine the level 190 if ($program eq "dsfsindex") { 191 $name = $fileset; 192 } elsif ($program eq "dsprodindex") { 193 $name = "$product"; 194 } else { 195 $name = ""; 196 } 197 print start_html("IPP Data Store $name"); 187 198 188 199 … … 208 219 print p(); 209 220 210 print_free_space();221 # print_free_space(); 211 222 print end_html(); 212 223 } … … 241 252 # if this is a file request, use a download cgi 242 253 if ($wpath =~ /\.fits\s*$/) { 243 $wpath = '/ds-cgi/dsfits.cgi?'.substr($wpath, 4); # strip' /ds/' 254 # This doesn't work through the proxy 255 # The /ds-cgi gets tried on alala 256 # $wpath = '/ds-cgi/dsfits.cgi?'.substr($wpath, 4); # strip' /ds/' 244 257 } 245 258 246 print a({-href=>$wpath }, $toks[0]);259 print a({-href=>$wpath, -type=>'image/x-fits'}, $toks[0]); 247 260 } 248 261
Note:
See TracChangeset
for help on using the changeset viewer.
