Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions plot/php/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
<h1><form>filter <input type="text" name="match" size="30" value="<?php if (isset($_GET['match'])) print htmlspecialchars($_GET['match']); ?>" /><input type="Submit" value="Go" /></form></h1>
<div>
<?php
$parent = "../";
print "<h3><a class=\"file\" href=\"$parent\">Parent Directory</a></h3>"
?>
</div>
<div>
<?php
$displayed = array();
if ($_GET['noplots']) {
print "Plots will not be displayed.\n";
Expand All @@ -72,6 +78,7 @@
if ($ex != '.txt') array_push($displayed, $other_filename);
}
}
print "<p> Last changed: " . date ("F d Y H:i:s.", filemtime($filename)) . " </p>";
if ($others) print "<p>Also as ".implode(', ',$others)."</p>";
print "</div>";
}
Expand All @@ -92,6 +99,7 @@
if ($ex != '.txt') array_push($displayed, $other_filename);
}
}
print "<p> Last changed: " . date ("F d Y H:i:s.", filemtime($filename)) . " </p>";
if ($others) print "<p>Also as ".implode(', ',$others)."</p>";
print "</div>";
}
Expand All @@ -118,6 +126,12 @@
?>
</ul>
</div>
<div>
<?php
$parent = "../";
print "<h3><a class=\"file\" href=\"$parent\">Parent Directory</a></h3>"
?>
</div>
<h3>a gp production</h3>
</body>
</html>
12 changes: 9 additions & 3 deletions plot/python/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ def copyIndexPHP( directory ):
''' Copy index.php to directory
'''
index_php = os.path.join( directory, 'index.php' )
if not os.path.exists( directory ): os.makedirs( directory )
if not os.path.exists( index_php ):
shutil.copyfile( os.path.expandvars( '$CMSSW_BASE/src/RootTools/plot/php/index.php' ), index_php )
if not os.path.exists( directory ): os.makedirs( directory )
if not directory[-1] == '/': directory = directory+'/'
subdirs = directory.split('/')
for i in range(1,len(subdirs)):
p = '/'.join(subdirs[:-i])
index_php = os.path.join( p, 'index.php' )
if os.path.exists( index_php ): break
else:
shutil.copyfile( os.path.expandvars( '$CMSSW_BASE/src/RootTools/plot/php/index.php' ), index_php )