summaryrefslogtreecommitdiffstats
path: root/settings/templates
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2014-12-20 22:44:41 +0100
committerGeorg Ehrke <developer@georgehrke.com>2015-01-07 14:55:53 +0100
commitf579f2bd948ca73a1af720e19517af9bdde11748 (patch)
tree08c7259d72d8db413895e215b774df83539a938c /settings/templates
parent510488ad3e24110c435423860e9afbc58020ed66 (diff)
downloadnextcloud-server-f579f2bd948ca73a1af720e19517af9bdde11748.tar.gz
nextcloud-server-f579f2bd948ca73a1af720e19517af9bdde11748.zip
add Download logfile button to admin settings
add logSettingsController add download logfile button move getEntries to LogSettingsController move set log level to logsettingscontroller.php add warning if logfile is bigger than 100MB add unit test for set log level fix typecasting, add new line at EoF show log and logfile download only if log_type is set to owncloud add unit test for getFilenameForDownload
Diffstat (limited to 'settings/templates')
-rw-r--r--settings/templates/admin.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index d04351c2d6c..dc800271d5c 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -462,6 +462,7 @@ if ($_['suggestedOverwriteWebroot']) {
<option value='<?php p($i)?>' <?php p($selected) ?>><?php p($levelLabels[$i])?></option>
<?php endfor;?>
</select>
+<?php if ($_['showLog'] && $_['doesLogFileExist']): ?>
<table id="log" class="grid">
<?php foreach ($_['entries'] as $entry): ?>
<tr>
@@ -484,11 +485,20 @@ if ($_['suggestedOverwriteWebroot']) {
</tr>
<?php endforeach;?>
</table>
+ <?php if ($_['logFileSize'] > 0): ?>
+ <a href="<?php print_unescaped(OC::$server->getURLGenerator()->linkToRoute('settings.LogSettings.download')); ?>" class="button" id="downloadLog"><?php p($l->t('Download logfile'));?></a>
+ <?php endif; ?>
<?php if ($_['entriesremain']): ?>
<input id="moreLog" type="button" value="<?php p($l->t('More'));?>...">
<input id="lessLog" type="button" value="<?php p($l->t('Less'));?>...">
<?php endif; ?>
-
+ <?php if ($_['logFileSize'] > (100 * 1024 * 1024)): ?>
+ <br>
+ <em>
+ <?php p($l->t('The logfile is bigger than 100MB. Downloading it may take some time!')); ?>
+ </em>
+ <?php endif; ?>
+ <?php endif; ?>
</div>
<div class="section">