Add emergency message if backend is unavailable
This commit is contained in:
parent
fa96588948
commit
85e660423e
1 changed files with 18 additions and 0 deletions
|
@ -210,6 +210,24 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
|
|||
reloadGUI("periodic" + (new Date()).getTime().toString());
|
||||
}, 1000);
|
||||
|
||||
if (!usdplReady || !get_value(LIMITS_INFO)) {
|
||||
// Not translated on purpose (to avoid USDPL issues)
|
||||
return (
|
||||
<PanelSection>
|
||||
USDPL or PowerTools's backend did not start correctly!
|
||||
<ButtonItem
|
||||
layout="below"
|
||||
onClick={(_: MouseEvent) => {
|
||||
console.log("POWERTOOLS: manual reload after startup failure");
|
||||
reload();
|
||||
}}
|
||||
>
|
||||
Reload
|
||||
</ButtonItem>
|
||||
</PanelSection>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<PanelSection>
|
||||
<Cpus idc={idc}/>
|
||||
|
|
Loading…
Reference in a new issue