mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 03:16:22 -05:00
Displaying plug icon when API fails to respond. Using window.apiDown to communicate to other hooks to stop fetching, the status interval will keep checking if the API is back up.
This commit is contained in:
parent
e7415873a5
commit
01338e4d89
7 changed files with 76 additions and 21 deletions
|
|
@ -178,7 +178,16 @@ export function NavBar() {
|
|||
<Icon loading name='circle notch' size='large'/>
|
||||
</Link>;
|
||||
|
||||
let apiDownIcon;
|
||||
if (window.apiDown) {
|
||||
apiDownIcon = <Popup
|
||||
content='API is not responding'
|
||||
trigger={<Icon name='plug'/>}
|
||||
/>
|
||||
}
|
||||
|
||||
const icons = <React.Fragment>
|
||||
<NavIconWrapper>{apiDownIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{processingIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{powerIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{warningIcon}</NavIconWrapper>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue