Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Logic for batch user import #553

Merged
merged 24 commits into from
Sep 18, 2020
Merged

Logic for batch user import #553

merged 24 commits into from
Sep 18, 2020

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Sep 17, 2020

Issue #517

Proposed Changes

  • Logic for bulk-user-import
    • Users html5 filereader
      * That might be a no-go for very old browsers, so leaving the Beta flash up
  • Displays CSV batches in a table and shows progress as it goes.

bulkimport

Release Note

Logic for bulk user import

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 17, 2020
</main>

{{template "scripts" .}}
<script type="text/javascript">
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm this is a lot of javascript. Is there a strong reason to do this on the client vs the server? It seems like a traditional form submit + background processing would suffice here.

Copy link
Member

Choose a reason for hiding this comment

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

I'm also worried about the "modern" requirements here. When you think about most hospitals and medical facilities, they aren't running the latest and greatest browsers. I wouldn't be surprised if we have some clients using IE on XP still, with no support for the HTML5 file objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main reason is so that it can batch and update progress as it goes. If we submit the whole file, we still need to return a response with all the users so we can do the password reset in javascript.

cmd/server/main.go Outdated Show resolved Hide resolved
pkg/api/api.go Outdated Show resolved Hide resolved
pkg/controller/user/importbatch.go Outdated Show resolved Hide resolved
pkg/controller/user/importbatch.go Outdated Show resolved Hide resolved
pkg/controller/user/importbatch.go Outdated Show resolved Hide resolved
pkg/controller/user/importbatch.go Outdated Show resolved Hide resolved
pkg/controller/user/importbatch.go Outdated Show resolved Hide resolved
@whaught whaught changed the title [WIP] Logic for batch user import Logic for batch user import Sep 18, 2020
@sethvargo
Copy link
Member

@whaught looks like there's test failures

@sethvargo
Copy link
Member

/lgtm

@google-oss-robot google-oss-robot merged commit 5d2710e into google:main Sep 18, 2020
@whaught whaught deleted the csvs branch September 18, 2020 21:35
@google google locked and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants