Fix/optimise address creation/editing via System AKAs
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m46s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s

This commit is contained in:
2024-05-27 21:42:03 +10:00
parent b102fc4d2a
commit 7ef9f2dbd0
5 changed files with 254 additions and 210 deletions

View File

@@ -104,7 +104,7 @@
<span class="input-group-text">/0.0</span>
<span class="invalid-feedback" role="alert">
@error('region_id_new')
{{ $message }}
{!! $message !!}
@else
The region number is required.
@enderror
@@ -118,24 +118,18 @@
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-hash"></i></span>
<input type="text" class="form-control text-end @error('host_id_new') is-invalid @enderror" id="host_id_new" placeholder="Host #" name="host_id_new" value="{{ old('host_id_new') }}" @cannot('admin',$o)disabled @endcannot>
<span class="input-group-text p-0">/</span>
<input type="text" class="form-control @error('node_id_new') is-invalid @enderror" id="node_id_new" placeholder="Node #" name="node_id_new" value="{{ old('node_id_new') }}" @cannot('admin',$o)disabled @endcannot>
<span class="input-group-text">.0</span>
<span class="input-group-text">/0.0</span>
<span class="invalid-feedback" role="alert">
@error('host_id_new')
{{ $message }}
{!! $message !!}
@else
The host address is required.
@enderror
@error('node_id_new')
{{ $message }}
@else
The node address is required.
@enderror
</span>
</div>
</div>
{{--
<!-- Hub Checkbox -->
<div class="col-2 d-none" id="hub-checkbox">
<span class="label form-label">Hub</span>
@@ -149,6 +143,7 @@
</div>
</div>
</div>
--}}
<!-- Security -->
<div class="col-2 d-none" id="sec-level">
@@ -176,7 +171,7 @@
There were errors with the submission.
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
<li>{!! $error !!}</li>
@endforeach
</ul>
</span>
@@ -240,8 +235,10 @@
if (! $('#hub-select').hasClass('d-none'))
$('#hub-select').addClass('d-none')
{{--
if (! $('#hub-checkbox').hasClass('d-none'))
$('#hub-checkbox').addClass('d-none');
--}}
if (! $('#node-address').hasClass('d-none'))
$('#node-address').addClass('d-none');
@@ -286,8 +283,10 @@
if (! $('#hub-select').hasClass('d-none'))
$('#hub-select').addClass('d-none');
{{--
if (! $('#hub-checkbox').hasClass('d-none'))
$('#hub-checkbox').addClass('d-none');
--}}
if (! $('#node-address').hasClass('d-none'))
$('#node-address').addClass('d-none');
@@ -374,8 +373,10 @@
if (! $('#host-address').hasClass('d-none'))
$('#host-address').addClass('d-none');
{{--
if (! $('#hub-checkbox').hasClass('d-none'))
$('#hub-checkbox').addClass('d-none');
--}}
if (! $('#node-address').hasClass('d-none'))
$('#node-address').addClass('d-none');
@@ -390,8 +391,10 @@
if ($('#host-address').hasClass('d-none'))
$('#host-address').removeClass('d-none');
{{--
if (! $('#hub-checkbox').hasClass('d-none'))
$('#hub-checkbox').addClass('d-none');
--}}
if (! $('#node-address').hasClass('d-none'))
$('#node-address').addClass('d-none');
@@ -413,8 +416,10 @@
if (! $('#host-address').hasClass('d-none'))
$('#host-address').addClass('d-none');
{{--
if ($('#hub-checkbox').hasClass('d-none'))
$('#hub-checkbox').removeClass('d-none');
--}}
if ($('#node-address').hasClass('d-none'))
$('#node-address').removeClass('d-none');
@@ -439,7 +444,7 @@
$('#hub_id').show();
if (modify && modify.responseJSON.hub_id)
$('#host_id').val(modify.responseJSON.hub_id).change();
$('#hub_id').val(modify.responseJSON.hub_id).change();
$('#hub-select').removeClass('d-none');
$('#node_id').prop('disabled',false);
@@ -462,6 +467,7 @@
if ($('#sec-level').hasClass('d-none'))
$('#sec-level').removeClass('d-none')
{{--
switch(this.value) {
// Not selected - enter a normal node
case '':
@@ -475,8 +481,10 @@
if (! $('#hub-checkbox').hasClass('d-none'))
$('#hub-checkbox').addClass('d-none');
}
--}}
});
{{--
$('#point_id').on('change',function() {
switch(this.value) {
case '0':
@@ -489,6 +497,7 @@
$('#hub-checkbox').addClass('d-none');
}
});
--}}
});
</script>
@append