|
| 1 | +@extends('layouts.admin') |
| 2 | + |
| 3 | +@section('title') |
| 4 | + Managing Server: {{ $server->name }} ({{ $server->uuidShort}}) |
| 5 | +@endsection |
| 6 | + |
| 7 | +@section('content') |
| 8 | +<div class="col-md-9"> |
| 9 | + <ul class="breadcrumb"> |
| 10 | + <li><a href="/admin">Admin Control</a></li> |
| 11 | + <li><a href="/admin/servers">Servers</a></li> |
| 12 | + <li class="active">{{ $server->name }} ({{ $server->uuidShort}})</li> |
| 13 | + </ul> |
| 14 | + @if (count($errors) > 0) |
| 15 | + <div class="alert alert-danger"> |
| 16 | + <strong>{{ trans('strings.whoops') }}!</strong> {{ trans('base.validation_error') }}<br><br> |
| 17 | + <ul> |
| 18 | + @foreach ($errors->all() as $error) |
| 19 | + <li>{{ $error }}</li> |
| 20 | + @endforeach |
| 21 | + </ul> |
| 22 | + </div> |
| 23 | + @endif |
| 24 | + @foreach (Alert::getMessages() as $type => $messages) |
| 25 | + @foreach ($messages as $message) |
| 26 | + <div class="alert alert-{{ $type }} alert-dismissable" role="alert"> |
| 27 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 28 | + {!! $message !!} |
| 29 | + </div> |
| 30 | + @endforeach |
| 31 | + @endforeach |
| 32 | + <ul class="nav nav-tabs tabs_with_panel" id="config_tabs"> |
| 33 | + <li class="active"><a href="#tab_about" data-toggle="tab">About</a></li> |
| 34 | + <li><a href="#tab_details" data-toggle="tab">Details</a></li> |
| 35 | + <li><a href="#tab_build" data-toggle="tab">Build Configuration</a></li> |
| 36 | + <li><a href="#tab_manage" data-toggle="tab">Manage</a></li> |
| 37 | + </ul> |
| 38 | + <div class="tab-content"> |
| 39 | + <div class="tab-pane active" id="tab_about"> |
| 40 | + <div class="panel panel-default"> |
| 41 | + <div class="panel-heading"></div> |
| 42 | + <div class="panel-body"> |
| 43 | + <table class="table table-striped" style="margin-bottom: 0;"> |
| 44 | + <tbody> |
| 45 | + <tr> |
| 46 | + <td>UUID</td> |
| 47 | + <td>{{ $server->uuid }}</td> |
| 48 | + </tr> |
| 49 | + <tr> |
| 50 | + <td>Owner</td> |
| 51 | + <td>{{ $server->a_ownerEmail }}</td> |
| 52 | + </tr> |
| 53 | + <tr> |
| 54 | + <td>Location</td> |
| 55 | + <td>{{ $server->a_locationName }}</td> |
| 56 | + </tr> |
| 57 | + <tr> |
| 58 | + <td>Node</td> |
| 59 | + <td>{{ $server->a_nodeName }}</td> |
| 60 | + </tr> |
| 61 | + <tr> |
| 62 | + <td>Service</td> |
| 63 | + <td>{{ $server->a_serviceName }} :: {{ $server->a_servceOptionName }}</td> |
| 64 | + </tr> |
| 65 | + <tr> |
| 66 | + <td>Name</td> |
| 67 | + <td>{{ $server->name }}</td> |
| 68 | + </tr> |
| 69 | + <tr> |
| 70 | + <td>Memory</td> |
| 71 | + <td><code>{{ $server->memory }}MB</code> (Swap: {{ $server->swap }}MB) (OOM Killer: <strong>{{ ($server->oom_disabled === 0) ? 'enabled' : 'disabled' }}</strong>)</td> |
| 72 | + </tr> |
| 73 | + <tr> |
| 74 | + <td>Disk Space</td> |
| 75 | + <td><code>{{ $server->disk }}MB</code> (Enforced: <strong>no</strong>)</td> |
| 76 | + </tr> |
| 77 | + <tr> |
| 78 | + <td>Block IO Weight</td> |
| 79 | + <td><code>{{ $server->io }}</code></td> |
| 80 | + </tr> |
| 81 | + <tr> |
| 82 | + <td>CPU Limit</td> |
| 83 | + <td><code>{{ $server->cpu }}%</code></td> |
| 84 | + </tr> |
| 85 | + <tr> |
| 86 | + <td>Default Connection</td> |
| 87 | + <td><code>{{ $server->ip }}:{{ $server->port }}</code></td> |
| 88 | + </tr> |
| 89 | + <tr> |
| 90 | + <td>Installed</td> |
| 91 | + <td>{{ ($server->installed === 1) ? 'Yes' : 'No' }}</td> |
| 92 | + </tr> |
| 93 | + </tbody> |
| 94 | + </table> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | + </div> |
| 98 | + <div class="tab-pane" id="tab_details"> |
| 99 | + <div class="panel panel-default"> |
| 100 | + <div class="panel-heading"></div> |
| 101 | + <div class="panel-body"> |
| 102 | + <form method="POST" action="/admin/servers/view/{{ $server->id }}/details"> |
| 103 | + <div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}"> |
| 104 | + <label for="name" class="control-label">Server Name</label> |
| 105 | + <div> |
| 106 | + <input type="text" name="name" value="{{ old('name', $server->name) }}" class="form-control" /> |
| 107 | + <p class="text-muted"><small>Character limits: <code>a-zA-Z0-9_-</code> and <code>[Space]</code> (max 35 characters).</small></p> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + <div class="form-group {{ $errors->has('owner') ? 'has-error' : '' }}"> |
| 111 | + <label for="name" class="control-label">Server Owner</label> |
| 112 | + <div> |
| 113 | + <input type="text" name="owner" value="{{ old('owner', $server->a_ownerEmail) }}" class="form-control" /> |
| 114 | + <p class="text-muted"><small>You can change the owner of this server by changing this field to an email matching another use on this system. If you do this a new daemon security token will be generated automatically.</small></p> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + <div class="form-group"> |
| 118 | + <label for="name" class="control-label">Daemon Secret Token</label> |
| 119 | + <div> |
| 120 | + <input type="text" disabled value="{{ $server->daemonSecret }}" class="form-control" /> |
| 121 | + <p class="text-muted"><small>This token should not be shared with anyone as it has full control over this server.</small></p> |
| 122 | + </div> |
| 123 | + </div> |
| 124 | + <div class="form-group"> |
| 125 | + <div> |
| 126 | + <input type="checkbox" name="reset_token"/> Yes, Reset Daemon Token |
| 127 | + <p class="text-muted"><small>Resetting this token will cause any requests using the old token to fail.</small></p> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + <div class="form-group"> |
| 131 | + {!! csrf_field() !!} |
| 132 | + <input type="submit" class="btn btn-sm btn-primary" value="Update Details" /> |
| 133 | + </div> |
| 134 | + </form> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + <div class="tab-pane" id="tab_build"> |
| 139 | + <div class="panel panel-default"> |
| 140 | + <div class="panel-heading"></div> |
| 141 | + <div class="panel-body"> |
| 142 | + Build |
| 143 | + </div> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | + <div class="tab-pane" id="tab_manage"> |
| 147 | + <div class="panel panel-default"> |
| 148 | + <div class="panel-heading"></div> |
| 149 | + <div class="panel-body"> |
| 150 | + Manage |
| 151 | + </div> |
| 152 | + </div> |
| 153 | + </div> |
| 154 | + </div> |
| 155 | +</div> |
| 156 | +<script> |
| 157 | +$(document).ready(function () { |
| 158 | + $('#sidebar_links').find("a[href='/admin/servers']").addClass('active'); |
| 159 | +}); |
| 160 | +</script> |
| 161 | +@endsection |
0 commit comments