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

Return CSV if requested from realm stats. #922

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

jeremyfaller
Copy link
Contributor

@jeremyfaller jeremyfaller commented Oct 28, 2020

Supports 2 modes:

${SERVER}/realm/stats?csv
Returns overall realm stats.
${SERVER}/realm/stats?csv&user
Returns the per-user realm stats.

Fixes #916

image

Realm stats now supports CSV export:
${SERVER}/realm/stats?csv
  Returns overall realm stats.
${SERVER}/realm/stats?csv&user
  Returns the per-user realm stats.

@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Oct 28, 2020
@jeremyfaller jeremyfaller requested review from sethvargo and mikehelmick and removed request for chaodaiG October 28, 2020 20:48
@jeremyfaller
Copy link
Contributor Author

/hold

hold. I'm going to add a link from the realm stats page.

@jeremyfaller
Copy link
Contributor Author

/unhold

pkg/controller/realmadmin/show.go Outdated Show resolved Hide resolved
pkg/controller/realmadmin/show.go Outdated Show resolved Hide resolved
pkg/controller/realmadmin/show.go Outdated Show resolved Hide resolved
@jeremyfaller
Copy link
Contributor Author

/hold while I write the JSON approach back in.

@jeremyfaller
Copy link
Contributor Author

/unhold

cmd/server/assets/realmadmin/show.html Outdated Show resolved Hide resolved
cmd/server/assets/realmadmin/show.html Outdated Show resolved Hide resolved
pkg/controller/realmadmin/show.go Outdated Show resolved Hide resolved
pkg/controller/realmadmin/show.go Outdated Show resolved Hide resolved
pkg/database/realm.go Outdated Show resolved Hide resolved
@jeremyfaller jeremyfaller force-pushed the issue_916 branch 2 times, most recently from 97ef955 to 820d635 Compare October 29, 2020 15:31
@@ -23,7 +23,16 @@ <h1>Realm stats</h1>
</p>

<div class="card mb-3 shadow-sm">
<div class="card-header">Statistics</div>
<div class="card-header">Statistics
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering what this would look like more like this:
https://gist.github.com/whaught/7ad634843cc4de808796bdce5cdd8a33

just to get things out of the 'card-header' div and have an all-encompassing body div

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like any of the styling. Here's what mine looks like:

image

And yours

image

I don't like any of them. I am happy to iterate till we're blue in the face, but perhaps you're the better man for the job here.

Copy link
Contributor

Choose a reason for hiding this comment

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

/lgtm

Let's go with this, we can tweak later

Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold
in case @whaught wants to re-review

@jeremyfaller
Copy link
Contributor Author

/unhold

Supports 4 modes:

${SERVER}/realm/stats.csv
${SERVER}/realm/stats.csv?user
${SERVER}/realm/stats.json
${SERVER}/realm/stats.json?user

Fixes google#916
@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jeremyfaller, sethvargo, 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:
  • OWNERS [jeremyfaller,sethvargo,whaught]

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

@google-oss-robot google-oss-robot merged commit b440f01 into google:main Oct 29, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 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.

implement stats export
4 participants