-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(*): Explore Profiles app #5
Conversation
# Conflicts: # src/app/components/Routes/Routes.tsx
… switch is on + proper refresh favs
…rious improvements
…uery builder var v1
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.
Great work! Even though I am new to scenes the structure of the code and names used made it easy to follow.
I couldn't pay full attention to all changes since the PR is on the bigger side, so I might have missed things. I added some minor remarks / questions as comments.
import { InlineSwitch } from '@grafana/ui'; | ||
import React from 'react'; | ||
|
||
export interface SceneNoDataSwitcherState extends SceneObjectState { |
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.
Writing this here but the issue is probably elsewhere (if it is a real issue). I noticed that I can get panels to display when I select "Hide panels without data" and they have no data by applying a filter. I see the same behavior when applying the quick filter in the "All services" exploration. Is this by 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.
Might be related: I've found a small bug that I've fixed in the SceneByVariableRepeaterGrid
src/pages/ProfilesExplorerView/data/labels/http/LabelsApiClient.ts
Outdated
Show resolved
Hide resolved
...ofilesExplorerView/exploration-types/SceneExploreServiceLabels/SceneExploreServiceLabels.tsx
Show resolved
Hide resolved
src/pages/ProfilesExplorerView/exploration-types/SceneServiceFlameGraph/SceneFlameGraph.tsx
Show resolved
Hide resolved
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.
This is very nice!!
I have a few thoughts that didn't seem to make sense to put any where in the PR so I'll lay them out here.
I'm not sure how we get around this, but I wish we had a way to signal moving from "All services" to "Single service" would select the first service in the grid. Perhaps not worth over-engineering, but it did trick me initially.
This is a known problem, but the fact the browser's back button is basically useless when navigating is a bit of a pain. As an example workflow:
- I go to "All services" and find a service that is interesting
- I click "Labels" on that grid item
- I realize I actually wanted "Profiles"
- I press back on my browser
- Nothing happens sad.jpg (Well technically something happens but I'm not brought back to the same functional page I was at before)
Group by dropdown "Other labels" could have a number of options that it contains in the placeholder text.
![Screenshot 2024-06-27 at 6 10 50 PM](https://private-user-images.githubusercontent.com/32787160/343975980-552db5c7-56c9-4564-84dc-2ae969e96d59.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDQ5OTcsIm5iZiI6MTczOTEwNDY5NywicGF0aCI6Ii8zMjc4NzE2MC8zNDM5NzU5ODAtNTUyZGI1YzctNTZjOS00NTY0LTg0ZGMtMmFlOTY5ZTk2ZDU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEyMzgxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4MjYyZTcxMTliYjlmOTcyNWEwYzE4MzYxZTA2MjE2ZDc4OWMzMDJiNmRmOTc2ZDEwNDEyYzNhYWU5ODVkZmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.O0wRIGPs3Ipb-7S9oWa2W-w7cUaIok4OjxUlWbRoWwo)
Add hover tooltip to group by refresh to help explain what it will refresh.
![Screenshot 2024-06-27 at 6 12 06 PM](https://private-user-images.githubusercontent.com/32787160/343976259-7cd7de0f-0010-4b19-b30a-83e3ba789c74.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDQ5OTcsIm5iZiI6MTczOTEwNDY5NywicGF0aCI6Ii8zMjc4NzE2MC8zNDM5NzYyNTktN2NkN2RlMGYtMDAxMC00YjE5LWIzMGEtODNlM2JhNzg5Yzc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEyMzgxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNiODE3YTRmMDI0ZGIyN2NiYjczNDczMDg0ZjdjMTRjN2I1YzFkNThmMDg4MzZiYTc4MzljZDdjYjczNDA1NmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.c6zUutybPydG4f-Y8eMfYDHN1zDHLLvOopZI44J8tUo)
...ages/ProfilesExplorerView/exploration-types/SceneExploreServiceLabels/SceneGroupByLabels.tsx
Outdated
Show resolved
Hide resolved
src/pages/ProfilesExplorerView/exploration-types/SceneServiceFlameGraph/SceneFlameGraph.tsx
Show resolved
Hide resolved
Thank you both for the time & energy spent to provide a thorough review!
Indeed, the
As a temporary solution, we can add a new header action on the main timeseries in the "Service labels" and "Flame graph" views: As a proper solution, I think it has been fixed in the newer versions of the Scenes library (TBC).
AFAIK, there's not way to customize the SceneRefreshPicker control to add a tooltip, my best effort was to add a title manually (not great): |
@@ -13,7 +13,7 @@ const PARAM_NAMES = new Map<TargetTimeline, string[]>([ | |||
]); | |||
|
|||
const DEFAULT_TIMERANGE_VALUES = new Map<string, string>([ | |||
['from', 'now-1h'], | |||
['from', 'now-30m'], |
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.
Now that we're going to fetch more data when landing on the page, I think that reducing the default time range is a sensible choice.
✨ Description
This PR adds a new page to the plugin, an "embedded application" based on the Scenes library. It was initially meant to replace the Tag Explorer page. It can now replace both the Tag Explorer and the Single View pages. In a near future, it will also add a Comparison exploration type.
This new app is part of the "Explore Apps" ecosystem.
🕹️ Live demo in profilesdev002.grafana-dev.net
📖 Summary of the changes
There are currently 5 exploration types:
All services
Single service
Service labels
Flame graph
Favorites
🧪 How to test?
Locally, after checking out this PR's branch
.env
file to include the credentials for the remote data sourceyarn && yarn build && yarn server:remote
Online: