Move some server function to Server::class (from Entry::class)

This commit is contained in:
Deon George
2023-02-19 16:35:07 +11:00
parent 92e5afd614
commit 4f9accbadf
11 changed files with 258 additions and 227 deletions

View File

@@ -24,7 +24,7 @@
<td>BaseDN(s)</td>
<td>
<table class="table table-sm table-borderless">
@foreach(\App\Ldap\Entry::baseDNs()->sort(function($item) { return $item->sortKey; }) as $item)
@foreach(\App\Classes\LDAP\Server::baseDNs()->sort(function($item) { return $item->sortKey; }) as $item)
<tr>
<td class="pl-0">{{ $item->getDn() }}</td>
</tr>
@@ -36,7 +36,7 @@
<!-- Schema DN -->
<tr>
<td>Schema DN</td>
<td>{{ \App\Ldap\Entry::schemaDN() }}</td>
<td>{{ \App\Classes\LDAP\Server::schemaDN() }}</td>
</tr>
</tbody>
</table>

View File

@@ -14,7 +14,7 @@
<table class="table">
@foreach ($o->getAttributes() as $attribute => $value)
<tr>
<th>{{ $attribute }}</th>
<th class="w-25">{{ $attribute }}</th>
<td>{!! $value !!}</td>
</tr>
@endforeach

View File

@@ -0,0 +1,27 @@
@extends('layouts.dn')
@section('page_title')
<table class="table table-borderless">
<tr>
<td style="border-radius: 5px;"><div class="page-title-icon f32"><i class="fas fa-info"></i></div></td>
<td class="top text-right align-text-top p-0 pt-2 }}"><strong>{{ __('Server Info') }}</strong><br><small>{{ $s->rootDSE()->entryuuid[0] ?? '' }}</small></td>
</tr>
</table>
@endsection
@section('main-content')
<div class="bg-white p-3">
<table class="table">
@foreach ($s->rootDSE()->getAttributes() as $attribute => $value)
<tr>
<th class="w-25">
{!! ($x=$s->schema('attributetypes',$attribute))
? sprintf('<a class="attributetype" id="strtolower(%s)" href="%s">%s</a>',$x->name_lc,url('schema/attributetypes',$x->name_lc),$x->name)
: $attribute !!}
</th>
<td>{!! $value !!}</td>
</tr>
@endforeach
</table>
</div>
@endsection

View File

@@ -4,7 +4,7 @@
<table class="table table-borderless">
<tr>
<td style="border-radius: 5px;"><div class="page-title-icon f32"><i class="fas fa-fingerprint"></i></div></td>
<td class="top text-right align-text-top p-0 pt-2"><strong>{{ \App\Ldap\Entry::schemaDN() }}</strong><br><small>{{ $o->entryuuid[0] ?? '' }}</small></td>
<td class="top text-right align-text-top p-0 pt-2"><strong>{{ \App\Classes\LDAP\Server::schemaDN() }}</strong></td>
</tr>
</table>
@endsection