Add a trailing slash to file links in the file tab

This avoids a HTTP 301 redirect when trying to open a file from the
file tab which was confusing reverse proxies with SSL termination.

Change-Id: If1cdf11ff6e1e2bae146307a21c1a1aea31c51ed
This commit is contained in:
David Moreau Simard 2018-06-12 10:05:04 -04:00
parent d69b2d34c2
commit 3a795d5166
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
2 changed files with 5 additions and 3 deletions

View File

@ -91,7 +91,9 @@ class TestUtils(TestAra):
child = child['nodes'][0]
self.assertEqual(child['text'], 'main.yml')
self.assertEqual(child['dataAttr']['load'],
ctx['task_file'].id)
ctx['task_file'].id + '/')
else:
self.assertEqual(f['text'], 'playbook.yml')
self.assertEqual(f['dataAttr']['load'], ctx['pb_file'].id)
self.assertEqual(
f['dataAttr']['load'], ctx['pb_file'].id + '/'
)

View File

@ -136,7 +136,7 @@ def generate_tree(root, paths, mock_os):
node['dataAttr'] = {
'toggle': 'modal',
'target': '#file_modal',
'load': paths[full_path]
'load': paths[full_path] + '/'
}
tree.append(node)
return tree