Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMSBIOHUB-646: Add Device Keys Button to Manage Deployments & Misc UI Updates #1440

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

mauberti-bc
Copy link
Collaborator

Links to Jira Tickets

Description of Changes

  • Adds Device Keys button to the manage devices table
  • Updates snackbar messages preventing devices/deployments from being deleted due to foreign key constraints
  • Added backend tests for creating devices endpoint
  • Fixed an issue with capture time being displayed on the create deployment page

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 45.47%. Comparing base (fdc21f7) to head (9923804).
Report is 1 commits behind head on SIMSBIOHUB-627.

Files with missing lines Patch % Lines
.../deployments/form/timeline/DeploymentStartForm.tsx 0.00% 1 Missing ⚠️
.../manage/deployments/table/DeploymentsContainer.tsx 0.00% 1 Missing ⚠️
...etry/manage/deployments/table/DeploymentsTable.tsx 0.00% 1 Missing ⚠️
...lemetry/manage/devices/create/CreateDevicePage.tsx 0.00% 1 Missing ⚠️
...elemetry/manage/devices/table/DevicesContainer.tsx 0.00% 1 Missing ⚠️
...ys/telemetry/manage/devices/table/DevicesTable.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           SIMSBIOHUB-627    #1440      +/-   ##
==================================================
+ Coverage           45.38%   45.47%   +0.08%     
==================================================
  Files                 887      887              
  Lines               23189    23201      +12     
  Branches             3376     3383       +7     
==================================================
+ Hits                10525    10550      +25     
+ Misses              12068    12055      -13     
  Partials              596      596              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mauberti-bc mauberti-bc added the Ready For Review PR is ready for review label Dec 3, 2024
@@ -137,6 +138,14 @@ export function createDevice(): RequestHandler {

const telemetryDeviceService = new TelemetryDeviceService(connection);

// Check whether device already exists in Survey
const device = await telemetryDeviceService.findDeviceBySerial(surveyId, serial, device_make_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: There is already a unique constraint on the device table for (survey_id, serial, device_make_id)

Copy link
Collaborator Author

@mauberti-bc mauberti-bc Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this to catch the would-be error to give a useful error message. I figured this made the goal more obvious rather than waiting for the database error, but let me know if you think we should do it differently.

Copy link

sonarqubecloud bot commented Dec 3, 2024

@MacQSL MacQSL merged commit 14053b1 into SIMSBIOHUB-627 Dec 6, 2024
21 checks passed
@MacQSL MacQSL deleted the SIMSBIOHUB-646 branch December 6, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants