This commit is contained in:
pbao9
2026-01-30 08:23:19 +07:00
parent a3c3f4a577
commit 8b4c93e820
210 changed files with 71688 additions and 590 deletions
@@ -0,0 +1,51 @@
@extends("admin.main")
@section("content")
@if(auth()->guard('admins')->user()->can("add module vcenter"))
<div class="card card-outline card-primary">
<form action="{{ route('package.host.store') }}" method="post">
@csrf
<div class="card-body">
<x-module.v-center :model="null" />
<x-module.datacenter :model="null" />
{{--Name--}}
<div class="row form-group align-items-center mb-0">
<label for="name" class="col-md-3 text-right">Name</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="name" name="name" placeholder="" value="" class="form-control">
</div>
</div>
{{--Host ID--}}
<div class="row form-group align-items-center mb-0">
<label for="host_id" class="col-md-3 text-right">Host ID</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="host_id" name="host_id" placeholder="" value="" class="form-control">
</div>
</div>
{{--Template ID--}}
<div class="row form-group align-items-center mb-0">
<label for="template" class="col-md-3 text-right">Template ID</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="template" name="template" placeholder="" value="" class="form-control">
</div>
</div>
{{--Console ID--}}
<div class="row form-group align-items-center mb-0">
<label for="console" class="col-md-3 text-right">Console Name</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="console" name="console" placeholder="consolenode129.tgs.com.vn" value="" class="form-control">
</div>
</div>
</div>
<div class="card-footer">
<a href="{{ route('package.host.index') }}" class="btn btn-outline-secondary">Trở về</a>
<button type="submit" class="btn btn-outline-primary">Lưu dữ liệu</button>
</div>
</form>
</div>
@else
<div class="alert alert-danger alert-dismissible">
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Module vCenter
management department</h5>
</div>
@endif
@endsection
@@ -0,0 +1,53 @@
@extends("admin.main")
@section("content")
@if(auth()->guard('admins')->user()->can("add module vcenter"))
<div class="card card-outline card-primary">
<form action="{{ route('package.host.update',['id' => $host->id]) }}" method="post">
@csrf
@method('put')
<div class="card-body">
<x-module.v-center :model="$host->datacenter" />
<x-module.datacenter :model="$host" />
{{--Name--}}
<div class="row form-group align-items-center mb-0">
<label for="name" class="col-md-3 text-right">Name</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="name" name="name" placeholder="" value="{{ $host->name}}" class="form-control">
</div>
</div>
{{--Host ID--}}
<div class="row form-group align-items-center mb-0">
<label for="host_id" class="col-md-3 text-right">Host ID</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="host_id" name="host_id" placeholder="" value="{{ $host->host_id}}" class="form-control">
</div>
</div>
{{--Template ID--}}
<div class="row form-group align-items-center mb-0">
<label for="template" class="col-md-3 text-right">Template ID</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="template" name="template" placeholder="" value="{{ $host->template}}" class="form-control">
</div>
</div>
{{--Console ID--}}
<div class="row form-group align-items-center mb-0">
<label for="console" class="col-md-3 text-right">Console Name</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="console" name="console" placeholder="consolenode129.tgs.com.vn" value="{{ $host->console}}" class="form-control">
</div>
</div>
</div>
<div class="card-footer">
<a href="{{ route('package.host.index') }}" class="btn btn-outline-secondary">Trở về</a>
<button type="submit" class="btn btn-outline-primary">Lưu dữ liệu</button>
</div>
</form>
</div>
@else
<div class="alert alert-danger alert-dismissible">
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Module vCenter
management department</h5>
</div>
@endif
@endsection
@@ -0,0 +1,85 @@
@php use App\Http\Helpers\Helper; @endphp
@extends('admin.main')
@section('content')
@if(auth()->guard('admins')->user()->can("manager package module"))
<div class="card card-primary card-outline">
<div class="card-header">
@include("admin.block.Sync.Host")
</div>
<div class="card-body">
<table class="table table-invoice table-bordered">
<thead>
<tr>
<th class="text-center">
<label>
<input type="checkbox" name="check" class="check-all">
</label>
</th>
<th class="text-center">Host Name</th>
<th class="text-center">Datacenter Name</th>
<th class="text-center">vCenter Host</th>
<th class="text-center">Last Updated</th>
<th style="width: 40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if(count($hosts) > 0)
@foreach($hosts->all() as $item)
<tr>
<td class="text-center">
<label for=""></label><input type="checkbox" name="id[]" value="{{ $item->id }}"
id="">
</td>
<td class="text-center">
{{ $item->name }}
</td>
<td class="text-center">
@isset($item->datacenter->name)
{{$item->datacenter->name}}
@endisset
</td>
<td class="text-center">
@isset($item->datacenter->vCenter->host)
{{$item->datacenter->vCenter->host}}
@endisset
</td>
<td class="text-center">
@time($item->updated_at)
</td>
<td class="text-center">
<a class="btn btn-warning btn-sm"
href="{{ route('package.host.edit', ['id' => $item->id]) }}">
<i class="fas fa-search"></i>
</a>
</td>
<td>
@if(auth()->guard('admins')->user()->can("delete module vcenter"))
<form method="post" class="d-inline"
action="{{ route('package.host.destroy', ['id' => $item->id]) }}">
@method('delete')
@csrf
<button type="submit" data-toggle="tooltip" data-placement="top" title=""
class="btn btn-sm btn-danger" data-original-title="Xoá">
<i class="fas fa-trash"></i>
</button>
</form>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
{{ $hosts->withQueryString()->links() }}
</div>
</div>
@else
<div class="alert alert-danger alert-dismissible">
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Module Package
management department</h5>
</div>
@endif
@endsection