Add support for external_id on servers, closes #975

This commit is contained in:
Dane Everitt 2018-02-24 11:57:12 -06:00
parent f655188c58
commit 633bba6d6e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 73 additions and 15 deletions

View file

@ -47,12 +47,17 @@
<form action="{{ route('admin.servers.view.details', $server->id) }}" method="POST">
<div class="box-body">
<div class="form-group">
<label for="name" class="control-label">Server Name</label>
<label for="name" class="control-label">Server Name <span class="field-required"></span></label>
<input type="text" name="name" value="{{ old('name', $server->name) }}" class="form-control" />
<p class="text-muted small">Character limits: <code>a-zA-Z0-9_-</code> and <code>[Space]</code> (max 35 characters).</p>
</div>
<div class="form-group">
<label for="pUserId" class="control-label">Server Owner</label>
<label for="external_id" class="control-label">External Identifier</label>
<input type="text" name="external_id" value="{{ old('external_id', $server->external_id) }}" class="form-control" />
<p class="text-muted small">Leave empty to not assign an external identifier for this server. The external ID should be unique to this server and not be in use by any other servers.</p>
</div>
<div class="form-group">
<label for="pUserId" class="control-label">Server Owner <span class="field-required"></span></label>
<select name="owner_id" class="form-control" id="pUserId">
<option value="{{ $server->owner_id }}" selected>{{ $server->user->email }}</option>
</select>

View file

@ -47,6 +47,18 @@
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tr>
<td>Internal Identifier</td>
<td><code>{{ $server->id }}</code></td>
</tr>
<tr>
<td>External Identifier</td>
@if(is_null($server->external_id))
<td><span class="label label-default">Not Set</span></td>
@else
<td><code>{{ $server->external_id }}</code></td>
@endif
</tr>
<tr>
<td>UUID / Docker Container ID</td>
<td><code>{{ $server->uuid }}</code></td>
@ -127,7 +139,7 @@
<div class="col-sm-12">
<div class="small-box bg-gray">
<div class="inner">
<h3>{{ str_limit($server->user->username, 8) }}</h3>
<h3>{{ str_limit($server->user->username, 16) }}</h3>
<p>Server Owner</p>
</div>
<div class="icon"><i class="fa fa-user"></i></div>
@ -139,7 +151,7 @@
<div class="col-sm-12">
<div class="small-box bg-gray">
<div class="inner">
<h3>{{ str_limit($server->node->name, 8) }}</h3>
<h3>{{ str_limit($server->node->name, 16) }}</h3>
<p>Server Node</p>
</div>
<div class="icon"><i class="fa fa-codepen"></i></div>