Fix: regression list_machines. Split into multiple functions
list_inventory_machines, list_nixos_machine, list_sops_machines The caller of the function should specify which machines they wants to see
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { createSignal, Match, Show, Switch } from "solid-js";
|
||||
import { ErrorData, pyApi, SuccessData } from "../api";
|
||||
|
||||
type MachineDetails = SuccessData<"list_machines">["data"][string];
|
||||
type MachineDetails = SuccessData<"list_inventory_machines">["data"][string];
|
||||
|
||||
interface MachineListItemProps {
|
||||
name: string;
|
||||
|
||||
@@ -23,7 +23,7 @@ import { MachineListItem } from "@/src/components/MachineListItem";
|
||||
// >["data"]["services"];
|
||||
|
||||
type MachinesModel = Extract<
|
||||
OperationResponse<"list_machines">,
|
||||
OperationResponse<"list_inventory_machines">,
|
||||
{ status: "success" }
|
||||
>["data"];
|
||||
|
||||
@@ -63,7 +63,7 @@ export const MachineListView: Component = () => {
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
const response = await callApi("list_machines", {
|
||||
const response = await callApi("list_inventory_machines", {
|
||||
flake_url: uri,
|
||||
});
|
||||
setLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user