Removed AdminLTE, some minor improvements
This commit is contained in:
36
Core/API/TestRedis.class.php
Normal file
36
Core/API/TestRedis.class.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Core\API;
|
||||
|
||||
use Core\Objects\Context;
|
||||
use Core\Objects\DatabaseEntity\Group;
|
||||
|
||||
class TestRedis extends Request {
|
||||
|
||||
public function __construct(Context $context, bool $externalCall = false) {
|
||||
parent::__construct($context, $externalCall, []);
|
||||
}
|
||||
|
||||
protected function _execute(): bool {
|
||||
|
||||
$settings = $this->context->getSettings();
|
||||
if (!$settings->isRateLimitingEnabled()) {
|
||||
return $this->createError("Rate Limiting is currently disabled");
|
||||
}
|
||||
|
||||
$connection = $this->context->getRedis();
|
||||
if ($connection === null || !$connection->isConnected()) {
|
||||
return $this->createError("Redis connection failed");
|
||||
}
|
||||
|
||||
return $this->success;
|
||||
}
|
||||
|
||||
public static function getDescription(): string {
|
||||
return "Allows users to test the redis connection with the configured credentials.";
|
||||
}
|
||||
|
||||
public static function getDefaultPermittedGroups(): array {
|
||||
return [Group::ADMIN];
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,7 @@ return [
|
||||
"active" => "Aktiv",
|
||||
"group" => "Gruppe",
|
||||
"no_members" => "Keine Mitglieder in dieser Gruppe",
|
||||
"user_list_placeholder" => "Keine Benutzer zum Anzeigen",
|
||||
|
||||
# profile picture
|
||||
"change_picture" => "Profilbild ändern",
|
||||
|
||||
@@ -83,4 +83,8 @@ return [
|
||||
"datefns_time_format_precise" => "HH:mm:ss",
|
||||
"datefns_datetime_format" => "dd.MM.yyyy HH:mm",
|
||||
"datefns_datetime_format_precise" => "dd.MM.yyyy HH:mm:ss",
|
||||
|
||||
# localization
|
||||
"error_language_fetch" => "Fehler beim Holen der Sprachen",
|
||||
"error_language_set" => "Fehler beim Setzen der Sprache",
|
||||
];
|
||||
@@ -55,6 +55,9 @@ return [
|
||||
"redis_host" => "Redis Host",
|
||||
"redis_port" => "Redis Port",
|
||||
"redis_password" => "Redis Passwort",
|
||||
"redis_test" => "Verbindung testen",
|
||||
"redis_test_error" => "Redis-Verbindung fehlgeschlagen, überprüfen Sie die Daten.",
|
||||
"redis_test_success" => "Redis-Verbindung erfolgreich aufgebaut.",
|
||||
|
||||
# dialog
|
||||
"fetch_settings_error" => "Fehler beim Holen der Einstellungen",
|
||||
|
||||
@@ -57,6 +57,7 @@ return [
|
||||
"group" => "Group",
|
||||
"no_members" => "No members in this group",
|
||||
"edit_profile" => "Edit Profile",
|
||||
"user_list_placeholder" => "No users to display",
|
||||
|
||||
# profile picture
|
||||
"change_picture" => "Change profile picture",
|
||||
|
||||
@@ -83,4 +83,8 @@ return [
|
||||
"datefns_time_format_precise" => "pp",
|
||||
"datefns_datetime_format" => "MM/dd/yyyy p",
|
||||
"datefns_datetime_format_precise" => "MM/dd/yyyy pp",
|
||||
|
||||
# localization
|
||||
"error_language_fetch" => "Error fetching languages",
|
||||
"error_language_set" => "Error setting language",
|
||||
];
|
||||
@@ -55,6 +55,9 @@ return [
|
||||
"redis_host" => "Redis host",
|
||||
"redis_port" => "Redis port",
|
||||
"redis_password" => "Redis password",
|
||||
"redis_test" => "Test Connection",
|
||||
"redis_test_error" => "Redis Connection failed, check your credentials.",
|
||||
"redis_test_success" => "Redis Connection successfully established.",
|
||||
|
||||
# dialog
|
||||
"fetch_settings_error" => "Error fetching settings",
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
{% block head %}
|
||||
<title>{{ site.name }} - {{ L("admin.title") }}</title>
|
||||
<link rel="stylesheet" href="/css/fontawesome.min.css" nonce="{{ site.csp.nonce }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
Reference in New Issue
Block a user