Merge pull request #52 from stephb9959/feature/32-statistics

Feature/32 statistics
This commit is contained in:
Charles
2021-05-31 19:40:32 -04:00
committed by GitHub
3 changed files with 25 additions and 24 deletions

View File

@@ -3,7 +3,7 @@ import { CFooter } from '@coreui/react';
const TheFooter = () => (
<CFooter fixed={false}>
<div>Version 0.0.6</div>
<div>Version 0.0.7</div>
<div className="mfs-auto">
<span className="mr-1">Powered by</span>
<a href="https://coreui.io/react" target="_blank" rel="noopener noreferrer">

View File

@@ -3,12 +3,12 @@ import PropTypes from 'prop-types';
import Chart from 'react-apexcharts'
const DeviceStatisticsChart = ({ data, options }) => (
<div>
<div style={{height: '360px'}}>
<Chart
series={data}
options={options}
type='line'
height={360}
height='100%'
/>
</div>
);

View File

@@ -97,7 +97,7 @@ const StatisticsChartList = ({ selectedDeviceId, lastRefresh }) => {
}
const getStatistics = () => {
if (loading) return;
if (!loading){
setLoading(true);
const options = {
@@ -119,6 +119,7 @@ const StatisticsChartList = ({ selectedDeviceId, lastRefresh }) => {
.finally(() => {
setLoading(false);
});
}
};
useEffect(() => {