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 { 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)
|
const GetRandomColor = () => "#" + Math.floor(Math.random()*16777215).toString(16)
|
||||||
function GetOrCreateDatasetByLineConfig (data: ChartTimeData, lineConfig: LineConfig) {
|
function GetOrCreateDatasetByLineConfig (data: ChartTimeData, lineConfig: LineConfig) {
|
@ -1,5 +1,5 @@
|
|||||||
import {Display} from "../../components/Display";
|
import {Display} from "../../components/Display";
|
||||||
import {ChartTimeOnline} from "../../components/charts/ChartTimeOnline";
|
import {ChartTimeOnline} from "./ChartTimeOnline";
|
||||||
import {ChartTimeOnlineFooter} from "./ChartTimeOnlineFooter";
|
import {ChartTimeOnlineFooter} from "./ChartTimeOnlineFooter";
|
||||||
|
|
||||||
export const Column = ({lineGroup, data, interval, showBorder}) => {
|
export const Column = ({lineGroup, data, interval, showBorder}) => {
|
||||||
|
@ -10,11 +10,11 @@ const modeNames = {
|
|||||||
10: "БЛОКИРОВКА",
|
10: "БЛОКИРОВКА",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ModeDisplay = (props)=>{
|
export const ModeDisplay = ({data})=>{
|
||||||
let value = '---'
|
let value = '---'
|
||||||
|
|
||||||
if(props.data.length > 0){
|
if(data.length > 0){
|
||||||
let lastFullData = props.data[props.data.length - 1]
|
let lastFullData = data[data.length - 1]
|
||||||
let index = lastFullData['mode']
|
let index = lastFullData['mode']
|
||||||
if(index >= 0)
|
if(index >= 0)
|
||||||
value = modeNames[index] ?? index
|
value = modeNames[index] ?? index
|
@ -4,12 +4,12 @@ import {Row, Col, Select} from 'antd'
|
|||||||
import {Column} from './Column'
|
import {Column} from './Column'
|
||||||
import {CustomColumn} from './CustomColumn'
|
import {CustomColumn} from './CustomColumn'
|
||||||
import ActiveMessagesOnline from './ActiveMessagesOnline'
|
import ActiveMessagesOnline from './ActiveMessagesOnline'
|
||||||
|
import {ModeDisplay} from "./ModeDisplay"
|
||||||
|
import {UserOfWells} from './UserOfWells'
|
||||||
|
|
||||||
import LoaderPortal from '../../components/LoaderPortal'
|
import LoaderPortal from '../../components/LoaderPortal'
|
||||||
import {UserOfWells} from './UserOfWells'
|
|
||||||
import {Subscribe} from '../../services/signalr'
|
import {Subscribe} from '../../services/signalr'
|
||||||
import {DataService} from '../../services/api'
|
import {DataService} from '../../services/api'
|
||||||
import {ModeDisplay} from "../../components/ModeDisplay"
|
|
||||||
import notify from "../../components/notify"
|
import notify from "../../components/notify"
|
||||||
|
|
||||||
import '../../styles/message.css'
|
import '../../styles/message.css'
|
||||||
|
Loading…
Reference in New Issue
Block a user