Add Startup Params view
Translations might be the end of us.
This commit is contained in:
parent
ffa1e46cec
commit
f6600f447f
8 changed files with 186 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'not_authorized' => 'You are not authorized to perform this action.',
|
||||
'auth_error' => 'There was an error while attempting to login.',
|
||||
'authentication_required' => 'Authentication is required in order to continue.',
|
||||
'remember_me' => 'Remember Me',
|
||||
|
|
|
@ -6,4 +6,21 @@ return [
|
|||
'header' => 'Server Console',
|
||||
'header_sub' => 'Control your server in real time.',
|
||||
],
|
||||
'config' => [
|
||||
'startup' => [
|
||||
'header' => 'Start Configuration',
|
||||
'header_sub' => 'Control server startup arguments.',
|
||||
'command' => 'Startup Command',
|
||||
'edit_params' => 'Edit Parameters',
|
||||
'update' => 'Update Startup Parameters',
|
||||
],
|
||||
'sftp' => [
|
||||
'header' => 'SFTP Configuration',
|
||||
'header_sub' => 'Account details for SFTP connections.',
|
||||
'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.',
|
||||
],
|
||||
]
|
||||
];
|
||||
|
|
|
@ -36,4 +36,7 @@ return [
|
|||
'never' => 'never',
|
||||
'sign_out' => 'Sign out',
|
||||
'admin_control' => 'Admin Control',
|
||||
'required' => 'Required',
|
||||
'port' => 'Port',
|
||||
'username' => 'Username',
|
||||
];
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="treeview
|
||||
@if(in_array(Route::currentRouteName(), ['server.settings.sftp', 'server.settings.databases']))
|
||||
@if(in_array(Route::currentRouteName(), ['server.settings.sftp', 'server.settings.databases', 'server.settings.startup', 'server.settings.allocations']))
|
||||
active
|
||||
@endif
|
||||
">
|
||||
|
@ -181,7 +181,7 @@
|
|||
<ul class="treeview-menu">
|
||||
<li><a href=""><i class="fa fa-angle-right"></i> {{ trans('navigation.server.port_allocations') }}</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.sftp' ?: 'active' }}"><a href="{{ route('server.settings.sftp', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> {{ trans('navigation.server.sftp_settings') }}</a></li>
|
||||
<li><a href=""><i class="fa fa-angle-right"></i> {{ trans('navigation.server.startup_parameters') }}</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.startup' ?: 'active' }}"><a href="{{ route('server.settings.startup', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> {{ trans('navigation.server.startup_parameters') }}</a></li>
|
||||
<li class="{{ Route::currentRouteName() !== 'server.settings.databases' ?: 'active' }}"><a href="{{ route('server.settings.databases', $server->uuidShort) }}"><i class="fa fa-angle-right"></i> {{ trans('navigation.server.databases') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
SFTP Settings
|
||||
@lang('server.config.sftp.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>SFTP Configuration<small>Account details for SFTP connections.</small></h1>
|
||||
<h1>@lang('server.config.sftp.header')<small>@lang('server.config.sftp.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">{{ trans('strings.home') }}</a></li>
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>{{ trans('strings.configuration') }}</li>
|
||||
<li class="active">{{ trans('strings.sftp') }}</li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.sftp_settings')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
<div class="col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Change SFTP Password</h3>
|
||||
<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">
|
||||
|
@ -59,7 +59,7 @@
|
|||
@else
|
||||
<div class="box-body">
|
||||
<div class="callout callout-warning callout-nomargin">
|
||||
<p>You are not authorized to perform this action.</p>
|
||||
<p>@lang('auth.not_authorized')</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
@ -68,25 +68,25 @@
|
|||
<div class="col-sm-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">SFTP Details</h3>
|
||||
<h3 class="box-title">@lang('server.config.sftp.details')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-8">
|
||||
<label for="new_email" class="control-label">Connection Address</label>
|
||||
<label for="new_email" class="control-label">@lang('server.config.sftp.conn_addr')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" readonly value="{{ $node->fqdn }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="new_email" class="control-label">Port</label>
|
||||
<label for="new_email" class="control-label">@lang('strings.port')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" readonly value="{{ $node->daemonSFTP }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label">Username</label>
|
||||
<label for="password" class="control-label">@lang('strings.username')</label>
|
||||
<div>
|
||||
<input type="text" class="form-control" readonly value="{{ $server->username }}" />
|
||||
</div>
|
||||
|
@ -101,7 +101,7 @@
|
|||
@endcan
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<p class="small text-muted">Ensure that your client is set to use <strong>SFTP</strong> and not FTP or FTPS for connections, there is a difference between the protocols.</p>
|
||||
<p class="small text-muted">@lang('server.config.sftp.warning')</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
|
||||
{{-- of this software and associated documentation files (the "Software"), to deal --}}
|
||||
{{-- in the Software without restriction, including without limitation the rights --}}
|
||||
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
|
||||
{{-- copies of the Software, and to permit persons to whom the Software is --}}
|
||||
{{-- furnished to do so, subject to the following conditions: --}}
|
||||
|
||||
{{-- The above copyright notice and this permission notice shall be included in all --}}
|
||||
{{-- copies or substantial portions of the Software. --}}
|
||||
|
||||
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
|
||||
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
|
||||
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
|
||||
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
|
||||
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
|
||||
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
|
||||
{{-- SOFTWARE. --}}
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.config.startup.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.config.startup.header')<small>@lang('server.config.startup.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.configuration')</li>
|
||||
<li class="active">@lang('navigation.server.startup_parameters')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.startup.command')</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{ $service->executable }}</span>
|
||||
<input type="text" class="form-control" readonly="readonly" value="{{ $processedStartup }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">@lang('server.config.startup.edit_params')</h3>
|
||||
</div>
|
||||
@can('edit-startup', $server)
|
||||
<form action="{{ route('server.settings.startup', $server->uuidShort) }}" method="POST">
|
||||
<div class="box-body">
|
||||
@foreach($variables as $item)
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
@if($item->required === 1)<span class="label label-danger">@lang('strings.required')</span> @endif
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<div>
|
||||
<input type="text"
|
||||
@if($item->user_editable === 1)
|
||||
name="{{ $item->env_variable }}"
|
||||
@else
|
||||
readonly="readonly"
|
||||
@endif
|
||||
class="form-control" value="{{ old($item->env_variable, $item->a_serverValue) }}" data-action="matchRegex" data-regex="{{ $item->regex }}" />
|
||||
</div>
|
||||
<p class="text-muted"><small>{!! $item->description !!}</small></p>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<input type="submit" class="btn btn-primary btn-sm" value="@lang('server.config.startup.update')" />
|
||||
</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>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
@endsection
|
Loading…
Add table
Add a link
Reference in a new issue