-
Notifications
You must be signed in to change notification settings - Fork 63
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
Devices UX: Moving devices between applications #4290
Comments
Initial thoughts around how to surface this in the UI: Replace the new Trashcan bulk "delete" with an "Actions" drop-down that includes "Delete" and "Move..." options. |
Functional design Now I have spent some time looking though the application and code, more thoughts occur. Below is a slightly disjointed brain dump that is intended to be thought provoking to get to the most intuitive behaviour of moving device(s). Please feel free to comment/correct/dismiss any or all of the below (feedback is wanted and required please) Scope
Handling movement of mixed application/instance source devices?
What if one of the devices is an application device-group member?
What if the target instance is protected?
What if the target instance is HA?
What do we do with devices having a target snapshot set
What do we do in terms of updating the devices upon move?
Should we permit simple bulk move to "unassigned"?
Once feedback is collated I will summarise it all for easier digestion to be served as an implementation guide. |
API design There are two approaches I am considering.
As it stands, I am strongly favouring Also, Lastly, in my previous comment, I reasoned that a new role "device:move" made sense. That also give weight to POST /bulk/move employing its own RBAC. the route should proabably also be idempotent. |
If we have the dedicated If we don't have bulk endpoint already, we shouldn't add one as that's not RESTful standard. PUT/DELETE to |
The URI Regarding PUT. PUT method is yypically used to replace an entire representation of a resource. This doesn't align with the "bulk move" operation. POST is for creating a new resource or perform an action that changes the state of resources. Based on those 2 observations I strongly prefer Endpoints are cheap & clarity feels more important here ;). Happy to be overruled as alsways (this is design phase) |
PATCH is perhaps more appropriate then. RESTful APIs shouldn't have verbs in them, the verb is always the POST/GET/PATCH, etc |
Fully open to that:
Lets see what/if any other more opinions come in before locking it in. (we can easily tweak in review) |
We can disagree and throw links around all day but sometimes the "recommendation" doesnt fit
But, for the sake of argument, I will use |
That's fine but why do we have a Singular operations should be done at |
Twas debated in the original PR Joe. There was a reason that alludes me right now (something like other bulk ops that would overlap and eventually cause either overloading of an endpoint or mangling of a different URI to suit) Anyhow, not to 100% renage on the previous comment but I think (to avoid future mangling to overloading) there may be a compromise - use of POST + param
Is that a suitable / sensible compromise? This permits future bulk ops that suite the same URI withut mangling or overloading. Anyhow, off out for beers with friends. Will catch up with feedback on monday PS, thanks a lot for feeding back out of hours Joe (I wanna to get a head start on this on Mon Morning) |
Not really because we're duplicating effort/code. We only need a PATCH endpoint for The FE, or whatever else calls that API, provides the relevant data there. If we have an endpoint for every action type, that's unnecessary code that we don't need to write and wasted time everytime we want to add a new action |
Not sure what you mean Joe. The Anyhow, lets move forward with your suggestion of the
Ahha, I now see the confusion. Let me put you mind at ease - there is no clash. Those single resource operations are on a different API route. They are in |
|
As part of Bulk Device Actions, users should be able to move multiple (even a single) Device easily from an Application to (a) another Application and (b) an Instance.
Tasks
The text was updated successfully, but these errors were encountered: