fix: 🐛 Show Product name instead of resource description #756

This commit is contained in:
IceToast 2023-04-04 01:58:23 +02:00
parent 44948226bb
commit 91476d2701
No known key found for this signature in database
GPG key ID: 1464353E063A5B97

View file

@ -6,12 +6,13 @@
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{__('Servers')}}</h1>
<h1>{{ __('Servers') }}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.servers.index')}}">{{__('Servers')}}</a></li>
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{ route('admin.servers.index') }}">{{ __('Servers') }}</a></li>
</ol>
</div>
</div>
@ -27,25 +28,25 @@
<div class="card-header">
<div class="d-flex justify-content-between">
<div class="card-title ">
<span><i class="fas fa-server mr-2"></i>{{__('Servers')}}</span>
<span><i class="fas fa-server mr-2"></i>{{ __('Servers') }}</span>
</div>
<a href="{{route('admin.servers.sync')}}" class="btn btn-primary btn-sm"><i
class="fas fa-sync mr-2"></i>{{__('Sync')}}</a>
<a href="{{ route('admin.servers.sync') }}" class="btn btn-primary btn-sm"><i
class="fas fa-sync mr-2"></i>{{ __('Sync') }}</a>
</div>
</div>
<div class="card-body table-responsive">
<table id="datatable" class="table table-striped">
<thead>
<tr>
<th width="20">{{ __('Status') }}</th>
<th>{{__('Name')}}</th>
<th>{{__('User')}}</th>
<th>{{__('Server id')}}</th>
<th>{{__('Config')}}</th>
<th>{{__('Suspended at')}}</th>
<th>{{__('Created at')}}</th>
<th>{{ __('Actions') }}</th>
</tr>
<tr>
<th width="20">{{ __('Status') }}</th>
<th>{{ __('Name') }}</th>
<th>{{ __('User') }}</th>
<th>{{ __('Server id') }}</th>
<th>{{ __('Product') }}</th>
<th>{{ __('Suspended at') }}</th>
<th>{{ __('Created at') }}</th>
<th>{{ __('Actions') }}</th>
</tr>
</thead>
<tbody>
</tbody>
@ -61,10 +62,10 @@
<script>
function submitResult() {
return confirm("{{__('Are you sure you wish to delete?')}}") !== false;
return confirm("{{ __('Are you sure you wish to delete?') }}") !== false;
}
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
$('#datatable').DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ $locale_datatables }}.json'
@ -72,19 +73,40 @@
processing: true,
serverSide: true,
stateSave: true,
ajax: "{{route('admin.servers.datatable')}}{{$filter ?? ''}}",
order: [[ 5, "desc" ]],
columns: [
{data: 'status' , name : 'servers.suspended'},
{data: 'name'},
{data: 'user' , name : 'user.name'},
{data: 'identifier'},
{data: 'resources' , name : 'product.name'},
{data: 'suspended'},
{data: 'created_at'},
{data: 'actions' , sortable : false},
ajax: "{{ route('admin.servers.datatable') }}{{ $filter ?? '' }}",
order: [
[5, "desc"]
],
fnDrawCallback: function( oSettings ) {
columns: [{
data: 'status',
name: 'servers.suspended'
},
{
data: 'name'
},
{
data: 'user',
name: 'user.name'
},
{
data: 'identifier'
},
{
data: 'product.name',
sortable: false
},
{
data: 'suspended'
},
{
data: 'created_at'
},
{
data: 'actions',
sortable: false
},
],
fnDrawCallback: function(oSettings) {
$('[data-toggle="popover"]').popover();
}
});