Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(debugpanel): add access to installation log #37

Merged
merged 1 commit into from Sep 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions admin/debugpanel.php
Expand Up @@ -99,6 +99,7 @@ function html_src_indent($num)
echo '<li><a class="'. $btnClass .'" href="#devlog" id="nav-devlog"><div><span data-i18n="devlog">devlog</span></div></a></li>';
echo '<li><a class="'. $btnClass .'" href="#serverprocesses" id="nav-serverprocesses"><div><span data-i18n="serverprocesses">serverprocesses</span></div></a></li>';
echo '<li><a class="'. $btnClass .'" href="#bootconfig" id="nav-bootconfig"><div><span data-i18n="bootconfig">bootconfig</span></div></a></li>';
echo '<li><a class="'. $btnClass .'" href="#installlog" id="nav-installlog"><div><span data-i18n="installlog">installlog</span></div></a></li>';
echo '<li><a class="'. $btnClass .'" href="#githead" id="nav-githead"><div><span data-i18n="githead">githead</span></div></a></li>';

html_src_indent(--$indent);
Expand Down
4 changes: 4 additions & 0 deletions api/serverInfo.php
Expand Up @@ -32,6 +32,10 @@
echo dumpfile($config['foldersAbs']['tmp'] . '/' . $config['dev']['logfile'], null);
break;

case 'nav-installlog':
echo dumpfile($config['foldersAbs']['private'] . '/install.log', null);
break;

case 'nav-githead':
$get_head = shell_exec('git rev-parse --is-inside-work-tree 2>/dev/null && git log --format="%h %s" -n 20 || false');
$file_path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'HEAD';
Expand Down
2 changes: 1 addition & 1 deletion config/config.inc.php
Expand Up @@ -371,7 +371,7 @@
$config['folders']['thumbs'] = 'thumbs';
$config['folders']['tmp'] = 'tmp';
$config['folders']['archives'] = 'archives';

$config['folders']['private'] = 'private';

// R E S E T
$config['reset']['remove_images'] = true;
Expand Down
2 changes: 1 addition & 1 deletion lib/config.php
Expand Up @@ -151,7 +151,7 @@
}

