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

feat: Update node status text #1012

Conversation

PHChenGit
Copy link
Contributor

Issue: #1011

@yvanoers
Copy link
Collaborator

@PHChenGit
Thanks for your efforts!
The change looks sound by itself, but I'd prefer it if the frond end would be fed the names of the statuses by the backend. Reason for this is that the names of the statuses originate from the external Serf library and this way there's no duplication of externally defined names.
Should be doable in 3 or 4 lines of code in api.go and Dashboard.tsx.

Would you be willing to rework it like this?

@PHChenGit
Copy link
Contributor Author

Hi @yvanoers

Yes, I can do it.
I pushed some new code to this PR and I found the Serf library has status to string method.
I also hope to avoid to change the serf.member struct, so I add statusText to struct MId

After changed the code, the ui is looked like below. You can focus on the Status column
First, It's a screenshot before changed.
Screen Shot 2021-08-13 at 3 45 51 PM

And, It's a screenshot after changed.
Screen Shot 2021-08-13 at 4 19 35 PM

Copy link
Collaborator

@yvanoers yvanoers left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

Really neat, thanks!

@vcastellm vcastellm merged commit 5300781 into distribworks:master Aug 26, 2021
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.

3 participants