Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions arm_cli/container/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ def attach_container(ctx):
message="Select a container to attach to",
choices=[f"{container.name} ({container.id[:12]})" for container in containers],
carousel=True,
page_size=get_setting("menu_page_size"),
)
]

answers = inquirer.prompt(container_choices)
if not answers:
print("No container selected.")
return

selected_container_name = answers["container"].split(" ")[0] # Extract name

print(f"Attaching to {selected_container_name}...")
Expand Down Expand Up @@ -85,7 +88,6 @@ def restart_container(ctx):
message="Select a container to restart",
choices=[f"{container.name} ({container.id[:12]})" for container in containers],
carousel=True,
page_size=get_setting("menu_page_size"),
)
]

Expand Down Expand Up @@ -126,7 +128,6 @@ def stop_container(ctx):
message="Select a container to stop",
choices=[f"{container.name} ({container.id[:12]})" for container in containers],
carousel=True,
page_size=get_setting("menu_page_size"),
)
]

Expand Down
1 change: 0 additions & 1 deletion arm_cli/projects/activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def _activate(ctx, project: Optional[str] = None):
message="Select a project to activate",
choices=choices,
carousel=True,
page_size=get_setting("menu_page_size"),
)
]

Expand Down
1 change: 0 additions & 1 deletion arm_cli/projects/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def _init(ctx, project_path: str, name: Optional[str] = None):
message=f"Select a configuration file from {project_dir.name} or use default",
choices=choices,
carousel=True,
page_size=get_setting("menu_page_size"),
)
]

Expand Down
1 change: 0 additions & 1 deletion arm_cli/projects/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def _remove(ctx, project: Optional[str] = None):
message="Select a project to remove",
choices=choices,
carousel=True,
page_size=get_setting("menu_page_size"),
)
]

Expand Down
3 changes: 3 additions & 0 deletions arm_cli/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
class Settings(BaseModel):
"""Settings schema for the CLI."""

# Note: menu_page_size is currently not used due to inquirer 3.4.0 not supporting
# the page_size parameter in List questions. This setting is kept for potential
# future use if we switch to a different interactive library.
menu_page_size: int = 20
global_context_path: str = "global_context.json"
cdc_path: str = "~/code"
Expand Down
1 change: 1 addition & 0 deletions feature_roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Probably mostly in order
5) Deployment tools - possibly using ansible or maybe save that for later
6) Connect to container registries for skill install
7) More comprehensive documentation of intent
8) Explore alternative interactive CLI libraries (e.g., questionary) for better page size control in menus

These are probably not all-encompassing, but it's what I am thinking about right now.

Expand Down