Skip to content

Commit 9592b2b

Browse files
committed
Fix caching logic and polish various look n' feel bits to clarify a the point
of the refresh link.
1 parent e949933 commit 9592b2b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

mig/shared/functionality/viewuser.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def signature():
5353
"""Signature of the main function"""
5454

5555
defaults = {'cert_id': REJECT_UNSET,
56-
'caching': ['false']}
56+
'caching': ['true']}
5757
return ['user_info', defaults]
5858

5959

@@ -211,10 +211,15 @@ def main(client_id, user_arguments_dict):
211211
client_dir)) + os.sep
212212
status = returnvalues.OK
213213

214+
if caching:
215+
caching_note = '(cached)'
216+
else:
217+
caching_note = ''
218+
214219
title_entry = find_entry(output_objects, 'title')
215220
title_entry['text'] = 'User details'
216221
output_objects.append({'object_type': 'header', 'text':
217-
'Show user details'})
222+
'Show user details %s' % caching_note})
218223

219224
visible_user = user_visible_user_confs(configuration, client_id, caching)
220225
vgrid_access = user_vgrid_access(configuration, client_id, caching)
@@ -251,12 +256,15 @@ def main(client_id, user_arguments_dict):
251256
vgrid_access)
252257
output_objects.append(user_item)
253258

259+
output_objects.append({'object_type': 'html_form',
260+
'text': '<div class="vertical-spacer"></div>'})
261+
user_query = '%s' % '&'.join(['cert_id=%s' % i for i in user_list])
254262
output_objects.append(
255263
{'object_type': 'link',
256264
'destination':
257-
'viewuser.py?%s' % '&'.join(['cert_id=%s' % i for i in user_list]),
265+
'viewuser.py?caching=false&%s' % user_query,
258266
'class': 'refreshlink iconspace',
259-
'title': 'Refresh current user data - may take long time',
260-
'text': ''})
267+
'title': 'View without caching',
268+
'text': 'View without caching of user data - may take a long time'})
261269

262270
return (output_objects, status)

0 commit comments

Comments
 (0)