From 3e279aff58cb10846e70e6d0ca094dd6f23a8e5a Mon Sep 17 00:00:00 2001 From: bourquecharles Date: Tue, 29 Jun 2021 14:40:32 -0400 Subject: [PATCH 1/5] Cleaned labels of mentioning 'Device' all the time --- public/locales/de/translation.json | 18 ++++++++--------- public/locales/en/translation.json | 20 +++++++++---------- public/locales/es/translation.json | 20 +++++++++---------- public/locales/fr/translation.json | 20 +++++++++---------- public/locales/pt/translation.json | 20 +++++++++---------- .../DeviceCommandsCollapse.js | 0 .../index.js | 1 - .../index.module.scss | 0 .../DeviceActionCard/index.js} | 1 + .../DeviceActionCard/index.module.scss | 3 +++ src/components/DeviceConfiguration/index.js | 2 +- src/components/DeviceLogs/index.js | 4 +--- src/pages/DevicePage/index.js | 6 +++--- 13 files changed, 58 insertions(+), 57 deletions(-) rename src/components/{DeviceCommandsLog => CommandHistory}/DeviceCommandsCollapse.js (100%) rename src/components/{DeviceCommandsLog => CommandHistory}/index.js (99%) rename src/components/{DeviceCommandsLog => CommandHistory}/index.module.scss (100%) rename src/{pages/DevicePage/DeviceActionCard.js => components/DeviceActionCard/index.js} (99%) create mode 100644 src/components/DeviceActionCard/index.module.scss diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index b77f428..34c9150 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -7,7 +7,7 @@ "factory_reset": "Werkseinstellungen zurückgesetzt", "firmware_upgrade": "Firmware-Aktualisierung", "reboot": "Starten Sie neu", - "title": "Geräteaktionen", + "title": "Befehle", "trace": "Spur", "wifi_scan": "WLAN-Scan" }, @@ -20,7 +20,7 @@ "commands": { "error": "Fehler beim Senden des Befehls!", "success": "Der Befehl wurde erfolgreich gesendet. Sie können das Ergebnis im Befehlsprotokoll anzeigen", - "title": "Gerätebefehle" + "title": "Befehlsverlauf" }, "common": { "are_you_sure": "Bist du sicher?", @@ -85,14 +85,14 @@ }, "configuration": { "created": "Erstellt", - "details": "Gerätedetails", + "details": "Einzelheiten", "device_password": "Passwort", "last_configuration_change": "Letzte Konfigurationsänderung", "last_configuration_download": "Letzter Konfigurations-Download", "location": "Ort", "notes": "Anmerkungen", "owner": "Inhaber", - "title": "Gerätekonfiguration", + "title": "Aufbau", "type": "Gerätetyp", "view_json": "Rohes JSON anzeigen" }, @@ -100,7 +100,7 @@ "choose_file": "Sie müssen eine gültige .json-Datei auswählen:", "enter_new": "Geben Sie die JSON für die neue Gerätekonfiguration ein:", "placeholder": "JSON konfigurieren", - "title": "Gerät konfigurieren", + "title": "Konfigurieren", "valid_json": "Sie müssen gültiges JSON eingeben" }, "delete_command": { @@ -120,7 +120,7 @@ }, "factory_reset": { "redirector": "Weiterleitung beibehalten:", - "title": "Gerät auf Werkseinstellungen zurücksetzen", + "title": "Werkseinstellungen zurückgesetzt", "warning": "Achtung: Nach dem Absenden kann dies nicht rückgängig gemacht werden" }, "footer": { @@ -130,7 +130,7 @@ }, "health": { "sanity": "Gesundheit", - "title": "Gerätezustand" + "title": "Gesundheit" }, "login": { "login": "Anmeldung", @@ -144,7 +144,7 @@ }, "reboot": { "directions": "Wann möchten Sie dieses Gerät neu starten?", - "title": "Gerät neustarten" + "title": "Starten Sie neu" }, "scan": { "active": "Aktiven Scan aktivieren", @@ -168,7 +168,7 @@ "directions": "Starten Sie eine Fernverfolgung dieses Geräts für eine bestimmte Dauer oder eine Anzahl von Paketen", "download_trace": "Klicke hier zum herunterladen", "packets": "Pakete", - "title": "Trace-Gerät", + "title": "Spur", "wait_for_file": "Möchten Sie warten, bis die Trace-Datei fertig ist?", "waiting_directions": "Bitte warten Sie auf die Trace-Datendatei. Dies könnte eine Weile dauern. Sie können das Warten beenden und die Ablaufverfolgungsdatei später aus der Befehlstabelle abrufen.", "waiting_seconds": "Verstrichene Zeit: {{seconds}} Sekunden" diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 9462bd8..3091fc8 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -7,7 +7,7 @@ "factory_reset": "Factory Reset", "firmware_upgrade": "Firmware Upgrade", "reboot": "Reboot", - "title": "Device Actions", + "title": "Commands", "trace": "Trace", "wifi_scan": "Wifi Scan" }, @@ -20,7 +20,7 @@ "commands": { "error": "Error while submitting command!", "success": "Command submitted successfully, you can look at the Commands log for the result", - "title": "Device Commands" + "title": "Command History" }, "common": { "are_you_sure": "Are you sure?", @@ -85,14 +85,14 @@ }, "configuration": { "created": "Created", - "details": "Device Details", + "details": "Details", "device_password": "Password", "last_configuration_change": "Last Configuration Change", "last_configuration_download": "Last Configuration Download", "location": "Location", "notes": "Notes", "owner": "Owner", - "title": "Device Configuration", + "title": "Configuration", "type": "Device Type", "view_json": "View raw JSON" }, @@ -100,7 +100,7 @@ "choose_file": "You need to choose a valid .json file: ", "enter_new": "Enter new device configuration JSON: ", "placeholder": "Config JSON", - "title": "Configure Device", + "title": "Configure", "valid_json": "You need to enter valid JSON" }, "delete_command": { @@ -116,11 +116,11 @@ "device_logs": { "log": "Log", "severity": "Severity", - "title": "Device Logs" + "title": "Logs" }, "factory_reset": { "redirector": "Keep redirector: ", - "title": "Factory Reset Device", + "title": "Factory Reset", "warning": "Warning: Once you submit this cannot be reverted" }, "footer": { @@ -130,7 +130,7 @@ }, "health": { "sanity": "Sanity", - "title": "Device Health" + "title": "Health" }, "login": { "login": "Login", @@ -144,7 +144,7 @@ }, "reboot": { "directions": "When would you like to reboot this device?", - "title": "Reboot Device" + "title": "Reboot" }, "scan": { "active": "Enable active scan", @@ -168,7 +168,7 @@ "directions": "Launch a remote trace of this device for either a specific duration or a number of packets", "download_trace": "Click here to download", "packets": "Packets", - "title": "Trace Device", + "title": "Trace", "wait_for_file": "Would you like to wait until the trace file is ready?", "waiting_directions": "Please wait for the trace data file. This may take some time. You can exit the wait and retrieve the trace file from the commands table later.", "waiting_seconds": "Time Elapsed: {{seconds}} seconds" diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index ff00076..793ce6f 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -7,7 +7,7 @@ "factory_reset": "Restablecimiento De Fábrica", "firmware_upgrade": "Actualización de firmware", "reboot": "Reiniciar", - "title": "Acciones del dispositivo", + "title": "Comandos", "trace": "Rastro", "wifi_scan": "Escaneo Wifi" }, @@ -20,7 +20,7 @@ "commands": { "error": "¡Error al enviar el comando!", "success": "Comando enviado con éxito, puede consultar el registro de Comandos para ver el resultado", - "title": "Comandos del dispositivo" + "title": "Historial de Comandos" }, "common": { "are_you_sure": "¿Estás seguro?", @@ -85,14 +85,14 @@ }, "configuration": { "created": "creado", - "details": "Detalles del dispositivo", + "details": "Detalles", "device_password": "Contraseña", "last_configuration_change": "Último cambio de configuración", "last_configuration_download": "Descarga de la última configuración", "location": "Ubicación", "notes": "Notas", "owner": "Propietario", - "title": "Configuración del dispositivo", + "title": "Configuración", "type": "Tipo de dispositivo", "view_json": "Ver JSON sin procesar" }, @@ -100,7 +100,7 @@ "choose_file": "Debe elegir un archivo .json válido:", "enter_new": "Ingrese la nueva configuración del dispositivo JSON:", "placeholder": "Configurar JSON", - "title": "Configurar dispositivo", + "title": "Configurar", "valid_json": "Debes ingresar un JSON válido" }, "delete_command": { @@ -116,11 +116,11 @@ "device_logs": { "log": "Iniciar sesión", "severity": "Gravedad", - "title": "Registros de dispositivos" + "title": "Registros" }, "factory_reset": { "redirector": "Mantener el redirector:", - "title": "Dispositivo de restablecimiento de fábrica", + "title": "Restablecimiento De Fábrica", "warning": "Advertencia: una vez que envíe, esto no se podrá revertir" }, "footer": { @@ -130,7 +130,7 @@ }, "health": { "sanity": "Cordura", - "title": "Salud del dispositivo" + "title": "Salud" }, "login": { "login": "Iniciar sesión", @@ -144,7 +144,7 @@ }, "reboot": { "directions": "¿Cuándo le gustaría reiniciar este dispositivo?", - "title": "Reiniciar dispositivo" + "title": "Reiniciar" }, "scan": { "active": "Habilitar escaneo activo", @@ -168,7 +168,7 @@ "directions": "Lanzar un rastreo remoto de este dispositivo por una duración específica o por una cantidad de paquetes", "download_trace": "Haga click aquí para descargar", "packets": "Paquetes", - "title": "Dispositivo de seguimiento", + "title": "Rastro", "wait_for_file": "¿Le gustaría esperar hasta que el archivo de seguimiento esté listo?", "waiting_directions": "Espere el archivo de datos de seguimiento. Esto puede tomar algo de tiempo. Puede salir de la espera y recuperar el archivo de seguimiento de la tabla de comandos más tarde.", "waiting_seconds": "Tiempo transcurrido: {{seconds}} segundos" diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 04c85e9..89ad934 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -7,7 +7,7 @@ "factory_reset": "Retour aux paramètres d'usine", "firmware_upgrade": "Mise à jour du firmware", "reboot": "Redémarrer", - "title": "Actions de l'appareil", + "title": "Les commandes", "trace": "Trace", "wifi_scan": "Balayage Wi-Fi" }, @@ -20,7 +20,7 @@ "commands": { "error": "Erreur lors de la soumission de la commande !", "success": "Commande soumise avec succès, vous pouvez consulter le journal des commandes pour le résultat", - "title": "Commandes de l'appareil" + "title": "Historique des commandes" }, "common": { "are_you_sure": "Êtes-vous sûr?", @@ -85,14 +85,14 @@ }, "configuration": { "created": "Créé", - "details": "Détails de l'appareil", + "details": "Détails", "device_password": "Mot de passe", "last_configuration_change": "Dernière modification de configuration", "last_configuration_download": "Téléchargement de la dernière configuration", "location": "Emplacement", "notes": "Remarques", "owner": "Propriétaire", - "title": "Configuration de l'appareil", + "title": "Configuration", "type": "Type d'appareil", "view_json": "Afficher le JSON brut" }, @@ -100,7 +100,7 @@ "choose_file": "Vous devez choisir un fichier .json valide :", "enter_new": "Entrez la nouvelle configuration de l'appareil JSON :", "placeholder": "Configurer JSON", - "title": "Configurer l'appareil", + "title": "Configurer", "valid_json": "Vous devez entrer un JSON valide" }, "delete_command": { @@ -116,11 +116,11 @@ "device_logs": { "log": "Bûche", "severity": "Gravité", - "title": "Journaux de l'appareil" + "title": "Journaux" }, "factory_reset": { "redirector": "Conserver le redirecteur :", - "title": "Dispositif de réinitialisation d'usine", + "title": "Retour aux paramètres d'usine", "warning": "Avertissement : Une fois que vous avez soumis, cela ne peut pas être annulé" }, "footer": { @@ -130,7 +130,7 @@ }, "health": { "sanity": "Santé mentale", - "title": "Santé de l'appareil" + "title": "Santé" }, "login": { "login": "S'identifier", @@ -144,7 +144,7 @@ }, "reboot": { "directions": "Quand souhaitez-vous redémarrer cet appareil ?", - "title": "Redémarrez l'appareil" + "title": "Redémarrer" }, "scan": { "active": "Activer l'analyse active", @@ -168,7 +168,7 @@ "directions": "Lancer une trace à distance de cet appareil pour une durée spécifique ou un nombre de paquets", "download_trace": "Cliquez ici pour télécharger", "packets": "Paquets", - "title": "Dispositif de traçage", + "title": "Trace", "wait_for_file": "Souhaitez-vous attendre que le fichier de trace soit prêt ?", "waiting_directions": "Veuillez attendre le fichier de données de trace. Cela peut prendre un certain temps. Vous pouvez quitter l'attente et récupérer le fichier de trace de la table des commandes plus tard.", "waiting_seconds": "Temps écoulé : {{seconds}} secondes" diff --git a/public/locales/pt/translation.json b/public/locales/pt/translation.json index 8c33f90..69a21f1 100644 --- a/public/locales/pt/translation.json +++ b/public/locales/pt/translation.json @@ -7,7 +7,7 @@ "factory_reset": "Restauração de fábrica", "firmware_upgrade": "Atualização de firmware", "reboot": "Reiniciar", - "title": "Ações do dispositivo", + "title": "Comandos", "trace": "Vestígio", "wifi_scan": "Wifi Scan" }, @@ -20,7 +20,7 @@ "commands": { "error": "Erro ao enviar comando!", "success": "Comando enviado com sucesso, você pode consultar o log de Comandos para ver o resultado", - "title": "Comandos de dispositivo" + "title": "Histórico de Comandos" }, "common": { "are_you_sure": "Você tem certeza?", @@ -85,14 +85,14 @@ }, "configuration": { "created": "Criado", - "details": "Detalhes do dispositivo", + "details": "Detalhes", "device_password": "Senha", "last_configuration_change": "Última Mudança de Configuração", "last_configuration_download": "Último download da configuração", "location": "Localização", "notes": "notas", "owner": "Proprietário", - "title": "Configuração do dispositivo", + "title": "Configuração", "type": "Tipo de dispositivo", "view_json": "Exibir JSON bruto" }, @@ -100,7 +100,7 @@ "choose_file": "Você precisa escolher um arquivo .json válido:", "enter_new": "Insira a nova configuração do dispositivo JSON:", "placeholder": "Config JSON", - "title": "Configurar dispositivo", + "title": "Configurar", "valid_json": "Você precisa inserir um JSON válido" }, "delete_command": { @@ -116,11 +116,11 @@ "device_logs": { "log": "Registro", "severity": "Gravidade", - "title": "Registros de dispositivos" + "title": "Toras" }, "factory_reset": { "redirector": "Manter redirecionador:", - "title": "Dispositivo de redefinição de fábrica", + "title": "Restauração de fábrica", "warning": "Aviso: depois de enviar, isso não pode ser revertido" }, "footer": { @@ -130,7 +130,7 @@ }, "health": { "sanity": "Sanidade", - "title": "Saúde do Dispositivo" + "title": "Saúde" }, "login": { "login": "Entrar", @@ -144,7 +144,7 @@ }, "reboot": { "directions": "Quando você gostaria de reinicializar este dispositivo?", - "title": "Reiniciar dispositivo" + "title": "Reiniciar" }, "scan": { "active": "Habilitar varredura ativa", @@ -168,7 +168,7 @@ "directions": "Lançar um rastreamento remoto deste dispositivo para uma duração específica ou um número de pacotes", "download_trace": "Clique aqui para baixar", "packets": "Pacotes", - "title": "Dispositivo de rastreamento", + "title": "Vestígio", "wait_for_file": "Você gostaria de esperar até que o arquivo de rastreamento esteja pronto?", "waiting_directions": "Aguarde o arquivo de dados de rastreamento. Isto pode tomar algum tempo. Você pode sair da espera e recuperar o arquivo de rastreamento da tabela de comandos mais tarde.", "waiting_seconds": "Tempo decorrido: {{seconds}} segundos" diff --git a/src/components/DeviceCommandsLog/DeviceCommandsCollapse.js b/src/components/CommandHistory/DeviceCommandsCollapse.js similarity index 100% rename from src/components/DeviceCommandsLog/DeviceCommandsCollapse.js rename to src/components/CommandHistory/DeviceCommandsCollapse.js diff --git a/src/components/DeviceCommandsLog/index.js b/src/components/CommandHistory/index.js similarity index 99% rename from src/components/DeviceCommandsLog/index.js rename to src/components/CommandHistory/index.js index f9ba8e8..2f04360 100644 --- a/src/components/DeviceCommandsLog/index.js +++ b/src/components/CommandHistory/index.js @@ -449,7 +449,6 @@ const DeviceCommands = ({ selectedDeviceId }) => { date={chosenWifiScanDate} /> - ); }; diff --git a/src/components/DeviceCommandsLog/index.module.scss b/src/components/CommandHistory/index.module.scss similarity index 100% rename from src/components/DeviceCommandsLog/index.module.scss rename to src/components/CommandHistory/index.module.scss diff --git a/src/pages/DevicePage/DeviceActionCard.js b/src/components/DeviceActionCard/index.js similarity index 99% rename from src/pages/DevicePage/DeviceActionCard.js rename to src/components/DeviceActionCard/index.js index 38227e9..e5327db 100644 --- a/src/pages/DevicePage/DeviceActionCard.js +++ b/src/components/DeviceActionCard/index.js @@ -12,6 +12,7 @@ import TraceModal from 'components/TraceModal'; import WifiScanModal from 'components/WifiScanModal'; import BlinkModal from 'components/BlinkModal'; import FactoryResetModal from 'components/FactoryResetModal'; + import styles from './index.module.scss'; const DeviceActions = ({ selectedDeviceId }) => { diff --git a/src/components/DeviceActionCard/index.module.scss b/src/components/DeviceActionCard/index.module.scss new file mode 100644 index 0000000..eb532ea --- /dev/null +++ b/src/components/DeviceActionCard/index.module.scss @@ -0,0 +1,3 @@ +.spacedRow { + margin-top: 10px; +} diff --git a/src/components/DeviceConfiguration/index.js b/src/components/DeviceConfiguration/index.js index b3a82a5..a41ab79 100644 --- a/src/components/DeviceConfiguration/index.js +++ b/src/components/DeviceConfiguration/index.js @@ -73,7 +73,7 @@ const DeviceConfiguration = ({ selectedDeviceId }) => { -
{t('configuration.details')}
+
{t('configuration.title')}
diff --git a/src/components/DeviceLogs/index.js b/src/components/DeviceLogs/index.js index 8ab4d3e..8050f54 100644 --- a/src/components/DeviceLogs/index.js +++ b/src/components/DeviceLogs/index.js @@ -256,9 +256,7 @@ const DeviceLogs = ({ selectedDeviceId }) => {
} - > - - + /> { const dispatch = useDispatch(); @@ -36,7 +36,7 @@ const DevicePage = () => { - + From 657f61b43e82f05970d6c7b0ec666f18517bde86 Mon Sep 17 00:00:00 2001 From: bourquecharles Date: Tue, 29 Jun 2021 14:41:31 -0400 Subject: [PATCH 2/5] Wifi scan modal has 'Cancel' instead of Close --- src/components/WifiScanModal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/WifiScanModal/index.js b/src/components/WifiScanModal/index.js index 884a64b..d706904 100644 --- a/src/components/WifiScanModal/index.js +++ b/src/components/WifiScanModal/index.js @@ -195,7 +195,7 @@ const WifiScanModal = ({ show, toggleModal }) => { disabled={waiting} /> - {(!hadSuccess && !hadFailure && waiting) ? t('common.cancel') : t('common.close')} + {(!hadSuccess && !hadFailure) ? t('common.cancel') : t('common.close')} From 16608c5fcf3ceeb7b4bae38abbc6eed2f60f3c33 Mon Sep 17 00:00:00 2001 From: bourquecharles Date: Tue, 29 Jun 2021 15:05:20 -0400 Subject: [PATCH 3/5] Standardized modal footer buttons --- public/locales/de/translation.json | 6 ++ public/locales/en/translation.json | 6 ++ public/locales/es/translation.json | 6 ++ public/locales/fr/translation.json | 6 ++ public/locales/pt/translation.json | 6 ++ src/components/BlinkModal/index.js | 3 +- src/components/ConfigureModal/index.js | 4 +- src/components/FactoryResetModal/index.js | 4 +- .../FirmwareUpgradeModal/UpgradeFooter.js | 5 +- src/components/FirmwareUpgradeModal/index.js | 1 + src/components/RebootModal/index.js | 3 +- src/components/TraceModal/index.js | 57 ++----------------- src/components/WifiScanModal/index.js | 2 +- 13 files changed, 45 insertions(+), 64 deletions(-) diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index 34c9150..ffe0b6d 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -70,6 +70,8 @@ "refresh": "Aktualisierung", "refresh_device": "Gerät aktualisieren", "result": "Ergebnis", + "save": "Sparen", + "saving": "Speichern ...", "schedule": "Zeitplan", "seconds_elapsed": "Sekunden verstrichen", "serial_number": "Ordnungsnummer", @@ -120,6 +122,8 @@ }, "factory_reset": { "redirector": "Weiterleitung beibehalten:", + "reset": "Zurücksetzen", + "resetting": "Zurücksetzen...", "title": "Werkseinstellungen zurückgesetzt", "warning": "Achtung: Nach dem Absenden kann dies nicht rückgängig gemacht werden" }, @@ -169,6 +173,7 @@ "download_trace": "Klicke hier zum herunterladen", "packets": "Pakete", "title": "Spur", + "trace": "Spur", "wait_for_file": "Möchten Sie warten, bis die Trace-Datei fertig ist?", "waiting_directions": "Bitte warten Sie auf die Trace-Datendatei. Dies könnte eine Weile dauern. Sie können das Warten beenden und die Ablaufverfolgungsdatei später aus der Befehlstabelle abrufen.", "waiting_seconds": "Verstrichene Zeit: {{seconds}} Sekunden" @@ -185,6 +190,7 @@ "offline_device": "Diese Option ist gesperrt, da dieses Gerät nicht verbunden ist", "time": "Zeitpunkt der Aktualisierung:", "title": "Firmware-Aktualisierung", + "upgrade": "Aktualisierung", "wait_for_upgrade": "Möchten Sie warten, bis das Upgrade abgeschlossen ist?", "waiting_for_device": "Warten, bis das Gerät wieder verbunden ist" } diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 3091fc8..cc0eff3 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -70,6 +70,8 @@ "refresh": "Refresh", "refresh_device": "Refresh Device", "result": "Result", + "save": "Save", + "saving": "Saving... ", "schedule": "Schedule", "seconds_elapsed": "Seconds elapsed", "serial_number": "Serial Number", @@ -120,6 +122,8 @@ }, "factory_reset": { "redirector": "Keep redirector: ", + "reset": "Reset", + "resetting": "Resetting... ", "title": "Factory Reset", "warning": "Warning: Once you submit this cannot be reverted" }, @@ -169,6 +173,7 @@ "download_trace": "Click here to download", "packets": "Packets", "title": "Trace", + "trace": "Trace", "wait_for_file": "Would you like to wait until the trace file is ready?", "waiting_directions": "Please wait for the trace data file. This may take some time. You can exit the wait and retrieve the trace file from the commands table later.", "waiting_seconds": "Time Elapsed: {{seconds}} seconds" @@ -185,6 +190,7 @@ "offline_device": "This option is blocked because this device is not connected", "time": "Time of upgrade:", "title": "Firmware Upgrade", + "upgrade": "Upgrade", "wait_for_upgrade": "Would you like to wait for the upgrade to finish?", "waiting_for_device": "Waiting for device to reconnect" } diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 793ce6f..6931936 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -70,6 +70,8 @@ "refresh": "Refrescar", "refresh_device": "Actualizar dispositivo", "result": "Resultado", + "save": "Salvar", + "saving": "Ahorro...", "schedule": "Programar", "seconds_elapsed": "Segundos transcurridos", "serial_number": "Número de serie", @@ -120,6 +122,8 @@ }, "factory_reset": { "redirector": "Mantener el redirector:", + "reset": "Reiniciar", + "resetting": "Restableciendo…", "title": "Restablecimiento De Fábrica", "warning": "Advertencia: una vez que envíe, esto no se podrá revertir" }, @@ -169,6 +173,7 @@ "download_trace": "Haga click aquí para descargar", "packets": "Paquetes", "title": "Rastro", + "trace": "Rastro", "wait_for_file": "¿Le gustaría esperar hasta que el archivo de seguimiento esté listo?", "waiting_directions": "Espere el archivo de datos de seguimiento. Esto puede tomar algo de tiempo. Puede salir de la espera y recuperar el archivo de seguimiento de la tabla de comandos más tarde.", "waiting_seconds": "Tiempo transcurrido: {{seconds}} segundos" @@ -185,6 +190,7 @@ "offline_device": "Esta opción está bloqueada porque este dispositivo no está conectado", "time": "Hora de actualización:", "title": "Actualización de firmware", + "upgrade": "Mejorar", "wait_for_upgrade": "¿Le gustaría esperar a que finalice la actualización?", "waiting_for_device": "Esperando que el dispositivo se vuelva a conectar" } diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 89ad934..58db11d 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -70,6 +70,8 @@ "refresh": "Rafraîchir", "refresh_device": "Actualiser l'appareil", "result": "Résultat", + "save": "Sauvegarder", + "saving": "Économie...", "schedule": "Programme", "seconds_elapsed": "Secondes écoulées", "serial_number": "Numéro de série", @@ -120,6 +122,8 @@ }, "factory_reset": { "redirector": "Conserver le redirecteur :", + "reset": "Réinitialiser", + "resetting": "Réinitialisation…", "title": "Retour aux paramètres d'usine", "warning": "Avertissement : Une fois que vous avez soumis, cela ne peut pas être annulé" }, @@ -169,6 +173,7 @@ "download_trace": "Cliquez ici pour télécharger", "packets": "Paquets", "title": "Trace", + "trace": "Trace", "wait_for_file": "Souhaitez-vous attendre que le fichier de trace soit prêt ?", "waiting_directions": "Veuillez attendre le fichier de données de trace. Cela peut prendre un certain temps. Vous pouvez quitter l'attente et récupérer le fichier de trace de la table des commandes plus tard.", "waiting_seconds": "Temps écoulé : {{seconds}} secondes" @@ -185,6 +190,7 @@ "offline_device": "Cette option est bloquée car cet appareil n'est pas connecté", "time": "Heure de la mise à niveau :", "title": "Mise à jour du firmware", + "upgrade": "Améliorer", "wait_for_upgrade": "Souhaitez-vous attendre la fin de la mise à niveau ?", "waiting_for_device": "En attente de la reconnexion de l'appareil" } diff --git a/public/locales/pt/translation.json b/public/locales/pt/translation.json index 69a21f1..0b82af7 100644 --- a/public/locales/pt/translation.json +++ b/public/locales/pt/translation.json @@ -70,6 +70,8 @@ "refresh": "REFRESH", "refresh_device": "Atualizar dispositivo", "result": "Resultado", + "save": "Salve", + "saving": "Salvando ...", "schedule": "Cronograma", "seconds_elapsed": "Segundos decorridos", "serial_number": "Número de série", @@ -120,6 +122,8 @@ }, "factory_reset": { "redirector": "Manter redirecionador:", + "reset": "Restabelecer", + "resetting": "Reiniciando ...", "title": "Restauração de fábrica", "warning": "Aviso: depois de enviar, isso não pode ser revertido" }, @@ -169,6 +173,7 @@ "download_trace": "Clique aqui para baixar", "packets": "Pacotes", "title": "Vestígio", + "trace": "Vestígio", "wait_for_file": "Você gostaria de esperar até que o arquivo de rastreamento esteja pronto?", "waiting_directions": "Aguarde o arquivo de dados de rastreamento. Isto pode tomar algum tempo. Você pode sair da espera e recuperar o arquivo de rastreamento da tabela de comandos mais tarde.", "waiting_seconds": "Tempo decorrido: {{seconds}} segundos" @@ -185,6 +190,7 @@ "offline_device": "Esta opção está bloqueada porque este dispositivo não está conectado", "time": "Tempo de atualização:", "title": "Atualização de firmware", + "upgrade": "Melhorar", "wait_for_upgrade": "Você gostaria de esperar a conclusão da atualização?", "waiting_for_device": "Esperando que o dispositivo se reconecte" } diff --git a/src/components/BlinkModal/index.js b/src/components/BlinkModal/index.js index 14a57f4..a2d9f41 100644 --- a/src/components/BlinkModal/index.js +++ b/src/components/BlinkModal/index.js @@ -173,11 +173,10 @@ const BlinkModal = ({ show, toggleModal }) => { diff --git a/src/components/ConfigureModal/index.js b/src/components/ConfigureModal/index.js index 854cfd0..dcb7396 100644 --- a/src/components/ConfigureModal/index.js +++ b/src/components/ConfigureModal/index.js @@ -191,7 +191,7 @@ const ConfigureModal = ({ show, toggleModal }) => { color="primary" onClick={confirmingIfSure} > - {t('common.submit')} + {t('common.save')} diff --git a/src/components/FactoryResetModal/index.js b/src/components/FactoryResetModal/index.js index af94393..61f09f1 100644 --- a/src/components/FactoryResetModal/index.js +++ b/src/components/FactoryResetModal/index.js @@ -116,7 +116,7 @@ const ConfigureModal = ({ show, toggleModal }) => { color="primary" onClick={() => confirmingIfSure()} > - {t('common.submit')} + {t('factory_reset.reset')} diff --git a/src/components/FirmwareUpgradeModal/UpgradeFooter.js b/src/components/FirmwareUpgradeModal/UpgradeFooter.js index 00f5c64..b4a3077 100644 --- a/src/components/FirmwareUpgradeModal/UpgradeFooter.js +++ b/src/components/FirmwareUpgradeModal/UpgradeFooter.js @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import PropTypes from 'prop-types'; import { CButton, CSpinner, CModalFooter } from '@coreui/react'; -const UpgradeFooter = ({ isShown, isLoading, action, color, variant, block, toggleParent }) => { +const UpgradeFooter = ({ isNow, isShown, isLoading, action, color, variant, block, toggleParent }) => { const { t } = useTranslation(); const [askingIfSure, setAskingIfSure] = useState(false); @@ -26,7 +26,7 @@ const UpgradeFooter = ({ isShown, isLoading, action, color, variant, block, togg onClick={() => confirmingIfSure()} block={block} > - {t('common.submit')} + {isNow ? t('upgrade.upgrade') : t('common.schedule')} {
{ diff --git a/src/components/TraceModal/index.js b/src/components/TraceModal/index.js index e8f9813..f274d2f 100644 --- a/src/components/TraceModal/index.js +++ b/src/components/TraceModal/index.js @@ -7,7 +7,6 @@ import { CModalFooter, CCol, CRow, - CInvalidFeedback, CSelect, CSwitch, CForm, @@ -17,10 +16,8 @@ import { } from '@coreui/react'; import React, { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import DatePicker from 'react-widgets/DatePicker'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; -import { dateToUnix } from 'utils/helper'; import 'react-widgets/styles.css'; import { getToken } from 'utils/authHelper'; import axiosInstance from 'utils/axiosInstance'; @@ -39,11 +36,9 @@ const TraceModal = ({ show, toggleModal }) => { const [usingDuration, setUsingDuration] = useState(true); const [duration, setDuration] = useState(20); const [packets, setPackets] = useState(100); - const [chosenDate, setChosenDate] = useState(new Date().toString()); const [responseBody, setResponseBody] = useState(''); const [chosenInterface, setChosenInterface] = useState('up'); const [isDeviceConnected, setIsDeviceConnected] = useState(false); - const [isNow, setIsNow] = useState(true); const [waitForTrace, setWaitForTrace] = useState(false); const [waitingForTrace, setWaitingForTrace] = useState(false); const [commandUuid, setCommandUuid] = useState(null); @@ -54,21 +49,10 @@ const TraceModal = ({ show, toggleModal }) => { setWaitForTrace(!waitForTrace); } - const toggleNow = () => { - setIsNow(!isNow); - } - - const setDate = (date) => { - if (date) { - setChosenDate(date.toString()); - } - }; - useEffect(() => { setWaitForTrace(false); setHadSuccess(false); setHadFailure(false); - setChosenDate(new Date().toString()); setResponseBody(''); setDuration(20); setPackets(100); @@ -85,7 +69,7 @@ const TraceModal = ({ show, toggleModal }) => { const parameters = { serialNumber: selectedDeviceId, - when: isNow ? 0 : dateToUnix(new Date(chosenDate)), + when: 0, network: chosenInterface, }; @@ -235,39 +219,7 @@ const TraceModal = ({ show, toggleModal }) => { - - -

{t('common.execute_now')}

-
- - - -
- - {t('common.need_date')} -