Show More
@@ -1,84 +1,87 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('SSH Keys')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | <div class="sshkeys_wrap"> |
|
7 | 7 | <table class="rctable ssh_keys"> |
|
8 | 8 | <tr> |
|
9 | 9 | <th>${_('Fingerprint')}</th> |
|
10 | 10 | <th>${_('Description')}</th> |
|
11 | 11 | <th>${_('Created')}</th> |
|
12 | 12 | <th>${_('Action')}</th> |
|
13 | 13 | </tr> |
|
14 | 14 | % if not c.ssh_enabled: |
|
15 | 15 | <tr><td colspan="4"><div class="">${_('SSH Keys usage is currently disabled, please ask your administrator to enable them.')}</div></td></tr> |
|
16 | 16 | % else: |
|
17 | 17 | %if c.user_ssh_keys: |
|
18 | 18 | %for ssh_key in c.user_ssh_keys: |
|
19 | 19 | <tr class=""> |
|
20 | 20 | <td class=""> |
|
21 | 21 | <code>${ssh_key.ssh_key_fingerprint}</code> |
|
22 | 22 | </td> |
|
23 | 23 | <td class="td-wrap">${ssh_key.description}</td> |
|
24 | 24 | <td class="td-tags">${h.format_date(ssh_key.created_on)}</td> |
|
25 | 25 | |
|
26 | 26 | <td class="td-action"> |
|
27 | 27 | ${h.secure_form(h.route_path('my_account_ssh_keys_delete'), request=request)} |
|
28 | 28 | ${h.hidden('del_ssh_key', ssh_key.ssh_key_id)} |
|
29 | 29 | <button class="btn btn-link btn-danger" type="submit" |
|
30 | 30 | onclick="return confirm('${_('Confirm to remove ssh key %s') % ssh_key.ssh_key_fingerprint}');"> |
|
31 | 31 | ${_('Delete')} |
|
32 | 32 | </button> |
|
33 | 33 | ${h.end_form()} |
|
34 | 34 | </td> |
|
35 | 35 | </tr> |
|
36 | 36 | %endfor |
|
37 | 37 | %else: |
|
38 | 38 | <tr><td colspan="4"><div class="">${_('No additional ssh keys specified')}</div></td></tr> |
|
39 | 39 | %endif |
|
40 | 40 | % endif |
|
41 | 41 | </table> |
|
42 | 42 | </div> |
|
43 | 43 | |
|
44 | 44 | % if c.ssh_enabled: |
|
45 | 45 | <div class="user_ssh_keys"> |
|
46 | 46 | ${h.secure_form(h.route_path('my_account_ssh_keys_add'), request=request)} |
|
47 | 47 | <div class="form form-vertical"> |
|
48 | 48 | <!-- fields --> |
|
49 | 49 | <div class="fields"> |
|
50 | 50 | <div class="field"> |
|
51 | 51 | <div class="label"> |
|
52 | 52 | <label for="new_email">${_('New ssh key')}:</label> |
|
53 | 53 | </div> |
|
54 | 54 | <div class="input"> |
|
55 | 55 | ${h.text('description', class_='medium', placeholder=_('Description'))} |
|
56 | 56 | <a href="${h.route_path('my_account_ssh_keys_generate')}">${_('Generate random RSA key')}</a> |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | |
|
60 | 60 | <div class="field"> |
|
61 | 61 | <div class="textarea text-area editor"> |
|
62 | 62 | ${h.textarea('key_data',c.default_key, size=30, placeholder=_("Public key, begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'"))} |
|
63 | 63 | </div> |
|
64 | 64 | </div> |
|
65 | 65 | |
|
66 | 66 | <div class="buttons"> |
|
67 | 67 | ${h.submit('save',_('Add'),class_="btn")} |
|
68 | 68 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
69 | 69 | </div> |
|
70 | % if c.default_key: | |
|
71 | ${_('Click add to use this generate SSH key')} | |
|
72 | % endif | |
|
70 | 73 | </div> |
|
71 | 74 | </div> |
|
72 | 75 | ${h.end_form()} |
|
73 | 76 | </div> |
|
74 | 77 | % endif |
|
75 | 78 | </div> |
|
76 | 79 | </div> |
|
77 | 80 | |
|
78 | 81 | <script> |
|
79 | 82 | |
|
80 | 83 | $(document).ready(function(){ |
|
81 | 84 | |
|
82 | 85 | |
|
83 | 86 | }); |
|
84 | 87 | </script> |
@@ -1,78 +1,81 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('SSH Keys')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | <div class="sshkeys_wrap"> |
|
7 | 7 | <table class="rctable ssh_keys"> |
|
8 | 8 | <tr> |
|
9 | 9 | <th>${_('Fingerprint')}</th> |
|
10 | 10 | <th>${_('Description')}</th> |
|
11 | 11 | <th>${_('Created')}</th> |
|
12 | 12 | <th>${_('Action')}</th> |
|
13 | 13 | </tr> |
|
14 | 14 | %if c.user_ssh_keys: |
|
15 | 15 | %for ssh_key in c.user_ssh_keys: |
|
16 | 16 | <tr class=""> |
|
17 | 17 | <td class=""> |
|
18 | 18 | <code>${ssh_key.ssh_key_fingerprint}</code> |
|
19 | 19 | </td> |
|
20 | 20 | <td class="td-wrap">${ssh_key.description}</td> |
|
21 | 21 | <td class="td-tags">${h.format_date(ssh_key.created_on)}</td> |
|
22 | 22 | |
|
23 | 23 | <td class="td-action"> |
|
24 | 24 | ${h.secure_form(h.route_path('edit_user_ssh_keys_delete', user_id=c.user.user_id), request=request)} |
|
25 | 25 | ${h.hidden('del_ssh_key', ssh_key.ssh_key_id)} |
|
26 | 26 | <button class="btn btn-link btn-danger" type="submit" |
|
27 | 27 | onclick="return confirm('${_('Confirm to remove ssh key %s') % ssh_key.ssh_key_fingerprint}');"> |
|
28 | 28 | ${_('Delete')} |
|
29 | 29 | </button> |
|
30 | 30 | ${h.end_form()} |
|
31 | 31 | </td> |
|
32 | 32 | </tr> |
|
33 | 33 | %endfor |
|
34 | 34 | %else: |
|
35 | 35 | <tr><td><div class="ip">${_('No additional ssh keys specified')}</div></td></tr> |
|
36 | 36 | %endif |
|
37 | 37 | </table> |
|
38 | 38 | </div> |
|
39 | 39 | |
|
40 | 40 | <div class="user_ssh_keys"> |
|
41 | 41 | ${h.secure_form(h.route_path('edit_user_ssh_keys_add', user_id=c.user.user_id), request=request)} |
|
42 | 42 | <div class="form form-vertical"> |
|
43 | 43 | <!-- fields --> |
|
44 | 44 | <div class="fields"> |
|
45 | 45 | <div class="field"> |
|
46 | 46 | <div class="label"> |
|
47 | 47 | <label for="new_email">${_('New ssh key')}:</label> |
|
48 | 48 | </div> |
|
49 | 49 | <div class="input"> |
|
50 | 50 | ${h.text('description', class_='medium', placeholder=_('Description'))} |
|
51 | 51 | <a href="${h.route_path('edit_user_ssh_keys_generate_keypair', user_id=c.user.user_id)}">${_('Generate random RSA key')}</a> |
|
52 | 52 | </div> |
|
53 | 53 | </div> |
|
54 | 54 | |
|
55 | 55 | <div class="field"> |
|
56 | 56 | <div class="textarea text-area editor"> |
|
57 | 57 | ${h.textarea('key_data',c.default_key, size=30, placeholder=_("Public key, begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'"))} |
|
58 | 58 | </div> |
|
59 | 59 | </div> |
|
60 | 60 | |
|
61 | 61 | <div class="buttons"> |
|
62 | 62 | ${h.submit('save',_('Add'),class_="btn")} |
|
63 | 63 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
64 | 64 | </div> |
|
65 | % if c.default_key: | |
|
66 | ${_('Click add to use this generate SSH key')} | |
|
67 | % endif | |
|
65 | 68 | </div> |
|
66 | 69 | </div> |
|
67 | 70 | ${h.end_form()} |
|
68 | 71 | </div> |
|
69 | 72 | </div> |
|
70 | 73 | </div> |
|
71 | 74 | |
|
72 | 75 | <script> |
|
73 | 76 | |
|
74 | 77 | $(document).ready(function(){ |
|
75 | 78 | |
|
76 | 79 | |
|
77 | 80 | }); |
|
78 | 81 | </script> |
@@ -1,48 +1,49 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('New SSH Key generated')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | <p> |
|
7 | 7 | ${_('Below is a 2048 bit generated SSH RSA key. You can use it to access RhodeCode via the SSH wrapper.')} |
|
8 | 8 | </p> |
|
9 | 9 | <h4>${_('Private key')}</h4> |
|
10 | 10 | <pre> |
|
11 | 11 | # Save the content as |
|
12 | 12 | ~/.ssh/id_rsa_rhodecode_access_priv.key |
|
13 | 13 | # Change permissions |
|
14 | 14 | chmod 0600 ~/.ssh/id_rsa_rhodecode_access_priv.key |
|
15 | 15 | </pre> |
|
16 | 16 | |
|
17 | 17 | <div> |
|
18 | 18 | <textarea style="height: 300px">${c.private}</textarea> |
|
19 | 19 | </div> |
|
20 | 20 | <br/> |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | <h4>${_('Public key')}</h4> |
|
24 | 24 | <pre> |
|
25 | 25 | # Save the content as |
|
26 | 26 | ~/.ssh/id_rsa_rhodecode_access_pub.key |
|
27 | 27 | # Change permissions |
|
28 | 28 | chmod 0600 ~/.ssh/id_rsa_rhodecode_access_pub.key |
|
29 | 29 | </pre> |
|
30 | 30 | |
|
31 | 31 | <input type="text" value="${c.public}" class="large text" size="100"/> |
|
32 | 32 | <p> |
|
33 | 33 | % if hasattr(c, 'target_form_url'): |
|
34 |
<a href="${c.target_form_url}">${_(' |
|
|
34 | <a href="${c.target_form_url}">${_('Use this generated key')}.</a> | |
|
35 | 35 | % else: |
|
36 |
<a href="${h.route_path('edit_user_ssh_keys', user_id=c.user.user_id, _query=dict(default_key=c.public))}">${_(' |
|
|
36 | <a href="${h.route_path('edit_user_ssh_keys', user_id=c.user.user_id, _query=dict(default_key=c.public))}">${_('Use this generated key')}.</a> | |
|
37 | 37 | % endif |
|
38 | ${_('Confirmation required on the next screen')}. | |
|
38 | 39 | </p> |
|
39 | 40 | </div> |
|
40 | 41 | </div> |
|
41 | 42 | |
|
42 | 43 | <script> |
|
43 | 44 | |
|
44 | 45 | $(document).ready(function(){ |
|
45 | 46 | |
|
46 | 47 | |
|
47 | 48 | }); |
|
48 | 49 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now