cloudfoundry / cloudfoundry/stratos

Ensure cf/org/space user lists and counts use the same data

Open
#1,945 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
267
Forks
137
Avg merge
5h 14m
Merged PRs (30d)
77

Description

  • Currently one global call to fetch all users fetches data for the
    • cf user's tab
    • summary User Org Role : and User Space Role/s : lines
    • cf summary users count
  • Separate requests (once per org) are made to fetch users for the
    • org users tab
    • org users count
  • Separate requests (once per space) are made to fetch users for the
    • space users tab
    • space users count

Issues/solutions

  • If the user is not the admin, the first call will fail. We need to fall back on the other methods to populate any user info
    • cf user's tab - make a call to each org. this should provide all org and space roles
    • summary 'user x role/s' should come from the data provided from the other calls
    • cf summary users count - this should come from a separate call (max results = 1, read total result), otherwise we make a hell of a lot of calls every time we visit the cf summary page
  • The other methods should not make additional calls if we already have that data (user is an admin). Suggest having an effect that will take the all users response, massage it and store in a way that the other methods can use.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. First trace the existing user-list and user-count requests for the Cloud Foundry, organization, and space views, then identify where their results can be shared. Done means the tabs, role summaries, and counts use consistent data without unnecessary duplicate requests and still work for non-admin users.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
cloud, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.