Merge branch 'develop' into pr/2434
This commit is contained in:
commit
abb043c1cc
1 changed files with 1 additions and 5 deletions
|
@ -41,7 +41,6 @@ const StatusIndicatorBox = styled(GreyRowBox)<{ $status: ServerPowerState | unde
|
||||||
|
|
||||||
export default ({ server, className }: { server: Server; className?: string }) => {
|
export default ({ server, className }: { server: Server; className?: string }) => {
|
||||||
const interval = useRef<number>(null);
|
const interval = useRef<number>(null);
|
||||||
const [ statsError, setStatsError ] = useState(false);
|
|
||||||
const [ isSuspended, setIsSuspended ] = useState(server.isSuspended);
|
const [ isSuspended, setIsSuspended ] = useState(server.isSuspended);
|
||||||
const [ stats, setStats ] = useState<ServerStats | null>(null);
|
const [ stats, setStats ] = useState<ServerStats | null>(null);
|
||||||
|
|
||||||
|
@ -49,10 +48,7 @@ export default ({ server, className }: { server: Server; className?: string }) =
|
||||||
setStatsError(false);
|
setStatsError(false);
|
||||||
return getServerResourceUsage(server.uuid)
|
return getServerResourceUsage(server.uuid)
|
||||||
.then(data => setStats(data))
|
.then(data => setStats(data))
|
||||||
.catch(error => {
|
.catch(error => console.error(error));
|
||||||
setStatsError(true);
|
|
||||||
console.error(error);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Loading…
Reference in a new issue