mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 06:09:17 +00:00
refactor: format compose deployment plan with style, display target context
This commit is contained in:
1 parent
68661e57c3
commit
0f4c211002
8 files changed
+399
-61
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/docker/docker/api/types/volume"
|
||||
"github.com/psviderski/uncloud/internal/cli/tui"
|
||||
"github.com/psviderski/uncloud/pkg/api"
|
||||
)
|
||||
|
||||
@@ -40,7 +41,11 @@ func (o *CreateVolumeOperation) Execute(ctx context.Context, cli Client) error {
|
||||
}
|
||||
|
||||
func (o *CreateVolumeOperation) Format(_ NameResolver) string {
|
||||
return fmt.Sprintf("%s: Create volume [name=%s]", o.MachineName, o.VolumeSpec.DockerVolumeName())
|
||||
return fmt.Sprintf("%s create volume %s %s %s",
|
||||
tui.BoldGreen.Render("+"),
|
||||
tui.NameStyle.Render(o.VolumeSpec.DockerVolumeName()),
|
||||
tui.Faint.Render("on"),
|
||||
o.MachineName)
|
||||
}
|
||||
|
||||
func (o *CreateVolumeOperation) String() string {
|
||||
|
||||
Reference in new issue
Block a user