mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-19 00:07:17 +01:00
Add Conditional Handling for H2SQL Databases and Improve Database Compatibility (#2632)
# Description 1. **Conditional Support for DatabaseController**: - The `DatabaseController` is now annotated with `@Conditional(H2SQLCondition.class)` to ensure it is only available for H2SQL database setups. - This prevents unnecessary exposure of endpoints when the application is configured for H2SQL. 2. **Database Web Template Adjustments**: - The UI elements related to database management are conditionally hidden when the database type is not supported (e.g., `databaseVersion == 'Unknown'`). - Improves user experience by avoiding unsupported operations for non-H2SQL or unknown databases. 3. **Model Attribute Updates**: - Added a check in `DatabaseWebController` to set an informational message (`notSupported`) when the database version is unknown. 4. **H2 Database Compatibility**: - Additional adjustments to ensure the application gracefully handles H2-specific functionality without affecting other database configurations. 5. **Build File Updates**: - Updated the `build.gradle` file to exclude `H2SQLCondition` and related controllers when specific configurations (e.g., security or database type) are disabled. ### Benefits: - Enhances application flexibility by adapting to the configured database type. - Improves user feedback with clear messaging and UI adjustments for unsupported operations. - Prevents accidental exposure of database endpoints in H2SQL setups. ## Checklist - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have performed a self-review of my own code - [ ] I have attached images of the change if it is UI based - [x] I have commented my code, particularly in hard-to-understand areas - [ ] If my code has heavily changed functionality I have updated relevant docs on [Stirling-PDFs doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) - [x] My changes generate no new warnings - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only)
This commit is contained in:
parent
8d4c762c7e
commit
f379c27bd7
@ -52,8 +52,9 @@ sourceSets {
|
||||
java {
|
||||
if (System.getenv("DOCKER_ENABLE_SECURITY") == "false") {
|
||||
exclude "stirling/software/SPDF/config/security/**"
|
||||
exclude "stirling/software/SPDF/controller/api/UserController.java"
|
||||
exclude "stirling/software/SPDF/controller/api/DatabaseController.java"
|
||||
exclude "stirling/software/SPDF/controller/api/UserController.java"
|
||||
exclude "stirling/software/SPDF/controller/api/H2SQLCondition.java"
|
||||
exclude "stirling/software/SPDF/controller/web/AccountWebController.java"
|
||||
exclude "stirling/software/SPDF/controller/web/DatabaseWebController.java"
|
||||
exclude "stirling/software/SPDF/model/ApiKeyAuthenticationToken.java"
|
||||
@ -70,7 +71,6 @@ sourceSets {
|
||||
exclude "stirling/software/SPDF/UI/impl/**"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,10 +178,10 @@ public class DatabaseService implements DatabaseInterface {
|
||||
} catch (CannotReadScriptException e) {
|
||||
log.error("Error during database export: File {} not found", insertOutputFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
log.info("Database export completed: {}", insertOutputFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
private static void deleteOldestBackup(List<FileInfo> filteredBackupList) {
|
||||
try {
|
||||
@ -226,7 +226,7 @@ public class DatabaseService implements DatabaseInterface {
|
||||
ApplicationProperties.Datasource datasource =
|
||||
applicationProperties.getSystem().getDatasource();
|
||||
return !datasource.isEnableCustomDatabase()
|
||||
|| datasource.getType().equals(ApplicationProperties.Driver.H2.name());
|
||||
|| datasource.getType().equalsIgnoreCase(ApplicationProperties.Driver.H2.name());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,13 +2,16 @@ package stirling.software.SPDF.config.security.database;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import stirling.software.SPDF.config.interfaces.DatabaseInterface;
|
||||
import stirling.software.SPDF.controller.api.H2SQLCondition;
|
||||
import stirling.software.SPDF.model.provider.UnsupportedProviderException;
|
||||
|
||||
@Component
|
||||
@Conditional(H2SQLCondition.class)
|
||||
public class ScheduledTasks {
|
||||
|
||||
private final DatabaseInterface databaseService;
|
||||
|
@ -8,6 +8,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.core.io.InputStreamResource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
@ -30,6 +31,7 @@ import stirling.software.SPDF.config.security.database.DatabaseService;
|
||||
@Controller
|
||||
@RequestMapping("/api/v1/database")
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@Conditional(H2SQLCondition.class)
|
||||
@Tag(name = "Database", description = "Database APIs for backup, import, and management")
|
||||
public class DatabaseController {
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
package stirling.software.SPDF.controller.api;
|
||||
|
||||
import org.springframework.context.annotation.Condition;
|
||||
import org.springframework.context.annotation.ConditionContext;
|
||||
import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
|
||||
public class H2SQLCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
boolean enableCustomDatabase =
|
||||
Boolean.parseBoolean(
|
||||
context.getEnvironment()
|
||||
.getProperty("system.datasource.enableCustomDatabase"));
|
||||
String dataSourceType = context.getEnvironment().getProperty("system.datasource.type");
|
||||
return !enableCustomDatabase
|
||||
|| (enableCustomDatabase && "h2".equalsIgnoreCase(dataSourceType));
|
||||
}
|
||||
}
|
@ -37,6 +37,9 @@ public class DatabaseWebController {
|
||||
List<FileInfo> backupList = databaseService.getBackupList();
|
||||
model.addAttribute("backupFiles", backupList);
|
||||
model.addAttribute("databaseVersion", databaseService.getH2Version());
|
||||
if ("Unknown".equalsIgnoreCase(databaseService.getH2Version())) {
|
||||
model.addAttribute("infoMessage", "notSupported");
|
||||
}
|
||||
return "database";
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=لم يتم العثور على الملف
|
||||
database.fileNullOrEmpty=يجب ألا يكون الملف فارغًا أو خاليًا
|
||||
database.failedImportFile=فشل استيراد الملف
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=لقد انتهت جلستك. يرجى تحديث الصفحة والمحاولة مرة أخرى
|
||||
session.refreshPage=تحديث الصفحة
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Fayl Tapılmadı
|
||||
database.fileNullOrEmpty=Fayl boş və ya "null" olmamalıdır
|
||||
database.failedImportFile=Faylı daxil etmək alınmadı
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Sessiyanızın vaxtı bitdi. Səhifəni yeniləyin və yenidən cəhd edin.
|
||||
session.refreshPage=Səhifəni Yenilə
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Файлът не е намерен
|
||||
database.fileNullOrEmpty=Файлът не трябва да е нулев или празен
|
||||
database.failedImportFile=Неуспешно импортиране на файл
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Вашата сесия е изтекла. Моля, опреснете страницата и опитайте отново.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Fitxer no trobat
|
||||
database.fileNullOrEmpty=El fitxer no ha de ser nul o buit
|
||||
database.failedImportFile=Error en la importació del fitxer
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=La teva sessió ha expirat. Si us plau, actualitza la pàgina i torna a intentar-ho.
|
||||
session.refreshPage=Actualitza la pàgina
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Soubor nemůže být null nebo prázdný
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Vaše sesace vypršela. Prosím obnovte stránku a zkusit to znovu.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Fil ikke fundet
|
||||
database.fileNullOrEmpty=Fil må ikke være null eller tom
|
||||
database.failedImportFile=Kunne ikke importere fil
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Din sesions tid har udløbet. Genlad siden og prøv igen.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Datenbanksicherung erfolgreich
|
||||
database.fileNotFound=Datei nicht gefunden
|
||||
database.fileNullOrEmpty=Datei darf nicht null oder leer sein
|
||||
database.failedImportFile=Dateiimport fehlgeschlagen
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Ihre Sitzung ist abgelaufen. Bitte laden Sie die Seite neu und versuchen Sie es erneut.
|
||||
session.refreshPage=Seite aktualisieren
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Το αρχείο δεν μπορεί να είναι τυχόν ή κενό.
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Η σεζώνη σας υπάρξει παραγωγή. Πατήστε για να ανανεώσετε το πλήρωμα και δοκιμάστε ξανά.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed to import file
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Archivo no encontrado
|
||||
database.fileNullOrEmpty=El archivo no debe ser nulo o vacío.
|
||||
database.failedImportFile=Archivo de importación fallido
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Tu sesión ha caducado. Actualice la página e inténtelo de nuevo.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=فایل پیدا نشد
|
||||
database.fileNullOrEmpty=فایل نباید خالی یا تهی باشد
|
||||
database.failedImportFile=وارد کردن فایل ناموفق بود
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=نشست شما به پایان رسیده است. لطفاً صفحه را تازهسازی کرده و دوباره تلاش کنید.
|
||||
session.refreshPage=تازهسازی صفحه
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Fichier ne peut pas être null ou vide
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Votre session a expiré. Veuillez recharger la page et réessayer.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Comhad gan aimsiú
|
||||
database.fileNullOrEmpty=Níor cheart go mbeadh an comhad ar neamhní nó folamh
|
||||
database.failedImportFile=Theip ar iompórtáil an chomhaid
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Datoteka ne smije biti null ili prazna
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Vaš sesija je istekla. Molim vas da osvježite stranicu i pokušate ponovno.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Fájlnull vagy üres nélkül nem lehet folytatni
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=A munkamenet letelezett. Frissítse a lapot és próbálkozzon újra.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Berkas tidak Ditemukan
|
||||
database.fileNullOrEmpty=Berkas tidak boleh null atau kosong
|
||||
database.failedImportFile=Impor Berkas Gagal
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Sesi Anda telah kedaluwarsa. Silakan muat ulang halaman dan coba lagi.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Backup del database riuscito
|
||||
database.fileNotFound=File non trovato
|
||||
database.fileNullOrEmpty=Il file non deve essere nullo o vuoto
|
||||
database.failedImportFile=Importazione file non riuscita
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=La tua sessione è scaduta. Aggiorna la pagina e riprova.
|
||||
session.refreshPage=Aggiorna pagina
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=ファイルが見つかりません
|
||||
database.fileNullOrEmpty=ファイルは null または空であってはなりません
|
||||
database.failedImportFile=ファイルのインポートに失敗
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=セッションが期限切れです。ページを更新してもう一度お試しください。
|
||||
session.refreshPage=ページを更新
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=파일은 null이나 빈 상태로 될 수 없습니다
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=세션이 만료되었습니다. 페이지를 새로 고침하고 다시 시도해 주세요.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Bestand mag niet null of leeg zijn
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Je sessie is verlopen. Voer de pagina opnieuw in en probeer het opnieuw.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Fil ikke funnet
|
||||
database.fileNullOrEmpty=Fil må ikke være tom eller null
|
||||
database.failedImportFile=Import av fil mislyktes
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Plik nie znaleziony
|
||||
database.fileNullOrEmpty=Plik nie może być pusty
|
||||
database.failedImportFile=Nie udało się zaimportować pliku
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Twoja sesja wygasła. Odśwież stronę i spróbuj ponownie.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Arquivo não encontrado
|
||||
database.fileNullOrEmpty=O arquivo não pode estar nulo ou vazio
|
||||
database.failedImportFile=Falha ao importar arquivo
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Sua sessão expirou. Por gentileza atualize a página e tente novamente.
|
||||
session.refreshPage=Atualizar Página
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=O ficheiro não pode ser nulo ou vazio
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=A sessão expirou. Por favor, recarregue a página e tente novamente.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Fișierul nu a fost găsit
|
||||
database.fileNullOrEmpty=Fișierul nu trebuie să fie nul sau gol
|
||||
database.failedImportFile=Importul Fișierului a Eșuat
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=Файл не должен быть пустым или NULL
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Ваша сессия истекла. Пожалуйста, обновите страницу и попробуйте снова.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Filen hittades inte
|
||||
database.fileNullOrEmpty=Filen får inte vara null eller tom
|
||||
database.failedImportFile=Misslyckades med att importera fil
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Din session har löpt ut. Uppdatera sidan och försök igen.
|
||||
session.refreshPage=Uppdatera sida
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=ไม่พบไฟล์
|
||||
database.fileNullOrEmpty=ไฟล์ต้องไม่ว่างเปล่าหรือไม่มีข้อมูล
|
||||
database.failedImportFile=การนำเข้าไฟล์ล้มเหลว
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=สถานะของคุณในระบบหมดอายุ กรุณารีเฟรชหน้าและลองใหม่อีกครั้ง
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Dosya bulunamadı
|
||||
database.fileNullOrEmpty=Dosya yok veya boş olmamalıdır
|
||||
database.failedImportFile=Dosya İçe Aktarılamadı
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=File not Found
|
||||
database.fileNullOrEmpty=File must not be null or empty
|
||||
database.failedImportFile=Failed Import File
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=Không tìm thấy tệp
|
||||
database.fileNullOrEmpty=Tệp không được để trống hoặc rỗng
|
||||
database.failedImportFile=Không thể nhập tệp
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=Your session has expired. Please refresh the page and try again.
|
||||
session.refreshPage=Refresh Page
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=Database backup successful
|
||||
database.fileNotFound=未找到文件
|
||||
database.fileNullOrEmpty=文件不能为空
|
||||
database.failedImportFile=导入文件失败
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=您的会话已过期。请刷新页面并重试。
|
||||
session.refreshPage=刷新页面
|
||||
|
@ -249,6 +249,7 @@ database.backupCreated=資料庫備份成功
|
||||
database.fileNotFound=找不到檔案
|
||||
database.fileNullOrEmpty=檔案不得為空或空白
|
||||
database.failedImportFile=匯入檔案失敗
|
||||
database.notSupported=This function is not available for your database connection.
|
||||
|
||||
session.expired=您的工作階段已過期。請重新整理頁面並再試一次。
|
||||
session.refreshPage=重新整理頁面
|
||||
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<p th:if="${error}" th:text="#{'database.' + ${error}}" class="alert alert-danger text-center"></p>
|
||||
<p th:if="${infoMessage}" th:text="#{'database.' + ${infoMessage}}" class="alert alert-success text-center"></p>
|
||||
<div class="bg-card mt-3 mb-3">
|
||||
<div th:if="${databaseVersion!='Unknown'}" class="bg-card mt-3 mb-3">
|
||||
<table class="table table-striped table-hover mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -45,7 +45,7 @@
|
||||
<a th:title="#{database.createBackupFile}" th:text="#{database.createBackupFile}" th:href="@{'/api/v1/database/createDatabaseBackup'}" class="btn btn-outline-primary">Create Backup File</a>
|
||||
</div>
|
||||
<hr>
|
||||
<form th:action="@{'/api/v1/database/import-database'}" method="post" enctype="multipart/form-data" class="bg-card mt-3 mb-3">
|
||||
<form th:if="${databaseVersion!='Unknown'}" th:action="@{'/api/v1/database/import-database'}" method="post" enctype="multipart/form-data" class="bg-card mt-3 mb-3">
|
||||
<div style="background: var(--md-sys-color-error-container);border-radius: 2rem;" class="mb-3 p-3">
|
||||
<p th:text="#{database.info_1}"></p>
|
||||
<p th:text="#{database.info_2}"></p>
|
||||
|
Loading…
Reference in New Issue
Block a user