Merge branch 'develop' into feature/service-changes
This commit is contained in:
commit
fc38b09e1f
169 changed files with 2268 additions and 2289 deletions
|
@ -36,7 +36,7 @@
|
|||
<li><a href="{{ route('admin.databases.new') }}"><i class="fa fa-plus"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_databases">
|
||||
<div class="tab-pane {{ Request::input('tab') == 'tab_dbservers' ? '' : 'active' }}" id="tab_databases">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"></div>
|
||||
<div class="panel-body">
|
||||
|
@ -65,12 +65,12 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-12 text-center">
|
||||
{{ $databases->render() }}
|
||||
{{ $databases->appends('tab', 'tab_databases')->render() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_dbservers">
|
||||
<div class="tab-pane {{ Request::input('tab') == 'tab_dbservers' ? 'active' : '' }}" id="tab_dbservers">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"></div>
|
||||
<div class="panel-body">
|
||||
|
@ -88,7 +88,7 @@
|
|||
<tbody>
|
||||
@foreach($dbh as $db)
|
||||
<tr>
|
||||
<td><a href="#">{{ $db->name }}</a></td>
|
||||
<td>{{ $db->name }}</td>
|
||||
<td><code>{{ $db->host }}:{{ $db->port }}</code></td>
|
||||
<td>{{ $db->username }}</td>
|
||||
<td class="text-center">{{ $db->c_databases }}</td>
|
||||
|
@ -99,7 +99,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-12 text-center">
|
||||
{{ $dbh->render() }}
|
||||
{{ $dbh->appends('tab', 'tab_dbservers')->render() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -216,6 +216,19 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="panel-heading" style="border-top: 1px solid #ddd;"></div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="disk_overallocate" class="control-label">Maximum Web Upload Filesize</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="upload_size" class="form-control" value="{{ old('upload_size', $node->upload_size) }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
<p class="text-muted"><small>Enter the maximum size of files that can be uploaded through the web-based file manager.</small></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading" style="border-top: 1px solid #ddd;"></div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
|
@ -242,7 +255,7 @@
|
|||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="reset_secret" class="control-label"><span class="label label-warning"><i class="fa fa-power-off"></i></span> Reset Daemon Key</label>
|
||||
<label for="reset_secret" class="control-label">Reset Daemon Key</label>
|
||||
<div style="padding: 7px 0;">
|
||||
<input type="checkbox" name="reset_secret" id="reset_secret" /> Reset Daemon Master Key
|
||||
</div>
|
||||
|
@ -294,7 +307,7 @@
|
|||
"container": "ptdl-sftp"
|
||||
},
|
||||
"query": {
|
||||
"kill_on_fail": false,
|
||||
"kill_on_fail": true,
|
||||
"fail_limit": 5
|
||||
},
|
||||
"logger": {
|
||||
|
@ -310,7 +323,7 @@
|
|||
"installed": "{{ route('remote.install') }}"
|
||||
},
|
||||
"uploads": {
|
||||
"maximumSize": 100000000
|
||||
"size_limit": {{ $node->upload_size }}
|
||||
},
|
||||
"keys": [
|
||||
"{{ $node->daemonSecret }}"
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<label for="owner" class="control-label">Owner Email</label>
|
||||
<div>
|
||||
{{-- Hacky workaround to prevent Safari and Chrome from trying to suggest emails here --}}
|
||||
<input id="fake_user_name" name="fake_user[name]" style="position:absolute; top:-10000px;" type="text" value="Autofill Me">
|
||||
<input id="fake_user_name" name="fake_user[name]" style="position:absolute; top:-10000px;" tabindex="5" type="text" value="Autofill Me">
|
||||
<input type="text" autocomplete="off" name="owner" class="form-control" value="{{ old('owner', Input::get('email')) }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -79,17 +79,25 @@
|
|||
<td>UUID</td>
|
||||
<td>{{ $server->uuid }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>Owner</td>
|
||||
<td><a href="{{ route('admin.users.view', $server->owner) }}">{{ $server->a_ownerEmail }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td><a href="{{ route('admin.locations') }}">{{ $server->a_locationName }}</a></td>
|
||||
<td><a href="{{ route('admin.locations') }}">{{ $node->a_locationName }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Node</td>
|
||||
<td><a href="{{ route('admin.nodes.view', $server->node) }}">{{ $server->a_nodeName }}</a></td>
|
||||
<td><a href="{{ route('admin.nodes.view', $server->node) }}">{{ $node->name }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service</td>
|
||||
|
@ -553,6 +561,27 @@
|
|||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$('#sidebar_links').find("a[href='/admin/servers']").addClass('active');
|
||||
(function checkServerInfo() {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'X-Access-Token': '{{ $server->daemonSecret }}',
|
||||
'X-Access-Server': '{{ $server->uuid }}'
|
||||
},
|
||||
url: '{{ $node->scheme }}://{{ $node->fqdn }}:{{ $node->daemonListen }}/server',
|
||||
dataType: 'json',
|
||||
timeout: 5000,
|
||||
}).done(function (data) {
|
||||
$('td[data-attr="container-id"]').html('<code>' + data.container.id + '</code>');
|
||||
$('td[data-attr="container-user"]').html('<code>' + data.user + '</code>');
|
||||
}).fail(function (jqXHR) {
|
||||
$('td[data-attr="container-id"]').html('<code>error</code>');
|
||||
$('td[data-attr="container-user"]').html('<code>error</code>');
|
||||
console.error(jqXHR);
|
||||
}).always(function () {
|
||||
setTimeout(checkServerInfo, 60000);
|
||||
})
|
||||
})();
|
||||
$('input[name="default"]').on('change', function (event) {
|
||||
$('select[name="remove_additional[]"]').find('option:disabled').prop('disabled', false);
|
||||
$('select[name="remove_additional[]"]').find('option[value="' + $(this).val() + '"]').prop('disabled', true).prop('selected', false);
|
||||
|
|
|
@ -31,6 +31,14 @@
|
|||
<li class="active">Accounts</li>
|
||||
</ul>
|
||||
<h3>All Registered Users</h3><hr />
|
||||
<form method="GET" style="margin-bottom:20px;">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter" class="form-control" value="{{ urldecode(Input::get('filter')) }}" placeholder="search term" />
|
||||
<div class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Filter Users</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
$('#applyUpdate').removeClass('fa-circle-o-notch fa-spinner fa-spin fa-check-circle fa-times-circle').addClass(selector).css({ color: color });
|
||||
});
|
||||
|
||||
// Socket Recieves New Status from Scales
|
||||
// Socket Recieves New Status from Daemon
|
||||
socket.on('status', function(data) {
|
||||
var newStatus, selector = 'fa-times-circle';
|
||||
var color = '#E33200';
|
||||
|
|
|
@ -105,8 +105,11 @@
|
|||
<div class="alert alert-warning">Edit the path location above <strong>before you upload files</strong>. They will automatically be placed in the directory you specify above. You can change this each time you upload a new file without having to press anything else. <em>The directory must exist before performing an upload.</em></div>
|
||||
<div class="alert alert-danger" id="upload_error" style="display: none;"></div>
|
||||
<input type="file" id="fileinput" name="fileUpload[]" multiple="" style="display:none;"/>
|
||||
<div id="uploader_box" class="well well-sm" style="cursor:pointer;">
|
||||
<center><h2 style="margin-bottom: 25px;">Drag and Drop File Here</h2></center>
|
||||
<div id="upload_box" class="well well-sm" style="cursor:pointer;">
|
||||
<center>
|
||||
<h2 style="margin-bottom: 25px;">Drag and Drop File(s) Here</h2>
|
||||
<p class="text-muted">The maximum size for web-based file uploads is currently <code>{{ $node->upload_size }} MB</code>.</p>
|
||||
</center>
|
||||
</div>
|
||||
<span id="file_progress"></span>
|
||||
</div>
|
||||
|
@ -154,16 +157,33 @@ $(window).load(function () {
|
|||
}
|
||||
});
|
||||
|
||||
var dropCounter = 0;
|
||||
$('#upload_box').bind({
|
||||
dragenter: function (event) {
|
||||
event.preventDefault();
|
||||
dropCounter++;
|
||||
$(this).addClass('hasFileHover');
|
||||
},
|
||||
dragleave: function (event) {
|
||||
dropCounter--;
|
||||
if (dropCounter === 0) {
|
||||
$(this).removeClass('hasFileHover');
|
||||
}
|
||||
},
|
||||
drop: function (event) {
|
||||
dropCounter = 0;
|
||||
$(this).removeClass('hasFileHover');
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('error', function (err) {
|
||||
console.error('There was an error while attemping to connect to the websocket: ' + err + '\n\nPlease try loading this page again.');
|
||||
});
|
||||
|
||||
|
||||
var siofu = new SocketIOFileUpload(uploadSocket);
|
||||
siofu.chunkDelay = 25;
|
||||
|
||||
document.getElementById("uploader_box").addEventListener("click", siofu.prompt, false);
|
||||
siofu.listenOnDrop(document.getElementById("uploader_box"));
|
||||
document.getElementById("upload_box").addEventListener("click", siofu.prompt, false);
|
||||
siofu.listenOnDrop(document.getElementById("upload_box"));
|
||||
|
||||
siofu.addEventListener('start', function (event) {
|
||||
event.file.meta.path = $("#u_file_name").val();
|
||||
|
@ -197,13 +217,13 @@ $(window).load(function () {
|
|||
// Do something when a file is uploaded:
|
||||
siofu.addEventListener('complete', function(event){
|
||||
if (!event.success) {
|
||||
$("#upload_error").html('An error was encountered while attempting to upload this file. Does the target directory exist?').show();
|
||||
$("#upload_error").html('An error was encountered while attempting to upload this file: <strong>' + event.message + '.</strong>').show();
|
||||
$("#file-upload-" + event.file.meta.identifier).hide();
|
||||
}
|
||||
});
|
||||
|
||||
siofu.addEventListener('error', function(event){
|
||||
$("#upload_error").html('An error was encountered while attempting to upload this file. Does the target directory exist?').show();
|
||||
$("#upload_error").html('An error was encountered while attempting to upload this file: <strong>' + event.message + '.</strong>').show();
|
||||
$("#file-upload-" + event.file.meta.identifier).hide();
|
||||
});
|
||||
|
||||
|
@ -248,7 +268,7 @@ $(window).load(function () {
|
|||
url: '{{ route('server.files.save', $server->uuidShort) }}',
|
||||
headers: { 'X-CSRF-Token': '{{ csrf_token() }}' },
|
||||
data: {
|
||||
file: '{{ $directory }}' + $('#file_name').val(),
|
||||
file: $('#file_name').val(),
|
||||
contents: Editor.getValue()
|
||||
}
|
||||
}).done(function (data) {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<h3 class="panel-title">File Path Information</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
When configuring any file paths in your server plugins or settings you should use <code>/home/container</code> as your base path.
|
||||
When configuring any file paths in your server plugins or settings you should use <code>/home/container</code> as your base path. The maximum size for web-based file uploads is currently <code>{{ $node->upload_size }} MB</code>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -101,8 +101,6 @@ $(window).load(function () {
|
|||
|
||||
|
||||
var siofu = new SocketIOFileUpload(uploadSocket);
|
||||
siofu.chunkDelay = 25;
|
||||
|
||||
siofu.listenOnDrop(document.getElementById("upload_box"));
|
||||
|
||||
window.addEventListener('dragover', function (event) {
|
||||
|
@ -173,12 +171,13 @@ $(window).load(function () {
|
|||
});
|
||||
|
||||
siofu.addEventListener('error', function(event){
|
||||
console.error(event);
|
||||
$('.prog-bar-' + event.file.meta.identifier).css('width', '100%').removeClass('progress-bar-info').addClass('progress-bar-danger');
|
||||
$.notify({
|
||||
message: 'An error was encountered while attempting to upload this file.'
|
||||
message: 'An error was encountered while attempting to upload this file: <strong>' + event.message + '.</strong>',
|
||||
}, {
|
||||
type: 'danger',
|
||||
delay: 5000
|
||||
delay: 8000
|
||||
});
|
||||
});
|
||||
@endcan
|
||||
|
|
|
@ -21,13 +21,14 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="width:2%;text-align:center;"><i class="fa fa-refresh muted muted-hover use-pointer" data-action="reload-files"></i></th>
|
||||
<th style="width:45%">File Name</th>
|
||||
<th style="width:55%">File Name</th>
|
||||
<th style="width:15%">Size</th>
|
||||
<th style="width:20%">Last Modified</th>
|
||||
<th style="width:8%"></th>
|
||||
</tr>
|
||||
<tr id="headerTableRow" data-currentdir="{{ $directory['header'] }}">
|
||||
<th><i class="fa fa-folder-open"></i></th>
|
||||
<th colspan="3">
|
||||
<th colspan="4">
|
||||
<code>/home/container{{ $directory['header'] }}</code>
|
||||
<small>
|
||||
<a href="/server/{{ $server->uuidShort }}/files/add/@if($directory['header'] !== '')?dir={{ $directory['header'] }}@endif" class="text-muted">
|
||||
|
@ -44,6 +45,7 @@
|
|||
<td><a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">←</a></a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($directory['show']) && $directory['show'] === true)
|
||||
|
@ -54,6 +56,7 @@
|
|||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($folders as $folder)
|
||||
|
@ -73,6 +76,7 @@
|
|||
{{ $carbon->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td><button class="btn btn-xxs btn-default" data-action="toggleMenu" style="padding:0px 6px;"><i class="fa fa-ellipsis-h"></i></button></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($files as $file)
|
||||
|
@ -149,6 +153,7 @@
|
|||
{{ $carbon->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td><button class="btn btn-xxs btn-default" data-action="toggleMenu" style="padding:0px 6px;"><i class="fa fa-ellipsis-h"></i></button></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
@parent
|
||||
{!! Theme::css('css/jquery.terminal.css') !!}
|
||||
{!! Theme::js('js/jquery.mousewheel-min.js') !!}
|
||||
{!! Theme::js('js/jquery.terminal-0.11.6.min.js') !!}
|
||||
{!! Theme::js('js/jquery.terminal-0.11.23.min.js') !!}
|
||||
{!! Theme::js('js/unix_formatting.js') !!}
|
||||
{!! Theme::js('js/vendor/chartjs/chart.min.js') !!}
|
||||
{!! Theme::js('js/vendor/jquery/jquery-dateFormat.min.js') !!}
|
||||
|
@ -50,6 +50,9 @@
|
|||
<div class="alert alert-info hidden" id="consoleThrottled">
|
||||
The console is currently being throttled due to the speed at which data is being sent. Messages are being queued and will appear as the queue is worked through.
|
||||
</div>
|
||||
<div id="consoleNotify" class="hidden">
|
||||
<i class="fa fa-bell"></i>
|
||||
</div>
|
||||
<div id="terminal">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -193,10 +196,30 @@ $(window).load(function () {
|
|||
height: 400,
|
||||
exit: false,
|
||||
prompt: '{{ $server->username }}:~$ ',
|
||||
scrollOnEcho: false,
|
||||
scrollBottomOffset: 5,
|
||||
onBlur: function (terminal) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
const $consoleNotify = $('#consoleNotify');
|
||||
$consoleNotify.on('click', function () {
|
||||
terminal.scroll_to_bottom();
|
||||
$consoleNotify.removeClass('hidden');
|
||||
});
|
||||
|
||||
terminal.on('scroll', function() {
|
||||
if (terminal.is_bottom()) {
|
||||
$consoleNotify.addClass('hidden');
|
||||
}
|
||||
})
|
||||
|
||||
function terminalNotifyOutput() {
|
||||
if (!terminal.is_bottom()) {
|
||||
$consoleNotify.removeClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
var ctc = $('#chart_cpu');
|
||||
var timeLabels = [];
|
||||
|
@ -326,10 +349,13 @@ $(window).load(function () {
|
|||
$('#consoleThrottled').addClass('hidden');
|
||||
}
|
||||
|
||||
for (var i = 0; i < {{ env('CONSOLE_PUSH_COUNT', 10) }} && outputQueue.length > 0; i++)
|
||||
{
|
||||
terminal.echo(outputQueue[0]);
|
||||
outputQueue.shift();
|
||||
if (outputQueue.length > 0) {
|
||||
for (var i = 0; i < {{ env('CONSOLE_PUSH_COUNT', 10) }} && outputQueue.length > 0; i++)
|
||||
{
|
||||
terminal.echo(outputQueue[0]);
|
||||
outputQueue.shift();
|
||||
}
|
||||
terminalNotifyOutput();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -347,8 +373,10 @@ $(window).load(function () {
|
|||
timeout: 10000
|
||||
}).done(function(data) {
|
||||
terminal.echo(data);
|
||||
terminalNotifyOutput();
|
||||
}).fail(function() {
|
||||
terminal.error('Unable to load initial server log, try reloading the page.');
|
||||
terminalNotifyOutput();
|
||||
});
|
||||
}
|
||||
updateServerPowerControls(data.status);
|
||||
|
|
|
@ -56,102 +56,109 @@ class ContextMenuClass {
|
|||
}
|
||||
|
||||
rightClick() {
|
||||
$('#file_listing > tbody td').on('contextmenu', event => {
|
||||
|
||||
const parent = $(event.target).closest('tr');
|
||||
const menu = $(this.makeMenu(parent));
|
||||
|
||||
if (parent.data('type') === 'disabled') return;
|
||||
$('[data-action="toggleMenu"]').on('mousedown', () => {
|
||||
event.preventDefault();
|
||||
this.showMenu(event);
|
||||
});
|
||||
$('#file_listing > tbody td').on('contextmenu', event => {
|
||||
this.showMenu(event);
|
||||
});
|
||||
}
|
||||
|
||||
$(menu).appendTo('body');
|
||||
$(menu).data('invokedOn', $(event.target)).show().css({
|
||||
position: 'absolute',
|
||||
left: event.pageX,
|
||||
top: event.pageY,
|
||||
});
|
||||
showMenu(event) {
|
||||
const parent = $(event.target).closest('tr');
|
||||
const menu = $(this.makeMenu(parent));
|
||||
|
||||
this.activeLine = parent;
|
||||
this.activeLine.addClass('active');
|
||||
if (parent.data('type') === 'disabled') return;
|
||||
event.preventDefault();
|
||||
|
||||
@can('download-files', $server)
|
||||
if (parent.data('type') === 'file') {
|
||||
$(menu).find('li[data-action="download"]').removeClass('hidden');
|
||||
}
|
||||
@endcan
|
||||
$(menu).appendTo('body');
|
||||
$(menu).data('invokedOn', $(event.target)).show().css({
|
||||
position: 'absolute',
|
||||
left: event.pageX - 150,
|
||||
top: event.pageY,
|
||||
});
|
||||
|
||||
@can('compress-files', $server)
|
||||
if (parent.data('type') === 'folder') {
|
||||
$(menu).find('li[data-action="compress"]').removeClass('hidden');
|
||||
}
|
||||
@endcan
|
||||
this.activeLine = parent;
|
||||
this.activeLine.addClass('active');
|
||||
|
||||
@can('decompress-files', $server)
|
||||
if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {
|
||||
$(menu).find('li[data-action="decompress"]').removeClass('hidden');
|
||||
}
|
||||
@endcan
|
||||
@can('download-files', $server)
|
||||
if (parent.data('type') === 'file') {
|
||||
$(menu).find('li[data-action="download"]').removeClass('hidden');
|
||||
}
|
||||
@endcan
|
||||
|
||||
// Handle Events
|
||||
const Actions = new ActionsClass(parent, menu);
|
||||
@can('move-files', $server)
|
||||
$(menu).find('li[data-action="move"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.move();
|
||||
});
|
||||
@endcan
|
||||
@can('compress-files', $server)
|
||||
if (parent.data('type') === 'folder') {
|
||||
$(menu).find('li[data-action="compress"]').removeClass('hidden');
|
||||
}
|
||||
@endcan
|
||||
|
||||
@can('copy-files', $server)
|
||||
$(menu).find('li[data-action="copy"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.copy();
|
||||
});
|
||||
@endcan
|
||||
@can('decompress-files', $server)
|
||||
if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {
|
||||
$(menu).find('li[data-action="decompress"]').removeClass('hidden');
|
||||
}
|
||||
@endcan
|
||||
|
||||
@can('move-files', $server)
|
||||
$(menu).find('li[data-action="rename"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.rename();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('compress-files', $server)
|
||||
$(menu).find('li[data-action="compress"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.compress();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('decompress-files', $server)
|
||||
$(menu).find('li[data-action="decompress"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.decompress();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('create-files', $server)
|
||||
$(menu).find('li[data-action="folder"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.folder();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('download-files', $server)
|
||||
$(menu).find('li[data-action="download"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.download();
|
||||
});
|
||||
@endcan
|
||||
|
||||
$(menu).find('li[data-action="delete"]').unbind().on('click', e => {
|
||||
// Handle Events
|
||||
const Actions = new ActionsClass(parent, menu);
|
||||
@can('move-files', $server)
|
||||
$(menu).find('li[data-action="move"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.delete();
|
||||
Actions.move();
|
||||
});
|
||||
@endcan
|
||||
|
||||
$(window).on('click', () => {
|
||||
$(menu).remove();
|
||||
if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');
|
||||
@can('copy-files', $server)
|
||||
$(menu).find('li[data-action="copy"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.copy();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('move-files', $server)
|
||||
$(menu).find('li[data-action="rename"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.rename();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('compress-files', $server)
|
||||
$(menu).find('li[data-action="compress"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.compress();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('decompress-files', $server)
|
||||
$(menu).find('li[data-action="decompress"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.decompress();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('create-files', $server)
|
||||
$(menu).find('li[data-action="folder"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.folder();
|
||||
});
|
||||
@endcan
|
||||
|
||||
@can('download-files', $server)
|
||||
$(menu).find('li[data-action="download"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.download();
|
||||
});
|
||||
@endcan
|
||||
|
||||
$(menu).find('li[data-action="delete"]').unbind().on('click', e => {
|
||||
e.preventDefault();
|
||||
Actions.delete();
|
||||
});
|
||||
|
||||
$(window).on('click', () => {
|
||||
$(menu).remove();
|
||||
if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($oldInput['add-files']))checked="checked"@endif value="add-files"> <strong>Create Files & Folders</strong>
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($oldInput['create-files']))checked="checked"@endif value="create-files"> <strong>Create Files & Folders</strong>
|
||||
<p class="text-muted"><small>Allows user to create a new file within the panel.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -83,32 +83,33 @@
|
|||
<p class="text-muted"><small>Allows user to save modified file contents.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($oldInput['move-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="move-files"> <strong>Rename & Move Files</strong>
|
||||
<p class="text-muted"><small>Allows user to move and rename files and folders on the filesystem.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($oldInput['copy-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="copy-files"> <strong>Copy Files</strong>
|
||||
<p class="text-muted"><small>Allows user to copy files and folders on the filesystem.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($oldInput['compress-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="compress-files"> <strong>Compress Files</strong>
|
||||
<p class="text-muted"><small>Allows user to make archives of files and folders on the system.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($oldInput['decompress-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="decompress-files"> <strong>Decompress Files</strong>
|
||||
<p class="text-muted"><small>Allows user to decompress <code>.zip</code> and <code>.tar / .tar.gz</code> archives.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($permissions['add-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="add-files"> <strong>Create Files</strong>
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($permissions['move-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="move-files"> <strong>Rename & Move Files</strong>
|
||||
<p class="text-muted"><small>Allows user to move and rename files and folders on the filesystem.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($permissions['copy-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="copy-files"> <strong>Copy Files</strong>
|
||||
<p class="text-muted"><small>Allows user to copy files and folders on the filesystem.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($permissions['compress-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="compress-files"> <strong>Compress Files</strong>
|
||||
<p class="text-muted"><small>Allows user to make archives of files and folders on the system.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($permissions['decompress-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="decompress-files"> <strong>Decompress Files</strong>
|
||||
<p class="text-muted"><small>Allows user to decompress <code>.zip</code> and <code>.tar / .tar.gz</code> archives.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox highlight">
|
||||
<label class="checkbox-custom highlight" data-initialize="checkbox">
|
||||
<input class="sr-only" name="permissions[]" type="checkbox" @if(isset($permissions['create-files']))checked="checked"@endif @cannot('edit-subuser', $server)disabled="disabled"@endcannot value="create-files"> <strong>Create Files & Folders</strong>
|
||||
<p class="text-muted"><small>Allows user to create a new file within the panel.</small><p>
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue