Skip to content

Commit

Permalink
add instances list
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaque committed Oct 24, 2024
1 parent 72d50a6 commit 68e5e6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ interface InstanceObject {
private_ip: string;
status: string;
ssh_port: number | undefined;
can_connect: boolean;
}

async function listInstancesAction({
clusterId,
returnJson,
Expand All @@ -64,6 +64,7 @@ async function listInstancesAction({
chalk.gray("IP Address"),
chalk.gray("SSH Port"),
chalk.gray("Status"),
chalk.gray("Can SSH"),
];

if (instances.length === 0) {
Expand All @@ -89,6 +90,7 @@ async function listInstancesAction({
instance.public_ip,
instance.ssh_port,
instance.status,
instance.can_connect ? "Yes" : "No",
]),
);
console.log(
Expand Down Expand Up @@ -197,5 +199,6 @@ export async function getInstances({
private_ip: instance.private_ip,
status: instance.status,
ssh_port: instance.ssh_port,
can_connect: instance.can_connect,
}));
}

0 comments on commit 68e5e6c

Please sign in to comment.