Files
portal-api/resources/views/administrator/pages/package/ipaddress/edit.blade.php
T
2026-02-03 16:10:49 +07:00

106 lines
5.6 KiB
PHP

@extends('administrator.layout.master')
@push('plugin-styles')
@foreach (config('assets.datatable.css') as $datatable)
<link href="{{ asset($datatable) }}" rel="stylesheet" />
@endforeach
@endpush
@section('breadcrumb')
@php
$breadcrumbItems = [
['label' => 'Modules'],
['label' => 'Package vCenter'],
['label' => 'Host', 'url' => route('package.host.index')],
['label' => 'Edit Host', 'active' => true],
];
@endphp
<x-admin-breadcrumb :items="$breadcrumbItems" />
@endsection
@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 select2" 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 select2" 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
@push('plugin-scripts')
@foreach (config('assets.datatable.js') as $datatable)
<script src="{{ asset($datatable) }}"></script>
@endforeach
@endpush