Updated server index blade view

Updated server index blade view for NPM webpack usage
This commit is contained in:
cp6 2022-11-13 15:54:27 +11:00
parent f0903e08f4
commit 26356b3cd7

View File

@ -1,17 +1,9 @@
@section("title", "Servers")
@section('style')
<x-modal-style></x-modal-style>
@endsection
@section('scripts')
<script src="{{ asset('js/vue.min.js') }}"></script>
<script src="{{ asset('js/axios.min.js') }}"></script>
@endsection
@section('title', 'Servers')
<x-app-layout>
<x-slot name="header">
{{ __('Servers') }}
</x-slot>
<div class="container" id="app">
<x-delete-confirm-modal></x-delete-confirm-modal>
<x-response-alerts></x-response-alerts>
<ul class="nav nav-tabs mt-3" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
@ -94,7 +86,7 @@
<i class="fas fa-plug mx-1" id="{{$server->hostname}}"
title="check if up"
@click="checkUp">
@click="checkIfUp">
</i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$server->id}}" title="{{$server->hostname}}"></i>
@ -175,7 +167,7 @@
<i class="fas fa-plug mx-1" id="{{$server->hostname}}"
title="check if up"
@click="checkUp">
@click="checkIfUp">
</i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$server->id}}" title="{{$server->hostname}}"></i>
@ -196,7 +188,12 @@
</div>
<x-details-footer></x-details-footer>
</div>
<x-delete-confirm-modal></x-delete-confirm-modal>
</div>
@section('scripts')
<script>
window.addEventListener('load', function () {
document.getElementById("confirmDeleteModal").classList.remove("d-none");
axios.defaults.headers.common = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
@ -214,7 +211,7 @@
showModal: false
},
methods: {
checkUp(event) {
checkIfUp(event) {
var hostname = event.target.id;
if (hostname) {
@ -238,5 +235,7 @@
}
}
});
})
</script>
@endsection
</x-app-layout>