From 09186591b4f99ed9927dd4bebc56f49d4fc13a59 Mon Sep 17 00:00:00 2001 From: Macgregor Aubertin-Young <108430771+mauberti-bc@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:27:40 -0700 Subject: [PATCH] Move device keys button & add info banner (#1369) Move device keys button & add info banner --- app/src/components/alert/AlertBar.tsx | 2 +- .../device-keys/TelemetryDeviceKeysButton.tsx | 16 ++++++++---- .../device-keys/TelemetryDeviceKeysDialog.tsx | 25 ++++++++++++------- .../telemetry/list/SurveyDeploymentList.tsx | 3 --- .../table/TelemetryTableContainer.tsx | 2 ++ 5 files changed, 30 insertions(+), 18 deletions(-) diff --git a/app/src/components/alert/AlertBar.tsx b/app/src/components/alert/AlertBar.tsx index 3db43456ed..ff7d46472f 100644 --- a/app/src/components/alert/AlertBar.tsx +++ b/app/src/components/alert/AlertBar.tsx @@ -7,7 +7,7 @@ interface IAlertBarProps { severity: 'error' | 'warning' | 'info' | 'success'; variant: 'filled' | 'outlined' | 'standard'; title: string; - text: string; + text: string | JSX.Element; } const AlertBar: React.FC = (props) => { diff --git a/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysButton.tsx b/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysButton.tsx index 556fa99888..a2c54ff8cf 100644 --- a/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysButton.tsx +++ b/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysButton.tsx @@ -1,6 +1,6 @@ -import { mdiKeyWireless } from '@mdi/js'; +import { mdiKeyVariant } from '@mdi/js'; import Icon from '@mdi/react'; -import IconButton from '@mui/material/IconButton'; +import Button from '@mui/material/Button'; import { TelemetryDeviceKeysDialog } from 'features/surveys/telemetry/device-keys/TelemetryDeviceKeysDialog'; import { useState } from 'react'; @@ -28,9 +28,15 @@ export const TelemetryDeviceKeysButton = (props: ITelemetryDeviceKeysButtonProps }} /> - setOpen(true)} disabled={disabled} aria-label="Manage telemetry device keys"> - - + ); }; diff --git a/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysDialog.tsx b/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysDialog.tsx index ab379def70..29302327b0 100644 --- a/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysDialog.tsx +++ b/app/src/features/surveys/telemetry/device-keys/TelemetryDeviceKeysDialog.tsx @@ -8,6 +8,7 @@ import useTheme from '@mui/material/styles/useTheme'; import Typography from '@mui/material/Typography'; import useMediaQuery from '@mui/material/useMediaQuery'; import { AxiosProgressEvent, CancelTokenSource } from 'axios'; +import AlertBar from 'components/alert/AlertBar'; import FileUpload from 'components/file-upload/FileUpload'; import { AttachmentTypeFileExtensions } from 'constants/attachments'; import { TelemetryDeviceKeysList } from 'features/surveys/telemetry/device-keys/TelemetryDeviceKeysList'; @@ -103,7 +104,7 @@ export const TelemetryDeviceKeysDialog = (props: ITelemetryDeviceKeysDialogProps return ( Manage Device Keys - - Device keys allow telemetry data from Vectronic to be automatically loaded into your Survey. - - Vectronic device keys are .keyx files. - Lotek device keys are .cfg files. - - Telemetry data from other manufacturers must be imported manually. - + + Telemetry data can be imported manually or, for Vectronic and Lotek devices, retrieved automatically + after uploading device keys (.keyx or .cfg files). Automatic data + retrievals happen nightly. For Vectronic devices, you should see new telemetry data for a deployment + within 24 hours of uploading the device's .keyx file. For Lotek devices, you should see telemetry data + after a system administrator has processed your .cfg file. + + } + /> { Add - - { const biohubApi = useBiohubApi(); @@ -144,6 +145,7 @@ export const TelemetryTableContainer = () => { +