api: rename 'show_mdns' -> 'list_mdns_services'
This commit is contained in:
@@ -4,7 +4,7 @@ import { Button } from "../../components/Button/Button";
|
||||
import Icon from "@/src/components/icon";
|
||||
|
||||
type ServiceModel = Extract<
|
||||
OperationResponse<"show_mdns">,
|
||||
OperationResponse<"list_mdns_services">,
|
||||
{ status: "success" }
|
||||
>["data"]["services"];
|
||||
|
||||
@@ -16,7 +16,7 @@ export const HostList: Component = () => {
|
||||
<div class="" data-tip="Refresh install targets">
|
||||
<Button
|
||||
variant="light"
|
||||
onClick={() => callApi("show_mdns", {})}
|
||||
onClick={() => callApi("list_mdns_services", {})}
|
||||
startIcon={<Icon icon="Update" />}
|
||||
></Button>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Button } from "../../components/Button/Button";
|
||||
import Icon from "@/src/components/icon";
|
||||
|
||||
type ServiceModel = Extract<
|
||||
OperationResponse<"show_mdns">,
|
||||
OperationResponse<"list_mdns_services">,
|
||||
{ status: "success" }
|
||||
>["data"]["services"];
|
||||
|
||||
@@ -16,7 +16,7 @@ export const HostList: Component = () => {
|
||||
<div class="" data-tip="Refresh install targets">
|
||||
<Button
|
||||
variant="light"
|
||||
onClick={() => callApi("show_mdns", {})}
|
||||
onClick={() => callApi("list_mdns_services", {})}
|
||||
startIcon={<Icon icon="Update" />}
|
||||
></Button>
|
||||
</div>
|
||||
|
||||
@@ -88,7 +88,7 @@ def parse_avahi_output(output: str) -> DNSInfo:
|
||||
|
||||
|
||||
@API.register
|
||||
def show_mdns() -> DNSInfo:
|
||||
def list_mdns_services() -> DNSInfo:
|
||||
cmd = nix_shell(
|
||||
["avahi"],
|
||||
[
|
||||
@@ -107,7 +107,7 @@ def show_mdns() -> DNSInfo:
|
||||
|
||||
|
||||
def mdns_command(args: argparse.Namespace) -> None:
|
||||
dns_info = show_mdns()
|
||||
dns_info = list_mdns_services()
|
||||
for name, info in dns_info.services.items():
|
||||
print(f"Hostname: {name} - ip: {info.ip}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user