[#1223] lens/tui: Change color schema

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
Aleksey Savchuk 2024-08-14 23:33:54 +03:00
parent 836e158c74
commit 79050140c6
No known key found for this signature in database
2 changed files with 27 additions and 27 deletions

View file

@ -10,25 +10,25 @@ import (
func (r *GraveyardRecord) String() string {
return fmt.Sprintf(
"Object CID %s OID %s | Tombstone CID %s OID %s",
common.FormatSimple(fmt.Sprintf("%-44s", r.object.Container()), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.object.Object()), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.tombstone.Container()), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.tombstone.Object()), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.object.Container()), tcell.ColorAqua),
common.FormatSimple(fmt.Sprintf("%-44s", r.object.Object()), tcell.ColorAqua),
common.FormatSimple(fmt.Sprintf("%-44s", r.tombstone.Container()), tcell.ColorAqua),
common.FormatSimple(fmt.Sprintf("%-44s", r.tombstone.Object()), tcell.ColorAqua),
)
}
func (r *GarbageRecord) String() string {
return fmt.Sprintf(
"CID %-44s OID %-44s",
common.FormatSimple(fmt.Sprintf("%-44s", r.addr.Container()), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.addr.Object()), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.addr.Container()), tcell.ColorAqua),
common.FormatSimple(fmt.Sprintf("%-44s", r.addr.Object()), tcell.ColorAqua),
)
}
func (r *ContainerVolumeRecord) String() string {
return fmt.Sprintf(
"CID %-44s | %d",
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
r.volume,
)
}
@ -36,7 +36,7 @@ func (r *ContainerVolumeRecord) String() string {
func (r *LockedRecord) String() string {
return fmt.Sprintf(
"Locker OID %s | Locked [%d]OID {...}",
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
len(r.ids),
)
}
@ -48,13 +48,13 @@ func (r *ShardInfoRecord) String() string {
func (r *ObjectRecord) String() string {
return fmt.Sprintf(
"OID %s | Object {...}",
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
)
}
func (r *SmallRecord) String() string {
s := fmt.Sprintf(
"OID %s |", common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
"OID %s |", common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
)
if r.storageID != nil {
s = fmt.Sprintf("%s %s", s, *r.storageID)
@ -64,7 +64,7 @@ func (r *SmallRecord) String() string {
func (r *RootRecord) String() string {
s := fmt.Sprintf(
"Root OID %s |", common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
"Root OID %s |", common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
)
if r.info != nil {
s += " Split info {...}"
@ -73,17 +73,17 @@ func (r *RootRecord) String() string {
}
func (r *OwnerRecord) String() string {
return "OID " + common.FormatSimple(r.id.String(), tcell.ColorBlue)
return "OID " + common.FormatSimple(r.id.String(), tcell.ColorAqua)
}
func (r *UserAttributeRecord) String() string {
return "OID " + common.FormatSimple(r.id.String(), tcell.ColorBlue)
return "OID " + common.FormatSimple(r.id.String(), tcell.ColorAqua)
}
func (r *PayloadHashRecord) String() string {
return fmt.Sprintf(
"Checksum %s | [%d]OID {...}",
common.FormatSimple(r.checksum.String(), tcell.ColorBlue),
common.FormatSimple(r.checksum.String(), tcell.ColorAqua),
len(r.ids),
)
}
@ -91,7 +91,7 @@ func (r *PayloadHashRecord) String() string {
func (r *ParentRecord) String() string {
return fmt.Sprintf(
"Parent OID %s | [%d]OID {...}",
common.FormatSimple(fmt.Sprintf("%-44s", r.parent), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.parent), tcell.ColorAqua),
len(r.ids),
)
}
@ -99,7 +99,7 @@ func (r *ParentRecord) String() string {
func (r *SplitRecord) String() string {
return fmt.Sprintf(
"Split ID %s | [%d]OID {...}",
common.FormatSimple(r.id.String(), tcell.ColorBlue),
common.FormatSimple(r.id.String(), tcell.ColorAqua),
len(r.ids),
)
}
@ -107,7 +107,7 @@ func (r *SplitRecord) String() string {
func (r *ContainerCountersRecord) String() string {
return fmt.Sprintf(
"CID %-44s | logical %d, physical %d, user %d",
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
r.logical, r.physical, r.user,
)
}
@ -115,7 +115,7 @@ func (r *ContainerCountersRecord) String() string {
func (r *ECInfoRecord) String() string {
return fmt.Sprintf(
"OID [blue]%-44s[white] | [%d]OID {...}",
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorBlue),
common.FormatSimple(fmt.Sprintf("%-44s", r.id), tcell.ColorAqua),
len(r.ids),
)
}

View file

@ -9,7 +9,7 @@ import (
func (b *PrefixBucket) String() string {
return common.FormatSimple(
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLightGreen,
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLime,
)
}
@ -17,32 +17,32 @@ func (b *PrefixContainerBucket) String() string {
return fmt.Sprintf(
"%s CID %s",
common.FormatSimple(
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLightGreen,
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLime,
),
common.FormatSimple(b.id.String(), tcell.ColorBlue),
common.FormatSimple(b.id.String(), tcell.ColorAqua),
)
}
func (b *UserBucket) String() string {
return "UID " + common.FormatSimple(b.id.String(), tcell.ColorBlue)
return "UID " + common.FormatSimple(b.id.String(), tcell.ColorAqua)
}
func (b *ContainerBucket) String() string {
return "CID " + common.FormatSimple(b.id.String(), tcell.ColorBlue)
return "CID " + common.FormatSimple(b.id.String(), tcell.ColorAqua)
}
func (b *UserAttributeKeyBucket) String() string {
return fmt.Sprintf("%s CID %s ATTR-KEY %s",
common.FormatSimple(
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLightGreen,
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLime,
),
common.FormatSimple(
fmt.Sprintf("%-44s", b.id), tcell.ColorBlue,
fmt.Sprintf("%-44s", b.id), tcell.ColorAqua,
),
common.FormatSimple(b.key, tcell.ColorBlue),
common.FormatSimple(b.key, tcell.ColorAqua),
)
}
func (b *UserAttributeValueBucket) String() string {
return "ATTR-VALUE " + common.FormatSimple(b.value, tcell.ColorBlue)
return "ATTR-VALUE " + common.FormatSimple(b.value, tcell.ColorAqua)
}