Update source into github

This commit is contained in:
pbao9
2025-07-24 16:18:27 +07:00
parent 41419358dd
commit 69851ac7bc
2642 changed files with 284095 additions and 0 deletions
@@ -0,0 +1,67 @@
@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.datastore.store') }}" method="post">
@csrf
<div class="card-body">
{{-- <livewire:vcenter-datacenter-select/> --}}
<x-module.v-center :model="null"/>
<x-module.datacenter :model="null"/>
<x-module.host :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="datastore_id" class="col-md-3 text-right">Datastore ID</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="datastore_id" name="datastore" placeholder="" value=""
class="form-control">
</div>
</div>
{{-- Template ID --}}
<div class="row form-group align-items-center mb-0">
<label for="type" class="col-md-3 text-right">Type</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="type" name="type" placeholder="" value="VMFS"
class="form-control">
</div>
</div>
{{-- Console ID --}}
<div class="row form-group align-items-center mb-0">
<label for="space" class="col-md-3 text-right">Free Space</label>
<div class="col-md-9 p-1 bg-customer">
<input type="number" id="space" name="space" placeholder="" value=""
class="form-control">
</div>
</div>
<div class="row form-group align-items-center mb-0">
<label for="space" class="col-md-3 text-right">Status</label>
<div class="col-md-9 p-1 bg-customer">
<select class="custom-select" name="status">
<option value="1">Active</option>
<option value="0">No Active</option>
</select>
</div>
</div>
</div>
<div class="card-footer">
<a href="{{ route('package.datastore.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,63 @@
@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.datastore.update',['id' => $datastore->id]) }}" method="post">
@csrf
@method('put')
<div class="card-body">
<x-module.v-center :model="$datastore" />
<x-module.datacenter :model="$datastore->host" />
<x-module.host :model="$datastore" />
{{--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="{{$datastore->name}}" class="form-control">
</div>
</div>
{{--Host ID--}}
<div class="row form-group align-items-center mb-0">
<label for="datastore_id" class="col-md-3 text-right">Datastore ID</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="datastore_id" name="datastore" placeholder="" value="{{$datastore->datastore}}" class="form-control">
</div>
</div>
{{--Template ID--}}
<div class="row form-group align-items-center mb-0">
<label for="type" class="col-md-3 text-right">Type</label>
<div class="col-md-9 p-1 bg-customer">
<input type="text" id="type" name="type" placeholder="" value="{{$datastore->type ?? "VMFS"}}" class="form-control">
</div>
</div>
{{--Console ID--}}
<div class="row form-group align-items-center mb-0">
<label for="space" class="col-md-3 text-right">Free Space</label>
<div class="col-md-9 p-1 bg-customer">
<input type="number" id="space" name="space" placeholder="" value="{{$datastore->space}}" class="form-control">
</div>
</div>
<div class="row form-group align-items-center mb-0">
<label for="space" class="col-md-3 text-right">Status</label>
<div class="col-md-9 p-1 bg-customer">
<select class="custom-select" name="status">
<option value="1" @selected($datastore->status === 1)>Active</option>
<option value="0" @selected($datastore->status === 0)>No Active</option>
</select>
</div>
</div>
</div>
<div class="card-footer">
<a href="{{ route('package.datastore.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,86 @@
@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.Datastore")
</div>
<div class="card-body">
<table class="table table-invoice table-bordered">
<thead>
<tr>
<th>
<label>
<input type="checkbox" name="check" class="check-all">
</label>
</th>
<th>Datastore Name</th>
<th>Host Name</th>
<th>vCenter Host</th>
<th>Free Space</th>
<th>Last Updated</th>
<th style="width:40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if($datastore->count())
@foreach($datastore->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">
{{ $item->host->name ?? 'N/A' }}
</td>
<td class="text-center">
{{ $item->host->datacenter->vCenter->host ?? 'N/A' }}
</td>
<td class="text-center">
{{ $item->space }} GB
</td>
<td class="text-center">
@time($item->updated_at)
</td>
<td>
<a class="btn btn-warning btn-sm"
href="{{ route('package.datastore.edit', ['id' => $item->id]) }}">
<i class="fas fa-user-edit"></i>
</a>
</td>
<td>
@if(auth()->guard('admins')->user()->can("delete module vcenter"))
<form method="post" class="d-inline"
action="{{ route('package.datastore.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">
{{ $datastore->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