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