foreach ($config['folders'] as $key => $folder) {
if ($folder === 'data' || $folder === 'archives' || $folder === 'config') {
if ($folder === 'data' || $folder === 'archives' || $folder === 'config' || $folder === 'private') {
$path = $basepath . DIRECTORY_SEPARATOR . $folder;
} else {
$path = $basepath . DIRECTORY_SEPARATOR . $config['folders']['data'] . DIRECTORY_SEPARATOR . $folder;
Expand Down
7 changes: 7 additions & 0 deletions lib/configsetup.inc.php
Expand Up @@ -2254,6 +2254,13 @@
'name' => 'folders[archives]',
'value' => $config['folders']['archives'],
],
'folders_private' => [
'view' => 'expert',
'type' => 'hidden',
'placeholder' => $defaultConfig['folders']['private'],
'name' => 'folders[private]',
'value' => $config['folders']['private'],
],
'folders_config' => [
'view' => 'expert',
'type' => 'hidden',
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/de.json
Expand Up @@ -31,14 +31,14 @@
"chromaInfoBefore": "Bitte wählen Sie einen Hintergrund, um ein neues Foto aufzunehmen",
"close": "Schließen",
"collage": "Collage",
"collage:collage_background": "Hintergrund",
"collage:collage_background_color": "Hintergrundfarbe Collage",
"collage:collage_cntdwn_time": "Collage-Countdown Timer:",
"collage:collage_continuous": "Collage ohne Unterbrechung aufnehmen",
"collage:collage_continuous_time": "Einzelne Bilder bei Collage ohne Unterbrechung anzeigen für:",
"collage:collage_dashedline_color": "Farbe der Trennlinie beim 2x4 Collage-Layout",
"collage:collage_enabled": "Foto-Collage erlauben",
"collage:collage_frame": "Rahmen",
"collage:collage_background": "Hintergrund",
"collage:collage_keep_single_images": "Einzelne Bilder des Collage zur Galerie hinzufügen",
"collage:collage_key": "Tastencode welcher eine Collage auslöst",
"collage:collage_layout": "Collage Layout wählen:",
Expand Down Expand Up @@ -217,12 +217,12 @@
"manual:authentication:protect_localhost_update": "Wenn deaktiviert, kann auf den Updater über localhost ohne Benutzername und Passwort zugegriffen werden.",
"manual:authentication:protect_manual": "Wenn aktiviert, kann auf das Handbuch und das FAQ nur zugegriffen werden, wenn ein Benutzername und ein Passwort eingegeben werden.",
"manual:authentication:protect_update": "Wenn diese Option aktiviert ist, kann auf den Updater nur zugegriffen werden, wenn ein Benutzername und ein Passwort eingegeben werden.",
"manual:collage:collage_background": "Geben Sie den Pfad des Hintergrundes ein, der nach der Aufnahme auf Ihre Collage angewendet wird.",
"manual:collage:collage_cntdwn_time": "Legen Sie Ihre Countdown-Zeit fest, welche zwischen den Bildern für eine Collage verwendet wird.",
"manual:collage:collage_continuous": "Collage ohne Unterbrechung aufnehmen.",
"manual:collage:collage_continuous_time": "Nehmen Sie Einfluss auf die Zeit, die ein Bild bei der Collage ohne Unterbrechung sichtbar ist, bevor das nächste Bild aufgenommen wird.",
"manual:collage:collage_enabled": "Wenn diese Option aktiviert ist, kann der Benutzer eine Collage aufnehmen. Eine Collage besteht aus 4 Bildern. Optional können Sie eine Collage mit oder ohne Unterbrechung aufnehmen.",
"manual:collage:collage_frame": "Geben Sie den Pfad des Rahmens ein, der nach der Aufnahme auf Ihre Collage angewendet wird.",
"manual:collage:collage_background": "Geben Sie den Pfad des Hintergrundes ein, der nach der Aufnahme auf Ihre Collage angewendet wird.",
"manual:collage:collage_keep_single_images": "Wenn Option aktiviert, werden einzelne Bilder aus dem Collage zur Galerie hinzugefügt. Bitte beachten Sie, dass einzelne Bilder nicht sichtbar sind, wenn Sie auf die Galerie von der Ergebnisseite aus zugreifen!",
"manual:collage:collage_key": "Geben Sie die Keyl-ID an, welche zum Erstellen einer Collage verwendet werden soll (z.B. 13 ist die Eingabetaste). Verwenden Sie beispielsweise <a href=\"https://keycode.info\" target=\"_blank\">https://keycode.info</a>, um die Key-ID herauszufinden.",
"manual:collage:collage_layout": "Wählen Sie zwischen den 2x2 und 2x4 Bilder Layouts für die Collage.",
Expand Down
5 changes: 3 additions & 2 deletions resources/lang/en.json
Expand Up @@ -32,14 +32,14 @@
"chromaInfoBefore": "Please choose a background to take a Picture",
"close": "Close",
"collage": "Collage",
"collage:collage_background": "Background",
"collage:collage_background_color": "Collage background color",
"collage:collage_cntdwn_time": "Collage-countdown timer:",
"collage:collage_continuous": "Take collage without interruption",
"collage:collage_continuous_time": "Show single images on continuous collage for:",
"collage:collage_dashedline_color": "Cutting line color on 2x4 Collage layouts",
"collage:collage_enabled": "Allow photo collage",
"collage:collage_frame": "Frame",
"collage:collage_background": "Background",
"collage:collage_keep_single_images": "Add single images from collage to gallery",
"collage:collage_key": "Key code which triggers a collage",
"collage:collage_layout": "Choose collage layout:",
Expand Down Expand Up @@ -173,6 +173,7 @@
"home": "Home",
"insertMail": "Enter your e-mail address to receive the photo.",
"insertMailToDB": "Enter your e-mail address to add it into a database. A link to all pictures will be send to you in the next few days.",
"installlog": "Installation log",
"jpeg_quality": "JPEG quality",
"jpeg_quality:jpeg_quality_chroma": "JPEG quality chroma-keying:",
"jpeg_quality:jpeg_quality_image": "JPEG quality images (-1 to disable):",
Expand Down Expand Up @@ -221,12 +222,12 @@
"manual:authentication:protect_localhost_update": "If disabled, updater can be accessed without username and password from localhost.",
"manual:authentication:protect_manual": "If enabled, manual and FAQ can only be accessed if a username and password is entered.",
"manual:authentication:protect_update": "If enabled, updater can only be accessed if a username and password is entered.",
"manual:collage:collage_background": "Enter the path of the background which is applied to your collage after taking it.",
"manual:collage:collage_cntdwn_time": "Set your countdown time between pictures while taking a collage.",
"manual:collage:collage_continuous": "Take collage without interrupption.",
"manual:collage:collage_continuous_time": "Controll the time a picture is visible on continuous collage before the next picture is taken.",
"manual:collage:collage_enabled": "If enabled, user can take a collage. A collage consists of 4 pictures. Optional you can take a collage with or without interruption.",
"manual:collage:collage_frame": "Enter the path of the frame which is applied to your collage after taking it.",
"manual:collage:collage_background": "Enter the path of the background which is applied to your collage after taking it.",
"manual:collage:collage_keep_single_images": "If enabled, single images from collage will be added to the gallery. Please note that single images are not visible if you access the gallery at the result screen!",
"manual:collage:collage_key": "Specify the key id to use that key to take a collage (e.g. 13 is the enter key). For example use <a href=\"https://keycode.info\" target=\"_blank\">https://keycode.info</a> to find out the key id.",
"manual:collage:collage_layout": "Choose between different collage layouts.",
Expand Down