Skip to content

Commit

Permalink
Feature: Refactor config management interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Oct 19, 2024
1 parent 1690148 commit 1e857b7
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 95 deletions.
11 changes: 8 additions & 3 deletions webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"2005": "Ungültige Landesauswahl!",
"3001": "Nichts gelöscht!",
"3002": "Konfiguration zurückgesetzt. Starte jetzt neu...",
"3003": "Datei erfolgreich gelöscht. Neustarten um Änderungen anzuwenden!",
"4001": "@:apiresponse.2001",
"4002": "Der Name muss zwischen 1 und {max} Zeichen lang sein!",
"4003": "Es werden nur {max} Wechselrichter unterstützt!",
Expand Down Expand Up @@ -556,11 +557,9 @@
"YieldDayCorrection": "Tagesertragskorrektur",
"YieldDayCorrectionHint": "Summiert den Tagesertrag, auch wenn der Wechselrichter neu gestartet wird. Der Wert wird um Mitternacht zurückgesetzt"
},
"configadmin": {
"fileadmin": {
"ConfigManagement": "Konfigurationsverwaltung",
"BackupHeader": "Sicherung: Sicherung der Konfigurationsdatei",
"BackupConfig": "Sicherung der Konfigurationsdatei",
"Backup": "Sichern",
"Restore": "Wiederherstellen",
"NoFileSelected": "Keine Datei ausgewählt",
"RestoreHeader": "Wiederherstellen: Wiederherstellen der Konfigurationsdatei",
Expand All @@ -573,6 +572,12 @@
"FactoryReset": "Werksreset",
"ResetMsg": "Sind Sie sicher, dass Sie die aktuelle Konfiguration löschen und alle Einstellungen auf die Werkseinstellungen zurücksetzen möchten?",
"ResetConfirm": "Werksreset!",
"Download": "Herunterladen",
"Delete": "Löschen",
"DeleteMsg": "Sind Sie sicher, dass Sie die Datei löschen wollen: '{name}'? Es muss manuell neu gestartet werden um die Konfigurationsänderungen zu übernehmen!",
"Name": "Name",
"Size": "Größe",
"Action": "Aktion",
"Cancel": "@:base.Cancel"
},
"login": {
Expand Down
11 changes: 8 additions & 3 deletions webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"2005": "Invalid country selection!",
"3001": "Not deleted anything!",
"3002": "Configuration resettet. Rebooting now...",
"3003": "File successful deleted. Restart to apply changes!",
"4001": "@:apiresponse.2001",
"4002": "Name must between 1 and {max} characters long!",
"4003": "Only {max} inverters are supported!",
Expand Down Expand Up @@ -556,11 +557,9 @@
"YieldDayCorrection": "Yield Day Correction",
"YieldDayCorrectionHint": "Sum up daily yield even if the inverter is restarted. Value will be reset at midnight"
},
"configadmin": {
"fileadmin": {
"ConfigManagement": "Config Management",
"BackupHeader": "Backup: Configuration File Backup",
"BackupConfig": "Backup the configuration file",
"Backup": "Backup",
"Restore": "Restore",
"NoFileSelected": "No file selected",
"RestoreHeader": "Restore: Restore the Configuration File",
Expand All @@ -573,6 +572,12 @@
"FactoryReset": "Factory Reset",
"ResetMsg": "Are you sure you want to delete the current configuration and reset all settings to their factory defaults?",
"ResetConfirm": "Factory Reset!",
"Download": "Download",
"Delete": "Delete",
"DeleteMsg": "Are you sure you want to delete file: '{name}'? You have to manually reboot the device to apply config changes!",
"Name": "Name",
"Size": "Size",
"Action": "Action",
"Cancel": "@:base.Cancel"
},
"login": {
Expand Down
11 changes: 8 additions & 3 deletions webapp/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"2005": "Invalid country selection !",
"3001": "Rien n'a été supprimé !",
"3002": "Configuration réinitialisée. Redémarrage maintenant...",
"3003": "File successful deleted. Restart to apply changes!",
"4001": "@:apiresponse.2001",
"4002": "Le nom doit comporter entre 1 et {max} caractères !",
"4003": "Seulement {max} onduleurs sont supportés !",
Expand Down Expand Up @@ -538,11 +539,9 @@
"YieldDayCorrection": "Yield Day Correction",
"YieldDayCorrectionHint": "Sum up daily yield even if the inverter is restarted. Value will be reset at midnight"
},
"configadmin": {
"fileadmin": {
"ConfigManagement": "Gestion de la configuration",
"BackupHeader": "Sauvegarder le fichier de configuration",
"BackupConfig": "Fichier de configuration",
"Backup": "Sauvegarder",
"Restore": "Restaurer",
"NoFileSelected": "Aucun fichier sélectionné",
"RestoreHeader": "Restaurer le fichier de configuration",
Expand All @@ -555,6 +554,12 @@
"FactoryReset": "Remise à zéro",
"ResetMsg": "Êtes-vous sûr de vouloir supprimer la configuration actuelle et réinitialiser tous les paramètres à leurs valeurs par défaut ?",
"ResetConfirm": "Remise à zéro !",
"Download": "Download",
"Delete": "Supprimer",
"DeleteMsg": "Are you sure you want to delete file: '{name}'? You have to manually reboot the device to apply config changes!",
"Name": "Name",
"Size": "Size",
"Action": "Action",
"Cancel": "@:base.Cancel"
},
"login": {
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/types/Alert.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface AlertResponse {
message: string;
type: string;
code: number;
show: boolean;
}
7 changes: 0 additions & 7 deletions webapp/src/types/Config.ts

This file was deleted.

4 changes: 4 additions & 0 deletions webapp/src/types/File.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface FileInfo {
name: string;
size: number;
}
Loading

0 comments on commit 1e857b7

Please sign in to comment.