Skip to content

Colorize patchset #14621

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

Closed
wants to merge 3 commits into from
Closed

Colorize patchset #14621

wants to merge 3 commits into from

Conversation

mcmilk
Copy link
Contributor

@mcmilk mcmilk commented Mar 14, 2023

Motivation and Context

This is just a rebase of these two pull requests:

The requested changes by @behlendorf and @Low-power (light blue) were added.
When the testings are fine, the changes could be applied.

I will not copy and paste the wordings of the two requests... this PR is just a sum up of the conversation of the other two pull requests.

@ethan-coe-renner - thank you, for working on this.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@Low-power
Copy link
Contributor

#define ANSI_BLUE "\033[1;34m" /* light blue */

I think the difference in this color code should be reflected in its name; may be ANSI_BRIGHT_BLUE?

@mcmilk
Copy link
Contributor Author

mcmilk commented Mar 14, 2023

ANSI_BRIGHT_BLUE

I also thought about that, but we will not need the standard blue for anything ... so i decided to keep the ANSI_BLUE define, but with the wanted brighter color. I could just rename it and delete the standard blue define. This ANSI_BLUE color is also used by the zfs diff code - there the brighter blue is also better I think.

@Low-power
Copy link
Contributor

Yes, we definitely want the blue in zfs diff to be brighter, and so more readable too.

@mcmilk mcmilk force-pushed the colorize-patchset branch from 493d48c to ec070d4 Compare March 14, 2023 08:33
@mcmilk
Copy link
Contributor Author

mcmilk commented Mar 14, 2023

We have two BLUE definitions now:

  1. BOLD_BLUE - used as primary blue
  2. ANSI_BLUE - currently unused

@Low-power - this should be fine I think :-)

@Low-power
Copy link
Contributor

BOLD_BLUE - used as primary blue

Why not ANSI_BOLD_BLUE? I think this is an ANSI color too.

@mcmilk
Copy link
Contributor Author

mcmilk commented Mar 14, 2023

BOLD_BLUE - used as primary blue

Why not ANSI_BOLD_BLUE? I think this is an ANSI color too.

I have no preference with this. I can change it to some longer value like ANSI_BOLD_BLUE. But I found BOLD_BLUE okay.

mcmilk added 3 commits March 14, 2023 23:22
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes: openzfs#14459
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes: openzfs#14350
@mcmilk mcmilk force-pushed the colorize-patchset branch from 1b6a1bb to d701643 Compare March 14, 2023 22:22
@mcmilk
Copy link
Contributor Author

mcmilk commented Mar 14, 2023

BOLD_BLUE - used as primary blue

Why not ANSI_BOLD_BLUE? I think this is an ANSI color too.

@Low-power: BOLD_BLUE -> ANSI_BOLD_BLUE is DONE :)

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Mar 14, 2023
Copy link
Contributor

@Low-power Low-power left a comment

Choose a reason for hiding this comment

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

Tested on my system, without issue.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Mar 17, 2023
@ethan-coe-renner
Copy link
Contributor

@mcmilk , thanks for making these changes!

behlendorf pushed a commit that referenced this pull request Mar 24, 2023
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes #14621
Closes #14459
behlendorf pushed a commit that referenced this pull request Mar 24, 2023
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes #14621
Closes #14350
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Mar 26, 2023
Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Mar 26, 2023
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14459
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Mar 26, 2023
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14350
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Mar 26, 2023
Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Mar 26, 2023
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14459
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Mar 26, 2023
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14350
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Mar 28, 2023
Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Mar 28, 2023
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14459
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Mar 28, 2023
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14350
@mcmilk mcmilk deleted the colorize-patchset branch March 31, 2023 07:28
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Apr 5, 2023
Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Apr 5, 2023
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14459
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Apr 5, 2023
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14350
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this pull request Sep 26, 2023
Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this pull request Sep 26, 2023
Use a bold header and colorize the space suffixes in iostat
by order of magnitude like this:
- K is green
- M is yellow
- G is red
- T is lightblue
- P is magenta
- E is cyan
- 0 space is colored gray

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14459
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this pull request Sep 26, 2023
Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ethan Coe-Renner <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes openzfs#14621
Closes openzfs#14350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants