63 content += '<tr><td style="padding-top:5px;padding-bottom:5px;"><font color="#CC0000"><i>The path for the following file differs from the above default. Full path + filename is thus given:</i></font><br>\n'
64 content += '%s<br>\n' % filename
65 content += '<font color="#999999"><font size="1px">%s</font></font><br></td></tr>\n' % info
66
67# page header
68 s = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html xmlns:"my"><head><head><title>ATLCAL results for dataset: %s' % searchstr
69 s += '</title><LINK href="atlas-runquery.css" rel="stylesheet" type="text/css"></head><body>\n\n'
70 s += '<table style="font-family:sans-serif;padding:4px;font-size:80%;width:100%">'
71
72# body
73 s += '<tr><td style="font-size:110%%"><b>ATLCAL disk pool − files belonging to dataset: <font color="#CC0000">%s</font><br><hr color="gray" size=1></td></tr>\n' % searchstr
74try:
75 s += '<tr><td>Age of dataset: <b>%s</b></td></tr>' % durationstr(float(age))
76except ValueError:
77 s += '<tr><td>Age of dataset: <b>%s</b></td></tr>' % 'unknown'
78pass
79if ic == 0: s += '<tr><td><b>No files found on ATLCAL.</b><br> <br>Note that the accounting of newly replicated datasets may take up to 24h (which adds to the production and replication delay). </td></tr>'
80else: s += '<tr><td>Number of files found: <b>%i</b></td></tr>' % ic
81
82if ic>0:
83if len(paths)==1:
84 s += '<tr><td>Common path for all files:<br> <font color="#AA0000">%s</font><br><hr color="gray" size=1></td></tr>' % refpath
85else:
86 s += '<tr><td>Common path for the following files if not indicated otherwise:<br> <font color="#AA0000">%s</font><br><hr color="gray" size=1></td></tr>' % refpath
87
88# add the content
89 s += content
90
91# end of page
92 s += '<tr><td><hr color="red" size=1><font color="#777777"><font size="-1"><i><font size="-2">Created by AtlRunQuery on: %s</font></i></font></td></tr>' % str(datetime.datetime.now())