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

Batch load machines #958

Merged
merged 2 commits into from
Apr 8, 2020
Merged

Conversation

huwshimi
Copy link
Contributor

@huwshimi huwshimi commented Apr 7, 2020

Done

  • Add support for batch loading via the websocket API.
  • Batch load the machine list.

QA

  • Visit /r/machines.
  • Your machines should get loaded in lots of 25.

Fixes

Fixes: #919.
Fixes: https://github.com/canonical-web-and-design/MAAS-squad/issues/1871.

Copy link
Contributor

@squidsoup squidsoup left a comment

Choose a reason for hiding this comment

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

Great work huw, this looks like a good solution. One small change to consider.

@@ -2,6 +2,19 @@ import { createStandardActions } from "app/utils/redux";

const machine = createStandardActions("machine");

machine.fetch = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think redefining this action is necessary, limit can be passed to machine.fetch as params and it should DTRT. createStandardActions should be updated to take params like the other actions. The components dispatching the action can then define the limits themselves.

@squidsoup squidsoup mentioned this pull request Apr 8, 2020
@huwshimi huwshimi force-pushed the handle-batch-requests branch from 079ffa1 to 47c182a Compare April 8, 2020 02:32
@huwshimi huwshimi merged commit bf0877e into canonical:master Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop waiting for all machines to load to start displaying them
2 participants