Update source into github
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
@extends("admin.main")
|
||||
@section("content")
|
||||
@if(auth()->guard('admins')->user()->can("manager package module"))
|
||||
<div class="card card-outline card-primary">
|
||||
<form action="{{ route('package.ipaddress.store') }}" method="post">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<x-module.v-center :model="null" />
|
||||
|
||||
<x-module.datacenter :model="null" />
|
||||
|
||||
<x-module.host :model="null" />
|
||||
|
||||
<x-module.network :model="null" />
|
||||
|
||||
{{--Netmask--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="netmask" class="col-md-3 text-right">Netmask</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="netmask" name="netmask" placeholder="" value="255.255.255.0"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Netmask--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="gateway" class="col-md-3 text-right">Gateway</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="gateway" name="gateway" placeholder="192.168.0.1" value=""
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--DNS--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="dns" class="col-md-3 text-right">DNS</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="dns" name="dns" placeholder="" value="8.8.8.8" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Tuy chon--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="option_selected" class="col-md-3 text-right">Tuỳ chọn</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<select class="custom-select" id="option_selected" name="option_selected">
|
||||
<option value="0">Mặc định (From - To)</option>
|
||||
<option value="1">Nhập ngẫu nhiên</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row" id="ip-pool">
|
||||
<label for="" class="col-md-3 text-right"></label>
|
||||
<div class="col-md-9 p-1">
|
||||
{{--From IP--}}
|
||||
<div class="form-group align-items-center mb-0">
|
||||
<label class="d-block" for="from">From IP</label>
|
||||
<div class="p-1 bg-customer">
|
||||
<input type="text" class="form-control" id="from" name="from"
|
||||
placeholder="192.168.1.1" value="">
|
||||
</div>
|
||||
</div>
|
||||
{{--From IP--}}
|
||||
<div class="form-group align-items-center mb-0">
|
||||
<label class="mb-2" for="to">To IP</label>
|
||||
<div class="p-1 bg-customer">
|
||||
<input type="text" class="form-control" id="to" name="to"
|
||||
placeholder="192.168.1.100" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group align-items-center d-none mb-0" id="row-ip">
|
||||
<label for="list-ip" class="col-md-3 text-right">List IP Address</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<textarea class="form-control" name="list-ip" id="list-ip" rows="5"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{{ route('package.ipaddress.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 Package
|
||||
management department</h5>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
@@ -0,0 +1,85 @@
|
||||
@extends("admin.main")
|
||||
@section("content")
|
||||
@if(auth()->guard('admins')->user()->can("manager package module"))
|
||||
<div class="card card-outline card-primary">
|
||||
<form action="{{ route('package.ipaddress.update',['id' => $ipaddress->id]) }}" method="post">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<x-module.v-center :model="$ipaddress->host->datacenter" />
|
||||
|
||||
<x-module.datacenter :model="$ipaddress->host" />
|
||||
|
||||
<x-module.host :model="$ipaddress" />
|
||||
|
||||
<x-module.network :model="$ipaddress" />
|
||||
|
||||
{{--Netmask--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="netmask" class="col-md-3 text-right">Netmask</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="netmask" name="netmask" placeholder="" value="{{$ipaddress->netmask ?? '255.255.255.0'}}"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Netmask--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="gateway" class="col-md-3 text-right">Gateway</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="gateway" name="gateway" placeholder="192.168.0.1" value="{{$ipaddress->gateway}}"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--DNS--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="dns" class="col-md-3 text-right">DNS</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="dns" name="dns" placeholder="" value="{{$ipaddress->dns ?? '8.8.8.8'}}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Tuy chon--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="option_selected" class="col-md-3 text-right">Tuỳ chọn</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<select class="custom-select" id="option_selected" name="option_selected">
|
||||
<option value="0">Mặc định (From - To)</option>
|
||||
<option value="1" selected>Nhập ngẫu nhiên</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{-- IP --}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="ip" class="col-md-3 text-right">IP Address</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input class="form-control" name="ip" id="ip" value="{{$ipaddress->ip}}">
|
||||
</div>
|
||||
</div>
|
||||
{{--Status--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="status" class="col-md-3 text-right">Status</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<select class="custom-select" id="status" name="status">
|
||||
<option value="0" @selected($ipaddress->status === 0)>Free</option>
|
||||
<option value="1" @selected($ipaddress->status === 1)>Assigned</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{{ route('package.ipaddress.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 Package
|
||||
management department</h5>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
@@ -0,0 +1,82 @@
|
||||
@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">
|
||||
<a href="{{ route('package.ipaddress.create') }}" class="btn btn-outline-secondary">
|
||||
<i class="fas fa-plus"></i> Add New IP Address
|
||||
</a>
|
||||
</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>VMWare Name</th>
|
||||
<th>IP Address</th>
|
||||
<th>Host Name</th>
|
||||
<th>Status</th>
|
||||
<th style="width: 40px"></th>
|
||||
<th style="width: 40px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($listIP->count())
|
||||
@foreach($listIP->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->vm_name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ $item->ip }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ $item->Host->name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{!! $item->getStatus() !!}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-warning btn-sm"
|
||||
href="{{ route('package.ipaddress.edit',['id' => $item->id]) }}">
|
||||
<i class="fas fa-user-edit"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<form method="post"
|
||||
class="d-inline"
|
||||
action="{{ route('package.ipaddress.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>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{{ $listIP->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
|
||||
Reference in New Issue
Block a user