-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
telemetry: show collected data under the toggle #8272
Conversation
checked={adminSettings?.sendTelemetry ?? false} | ||
onChange={(evt) => actuallySetTelemetryPrefs({ | ||
sendTelemetry: evt.target.checked, | ||
})} /> | ||
</PageWithSubMenu> | ||
<InfoBox>{JSON.stringify(telemetryData, null, 2)}</InfoBox> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't done a lot of UI yet, Hence a newbie question. What's the nicest way to display this? 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a first step, I would recommend using a pre
block.
<InfoBox>{JSON.stringify(telemetryData, null, 2)}</InfoBox> | |
<InfoBox><pre>{JSON.stringify(telemetryData, null, 2)}</pre></InfoBox> |
before | after |
---|---|
With this proposed change, in my opinion, it would be sufficient for a first increment (as an MVC/minimal viable change).
For a next iteration, we could think about a toggle that allows collapsing the box. For that, we should ask @gtsiolis for his always terrific input on UX design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this to use the pre
block, and it already looks way better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey everyone!
issue: Using the alert component[1][2], also known asInfoBox
, feels a bit misleading. Also, including the payload expanded looks a bit verbose and will not scale well in the long run as we add more information encapsulated in the payload. Lastly although a minor issue, the help links pattern (Learn more, Read our Privacy Policy, etc) is used at the end of sentences without any following text. Also, yes using a monospaced
font for depicting such information sounds ideal.
suggestion: What do you think of using a modal to encapsulate this information to avoid injecting this kind of verbose information in the dashboard layout?
thought: We could also
Button | Modal |
---|---|
Thanks for the ping @corneliusludmann! 🏓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for our input, @gtsiolis! I agree with your proposal. 👍
If you agree, I would like to move this part to a new issue and exclude these improvements from this PR for the following reasons:
- It is functionally working now and I think it's very important that we get this into the February release.
- For @Pothulapati, it would take some time to get familiar with the modal feature. Moving this into a follow-up PR would give him more time for this without jeopardizing the release (or someone else takes the new issue to implement this improvement—Tarun can decide).
Thus, my proposal would be:
- Let's merge this pull request as is.
- Move the UX proposals to a new issue and do the work in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corneliusludmann Your suggestion, makes sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took the liberty and created #8300.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @corneliusludmann for opening the follow up issue. Agree! Re-posting from #8125 (comment):
Codecov Report
@@ Coverage Diff @@
## main #8272 +/- ##
==========================================
- Coverage 12.31% 11.17% -1.14%
==========================================
Files 20 18 -2
Lines 1161 993 -168
==========================================
- Hits 143 111 -32
+ Misses 1014 880 -134
+ Partials 4 2 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for venturing into TypeScript and the depths of Gitpod Server. 🧗 Good work. 🥳 I left a few comments.
components/server/src/installation-admin/telemetry-data-provider.ts
Outdated
Show resolved
Hide resolved
4034e46
to
78a1efd
Compare
@Pothulapati May I have admin access please? :) |
@Pothulapati @laushinka Gave you both admin access. |
Triggered by the comment in #8272 (comment), cross-posting a link to some relevant docs for visibility. 💡 tip: You can give give another user, including your user, admin rights with a one-line command, see relevant docs (internal). |
})(); | ||
}); | ||
|
||
if (!user || !user?.rolesOrPermissions?.includes('admin')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this new gaurd, admin/settings
does not open when the user isn't a admin like you'd expect!
b600fdf
to
bfddc13
Compare
Currently, The service ping can be disabled by going into the admin settings. Users are more likely to do that if they have no clue what is being sent. This PR tries to improve this experience, by showcasing the exact data that is being sent below the option. This is possible by creating a new TelemetryDataProvider and injecting that both in the `installation-admin-collector` controller and the `gitpod-service` (`getTelemetryData` func is added here that can be used). This PR also adds a gaurd to the `/admin/settings` page which was missing previously Signed-off-by: Tarun Pothulapati <[email protected]> replace cluster with gitpod instance in desc Signed-off-by: Tarun Pothulapati <[email protected]> easy nits around design and TelemetryData naming Signed-off-by: Tarun Pothulapati <[email protected]> gaurd telemetry method with admin access Signed-off-by: Tarun Pothulapati <[email protected]> replace TelemetryData at more places Signed-off-by: Tarun Pothulapati <[email protected]> gaurd access to `admin/settings` like other admin settings Signed-off-by: Tarun Pothulapati <[email protected]> call useEffect hook early Signed-off-by: Tarun Pothulapati <[email protected]>
bfddc13
to
185544a
Compare
Description
Currently, The service ping can be disabled by going into the
admin settings. Users are more likely to do that if they have
no clue what is being sent.
This PR tries to improve this experience, by showcasing the
exact data that is being sent below the option. This is possible
by creating a new TelemetryDataProvider and injecting that
both in the
installation-admin-collector
controllerand the
gitpod-service
(getTelemetryData
func is added herethat can be used).
Related Issue(s)
Fixes #7891
How to test
yarn telepresence
in/server
admin
settings page, and view the new information below the service ping optionRelease Notes
Documentation