mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
UI connections page: add a refresh button
This commit is contained in:
@@ -134,6 +134,15 @@
|
|||||||
enabled: false
|
enabled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$.fn.dataTable.ext.buttons.refresh = {
|
||||||
|
text: '<i class="fas fa-sync-alt"></i>',
|
||||||
|
name: 'refresh',
|
||||||
|
titleAttr: "Refresh",
|
||||||
|
action: function (e, dt, node, config) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var table = $('#dataTable').DataTable({
|
var table = $('#dataTable').DataTable({
|
||||||
"select": {
|
"select": {
|
||||||
"style": "single",
|
"style": "single",
|
||||||
@@ -159,6 +168,9 @@
|
|||||||
|
|
||||||
new $.fn.dataTable.FixedHeader( table );
|
new $.fn.dataTable.FixedHeader( table );
|
||||||
|
|
||||||
|
table.button().add(0, 'refresh');
|
||||||
|
table.button().add(0,'pageLength');
|
||||||
|
|
||||||
{{if .LoggedAdmin.HasPermission "close_conns"}}
|
{{if .LoggedAdmin.HasPermission "close_conns"}}
|
||||||
table.button().add(0,'disconnect');
|
table.button().add(0,'disconnect');
|
||||||
|
|
||||||
@@ -167,9 +179,7 @@
|
|||||||
table.button('disconnect:name').enable(selectedRows == 1);
|
table.button('disconnect:name').enable(selectedRows == 1);
|
||||||
});
|
});
|
||||||
{{end}}
|
{{end}}
|
||||||
table.button().add(0,'pageLength');
|
|
||||||
table.buttons().container().appendTo('#dataTable_wrapper .col-md-6:eq(0)');
|
table.buttons().container().appendTo('#dataTable_wrapper .col-md-6:eq(0)');
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{end}}
|
||||||
Reference in New Issue
Block a user