-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Add raw status to Agent details UI #154826
[Fleet] Add raw status to Agent details UI #154826
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@kpollich @jen-huang @karenzone |
@jillguyonnet I think the code block is too big to be in the collapsible details area. WDYT of adding a new item to the When clicked, it can open a flyout with the raw document. This would make it consistent with an existing UX pattern that exists at |
@jen-huang Thank you! That looks way better and consistent with existing UX. On it. |
d19bae3
to
a4c3094
Compare
...c/applications/fleet/sections/agents/agent_details_page/components/agent_document_flyout.tsx
Outdated
Show resolved
Hide resolved
@jillguyonnet - Could you paste an example of the agent JSON here to make sure it aligns with what Craig is proposing in the original issue? |
Thanks for catching the typo @kpollich :) Here is an example JSON from my local dev: JSON output {
"id": "430f2e47-0dc2-40a5-870e-07e861a38e67",
"access_api_key_id": "ws-8dYcBO_tAA7yPFnJS",
"action_seq_no": [
-1
],
"active": true,
"agent": {
"id": "430f2e47-0dc2-40a5-870e-07e861a38e67",
"version": "8.8.0"
},
"enrolled_at": "2023-04-12T13:51:13Z",
"local_metadata": {
"elastic": {
"agent": {
"build.original": "8.8.0-SNAPSHOT (build: 0c96fc55ec341d0a3c4f12477e5207e2827e3bdc at 2023-04-11 02:10:10 +0000 UTC)",
"id": "430f2e47-0dc2-40a5-870e-07e861a38e67",
"log_level": "info",
"snapshot": true,
"upgradeable": false,
"version": "8.8.0"
}
},
"host": {
"architecture": "aarch64",
"hostname": "dcfc864e0e1c",
"id": "",
"ip": [
"127.0.0.1/8",
"172.17.0.3/16"
],
"mac": [
"02:42:ac:11:00:03"
],
"name": "dcfc864e0e1c"
},
"os": {
"family": "debian",
"full": "Ubuntu focal(20.04.5 LTS (Focal Fossa))",
"kernel": "5.15.49-linuxkit",
"name": "Ubuntu",
"platform": "ubuntu",
"version": "20.04.5 LTS (Focal Fossa)"
}
},
"policy_id": "21fbd1e0-d917-11ed-8c4b-9f33f6a28da9",
"type": "PERMANENT",
"outputs": {
"default": {
"api_key": "xM-8dYcBO_tAA7yPIXJl:GIHnIyDtQK21XHJXIVGkcg",
"permissions_hash": "a40c5fbf91c40a30ee69112a6e659e13513e37799d2264c866c42f8752d1d356",
"type": "elasticsearch",
"api_key_id": "xM-8dYcBO_tAA7yPIXJl"
}
},
"policy_revision_idx": 3,
"policy_coordinator_idx": 1,
"updated_at": "2023-04-13T11:07:52Z",
"components": [
{
"id": "log-default",
"units": [
{
"id": "log-default-logfile-system-240b02d0-d917-11ed-8c4b-9f33f6a28da9",
"type": "input",
"message": "Healthy",
"status": "HEALTHY"
},
{
"id": "log-default",
"type": "output",
"message": "Healthy",
"status": "HEALTHY"
}
],
"type": "log",
"message": "Healthy: communicating with pid '28'",
"status": "HEALTHY"
},
{
"id": "system/metrics-default",
"units": [
{
"id": "system/metrics-default",
"type": "output",
"message": "Healthy",
"status": "HEALTHY"
},
{
"id": "system/metrics-default-system/metrics-system-240b02d0-d917-11ed-8c4b-9f33f6a28da9",
"type": "input",
"message": "Healthy",
"status": "HEALTHY"
}
],
"type": "system/metrics",
"message": "Healthy: communicating with pid '34'",
"status": "HEALTHY"
},
{
"id": "http/metrics-monitoring",
"units": [
{
"id": "http/metrics-monitoring-metrics-monitoring-agent",
"type": "input",
"message": "Healthy",
"status": "HEALTHY"
},
{
"id": "http/metrics-monitoring",
"type": "output",
"message": "Healthy",
"status": "HEALTHY"
}
],
"type": "http/metrics",
"message": "Healthy: communicating with pid '46'",
"status": "HEALTHY"
},
{
"id": "filestream-monitoring",
"units": [
{
"id": "filestream-monitoring-filestream-monitoring-agent",
"type": "input",
"message": "Healthy",
"status": "HEALTHY"
},
{
"id": "filestream-monitoring",
"type": "output",
"message": "Healthy",
"status": "HEALTHY"
}
],
"type": "filestream",
"message": "Healthy: communicating with pid '57'",
"status": "HEALTHY"
},
{
"id": "beat/metrics-monitoring",
"units": [
{
"id": "beat/metrics-monitoring-metrics-monitoring-beats",
"type": "input",
"message": "Healthy",
"status": "HEALTHY"
},
{
"id": "beat/metrics-monitoring",
"type": "output",
"message": "Healthy",
"status": "HEALTHY"
}
],
"type": "beat/metrics",
"message": "Healthy: communicating with pid '69'",
"status": "HEALTHY"
}
],
"last_checkin_message": "Running",
"last_checkin_status": "online",
"last_checkin": "2023-04-13T11:07:49Z",
"policy_revision": 3,
"status": "online",
"packages": [],
"sort": [
1681307473000
],
"metrics": {}
} |
@zombieFox is joining Ingest to help with UX design. Looping him in here. |
> | ||
<FormattedMessage | ||
id="xpack.fleet.agentList.viewAgentDocumentText" | ||
defaultMessage="View agent document" |
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.
We try to be as descriptive with labeling as possible so that users have a better idea of what an option will do for them.
Could we use "View agent json" instead of "View agent document"
? My first thought was "View agent details,", but that label is already being used.
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.
Thank you @karenzone - I am not sure whether there is a UX pattern in this case. View agent json
sounds clear to me. There is a sort of equivalent in the agent policy simply labelled View policy
(note that the output is represented as yaml, not json, like in the screenshot @jen-huang posted above), so maybe View agent
could even make sense? Or maybe View full agent details
?
@zombieFox As it looks like Karen is on PTO this week could you weigh in on this?
I think it'd be good if we could add some kind of description here, as it's not clear why a user might open this flyout or what they should do with the resulting data. Maybe something like
cc @karenzone for copy suggestions 🙏 |
Hi all 👋🏽 From the limited context I have the I feel the comments and contributors here are on the right path. +1 to the
+1 to adding more details on the flyout to guide users to useful information in the JSON code block. This might add scope, so please disregard if so - A question:
|
Hi @zombieFox - thank you for your feedback!
Definitely 👍 Could you weigh in on Kyle's suggestion above? As mentioned in the other thread, it looks like Karen is off this week.
While it is possible to highlight certain lines (https://elastic.github.io/eui/#/editors-syntax/code), which lines are relevant for debugging might depend on the specific failure scenario. I am not sure in my current understanding how feasible that would be. Maybe @kpollich can confirm. |
We could look for any |
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
e364c2e
to
d33c8af
Compare
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/fleet (Team:Fleet) |
Opening this for review based on the feedback gathered so far. @karenzone @zombieFox If this gets merged before you get a chance to do any more reviewing, please note that any additional UX feedback such as wording can very easily be added at a later stage. @elastic/fleet Something I'm not 100% confident with is the implementation of the download link (seems like a shame to do an API call since the payload is already in memory). Please have a critical look at it when reviewing, thanks 🙂 |
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.
Code LGTM! I also tested locally and it works well. 🚢
Summary
Make raw agent status discoverable in Fleet UI, under
Agent details
tab.Closes #154067
Screenshots
UX checklist
View agent JSON
){agentName} agent details
)Download JSON
){agentName}-agent-details.json
)Testing steps
View agent JSON
item in theActions
menu. Click it.Close
button should close the flyout.Download JSON
button should download the JSON correctly.Checklist