forked from ddrilling/asb_cloud_front
Компоненты мониторинга перемещены в общую директорию
This commit is contained in:
parent
5e5da5c4a9
commit
539030e9fd
@ -1,6 +1,4 @@
|
||||
export * from './D3Chart'
|
||||
export type { D3ChartProps } from './D3Chart'
|
||||
|
||||
export * from './D3MonitoringCharts'
|
||||
|
||||
export * from './types'
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { CSSProperties, ReactNode, SVGProps, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { CSSProperties, ReactNode, SVGProps, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import * as d3 from 'd3'
|
||||
|
||||
import { wrapPlugin } from '@components/d3/plugins/base'
|
||||
import { useD3MouseZone } from '@components/d3/D3MouseZone'
|
||||
import { ChartGroup, ChartSizes } from '@components/d3/D3MonitoringCharts'
|
||||
import { D3TooltipPosition } from '@components/d3/plugins/D3Tooltip'
|
||||
import { getChartIcon, isDev, usePartialProps } from '@utils'
|
||||
|
||||
import { wrapPlugin } from './base'
|
||||
import { D3TooltipPosition } from './D3Tooltip'
|
||||
import { ChartGroup, ChartSizes } from './D3MonitoringCharts'
|
||||
|
||||
import '@styles/d3.less'
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { Button, Form, FormItemProps, Input, InputNumber, Select, Tooltip } from 'antd'
|
||||
import { memo, useCallback, useEffect, useMemo } from 'react'
|
||||
|
||||
import { ColorPicker, Color } from '../ColorPicker'
|
||||
import { MinMax } from '@components/d3/types'
|
||||
import { ColorPicker, Color } from '@components/ColorPicker'
|
||||
|
||||
import { ExtendedChartDataset } from './D3MonitoringCharts'
|
||||
import { MinMax } from './types'
|
||||
|
||||
const { Item: RawItem } = Form
|
||||
|
@ -16,18 +16,19 @@ import {
|
||||
ChartRegistry,
|
||||
ChartTick,
|
||||
MinMax
|
||||
} from './types'
|
||||
} from '@components/d3/types'
|
||||
import {
|
||||
BasePluginSettings,
|
||||
D3ContextMenu,
|
||||
D3ContextMenuSettings,
|
||||
D3HorizontalCursor,
|
||||
D3HorizontalCursorSettings
|
||||
} from './plugins'
|
||||
import D3MouseZone from './D3MouseZone'
|
||||
} from '@components/d3/plugins'
|
||||
import D3MouseZone from '@components/d3/D3MouseZone'
|
||||
import { getByAccessor, getChartClass, getGroupClass, getTicks } from '@components/d3/functions'
|
||||
import { renderArea, renderLine, renderNeedle, renderPoint, renderRectArea } from '@components/d3/renders'
|
||||
|
||||
import D3MonitoringGroupsEditor from './D3MonitoringGroupsEditor'
|
||||
import { getByAccessor, getChartClass, getGroupClass, getTicks } from './functions'
|
||||
import { renderArea, renderLine, renderNeedle, renderPoint, renderRectArea } from './renders'
|
||||
import { D3HorizontalCursor, D3HorizontalCursorSettings } from './D3HorizontalCursor'
|
||||
import D3MonitoringLimitChart from './D3MonitoringLimitChart'
|
||||
|
||||
const roundTo = (v: number, to: number = 50) => {
|
||||
if (v === 0) return v
|
||||
@ -73,7 +74,7 @@ const defaultOffsets: ChartOffset = {
|
||||
top: 10,
|
||||
bottom: 10,
|
||||
left: 100,
|
||||
right: 10,
|
||||
right: 20,
|
||||
}
|
||||
|
||||
const getDefaultYAxisConfig = <DataType,>(): ChartAxis<DataType> => ({
|
@ -3,11 +3,11 @@ import { Button, Divider, Empty, Modal, Popconfirm, Tooltip, Tree } from 'antd'
|
||||
import { UndoOutlined } from '@ant-design/icons'
|
||||
import { EventDataNode } from 'antd/lib/tree'
|
||||
|
||||
import { notify } from '@components/factory'
|
||||
import { getChartIcon } from '@utils'
|
||||
|
||||
import { ExtendedChartDataset } from './D3MonitoringCharts'
|
||||
import D3MonitoringChartEditor from './D3MonitoringChartEditor'
|
||||
import { notify } from '../factory'
|
||||
|
||||
export type D3MonitoringGroupsEditorProps<DataType> = {
|
||||
visible?: boolean
|
1
src/components/d3/monitoring/index.ts
Normal file
1
src/components/d3/monitoring/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './D3MonitoringCharts'
|
@ -1,6 +1,5 @@
|
||||
export * from './base'
|
||||
export * from './D3ContextMenu'
|
||||
export * from './D3Cursor'
|
||||
export * from './D3HorizontalCursor'
|
||||
export * from './D3Legend'
|
||||
export * from './D3Tooltip'
|
||||
|
@ -5,7 +5,7 @@ import { Select } from 'antd'
|
||||
|
||||
import { useIdWell } from '@asb/context'
|
||||
import { Flex } from '@components/Grid'
|
||||
import { D3MonitoringCharts } from '@components/d3'
|
||||
import { D3MonitoringCharts } from '@components/d3/monitoring'
|
||||
import { CopyUrlButton } from '@components/CopyUrl'
|
||||
import LoaderPortal from '@components/LoaderPortal'
|
||||
import { invokeWebApiWrapperAsync } from '@components/factory'
|
||||
|
@ -4,7 +4,7 @@ import { Button, Select } from 'antd'
|
||||
|
||||
import { useIdWell } from '@asb/context'
|
||||
import { makeDateSorter } from '@components/Table'
|
||||
import { D3MonitoringCharts } from '@components/d3'
|
||||
import { D3MonitoringCharts } from '@components/d3/monitoring'
|
||||
import LoaderPortal from '@components/LoaderPortal'
|
||||
import { Grid, GridItem, Flex } from '@components/Grid'
|
||||
import { invokeWebApiWrapperAsync } from '@components/factory'
|
||||
|
Loading…
Reference in New Issue
Block a user