forked from ddrilling/asb_cloud_front
grouping TelemetryView components
This commit is contained in:
parent
a9a572d57f
commit
f384981d7b
@ -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) {
|
@ -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}) => {
|
||||
|
@ -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
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user