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

Improve snapshot actions across devices, instances and applications #3885

Merged
merged 22 commits into from
May 22, 2024

Conversation

Steve-Mcl
Copy link
Contributor

@Steve-Mcl Steve-Mcl commented May 17, 2024

closes #3815
closes #3629

Description

Caveats

Some menu items do not make a sense on other views and thus not all menus are the same. This was discussed and agreed in the issue comment

TODO:

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.28%. Comparing base (67b459b) to head (f012a0f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3885   +/-   ##
=======================================
  Coverage   79.28%   79.28%           
=======================================
  Files         281      281           
  Lines       12754    12755    +1     
  Branches     2844     2844           
=======================================
+ Hits        10112    10113    +1     
  Misses       2642     2642           
Flag Coverage Δ
backend 79.28% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Steve-Mcl and others added 2 commits May 20, 2024 12:23
Also makes existing tests less brittle when re-ran
@Steve-Mcl Steve-Mcl changed the title Better symmetry between the snapshot table views kebab menus Improve snapshot actions across devices, instances and applications May 20, 2024
@Steve-Mcl Steve-Mcl requested a review from joepavitt May 20, 2024 14:02
@Steve-Mcl Steve-Mcl marked this pull request as ready for review May 20, 2024 14:02
also, ensure downloads dir is cleared before test
@joepavitt joepavitt requested review from cstns and removed request for joepavitt May 21, 2024 08:29
Copy link
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

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

partial review, unable to leave more comments for it due to This diff is outdated, please refresh and try again.

frontend/src/pages/application/Snapshots.vue Outdated Show resolved Hide resolved
frontend/src/pages/application/Snapshots.vue Outdated Show resolved Hide resolved
frontend/src/pages/application/Snapshots.vue Show resolved Hide resolved
kind: 'danger',
confirmLabel: 'Delete'
}, async () => {
await SnapshotsApi.deleteSnapshot(snapshot.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we treat possible failures?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, not sure what the question is here

Copy link
Contributor

Choose a reason for hiding this comment

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

Was wondering if we should threat the possibility for the deleteSnapshot endpoint to fail

frontend/src/pages/application/Snapshots.vue Show resolved Hide resolved
Copy link
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

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

haven't went over the cypress tests yet, would love to have a chat before starting to make changes

frontend/src/pages/device/Snapshots/index.vue Outdated Show resolved Hide resolved
frontend/src/pages/device/Snapshots/index.vue Outdated Show resolved Hide resolved
frontend/src/pages/device/Snapshots/index.vue Show resolved Hide resolved
frontend/src/pages/instance/Snapshots/index.vue Outdated Show resolved Hide resolved
frontend/src/pages/instance/Snapshots/index.vue Outdated Show resolved Hide resolved
@Steve-Mcl
Copy link
Contributor Author

@cstns all suggestions we discussed now in place and working and tests passing again. Ready for (re)review.

Copy link
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

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

Looks good on my end! We can move forward even without the modal validation when deleting snapshots because i couldn't find any other delete dialogs that implement such a catch

kind: 'danger',
confirmLabel: 'Delete'
}, async () => {
await SnapshotsApi.deleteSnapshot(snapshot.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was wondering if we should threat the possibility for the deleteSnapshot endpoint to fail

@Steve-Mcl Steve-Mcl merged commit 78ee033 into main May 22, 2024
13 checks passed
@Steve-Mcl Steve-Mcl deleted the 3815-snapshot-actions branch May 22, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants