forked from ddrilling/asb_cloud_front
fix telemetryView
This commit is contained in:
parent
f50855d179
commit
0aec1b7379
21347
package-lock.json
generated
21347
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -202,17 +202,17 @@ const timePeriodCollection = [
|
||||
{value: '86400', label: '24 часа'}
|
||||
]
|
||||
|
||||
const defaultChartInterval = '600'
|
||||
|
||||
export default function TelemetryView(props) {
|
||||
let {id} = useParams()
|
||||
const [saubData, setSaubData] = useState([])
|
||||
const [chartInterval, setChartInterval] = useState(defaultInterval)
|
||||
const [chartInterval, setChartInterval] = useState(defaultChartInterval)
|
||||
const [messages, setMessages] = useState([])
|
||||
|
||||
const [loader, setLoader] = useState(false)
|
||||
|
||||
const periods = intervalSteps.map((line) => <Option key={line.value} value={line.value}>{line.label}</Option>)
|
||||
|
||||
const children = timePeriodCollection.map((line) => <Option key={line.value}>{line.label}</Option>)
|
||||
const options = timePeriodCollection.map((line) => <Option key={line.value}>{line.label}</Option>)
|
||||
|
||||
const handleReceiveDataSaub = (data) => {
|
||||
if (data) {
|
||||
@ -270,8 +270,8 @@ export default function TelemetryView(props) {
|
||||
<span style={{flexGrow: 0.1}}> </span>
|
||||
<Col>
|
||||
Интервал:
|
||||
<Select defaultValue="600" onChange={setChartInterval}>
|
||||
{children}
|
||||
<Select defaultValue={defaultChartInterval} onChange={setChartInterval}>
|
||||
{options}
|
||||
</Select>
|
||||
</Col>
|
||||
<span style={{flexGrow: 1}}> </span>
|
||||
|
Loading…
Reference in New Issue
Block a user