CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
web_templates Namespace Reference

Functions

def usual_validation_dataset_template
 

Variables

string create_main_list_element = lambdax:' <li><a href="%s/">%s</a></li>\n'
 
string main_page_template
 
tuple usual_validation_template
 

Function Documentation

def web_templates.usual_validation_dataset_template (   dataset_name,
  root_link,
  ref_file,
  dir_link,
  paths_to_pictures,
  source_file 
)

Definition at line 61 of file web_templates.py.

References join().

61 
62 def usual_validation_dataset_template(dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file):
63  chunk_list = lambda l,n: [l[i:i+n] for i in range(0, len(l), n)]
64  rows_paths = chunk_list(paths_to_pictures,2)
65  cell_template = ' <td style="width: 640px;"><A href=%s><IMG src="%s" width="640" align="center" border="0"></A></td>'
66  row_template = ''' <tr>
67 %s </tr>\n'''
68  rows = ''.join([row_template % ''.join([ cell_template % (path,path) for path in row]) for row in rows_paths])
69  reference = '<A href=%s>Reference</A>' % ref_file if ref_file else 'Reference not available'
70  source = '<A href=%s>Input Source</A>' % source_file if ref_file else 'Source not available' #ALL source files seem empty... need to check
71  return ''' <h3>%s ( <A href=%s>Root File</A> ) ( %s ) ( %s ) ( <A href=%s>Full Directory Content</A> )</h3>
72  <table style="text-align: left; " border="1" cellpadding="2" cellspacing="1">
73  <tbody>
74 %s
75  </tbody>
76  </table>
77 ''' % (dataset_name, root_link, reference, source, dir_link, rows)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def usual_validation_dataset_template

Variable Documentation

string web_templates.create_main_list_element = lambdax:' <li><a href="%s/">%s</a></li>\n'

Definition at line 32 of file web_templates.py.

string web_templates.main_page_template

Definition at line 1 of file web_templates.py.

tuple web_templates.usual_validation_template
Initial value:
1 = Template('''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4  <link type="text/css" href="http://cern.ch/cms-project-tau-validation/styles.css" rel="stylesheet">
5  <title>$THIS_RELEASE Validation Results</title>
6 </head>
7 <body class="index">
8  <div id="header">
9  <A href="https://cms-project-tauvalidation.web.cern.ch/cms-project-tauvalidation/">Home</A>
10  <A href="https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideTauValidation">Wiki</A>
11  </div>
12  <hr>
13  <div id="title">
14  <h1>$THIS_RELEASE Validation Results</h1>
15  </div>
16  <hr>
17  <h2>Configuration:</h2>
18  <pre>
19 $CONFIG
20  </pre>
21  <h2>Datasets:</h2>
22 $DATASETS
23 </body>
24 </html>
25 ''')

Definition at line 35 of file web_templates.py.