mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Add ability to auto open system health with params (#13303)
* Add ability to auto open system health with params * Update my link * Update url when opening dialog * comment
This commit is contained in:
parent
ecc1bf5206
commit
cfdf043444
@ -6,6 +6,8 @@ import { customElement, property, state } from "lit/decorators";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
||||
import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
|
||||
import { navigate } from "../../../common/navigate";
|
||||
import { extractSearchParam } from "../../../common/url/search-params";
|
||||
import "../../../components/ha-card";
|
||||
import "../../../components/ha-check-list-item";
|
||||
import {
|
||||
@ -37,6 +39,17 @@ class HaConfigRepairsDashboard extends SubscribeMixin(LitElement) {
|
||||
: repairsIssues.filter((issue) => !issue.ignored)
|
||||
);
|
||||
|
||||
public connectedCallback(): void {
|
||||
super.connectedCallback();
|
||||
|
||||
const searchParam = extractSearchParam("dialog");
|
||||
|
||||
if (searchParam === "system-health") {
|
||||
navigate("/config/repairs", { replace: true });
|
||||
showSystemInformationDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
public hassSubscribe(): UnsubscribeFunc[] {
|
||||
return [
|
||||
subscribeRepairsIssueRegistry(this.hass.connection!, (repairs) => {
|
||||
|
@ -157,7 +157,7 @@ export const getMyRedirects = (hasSupervisor: boolean): Redirects => ({
|
||||
redirect: "/config/info",
|
||||
},
|
||||
system_health: {
|
||||
redirect: "/config/system_health",
|
||||
redirect: "/config/repairs?dialog=system-health",
|
||||
},
|
||||
hardware: {
|
||||
redirect: "/config/hardware",
|
||||
|
Loading…
x
Reference in New Issue
Block a user