feat: ✨ Added Resource plan-/product-data to server card
This commit is contained in:
parent
2bfe26247a
commit
5a05c5f846
|
@ -44,9 +44,9 @@ class ServerController extends Controller
|
||||||
$server->nest = $serverRelationships['nest']['attributes']['name'];
|
$server->nest = $serverRelationships['nest']['attributes']['name'];
|
||||||
|
|
||||||
//get productname by product_id for server
|
//get productname by product_id for server
|
||||||
$productName = Product::find($server->product_id)->name;
|
$product = Product::find($server->product_id);
|
||||||
|
|
||||||
$server->resourceplanName = $productName;
|
$server->product = $product;
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('servers.index')->with([
|
return view('servers.index')->with([
|
||||||
|
|
|
@ -107,8 +107,12 @@
|
||||||
<div class="col-5 ">
|
<div class="col-5 ">
|
||||||
{{ __('Resource plan') }}:
|
{{ __('Resource plan') }}:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7 text-wrap">
|
<div class="col-7 text-wrap d-flex justify-content-between align-items-center">
|
||||||
<span>{{ $server->resourceplanName }}</span>
|
<span>{{ $server->product->name }}
|
||||||
|
</span>
|
||||||
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
|
data-content="{{ __('CPU') }}: {{ $server->product->cpu / 100 }} {{ __('vCores') }} <br/>{{ __('RAM') }}: {{ $server->product->memory }} MB <br/>{{ __('Disk') }}: {{ $server->product->disk }} MB <br/>{{ __('Backups') }}: {{ $server->product->backups }} <br/> {{ __('MySQL Databases') }}: {{ $server->product->databases }} <br/> {{ __('Allocations') }}: {{ $server->product->allocations }} <br/>"
|
||||||
|
class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -193,5 +197,9 @@
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
$('[data-toggle="popover"]').popover();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
Loading…
Reference in a new issue