-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Datanode List Page UI #17161
Datanode List Page UI #17161
Conversation
c20249e
to
e37a853
Compare
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.
Below are the results of testing this PR.
I still need to test the sorting functionality of the columns "Name" and "Is leader" and the searching but I still need to figure out how to manipulate these fields.
I found some issues with this list, I will review the code afterwards.
Test results
✅Data Node List shows all data nodes with "Name", "Transport address", "Status", "Is leader", "Certificate valid until" and "Actions"
✅When clicking on "More" in the "Actions" column it shows the following actions
- Renew certificate
- Start
- Stop
- Rejoin
- Remove
❌ The action "Stop" should only be shown for running data nodes
❌ The action "Start" should only be shown for stopped data nodes
✅When clicking on "Stop" it shows a notification
✅When clicking on "Stop" the status changes from "Available" to "Unavailable"
✅When clicking on "Start" it shows a notification
✅When clicking on "Start" the status changes from "Unavailable" to "Starting" to "Available"
❌ Entries can be sorted by "Status"
❌ Entries can be sorted by " Certificate valid until"
❌ The search syntax help shows information about searchable fields in this list -> Shows fields that are not in the list, like id
, description
✅Clicking on the name leads to the detail view
✅Columns can be hidden and shown using the "Columns" dropdown on the right
✅A "Data Nodes documentation" link on the top right redirects to the official Graylog Documentation for Data Nodes
✅When clicking "Renew certificate" it shows a success notification
When clicking "Renew certificate" the certificate is renewed
✅When clicking "Remove" a confirmation modal is shown
✅When confirming the removal a success notification is shown
✅When confirming the removal the status changes to "Removing" and later to "Removed"
✅When clicking "Rejoin" a confirmation modal is shown
✅When confirming rejoining a success notification is shown
✅When confirming rejoining the status changes to "Unconfigured"
❌ When confirming rejoining the status does not change further and stays "Unconfigured", however in preflight mode nothing else can be configured for this Data Node
❌ When removing a rejoined Data Node which is stuck on "Unconfigured" it shows a success message, but the status does not change
✅Entries can be sorted by "Name"
✅Entries can be sorted by "Is leader"
❌ Entries can be searched by "Name"
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 looks good in general. However, I think we should go through all the copy and make sure we use one spelling of Data Node
.
graylog2-web-interface/src/components/datanode/DataNodeList/DataNodeActions.tsx
Outdated
Show resolved
Hide resolved
graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts
Outdated
Show resolved
Hide resolved
graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts
Outdated
Show resolved
Hide resolved
graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts
Outdated
Show resolved
Hide resolved
graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts
Outdated
Show resolved
Hide resolved
() => fetchDataNodes(params), | ||
{ | ||
onError: (errorThrown) => { | ||
UserNotification.error(`Loading datanodes failed with status: ${errorThrown}`, |
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.
Same here, another way to spell datanodes
.
Thank you for your test and review. I fixed all the frontend-related comments. For these below, we will need to adjust the backend; for example, for the search-related issue, the frontend sends the right request, and the same goes for the sorting.
|
I have created a issue for these, as making that available is not trivial. Maybe the sorting button could be hidden in these columns in the UI in the meantime? |
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 a lot for the fixes!
I still found inconsistencies in the copy, so I went through all the files and commented suggestions so it's easier to track an update. I suggested to go with Data Node
/Data Nodes
, using it as a term/own name.
❌ Entries can be sorted by "Status"
❌ Entries can be sorted by " Certificate valid until"I have created a issue for these, as making that available is not trivial. Maybe the sorting button could be hidden in these columns in the UI in the meantime?
I think this is a good idea, so we don't merge something broken.
I retested the other cases and they look fine now! However, I added to more cases which I think should be adjusted.
Test results
✅ Entries can be searched by "Name"
✅ When confirming rejoining the status does not change further and stays "Unconfigured", however in preflight mode nothing else can be configured for this Data Node
✅ When removing a rejoined Data Node which is stuck on "Unconfigured" it shows a success message, but the status does not change
✅ The search syntax help shows information about searchable fields in this list -> Shows fields that are not in the list, like id, description
✅ The action "Stop" should only be shown for running data nodes
✅ The action "Start" should only be shown for stopped data nodes
✅ The confirmation modal for "Rejoin" talks about resetting the Data Node. The naming is not consistent and thus confusing. I'd suggest to change "reset" to "rejoin" in the modal.
❌ The action "Rejoin" should only be shown for removed data nodes
❌ The action "Remove" should only be for data nodes that are not already removed
|
||
const DIALOG_TEXT = { | ||
[DIALOG_TYPES.REJOIN]: { | ||
dialogTitle: 'Rejoin Datanode', |
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.
dialogTitle: 'Rejoin Datanode', | |
dialogTitle: 'Rejoin Data Node', |
const DIALOG_TEXT = { | ||
[DIALOG_TYPES.REJOIN]: { | ||
dialogTitle: 'Rejoin Datanode', | ||
dialogBody: (datanode: string) => `Are you sure you want to rejoin datanode "${datanode}"?`, |
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.
dialogBody: (datanode: string) => `Are you sure you want to rejoin datanode "${datanode}"?`, | |
dialogBody: (datanode: string) => `Are you sure you want to rejoin Data Node "${datanode}"?`, |
dialogBody: (datanode: string) => `Are you sure you want to rejoin datanode "${datanode}"?`, | ||
}, | ||
[DIALOG_TYPES.REMOVE]: { | ||
dialogTitle: 'Remove datanode', |
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.
dialogTitle: 'Remove datanode', | |
dialogTitle: 'Remove Data Node', |
}, | ||
[DIALOG_TYPES.REMOVE]: { | ||
dialogTitle: 'Remove datanode', | ||
dialogBody: (datanode: string) => `Are you sure you want to remove datanode "${datanode}"?`, |
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.
dialogBody: (datanode: string) => `Are you sure you want to remove datanode "${datanode}"?`, | |
dialogBody: (datanode: string) => `Are you sure you want to remove Data Node "${datanode}"?`, |
dialogBody: (datanode: string) => `Are you sure you want to remove datanode "${datanode}"?`, | ||
}, | ||
[DIALOG_TYPES.STOP]: { | ||
dialogTitle: 'Stop datanode', |
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.
dialogTitle: 'Stop datanode', | |
dialogTitle: 'Stop Data Node', |
<DataNodesPageNavigation /> | ||
<PageHeader title="Data nodes Migration" | ||
documentationLink={{ | ||
title: 'Data nodes documentation', |
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.
title: 'Data nodes documentation', | |
title: 'Data Nodes documentation', |
path: DocsHelper.PAGES.GRAYLOG_DATA_NODE, | ||
}}> | ||
<span> | ||
Graylog data nodes offer a better integration with Graylog and simplify future updates. They allow you to index and search through all the messages in your Graylog message database. |
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.
Graylog data nodes offer a better integration with Graylog and simplify future updates. They allow you to index and search through all the messages in your Graylog message database. | |
Graylog Data Nodes offer a better integration with Graylog and simplify future updates. They allow you to index and search through all the messages in your Graylog message database. |
|
||
const DataNodesPage = () => ( | ||
<DocumentTitle title="Data Nodes"> | ||
<DataNodesPageNavigation /> | ||
<PageHeader title="Data Nodes" | ||
documentationLink={{ | ||
title: 'Data Nodes documentation', |
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.
Spelling already correct.
|
||
const DataNodesPage = () => ( | ||
<DocumentTitle title="Data Nodes"> | ||
<DataNodesPageNavigation /> | ||
<PageHeader title="Data Nodes" |
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.
Spelling already correct.
{ title: 'Overview', path: Routes.SYSTEM.DATANODES.OVERVIEW, exactPathMatch: true }, | ||
{ title: 'Monitoring & Management', path: Routes.SYSTEM.DATANODES.OVERVIEW }, | ||
{ title: 'Migrations', path: Routes.SYSTEM.DATANODES.OVERVIEW }, | ||
{ title: 'Data Nodes', path: Routes.SYSTEM.DATANODES.LIST, exactPathMatch: true }, |
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.
Spelling already correct.
cabbf59
to
654c1a1
Compare
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.
Two more places for the spelling. I will just commit those suggestions, that will make it easier :)
Also It would be good if we can still "fix":
❌ The action "Rejoin" should only be shown for removed data nodes
❌ The action "Remove" should only be for data nodes that are not already removed
graylog2-web-interface/src/components/datanode/DataNodeList/DataNodeActions.tsx
Outdated
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.
Looking great! Thanks a lot!
✅ The action “Rejoin” should only be shown for removed data nodes
✅ The action “Remove” should only be for data nodes that are not already removed
Co-authored-by: Gary Bot <[email protected]>
…taNodeActions.tsx
ff140f9
to
c9db05f
Compare
Motivation and Context
fixes #17159
/nocl
Types of changes
Checklist: