1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-01 22:25:15 +01:00

Display docker version (#5989)

This commit is contained in:
Joakim Sørensen
2020-06-18 11:54:21 +02:00
committed by GitHub
parent 5cbffb23fd
commit 16c604937e
6 changed files with 54 additions and 3 deletions

View File

@@ -4,6 +4,20 @@ import { hassioApiResultExtractor, HassioResponse } from "./common";
export type HassioHomeAssistantInfo = any;
export type HassioSupervisorInfo = any;
export type HassioInfo = {
arch: string;
channel: string;
docker: string;
hassos?: string;
homeassistant: string;
hostname: string;
logging: string;
maching: string;
supervisor: string;
supported_arch: string[];
timezone: string;
};
export type HassioPanelInfo = PanelInfo<
| undefined
| {
@@ -38,6 +52,12 @@ export const fetchHassioSupervisorInfo = async (hass: HomeAssistant) => {
);
};
export const fetchHassioInfo = async (hass: HomeAssistant) => {
return hassioApiResultExtractor(
await hass.callApi<HassioResponse<HassioInfo>>("GET", "hassio/info")
);
};
export const fetchHassioLogs = async (
hass: HomeAssistant,
provider: string