8000 Fix per-app stats to handle two apps having routes with the same path… by nigeldeakin · Pull Request #38 · fnproject/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix per-app stats to handle two apps having routes with the same path… #38

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

Merged
merged 1 commit into from
Feb 5, 2018

Conversation

nigeldeakin
Copy link
Contributor

This PR fixes a bug which meant that the UI tool could not distinguish between two routes, in different apps, which had the same path.

The root cause of the bug was that the data returned by the Fn server (/stats) was simply a list of route stats, keyed by path. So this would not distinguish between two routes, in different apps, which had the same path. That bug is fixed by PR fnproject/fn#735 , which reorganises the data returned into two levels: app and then path.

This PR makes use of the updated API and now will correctly handle two apps having routes with the same path.

(As an aside, when on the "all apps" chart, the lines are currently labelled only by path. They do not mention the app. Although these will display duplicate paths correctly, a use will have to navigate down to the page for the individual app to be sure which line is the one they want. An obvious change would be to display the app name as well, but I'm concerned that this would make the legend too big. That's probably worth fixing, but I think we can do that as a separate change)

@nigeldeakin
Copy link
Contributor Author

I've logged #39 "Top-level dashboard should show app name as well as path in the legend"

Copy link
@adoublebarrel adoublebarrel left a comment

Choose a reason for hiding this comment

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

LGTM

@nigeldeakin nigeldeakin merged commit d1b7e9b into master Feb 5, 2018
@nigeldeakin nigeldeakin deleted the per-app-stats branch February 5, 2018 15:52
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

Successfully merging this pull request may close these issues.

2 participants
0