User path for performance graph

merge-requests/30/head
Bob Mottram 2021-10-20 11:41:58 +01:00
parent 9e9f970c96
commit 2873c4705b
1 changed files with 6 additions and 4 deletions

View File

@ -1415,12 +1415,14 @@ def _htmlEditProfileDangerZone(translate: {}) -> str:
return editProfileForm
def _htmlSystemMonitor(translate: {}) -> str:
def _htmlSystemMonitor(nickname: str, translate: {}) -> str:
"""Links to performance graphs
"""
systemMonitorStr = beginEditSection(translate['System Monitor'])
systemMonitorStr += '<p><a href="/performance?graph=get">📊 GET</a></p>'
systemMonitorStr += '<p><a href="/performance?graph=post">📊 POST</a></p>'
systemMonitorStr += '<p><a href="/users/' + nickname + \
'/performance?graph=get">📊 GET</a></p>'
systemMonitorStr += '<p><a href="/users/' + nickname + \
'/performance?graph=post">📊 POST</a></p>'
systemMonitorStr += endEditSection()
return systemMonitorStr
@ -2074,7 +2076,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
mediaInstanceStr,
blogsInstanceStr,
newsInstanceStr)
systemMonitorStr = _htmlSystemMonitor(translate)
systemMonitorStr = _htmlSystemMonitor(nickname, translate)
instanceTitle = getConfigParam(baseDir, 'instanceTitle')
editProfileForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)