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
38 changes: 13 additions & 25 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/lib/Quote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function QuoteDisplay(props: { quote: Quote }) {

return (
<Box flexDirection="column" paddingBottom={1}>
<Row headWidth={10} head="zone" value={props.quote.zone ?? "N/A"} />
<Row
headWidth={10}
head="rate"
Expand All @@ -42,12 +43,14 @@ export type Quote =
start_at: string;
end_at: string;
instance_type: string;
zone?: string;
}
| {
price: number;
quantity: number;
start_at: string;
end_at: string;
contract_id: string;
zone?: string;
}
| null;
5 changes: 5 additions & 0 deletions src/lib/contracts/ContractDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ export function ContractDisplay(props: { contract: Contract }) {
)}
</Box>
</Box>
<Row
headWidth={COLUMN_WIDTH}
head="Zone"
value={props.contract.zone ?? "N/A"}
/>
{props.contract.colocate_with.length > 0 && (
<Row
headWidth={COLUMN_WIDTH}
Expand Down
1 change: 1 addition & 0 deletions src/lib/contracts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface ActiveContract extends BaseContract {
};
colocate_with: string[];
cluster_id?: string;
zone?: string;
}

export type Contract = PendingContract | ActiveContract;
1 change: 1 addition & 0 deletions src/lib/nodes/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ async function createNodesAction(
}/node/hr`;
if ("zone" in quote) {
confirmationMessage += ` on ${cyan(quote.zone)}`;
createParams.zone ||= quote.zone;
}
} else {
logAndQuit(
Expand Down
1 change: 1 addition & 0 deletions src/lib/orders/OrderDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function Order(props: { order: HydratedOrder }) {
props.order.quantity * GPUS_PER_NODE
} gpus)`}
/>
<Row headWidth={7} head="zone" value={props.order.cluster ?? "N/A"} />
<Row
headWidth={7}
head="price"
Expand Down
3 changes: 2 additions & 1 deletion src/lib/orders/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export function registerOrders(program: Command) {
),
)
.option("-t, --type <type>", "Filter by instance type")
.option("-v, --verbose", "Show verbose output")
.addOption(
new Option(
"--public",
Expand Down Expand Up @@ -233,7 +234,7 @@ export function registerOrders(program: Command) {
console.log(JSON.stringify(sortedOrders, null, 2));
} else {
const { waitUntilExit } = render(
<OrderDisplay orders={sortedOrders} />,
<OrderDisplay orders={sortedOrders} expanded={options.verbose} />,
);
await waitUntilExit();
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/orders/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface HydratedOrder {
execution_price?: number;
cancelled: boolean;
status: OrderStatus;
cluster?: string;
}

export type PlaceSellOrderParameters = {
Expand Down