grouping TelemetryView components

This commit is contained in:
Фролов 2021-08-12 17:54:04 +05:00
parent a9a572d57f
commit f384981d7b
4 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import { useEffect, useState} from 'react';
import {ChartTimeBase, ChartTimeData, ChartTimeDataParams} from './ChartTimeBase'
import {ChartTimeBase, ChartTimeData, ChartTimeDataParams} from '../../components/charts/ChartTimeBase'
const GetRandomColor = () => "#" + Math.floor(Math.random()*16777215).toString(16)
function GetOrCreateDatasetByLineConfig (data: ChartTimeData, lineConfig: LineConfig) {

View File

@ -1,5 +1,5 @@
import {Display} from "../../components/Display";
import {ChartTimeOnline} from "../../components/charts/ChartTimeOnline";
import {ChartTimeOnline} from "./ChartTimeOnline";
import {ChartTimeOnlineFooter} from "./ChartTimeOnlineFooter";
export const Column = ({lineGroup, data, interval, showBorder}) => {

View File

@ -10,11 +10,11 @@ const modeNames = {
10: "БЛОКИРОВКА",
}
export const ModeDisplay = (props)=>{
export const ModeDisplay = ({data})=>{
let value = '---'
if(props.data.length > 0){
let lastFullData = props.data[props.data.length - 1]
if(data.length > 0){
let lastFullData = data[data.length - 1]
let index = lastFullData['mode']
if(index >= 0)
value = modeNames[index] ?? index

View File

@ -4,12 +4,12 @@ import {Row, Col, Select} from 'antd'
import {Column} from './Column'
import {CustomColumn} from './CustomColumn'
import ActiveMessagesOnline from './ActiveMessagesOnline'
import {ModeDisplay} from "./ModeDisplay"
import {UserOfWells} from './UserOfWells'
import LoaderPortal from '../../components/LoaderPortal'
import {UserOfWells} from './UserOfWells'
import {Subscribe} from '../../services/signalr'
import {DataService} from '../../services/api'
import {ModeDisplay} from "../../components/ModeDisplay"
import notify from "../../components/notify"
import '../../styles/message.css'