|
20 | 20 | find_marin_root, |
21 | 21 | get_git_sha, |
22 | 22 | ) |
23 | | -from iris.cli.main import IRIS_CLUSTER_CONFIG_DIRS, require_controller_url, rpc_client |
| 23 | +from iris.cli.main import IRIS_CLUSTER_CONFIG_DIRS, dashboard_url, require_controller_url, rpc_client |
24 | 24 | from iris.cluster.config import IrisConfig, clear_remote_state, make_local_config |
25 | 25 | from iris.cluster.controller.autoscaler.scaling_group import ( |
26 | 26 | build_worker_config_for_group, |
@@ -267,11 +267,13 @@ def cluster_start(ctx, local: bool, fresh: bool): |
267 | 267 | cluster = LocalCluster(config) |
268 | 268 | address = cluster.start() |
269 | 269 | click.echo(f"Controller started at {address}") |
| 270 | + title_url = dashboard_url(address, ctx.obj.get("cluster_name")) |
270 | 271 | token = cluster.auto_login_token |
271 | 272 | if token: |
272 | | - click.echo(f"Dashboard: {address}?session_token={token}") |
| 273 | + separator = "&" if "?" in title_url else "?" |
| 274 | + click.echo(f"Dashboard: {title_url}{separator}session_token={token}") |
273 | 275 | else: |
274 | | - click.echo(f"Dashboard: {address}") |
| 276 | + click.echo(f"Dashboard: {title_url}") |
275 | 277 | click.echo("\nController is running with integrated autoscaler.") |
276 | 278 | click.echo("Press Ctrl+C to stop.") |
277 | 279 | if threading.current_thread() is threading.main_thread(): |
@@ -567,7 +569,7 @@ def on_signal(sig, frame): |
567 | 569 | signal.signal(signal.SIGINT, on_signal) |
568 | 570 | signal.signal(signal.SIGTERM, on_signal) |
569 | 571 |
|
570 | | - click.echo(f"\nDashboard: {controller_url}") |
| 572 | + click.echo(f"\nDashboard: {dashboard_url(controller_url, ctx.obj.get('cluster_name'))}") |
571 | 573 | click.echo(f"Controller RPC: {controller_url}") |
572 | 574 | click.echo("\nPress Ctrl+C to close tunnel.") |
573 | 575 | stop.wait() |
|
0 commit comments