Skip to content
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

Merged
merged 53 commits into from
Dec 21, 2023
Merged

Datanode List Page UI #17161

merged 53 commits into from
Dec 21, 2023

Conversation

gally47
Copy link
Contributor

@gally47 gally47 commented Nov 2, 2023

Motivation and Context

fixes #17159

/nocl

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@gally47 gally47 self-assigned this Nov 9, 2023
@ousmaneo ousmaneo force-pushed the datanode-list-page branch 3 times, most recently from c20249e to e37a853 Compare December 1, 2023 15:14
@ousmaneo ousmaneo changed the base branch from master to feature/17383-datanode-lifecycle-validations December 1, 2023 15:15
Base automatically changed from feature/17383-datanode-lifecycle-validations to master December 5, 2023 11:16
@ousmaneo ousmaneo requested a review from grotlue December 11, 2023 13:10
Copy link
Contributor

@grotlue grotlue left a 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
⚠️ 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.
✅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"

Copy link
Contributor

@grotlue grotlue left a 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.

() => fetchDataNodes(params),
{
onError: (errorThrown) => {
UserNotification.error(`Loading datanodes failed with status: ${errorThrown}`,
Copy link
Contributor

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.

graylog2-web-interface/src/pages/DataNodesClusterPage.tsx Outdated Show resolved Hide resolved
@ousmaneo
Copy link
Contributor

ousmaneo commented Dec 19, 2023

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.
Hi @moesterheld can you help with this?

❌ Entries can be sorted by "Status"
❌ Entries can be sorted by " Certificate valid until"
❌ 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 searched by "Name"

@moesterheld
Copy link
Contributor

❌ 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?

Copy link
Contributor

@grotlue grotlue left a 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',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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}"?`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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}"?`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
dialogTitle: 'Stop datanode',
dialogTitle: 'Stop Data Node',

<DataNodesPageNavigation />
<PageHeader title="Data nodes Migration"
documentationLink={{
title: 'Data nodes documentation',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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',
Copy link
Contributor

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"
Copy link
Contributor

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 },
Copy link
Contributor

Choose a reason for hiding this comment

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

Spelling already correct.

@ousmaneo ousmaneo requested a review from grotlue December 20, 2023 08:13
Copy link
Contributor

@grotlue grotlue left a 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

@ousmaneo ousmaneo requested a review from grotlue December 20, 2023 12:03
Copy link
Contributor

@grotlue grotlue left a 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

@ousmaneo ousmaneo merged commit f0a9ca2 into master Dec 21, 2023
6 checks passed
@ousmaneo ousmaneo deleted the datanode-list-page branch December 21, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Node List Page UI
4 participants