ctrlpanel/themes/default/views/admin/servers/table.blade.php

72 lines
2 KiB
PHP
Raw Normal View History

2021-06-05 09:26:32 +00:00
<table id="datatable" class="table table-striped">
<thead>
2023-02-15 20:41:24 +00:00
<tr>
<th width="20"></th>
<th>{{ __('Name') }}</th>
<th>{{ __('User') }}</th>
<th>{{ __('Server id') }}</th>
<th>{{ __('Config') }}</th>
<th>{{ __('Suspended at') }}</th>
<th>{{ __('Created at') }}</th>
<th></th>
</tr>
2021-06-05 09:26:32 +00:00
</thead>
<tbody>
</tbody>
</table>
<script>
function submitResult() {
2023-02-15 20:41:24 +00:00
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
2021-06-05 09:26:32 +00:00
}
2023-02-15 20:41:24 +00:00
document.addEventListener("DOMContentLoaded", function() {
2021-06-05 09:26:32 +00:00
$('#datatable').DataTable({
2021-12-13 21:39:40 +00:00
language: {
2023-02-15 20:41:24 +00:00
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ config('SETTINGS::LOCALE:DATATABLES') }}.json'
2021-12-13 21:39:40 +00:00
},
2021-06-05 09:26:32 +00:00
processing: true,
serverSide: true,
stateSave: true,
2023-02-15 20:41:24 +00:00
ajax: "{{ route('admin.servers.datatable') }}{{ $filter ?? '' }}",
order: [
[6, "desc"]
2021-06-05 09:26:32 +00:00
],
2023-02-15 20:41:24 +00:00
columns: [{
data: 'status',
name: 'servers.suspended',
sortable: false
},
{
data: 'name'
},
{
data: 'user',
name: 'user.name',
},
{
data: 'identifier'
},
{
data: 'resources',
name: 'product.name',
sortable: false
},
{
data: 'suspended'
},
{
data: 'created_at'
},
{
data: 'actions',
sortable: false
},
],
fnDrawCallback: function(oSettings) {
2021-06-05 09:26:32 +00:00
$('[data-toggle="popover"]').popover();
}
});
});
</script>