##// END OF EJS Templates
comment-history: UI fixes
comment-history: UI fixes

File last commit:

r4313:4bf03e9f default
r4404:56b5a39d default
Show More
my_account_ssh_keys.mako
92 lines | 3.9 KiB | application/x-mako | MakoHtmlLexer
ssh: added ssh key management into my account.
r2044 <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('SSH Keys')}</h3>
</div>
<div class="panel-body">
<div class="sshkeys_wrap">
<table class="rctable ssh_keys">
<tr>
<th>${_('Fingerprint')}</th>
<th>${_('Description')}</th>
ssh: improve logging, and make the UI show last accessed date for key.
r2973 <th>${_('Created on')}</th>
<th>${_('Accessed on')}</th>
ssh: added ssh key management into my account.
r2044 <th>${_('Action')}</th>
</tr>
SSH: disable visually support ssh keys if we have them disabled in the .ini
r2045 % if not c.ssh_enabled:
<tr><td colspan="4"><div class="">${_('SSH Keys usage is currently disabled, please ask your administrator to enable them.')}</div></td></tr>
% else:
%if c.user_ssh_keys:
%for ssh_key in c.user_ssh_keys:
<tr class="">
<td class="">
<code>${ssh_key.ssh_key_fingerprint}</code>
</td>
<td class="td-wrap">${ssh_key.description}</td>
<td class="td-tags">${h.format_date(ssh_key.created_on)}</td>
ssh: improve logging, and make the UI show last accessed date for key.
r2973 <td class="td-tags">${h.format_date(ssh_key.accessed_on)}</td>
ssh: added ssh key management into my account.
r2044
SSH: disable visually support ssh keys if we have them disabled in the .ini
r2045 <td class="td-action">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('my_account_ssh_keys_delete'), request=request)}
SSH: disable visually support ssh keys if we have them disabled in the .ini
r2045 ${h.hidden('del_ssh_key', ssh_key.ssh_key_id)}
<button class="btn btn-link btn-danger" type="submit"
templates: switched most of confirm dialogs to sweetalert2
r4313 onclick="submitConfirm(event, this, _gettext('Confirm to delete this ssh key'), _gettext('Delete'), '${ssh_key.ssh_key_fingerprint}')"
>
SSH: disable visually support ssh keys if we have them disabled in the .ini
r2045 ${_('Delete')}
</button>
${h.end_form()}
</td>
</tr>
%endfor
%else:
<tr><td colspan="4"><div class="">${_('No additional ssh keys specified')}</div></td></tr>
%endif
% endif
ssh: added ssh key management into my account.
r2044 </table>
</div>
SSH: disable visually support ssh keys if we have them disabled in the .ini
r2045 % if c.ssh_enabled:
ssh: added ssh key management into my account.
r2044 <div class="user_ssh_keys">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('my_account_ssh_keys_add'), request=request)}
ssh: added ssh key management into my account.
r2044 <div class="form form-vertical">
<!-- fields -->
<div class="fields">
<div class="field">
<div class="label">
<label for="new_email">${_('New ssh key')}:</label>
</div>
<div class="input">
${h.text('description', class_='medium', placeholder=_('Description'))}
Issue #5536 - ability to disable server-side SSH key generation...
r3478 % if c.ssh_key_generator_enabled:
<a href="${h.route_path('my_account_ssh_keys_generate')}">${_('Generate random RSA key')}</a>
% endif
ssh: added ssh key management into my account.
r2044 </div>
</div>
<div class="field">
<div class="textarea text-area editor">
${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'"))}
</div>
</div>
<div class="buttons">
${h.submit('save',_('Add'),class_="btn")}
${h.reset('reset',_('Reset'),class_="btn")}
</div>
ssh: add few explanation text about two step addition of generated keys....
r2477 % if c.default_key:
Issue #5536 - ability to disable server-side SSH key generation...
r3478 ${_('Click add to use this generated SSH key')}
ssh: add few explanation text about two step addition of generated keys....
r2477 % endif
ssh: added ssh key management into my account.
r2044 </div>
</div>
${h.end_form()}
</div>
SSH: disable visually support ssh keys if we have them disabled in the .ini
r2045 % endif
ssh: added ssh key management into my account.
r2044 </div>
</div>
<script>
$(document).ready(function(){
});
</script>