Skip to content

Commit

Permalink
make the settings table range column no more than 64 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
BohuTANG committed Mar 17, 2024
1 parent 8933dc7 commit 4737816
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/query/storages/system/src/settings_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ impl SyncSystemTable for SettingsTable {

// Range Value.
match item.range {
Some(range) => ranges.push(format!("{}", range)),
Some(range) => {
// If the string range is larger than 64, we only show the first 64 characters and add "...".
let range_str = format!("{}", range);
let suffix = if range_str.len() > 64 { "..." } else { "" };
ranges.push(format!("{}{}", range_str.chars().take(64).collect::<String>(), suffix));
}
None => ranges.push("None".to_string()),
}


// Scope level.
levels.push(format!("{:?}", item.level));

Expand Down

0 comments on commit 4737816

Please sign in to comment.