weave-gitops icon indicating copy to clipboard operation
weave-gitops copied to clipboard

Suspend/Resume All

Open joshri opened this issue 2 years ago • 2 comments

Closes: #2317

Video showing multi suspend / resume:

https://user-images.githubusercontent.com/65822698/186517860-4a2ba9b9-ecd4-4928-94ed-26418aacf243.mov

Screenshot showing tooltips: image

Sync all can happen in a follow up PR. This PR got WAY too big as we completely restructured the data tables so checkboxes were easy like they should be instead of passing them down through seventy layers. First step of what I'm sure is a larger data table restructuring.

What's done:

backend -

  • suspend.go changed to allow multiple objects to be submitted and checked in one request, potentially returning multiple errors.
  • Most objects now have a Uid field so we don't have to deep compare things in the frontend

frontend -

  • URLAddressableTable and FilterableTable removed, functionality slapped into DataTable, tests fixed.
  • Enterprise imports changed :(
  • checkboxes prop added to DataTable, rendering checkboxes for use with new CheckboxActions component
  • CheckboxActions component handles play and pause button, receiving array of checked IDs and filtered rows.
  • checkbox and play/pause button styling and tooltips
  • handle suspend success/error similar to sync action

🌞

joshri avatar Aug 23 '22 13:08 joshri

  • Could you please point the latest design to me? On the last screenshots @JamWils provided/the last version in Figma, the shape of the Play and Pause buttons is closer to square. When I run the app, the buttons are more rectangular:
Screenshot 2022-08-24 at 00 29 30

And do we already need the multi-Sync button there?

  • It would be nice to have tooltips on buttons.

  • I think we need to show some notifications while this multi-suspend/resume is working.

opudrovs avatar Aug 23 '22 22:08 opudrovs

@opudrovs I like the buttons that way they look in your screenshot. Lets keep it that way. I agree on the tooltips as well. It would be nice to also have the "sync" button there, but that can also be done in a later story.

Tooltip for play button: "Resume selected automations" Tooltip for pause button: "Suspend selected automations"

JamWils avatar Aug 24 '22 19:08 JamWils

@joshri the tooltips I see right now are "Resume Selected" and "Suspend Selected". Were they edited by @JamWils ? Or should they still be

Tooltip for play button: "Resume selected automations" Tooltip for pause button: "Suspend selected automations"

And what about tooltips on the Sources page? Are they considered "automations" in the context of resume/suspend functionality or should this be changed for the Sources page?

opudrovs avatar Aug 26 '22 09:08 opudrovs

@ozamosi are Uids added in the current PR compatible with Uids added in the listObjects PR?

https://github.com/weaveworks/weave-gitops/pull/2658

opudrovs avatar Aug 26 '22 10:08 opudrovs

@ozamosi are Uids added in the current PR compatible with Uids added in the listObjects PR?

That's the intention - should be same field, same value. I was planning to let this get merged, rebase #2658, and actually test it though.

ozamosi avatar Aug 26 '22 10:08 ozamosi

@joshri the tooltips I see right now are "Resume Selected" and "Suspend Selected". Were they edited by @JamWils ? Or should they still be

Tooltip for play button: "Resume selected automations" Tooltip for pause button: "Suspend selected automations"

And what about tooltips on the Sources page? Are they considered "automations" in the context of resume/suspend functionality or should this be changed for the Sources page?

This is why I did a little edit to James' text - as far as I know these checkboxes should also be on the sources page and it doesn't make sense to say automations there....or does it?

joshri avatar Aug 26 '22 13:08 joshri