Implement Panel changes to support internal SFTP subsystem on Daemon (#703)

This commit is contained in:
Dane Everitt 2017-10-25 00:35:25 -04:00 committed by GitHub
parent 57db949a9c
commit 058e490ec4
23 changed files with 484 additions and 247 deletions

View file

@ -301,7 +301,7 @@ return [
'change_pass' => 'Change SFTP Password',
'details' => 'SFTP Details',
'conn_addr' => 'Connection Address',
'warning' => 'Ensure that your client is set to use SFTP and not FTP or FTPS for connections, there is a difference between the protocols.',
'warning' => 'The SFTP password is your account password. Ensure that your client is set to use SFTP and not FTP or FTPS for connections, there is a difference between the protocols.',
],
'database' => [
'header' => 'Databases',

View file

@ -42,7 +42,6 @@
<th>ID</th>
<th>Server Name</th>
<th>Owner</th>
<th>Username</th>
<th>Node</th>
<th>Connection</th>
<th></th>
@ -52,7 +51,6 @@
<td><code>{{ $server->uuidShort }}</code></td>
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
<td><a href="{{ route('admin.users.view', $server->user->id) }}">{{ $server->user->username }}</a></td>
<td>{{ $server->username }}</td>
<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>
<td>
<code>{{ $server->allocation->alias }}:{{ $server->allocation->port }}</code>

View file

@ -55,14 +55,6 @@
<td>Docker Container ID</td>
<td data-attr="container-id"><i class="fa fa-fw fa-refresh fa-spin"></i></td>
</tr>
<tr>
<td>Docker User ID</td>
<td data-attr="container-user"><i class="fa fa-fw fa-refresh fa-spin"></i></td>
</tr>
<tr>
<td>Docker Container Name</td>
<td>{{ $server->username }}</td>
</tr>
<tr>
<td>Service</td>
<td>

View file

@ -16,7 +16,7 @@
<div id="terminal" style="width:100%;max-height: none !important;"></div>
<div id="terminal_input" class="form-group no-margin">
<div class="input-group">
<div class="input-group-addon terminal_input--prompt">{{ $server->username }}:~$</div>
<div class="input-group-addon terminal_input--prompt">container:~/$</div>
<input type="text" class="form-control terminal_input--input">
</div>
</div>

View file

@ -30,7 +30,7 @@
<div id="terminal" style="width:100%;"></div>
<div id="terminal_input" class="form-group no-margin">
<div class="input-group">
<div class="input-group-addon terminal_input--prompt">{{ $server->username }}:~$</div>
<div class="input-group-addon terminal_input--prompt">container:~/$</div>
<input type="text" class="form-control terminal_input--input">
</div>
</div>

View file

@ -21,37 +21,7 @@
@section('content')
<div class="row">
<div class="col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.config.sftp.change_pass')</h3>
</div>
@can('reset-sftp', $server)
<form action="{{ route('server.settings.sftp', $server->uuidShort) }}" method="post">
<div class="box-body">
<div class="form-group">
<label for="sftp_pass" class="control-label">@lang('base.account.new_password')</label>
<div>
<input type="password" class="form-control" name="sftp_pass" />
<p class="text-muted"><small>@lang('auth.password_requirements')</small></p>
</div>
</div>
</div>
<div class="box-footer">
{!! csrf_field() !!}
<input type="submit" class="btn btn-primary btn-sm" value="@lang('base.account.update_pass')" />
</div>
</form>
@else
<div class="box-body">
<div class="callout callout-warning callout-nomargin">
<p>@lang('auth.not_authorized')</p>
</div>
</div>
@endcan
</div>
</div>
<div class="col-sm-6">
<div class="col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.config.sftp.details')</h3>
@ -66,20 +36,12 @@
<div class="form-group">
<label for="password" class="control-label">@lang('strings.username')</label>
<div>
<input type="text" class="form-control" readonly value="{{ $server->username }}" />
<input type="text" class="form-control" readonly value="{{ auth()->user()->username }}.{{ $server->uuidShort }}" />
</div>
</div>
@can('view-sftp-password', $server)
<div class="form-group">
<label for="password" class="control-label">@lang('base.account.current_password')</label>
<div>
<input type="text" class="form-control" readonly @if(! is_null($server->sftp_password))value="{{ Crypt::decrypt($server->sftp_password) }}"@endif />
</div>
</div>
@endcan
</div>
<div class="box-footer">
<p class="small text-muted">@lang('server.config.sftp.warning')</p>
<p class="small text-muted no-margin-bottom">@lang('server.config.sftp.warning')</p>
</div>
</div>
</div>