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

Wrong values in Total updates column #7

Closed
yskopets opened this issue Jan 17, 2020 · 1 comment
Closed

Wrong values in Total updates column #7

yskopets opened this issue Jan 17, 2020 · 1 comment
Assignees

Comments

@yskopets
Copy link
Contributor

Context

Reported by a user on Kuma Slack

Description

Total updates looks wrong

image

For comparison, the output of kumactl inspect dataplanes looks like this:

image (1)

bloqhead pushed a commit that referenced this issue Jan 17, 2020
@bloqhead bloqhead self-assigned this Jan 17, 2020
@bloqhead bloqhead added the bug label Jan 17, 2020
@bloqhead
Copy link
Contributor

bloqhead commented Jan 17, 2020

@yskopets I've improved the functionality that evaluates the total number of updates. I use a reducer to sum up the number of updates found in subscriptions. For certain contexts, I'll add "n/a" as a placeholder in the UI. I failed to address instances where a number of updates might be mixed in with a "n/a" string. The reducer now properly ignores the non-integer values and only does a sum of the updates that return an integer.

This is one of the main parts of the app I want to refactor. I have to do a lot of cross-querying between the Dataplane and Dataplane Insights endpoints and it gets a bit crazy. GraphQL would probably be perfect here.

bloqhead pushed a commit that referenced this issue Jan 17, 2020
* fix: added better evaluation for the reduce function that handles the sum of Total Updates (#7).

* simplified the reduce function for Total Updates to fallback to 0 if there is no value returned.

* removed an if statement we no longer needed for the Total Updates value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants