Skip to content

Commit

Permalink
Show group info in storage list
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Oct 6, 2021
1 parent 768ce86 commit aa31895
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
9 changes: 8 additions & 1 deletion cmd/lotus-miner/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,17 @@ var storageListCmd = &cli.Command{
if si.CanStore {
fmt.Print(color.CyanString("Store"))
}
fmt.Println("")
} else {
fmt.Print(color.HiYellowString("Use: ReadOnly"))
}
fmt.Println()

if len(si.Groups) > 0 {
fmt.Printf("\tGroups: %s\n", strings.Join(si.Groups, ", "))
}
if len(si.AllowTo) > 0 {
fmt.Printf("\tAllowTo: %s\n", strings.Join(si.AllowTo, ", "))
}

if localPath, ok := local[s.ID]; ok {
fmt.Printf("\tLocal: %s\n", color.GreenString(localPath))
Expand Down
8 changes: 6 additions & 2 deletions documentation/en/api-v0-methods-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,9 @@ Inputs:
"Weight": 42,
"MaxStorage": 42,
"CanSeal": true,
"CanStore": true
"CanStore": true,
"Groups": null,
"AllowTo": null
},
{
"Capacity": 9,
Expand Down Expand Up @@ -2241,7 +2243,9 @@ Response:
"Weight": 42,
"MaxStorage": 42,
"CanSeal": true,
"CanStore": true
"CanStore": true,
"Groups": null,
"AllowTo": null
}
```

Expand Down

0 comments on commit aa31895

Please sign in to comment.