diff --git a/app/Http/Controllers/admin/package/Host.php b/app/Http/Controllers/admin/package/Host.php index 50ecb3f..d35f868 100644 --- a/app/Http/Controllers/admin/package/Host.php +++ b/app/Http/Controllers/admin/package/Host.php @@ -27,7 +27,7 @@ class Host extends Controller public function index(Request $request) { $title = 'List all Host'; - return view("admin.package.host.index", compact('title')); + return view("administrator.pages.package.host.index", compact('title')); } public function datatable(Request $request) @@ -44,6 +44,9 @@ class Host extends Controller ->editColumn('updated_at', function ($d) { return $d->updated_at ? $d->updated_at->format('d/m/Y') : ''; }) + ->editColumn('datacenter.name', function ($d) { + return $d->datacenter->name . ' - ' . $d->datacenter->datacenter_id; + }) ->addColumn('action', function ($d) { $editUrl = route('package.host.edit', ['id' => $d->id]); $deleteBtn = ''; @@ -92,7 +95,7 @@ HTML; { $title = 'Add host'; - return view('admin.package.host.add', compact('title')); + return view('administrator.pages.package.host.add', compact('title')); } public function store(HostRequest $request) { @@ -123,7 +126,7 @@ HTML; } $title = "View Host Information"; - return view('admin.package.host.edit', compact('host', 'title')); + return view('administrator.pages.package.host.edit', compact('host', 'title')); } public function update(int $id = 0, HostRequest $request) { diff --git a/resources/views/administrator/pages/block/Sync/Host.blade.php b/resources/views/administrator/pages/block/Sync/Host.blade.php index 54ce5a7..1a5be41 100644 --- a/resources/views/administrator/pages/block/Sync/Host.blade.php +++ b/resources/views/administrator/pages/block/Sync/Host.blade.php @@ -1,3 +1,3 @@ Add Host -@include("admin.block.Sync.All") +@include("administrator.pages.block.Sync.All") Sync Host diff --git a/resources/views/administrator/pages/package/host/add.blade.php b/resources/views/administrator/pages/package/host/add.blade.php index be510bc..9af4e6f 100644 --- a/resources/views/administrator/pages/package/host/add.blade.php +++ b/resources/views/administrator/pages/package/host/add.blade.php @@ -1,51 +1,73 @@ -@extends("admin.main") -@section("content") -@if(auth()->guard('admins')->user()->can("add module vcenter")) -
-
- @csrf -
- - - {{--Name--}} -
- -
- -
-
- {{--Host ID--}} -
- -
- -
-
- {{--Template ID--}} -
- -
- -
-
- {{--Console ID--}} -
- -
- -
-
-
- -
-
-@else -
-
Access Denied - You are not assigned to any Module vCenter - management department
-
-@endif +@extends('administrator.layout.master') +@push('plugin-styles') + +@endpush + +@section('breadcrumb') + @php + $breadcrumbItems = [ + ['label' => 'Modules'], + ['label' => 'Package vCenter'], + ['label' => 'Host', 'active' => true], + ]; + @endphp + @endsection +@section("content") + @if(auth()->guard('admins')->user()->can("add module vcenter")) +
+
+ @csrf +
+ + + {{--Name--}} +
+ +
+ +
+
+ {{--Host ID--}} +
+ +
+ +
+
+ {{--Template ID--}} +
+ +
+ +
+
+ {{--Console ID--}} +
+ +
+ +
+
+
+ +
+
+ @else +
+
Access Denied - You are not assigned to any Module vCenter + management department
+
+ @endif +@endsection + +@push('plugin-scripts') + + + + +@endpush \ No newline at end of file diff --git a/resources/views/administrator/pages/package/host/edit.blade.php b/resources/views/administrator/pages/package/host/edit.blade.php index 113c9f9..94375d8 100644 --- a/resources/views/administrator/pages/package/host/edit.blade.php +++ b/resources/views/administrator/pages/package/host/edit.blade.php @@ -1,53 +1,77 @@ -@extends("admin.main") -@section("content") -@if(auth()->guard('admins')->user()->can("add module vcenter")) -
-
- @csrf - @method('put') -
- - - - {{--Name--}} -
- -
- -
-
- {{--Host ID--}} -
- -
- -
-
- {{--Template ID--}} -
- -
- -
-
- {{--Console ID--}} -
- -
- -
-
-
- -
-
-@else -
-
Access Denied - You are not assigned to any Module vCenter - management department
-
-@endif +@extends('administrator.layout.master') +@push('plugin-styles') + +@endpush + +@section('breadcrumb') + @php + $breadcrumbItems = [ + ['label' => 'Modules'], + ['label' => 'Package vCenter'], + ['label' => 'Host', 'active' => true], + ]; + @endphp + @endsection +@section("content") + @if(auth()->guard('admins')->user()->can("add module vcenter")) +
+
+ @csrf + @method('put') +
+ + + + {{--Name--}} +
+ +
+ +
+
+ {{--Host ID--}} +
+ +
+ +
+
+ {{--Template ID--}} +
+ +
+ +
+
+ {{--Console ID--}} +
+ +
+ +
+
+
+ +
+
+ @else +
+
Access Denied - You are not assigned to any Module vCenter + management department
+
+ @endif +@endsection +@push('plugin-scripts') + + + + +@endpush \ No newline at end of file diff --git a/resources/views/administrator/pages/package/host/index.blade.php b/resources/views/administrator/pages/package/host/index.blade.php index 3e6cf50..d52732c 100644 --- a/resources/views/administrator/pages/package/host/index.blade.php +++ b/resources/views/administrator/pages/package/host/index.blade.php @@ -1,79 +1,32 @@ -@php use App\Http\Helpers\Helper; @endphp -@extends('admin.main') +@extends('administrator.layout.master') +@push('plugin-styles') + +@endpush + +@section('breadcrumb') + @php + $breadcrumbItems = [ + ['label' => 'Modules'], + ['label' => 'Package vCenter'], + ['label' => 'Host', 'active' => true], + ]; + @endphp + +@endsection @section('content') @if(auth()->guard('admins')->user()->can("manager package module"))
- @include("admin.block.Sync.Host") + @include("administrator.pages.block.Sync.Host")
- - - - - - - - - - - - - - @if(count($hosts) > 0) - @foreach($hosts->all() as $item) - - - - - - - - - - @endforeach - @endif - -
- - Host NameDatacenter NamevCenter HostLast Updated
- - - {{ $item->name }} - - @isset($item->datacenter->name) - {{$item->datacenter->name}} - @endisset - - @isset($item->datacenter->vCenter->host) - {{$item->datacenter->vCenter->host}} - @endisset - - @time($item->updated_at) - - - - - - @if(auth()->guard('admins')->user()->can("delete module vcenter")) -
- @method('delete') - @csrf - -
- @endif -
-
-
@else @@ -83,3 +36,9 @@ @endif @endsection +@push('plugin-scripts') + + + + +@endpush \ No newline at end of file