diff --git a/package.json b/package.json index bbad89d..4ab52fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucentral-client", - "version": "2.0.25", + "version": "2.0.26", "dependencies": { "@coreui/coreui": "^3.4.0", "@coreui/icons": "^2.0.1", diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index 09885ac..5d9246c 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -302,6 +302,7 @@ "packets": "Pakete", "title": "Tcpdump", "trace": "Spur", + "trace_not_successful": "Trace nicht erfolgreich: Gateway hat folgenden Fehler gemeldet: {{error}}", "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 7edc1ef..e84a49d 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -302,6 +302,7 @@ "packets": "Packets", "title": "Trace", "trace": "Trace", + "trace_not_successful": "Trace not successful: gateway reported the following error : {{error}}", "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 368da9a..fa34e7e 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -302,6 +302,7 @@ "packets": "Paquetes", "title": "Rastro", "trace": "Rastro", + "trace_not_successful": "Seguimiento fallido: la puerta de enlace informó el siguiente error: {{error}}", "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 8cdf3c2..604a7d3 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -302,6 +302,7 @@ "packets": "Paquets", "title": "Trace", "trace": "Trace", + "trace_not_successful": "Trace non réussie : la passerelle a signalé l'erreur suivante : {{error}}", "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 26bd829..b83e7a2 100644 --- a/public/locales/pt/translation.json +++ b/public/locales/pt/translation.json @@ -302,6 +302,7 @@ "packets": "Pacotes", "title": "Vestígio", "trace": "Vestígio", + "trace_not_successful": "O rastreamento não foi bem-sucedido: o gateway relatou o seguinte erro: {{error}}", "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/CommandHistory/index.js b/src/components/CommandHistory/index.js index 3635e88..3a9509d 100644 --- a/src/components/CommandHistory/index.js +++ b/src/components/CommandHistory/index.js @@ -292,12 +292,7 @@ const DeviceCommands = () => {
- +
@@ -318,7 +313,7 @@ const DeviceCommands = () => { loading={loading} items={commands ?? []} fields={columns} - className={styles.whiteIcon} + className="text-white" sorterValue={{ column: 'created', desc: 'true' }} scopedSlots={{ completed: (item) => ( @@ -434,7 +429,7 @@ const DeviceCommands = () => { diff --git a/src/components/CommandHistory/index.module.scss b/src/components/CommandHistory/index.module.scss index 4ea320a..b629188 100644 --- a/src/components/CommandHistory/index.module.scss +++ b/src/components/CommandHistory/index.module.scss @@ -6,10 +6,6 @@ height: 200px; } -.whiteIcon { - color: white; -} - .customIconHeight { height: 19px; } diff --git a/src/components/ConfirmModal/index.js b/src/components/ConfirmModal/index.js index 92e87a2..95cacaf 100644 --- a/src/components/ConfirmModal/index.js +++ b/src/components/ConfirmModal/index.js @@ -11,7 +11,6 @@ import { CBadge, } from '@coreui/react'; import PropTypes from 'prop-types'; -import styles from './index.module.scss'; const ConfirmModal = ({ show, toggle, action }) => { const { t } = useTranslation(); @@ -63,7 +62,7 @@ const ConfirmModal = ({ show, toggle, action }) => { }, [show]); return ( - + {t('delete_command.title')} diff --git a/src/components/ConfirmModal/index.module.scss b/src/components/ConfirmModal/index.module.scss deleted file mode 100644 index a672b6b..0000000 --- a/src/components/ConfirmModal/index.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.modal { - color: #3c4b64; -} diff --git a/src/components/DeleteLogModal/index.js b/src/components/DeleteLogModal/index.js index 56be003..59a5c84 100644 --- a/src/components/DeleteLogModal/index.js +++ b/src/components/DeleteLogModal/index.js @@ -7,7 +7,6 @@ import { ConfirmFooter, useAuth, useDevice } from 'ucentral-libs'; import { dateToUnix } from 'utils/helper'; import axiosInstance from 'utils/axiosInstance'; import eventBus from 'utils/eventBus'; -import styles from './index.module.scss'; const DeleteLogModal = ({ show, toggle, object }) => { const { t } = useTranslation(); @@ -54,7 +53,7 @@ const DeleteLogModal = ({ show, toggle, object }) => { }, [show]); return ( - + {object === 'healthchecks' diff --git a/src/components/DeleteLogModal/index.module.scss b/src/components/DeleteLogModal/index.module.scss deleted file mode 100644 index a672b6b..0000000 --- a/src/components/DeleteLogModal/index.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.modal { - color: #3c4b64; -} diff --git a/src/components/DeviceConfiguration/DeviceConfigurationModal.js b/src/components/DeviceConfiguration/DeviceConfigurationModal.js index f110042..a6a3049 100644 --- a/src/components/DeviceConfiguration/DeviceConfigurationModal.js +++ b/src/components/DeviceConfiguration/DeviceConfigurationModal.js @@ -10,14 +10,13 @@ import { } from '@coreui/react'; import PropTypes from 'prop-types'; import { Translation } from 'react-i18next'; -import styles from './index.module.scss'; const DeviceConfigurationModal = ({ show, toggle, configuration }) => ( {(t) => ( - {t('configuration.title')} + {t('configuration.title')}
{JSON.stringify(configuration, null, 4)}
diff --git a/src/components/DeviceConfiguration/index.js b/src/components/DeviceConfiguration/index.js index 6eba687..427b47d 100644 --- a/src/components/DeviceConfiguration/index.js +++ b/src/components/DeviceConfiguration/index.js @@ -24,7 +24,6 @@ import { useDevice, } from 'ucentral-libs'; import DeviceConfigurationModal from './DeviceConfigurationModal'; -import styles from './index.module.scss'; const DeviceConfiguration = () => { const { t } = useTranslation(); @@ -241,7 +240,7 @@ const DeviceConfiguration = () => { diff --git a/src/components/DeviceConfiguration/index.module.scss b/src/components/DeviceConfiguration/index.module.scss deleted file mode 100644 index 9ea3431..0000000 --- a/src/components/DeviceConfiguration/index.module.scss +++ /dev/null @@ -1,7 +0,0 @@ -.blackIcon { - color: black; -} - -.modalTitle { - color: black; -} diff --git a/src/components/DeviceHealth/index.js b/src/components/DeviceHealth/index.js index ef29b01..9adec1b 100644 --- a/src/components/DeviceHealth/index.js +++ b/src/components/DeviceHealth/index.js @@ -20,7 +20,6 @@ import axiosInstance from 'utils/axiosInstance'; import eventBus from 'utils/eventBus'; import { LoadingButton, useAuth, useDevice } from 'ucentral-libs'; import DeleteLogModal from 'components/DeleteLogModal'; -import styles from './index.module.scss'; const DeviceHealth = () => { const { t } = useTranslation(); @@ -226,12 +225,12 @@ const DeviceHealth = () => { -
+
{ diff --git a/src/components/DeviceHealth/index.module.scss b/src/components/DeviceHealth/index.module.scss deleted file mode 100644 index 55061b8..0000000 --- a/src/components/DeviceHealth/index.module.scss +++ /dev/null @@ -1,11 +0,0 @@ -.icon { - color: white; -} - -.dataTable { - color: white; -} - -.scrollable { - height: 250px; -} diff --git a/src/components/DeviceLogs/index.js b/src/components/DeviceLogs/index.js index 6bc5cf7..f55b01d 100644 --- a/src/components/DeviceLogs/index.js +++ b/src/components/DeviceLogs/index.js @@ -19,7 +19,6 @@ import axiosInstance from 'utils/axiosInstance'; import eventBus from 'utils/eventBus'; import { LoadingButton, useAuth, useDevice } from 'ucentral-libs'; import DeleteLogModal from 'components/DeleteLogModal'; -import styles from './index.module.scss'; const DeviceLogs = () => { const { t } = useTranslation(); @@ -204,12 +203,12 @@ const DeviceLogs = () => { -
+
{prettyDate(item.recorded)}, @@ -255,7 +254,7 @@ const DeviceLogs = () => { diff --git a/src/components/DeviceLogs/index.module.scss b/src/components/DeviceLogs/index.module.scss deleted file mode 100644 index b78784e..0000000 --- a/src/components/DeviceLogs/index.module.scss +++ /dev/null @@ -1,7 +0,0 @@ -.whiteIcon { - color: white; -} - -.scrollableCard { - height: 250px; -} diff --git a/src/components/InterfaceStatistics/LatestStatisticsModal.js b/src/components/InterfaceStatistics/LatestStatisticsModal.js index 94bf45d..eeb858b 100644 --- a/src/components/InterfaceStatistics/LatestStatisticsModal.js +++ b/src/components/InterfaceStatistics/LatestStatisticsModal.js @@ -11,7 +11,6 @@ import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; import axiosInstance from 'utils/axiosInstance'; import { useAuth, useDevice } from 'ucentral-libs'; -import styles from './index.module.scss'; const LatestStatisticsModal = ({ show, toggle }) => { const { t } = useTranslation(); @@ -47,7 +46,7 @@ const LatestStatisticsModal = ({ show, toggle }) => { return ( - {t('statistics.latest_statistics')} + {t('statistics.latest_statistics')}
{JSON.stringify(latestStats, null, 4)}
diff --git a/src/components/InterfaceStatistics/index.module.scss b/src/components/InterfaceStatistics/index.module.scss deleted file mode 100644 index 808e10e..0000000 --- a/src/components/InterfaceStatistics/index.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.modalTitle { - color: black; -} diff --git a/src/components/TraceModal/WaitingForTraceBody.js b/src/components/TraceModal/WaitingForTraceBody.js index ae39fd3..8354a2f 100644 --- a/src/components/TraceModal/WaitingForTraceBody.js +++ b/src/components/TraceModal/WaitingForTraceBody.js @@ -1,17 +1,16 @@ import React, { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import PropTypes from 'prop-types'; -import { CModalBody, CButton, CSpinner, CModalFooter } from '@coreui/react'; +import { CAlert, CModalBody, CButton, CSpinner, CModalFooter } from '@coreui/react'; import { useAuth } from 'ucentral-libs'; import axiosInstance from 'utils/axiosInstance'; -import styles from './index.module.scss'; - const WaitingForTraceBody = ({ serialNumber, commandUuid, toggle }) => { const { t } = useTranslation(); const { currentToken, endpoints } = useAuth(); const [secondsElapsed, setSecondsElapsed] = useState(0); const [waitingForFile, setWaitingForFile] = useState(true); + const [error, setError] = useState(null); const getTraceResult = () => { const options = { @@ -27,6 +26,10 @@ const WaitingForTraceBody = ({ serialNumber, commandUuid, toggle }) => { if (response.data.waitingForFile === 0) { setWaitingForFile(false); } + if (response.data.errorCode !== 0) { + setWaitingForFile(false); + setError(response.data.errorText); + } }) .catch(() => {}); }; @@ -83,16 +86,19 @@ const WaitingForTraceBody = ({ serialNumber, commandUuid, toggle }) => {
{t('trace.waiting_seconds', { seconds: secondsElapsed })}

{t('trace.waiting_directions')}

-
+
diff --git a/src/components/TraceModal/index.module.scss b/src/components/TraceModal/index.module.scss deleted file mode 100644 index 5ab3e6b..0000000 --- a/src/components/TraceModal/index.module.scss +++ /dev/null @@ -1,6 +0,0 @@ -.centerDiv { - display: flex; - justify-content: center; - align-items: center; - height: 20px; -} diff --git a/src/components/WifiScanModal/index.js b/src/components/WifiScanModal/index.js index 167a9b9..3bdd8ac 100644 --- a/src/components/WifiScanModal/index.js +++ b/src/components/WifiScanModal/index.js @@ -19,7 +19,6 @@ import eventBus from 'utils/eventBus'; import { LoadingButton, useAuth, useDevice } from 'ucentral-libs'; import WifiChannelTable from 'components/WifiScanResultModal/WifiChannelTable'; import 'react-widgets/styles.css'; -import styles from './index.module.scss'; const WifiScanModal = ({ show, toggleModal }) => { const { t } = useTranslation(); @@ -171,7 +170,7 @@ const WifiScanModal = ({ show, toggleModal }) => { - + diff --git a/src/components/WifiScanModal/index.module.scss b/src/components/WifiScanModal/index.module.scss deleted file mode 100644 index 5ab3e6b..0000000 --- a/src/components/WifiScanModal/index.module.scss +++ /dev/null @@ -1,6 +0,0 @@ -.centerDiv { - display: flex; - justify-content: center; - align-items: center; - height: 20px; -} diff --git a/src/components/WifiScanResultModal/WifiChannelCard.js b/src/components/WifiScanResultModal/WifiChannelCard.js index 86bd965..e79560d 100644 --- a/src/components/WifiScanResultModal/WifiChannelCard.js +++ b/src/components/WifiScanResultModal/WifiChannelCard.js @@ -3,7 +3,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import PropTypes from 'prop-types'; import 'react-widgets/styles.css'; -import styles from './index.module.scss'; const WifiChannelCard = ({ channel }) => { const { t } = useTranslation(); @@ -12,13 +11,13 @@ const WifiChannelCard = ({ channel }) => { return ( - + {t('scan.channel')} #{channel.channel} -
- +
+
diff --git a/src/components/WifiScanResultModal/index.js b/src/components/WifiScanResultModal/index.js index c5c5beb..18589f7 100644 --- a/src/components/WifiScanResultModal/index.js +++ b/src/components/WifiScanResultModal/index.js @@ -12,7 +12,6 @@ import { import PropTypes from 'prop-types'; import { prettyDate } from 'utils/helper'; import WifiChannelTable from './WifiChannelTable'; -import styles from './index.module.scss'; const WifiScanResultModal = ({ show, toggle, scanResults, date }) => { const { t } = useTranslation(); @@ -50,7 +49,7 @@ const WifiScanResultModal = ({ show, toggle, scanResults, date }) => { return ( - + {date !== '' ? prettyDate(date) : ''} {t('scan.results')} diff --git a/src/components/WifiScanResultModal/index.module.scss b/src/components/WifiScanResultModal/index.module.scss deleted file mode 100644 index 11a9f4d..0000000 --- a/src/components/WifiScanResultModal/index.module.scss +++ /dev/null @@ -1,15 +0,0 @@ -.modalTitle { - color: black; -} - -.cardTitle { - color: black; -} - -.scrollable { - height: 250px; -} - -.datatable { - color: white; -} diff --git a/src/layout/index.js b/src/layout/index.js index 10721bf..d98c94b 100644 --- a/src/layout/index.js +++ b/src/layout/index.js @@ -89,7 +89,7 @@ const TheLayout = () => {
-
);