ATLAS Offline Software
DebugPage.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 """
4 ATLAS beam spot web page for debugging
5 """
6 
7 __author__ = 'Juerg Beringer'
8 __version__ = 'DebugPage.py atlas/athena'
9 
10 from BeamSpotWebPage import BeamSpotWebPage
11 from InDetBeamSpotExample.Utils import getUserName
12 
13 import sys, os
14 
15 from future import standard_library
16 standard_library.install_aliases()
17 import subprocess
18 
19 
20 debuginfo = """
21 <div class="text">
22 <pre>
23 Python version: %s
24 Web server user: %s
25 whoami output: %s
26 HOME dir: %s
27 URL base path: %s
28 
29 List of pages: %s
30 Page attributes: %s
31 
32 Job directory: %s
33 TaskManager DB: %s
34 www directory: %s
35 nt directory: %s
36 </pre>
37 </div>
38 """
39 
40 
42 
43  def content(self,**args):
44  # Make sure we don't expose any password stored in oracle connection strings
45  taskDb = 'oracle:******' if 'oracle:' in self.globalConfig['taskDb'] else self.globalConfig['taskDb']
46  return debuginfo % (sys.version,
47  getUserName(),
48  subprocess.getoutput('whoami'),
49  os.environ.get('HOME','not defined'),
50  self.globalConfig.baseUrl,
51  self.globalConfig.pageList,
52  self.globalConfig.pageAttributes,
53 
54  self.globalConfig['jobDir'],
55  taskDb,
56  self.globalConfig['wwwDir'],
57  self.globalConfig['ntDir'])
WebPage.WebPage.globalConfig
globalConfig
Definition: WebPage.py:290
DebugPage.DebugPage
Definition: DebugPage.py:41
DebugPage.DebugPage.content
def content(self, **args)
Definition: DebugPage.py:43
python.Utils.getUserName
def getUserName(default='UNKNOWN')
Definition: InnerDetector/InDetExample/InDetBeamSpotExample/python/Utils.py:48
BeamSpotWebPage.BeamSpotWebPage
Definition: BeamSpotWebPage.py:47