forked from TrueCloudLab/frostfs-node
[#1223] lens/tui: Add metabase schema
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
b9043433a0
commit
1ae86f35a8
18 changed files with 1381 additions and 1 deletions
48
cmd/frostfs-lens/internal/schema/metabase/buckets/string.go
Normal file
48
cmd/frostfs-lens/internal/schema/metabase/buckets/string.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
package buckets
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-lens/internal/schema/common"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
func (b *PrefixBucket) String() string {
|
||||
return common.FormatSimple(
|
||||
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLime,
|
||||
)
|
||||
}
|
||||
|
||||
func (b *PrefixContainerBucket) String() string {
|
||||
return fmt.Sprintf(
|
||||
"%s CID %s",
|
||||
common.FormatSimple(
|
||||
fmt.Sprintf("(%2d %-18s)", b.prefix, b.prefix), tcell.ColorLime,
|
||||
),
|
||||
common.FormatSimple(b.id.String(), tcell.ColorAqua),
|
||||
)
|
||||
}
|
||||
|
||||
func (b *UserBucket) String() string {
|
||||
return "UID " + common.FormatSimple(b.id.String(), tcell.ColorAqua)
|
||||
}
|
||||
|
||||
func (b *ContainerBucket) String() string {
|
||||
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.ColorLime,
|
||||
),
|
||||
common.FormatSimple(
|
||||
fmt.Sprintf("%-44s", b.id), tcell.ColorAqua,
|
||||
),
|
||||
common.FormatSimple(b.key, tcell.ColorAqua),
|
||||
)
|
||||
}
|
||||
|
||||
func (b *UserAttributeValueBucket) String() string {
|
||||
return "ATTR-VALUE " + common.FormatSimple(b.value, tcell.ColorAqua)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue