##// END OF EJS Templates
user-groups: fix potential problem with group sync of external plugins....
user-groups: fix potential problem with group sync of external plugins. - when using external plugin we used to check for a parameter that set the sync mode. The problem is we only checked if the flag was there. So toggling sync on and off set the value and then left the key still set but with None. This confused the sync and thought the group should be synced !

File last commit:

r2134:5a024fcf default
r2143:4314e88b default
Show More
permissions_ssh_keys.mako
93 lines | 3.0 KiB | application/x-mako | MakoHtmlLexer
ssh-keys: added admin panel for managing globally all SSH Keys....
r2042
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('SSH Keys')} - <span id="ssh_keys_count"></span></h3>
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('admin_permissions_ssh_keys_update'), request=request)}
ssh-keys: added admin panel for managing globally all SSH Keys....
r2042 <button class="btn btn-link pull-right" type="submit">${_('Update SSH keys file')}</button>
${h.end_form()}
</div>
<div class="panel-body">
<input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
<div id="repos_list_wrap">
<table id="ssh_keys_table" class="display"></table>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
var $sshKeyListTable = $('#ssh_keys_table');
var getDatatableCount = function(){
var table = $sshKeyListTable.dataTable();
var page = table.api().page.info();
var active = page.recordsDisplay;
var total = page.recordsTotal;
var _text = _gettext("{0} out of {1} ssh keys").format(active, total);
$('#ssh_keys_count').text(_text);
};
// user list
$sshKeyListTable.DataTable({
processing: true,
serverSide: true,
ajax: "${h.route_path('admin_permissions_ssh_keys_data')}",
dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
order: [[ 0, "asc" ]],
columns: [
{ data: {"_": "username",
"sort": "username"}, title: "${_('Username')}", className: "td-user" },
{ data: {"_": "fingerprint",
"sort": "fingerprint"}, title: "${_('Fingerprint')}", className: "td-type" },
{ data: {"_": "description",
"sort": "description"}, title: "${_('Description')}", className: "td-type" },
{ data: {"_": "created_on",
"sort": "created_on"}, title: "${_('Created on')}", className: "td-time" },
ssh-keys: expose last access time on admin summary page for SSH keys.
r2134 { data: {"_": "accessed_on",
"sort": "accessed_on"}, title: "${_('Accessed on')}", className: "td-time" },
ssh-keys: added admin panel for managing globally all SSH Keys....
r2042 { data: {"_": "action",
"sort": "action"}, title: "${_('Action')}", className: "td-action", orderable: false }
],
language: {
paginate: DEFAULT_GRID_PAGINATION,
sProcessing: _gettext('loading...'),
emptyTable: _gettext("No ssh keys available yet.")
},
"createdRow": function ( row, data, index ) {
if (!data['active_raw']){
$(row).addClass('closed')
}
}
});
$sshKeyListTable.on('xhr.dt', function(e, settings, json, xhr){
$sshKeyListTable.css('opacity', 1);
});
$sshKeyListTable.on('preXhr.dt', function(e, settings, data){
$sshKeyListTable.css('opacity', 0.3);
});
// refresh counters on draw
$sshKeyListTable.on('draw.dt', function(){
getDatatableCount();
});
// filter
$('#q_filter').on('keyup',
$.debounce(250, function() {
$sshKeyListTable.DataTable().search(
$('#q_filter').val()
).draw();
})
);
});
</script>