Feature/dataset info improvements - #119
Merged
Merged
Conversation
…yption properties in DatasetInfo
… creation date in DatasetInfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request significantly refactors and enhances the dataset info UI and related dataset property accessors. The main improvements are a more compact, color-coded, and readable display for dataset properties, and a major simplification and unification of property retrieval logic in the
Datasetmodel. There are also improvements to color handling for file and snapshot browser tables to ensure consistent status highlighting.Key changes:
UI Enhancements for Dataset Info:
tview.TextViewinstead of a table, allowing for colorized, aligned, and more compact output. Property keys and values are color-coded for readability, and special states (like "readonly" or missing keys) are visually highlighted. Helper functions for color formatting and value-based color resolution have been added to support this. [1] [2] [3] [4]Dataset Property Accessor Refactor:
internal/zfs/dataset.gohave been refactored to use new helper methods (getPropertyString,getPropertyInt,getPropertyUint64). This unifies property retrieval between the two ZFS backends and reduces code duplication.time.Timeobject for proper formatting in the UI.File and Snapshot Browser Table Improvements:
General Improvements:
These changes collectively modernize the dataset info UI, improve maintainability, and enhance the user experience with clearer and more informative displays.
dataset_info.go): [1] [2] [3] [4]dataset_info.go):dataset.go): [1] [2]