Compare commits
1 Commits
d9962a4a4b
...
docker-imp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2f8671162 |
@@ -1,4 +1,3 @@
|
|||||||
branch=
|
|
||||||
DEV_API_URL=http://localhost:3101
|
DEV_API_URL=http://localhost:3101
|
||||||
VITE_DIAGRAM_API_URL=http://localhost:3002
|
VITE_DIAGRAM_API_URL=http://localhost:3002
|
||||||
VITE_TOIR_LIGHT_ORIGIN=https://toir-light.greact.ru
|
VITE_TOIR_LIGHT_ORIGIN=https://toir-light.greact.ru
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
services:
|
|
||||||
drill-ui-dev:
|
|
||||||
container_name: container-drill-ui${branch:+-${branch}}
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
args:
|
|
||||||
VITE_DIAGRAM_API_URL: ${VITE_DIAGRAM_API_URL}
|
|
||||||
VITE_TOIR_LIGHT_ORIGIN: ${VITE_TOIR_LIGHT_ORIGIN}
|
|
||||||
VITE_KEYCLOAK_URL: ${VITE_KEYCLOAK_URL}
|
|
||||||
VITE_KEYCLOAK_REALM: ${VITE_KEYCLOAK_REALM}
|
|
||||||
VITE_KEYCLOAK_CLIENT_ID: ${VITE_KEYCLOAK_CLIENT_ID}
|
|
||||||
expose:
|
|
||||||
- "80"
|
|
||||||
networks:
|
|
||||||
- proxy
|
|
||||||
|
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
external: true
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
drill-ui:
|
drill-ui:
|
||||||
container_name: container-drill-ui${branch:+-${branch}}
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
export type AvgPointValue = [time: number, avg: number, min: number, max: number, count: number];
|
export type AvgPointValue = [time: number, avg: number, min: number, max: number, count: number];
|
||||||
|
|
||||||
export type TooltipParam = {
|
export type TooltipParam = {
|
||||||
color?: string;
|
|
||||||
marker?: string;
|
marker?: string;
|
||||||
seriesName?: string;
|
seriesName?: string;
|
||||||
value?: unknown;
|
value?: unknown;
|
||||||
|
|||||||
@@ -60,19 +60,6 @@ function formatChartValue(value: number): string {
|
|||||||
}).format(value);
|
}).format(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Показывает одно значение, если min/avg/max визуально совпадают. */
|
|
||||||
function formatTooltipValue(value: AvgPointValue): string {
|
|
||||||
const avg = formatChartValue(value[1]);
|
|
||||||
const min = formatChartValue(value[2]);
|
|
||||||
const max = formatChartValue(value[3]);
|
|
||||||
|
|
||||||
if (min === avg && avg === max) {
|
|
||||||
return avg;
|
|
||||||
}
|
|
||||||
|
|
||||||
return `min ${min} · avg ${avg} · max ${max}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isAvgPointValue(value: unknown): value is AvgPointValue {
|
function isAvgPointValue(value: unknown): value is AvgPointValue {
|
||||||
return Array.isArray(value) && value.length >= 5 && value.every((item) => typeof item === 'number');
|
return Array.isArray(value) && value.length >= 5 && value.every((item) => typeof item === 'number');
|
||||||
}
|
}
|
||||||
@@ -102,9 +89,9 @@ export function formatTooltip(params: unknown): string {
|
|||||||
const value = item.value as AvgPointValue;
|
const value = item.value as AvgPointValue;
|
||||||
return [
|
return [
|
||||||
'<div class="chart-tooltip-row">',
|
'<div class="chart-tooltip-row">',
|
||||||
`<span class="chart-tooltip-label" style="--chart-tooltip-marker-color:${item.color ?? 'currentColor'};">${item.seriesName ?? ''}</span>`,
|
`<span>${item.marker ?? ''}${item.seriesName ?? ''}</span>`,
|
||||||
'<strong>',
|
'<strong>',
|
||||||
formatTooltipValue(value),
|
`min ${formatChartValue(value[2])} · avg ${formatChartValue(value[1])} · max ${formatChartValue(value[3])}`,
|
||||||
value[4] > 1 ? ` · ${value[4]} точек` : '',
|
value[4] > 1 ? ` · ${value[4]} точек` : '',
|
||||||
'</strong>',
|
'</strong>',
|
||||||
'</div>',
|
'</div>',
|
||||||
|
|||||||
@@ -45,9 +45,6 @@ export function createHistoryChartOptions({
|
|||||||
legend: {
|
legend: {
|
||||||
type: 'scroll',
|
type: 'scroll',
|
||||||
top: 0,
|
top: 0,
|
||||||
icon: 'rect',
|
|
||||||
itemWidth: 18,
|
|
||||||
itemHeight: 3,
|
|
||||||
data: legendData,
|
data: legendData,
|
||||||
textStyle: { color: '#cbd5e1' },
|
textStyle: { color: '#cbd5e1' },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -93,11 +93,7 @@ export function createSeriesOptions(points: HistoryPoint[], index: number, label
|
|||||||
color,
|
color,
|
||||||
},
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
disabled: true,
|
focus: 'series',
|
||||||
lineStyle: {
|
|
||||||
width: 1.8,
|
|
||||||
color,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
z: 3,
|
z: 3,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-tooltip-label {
|
.chart-tooltip-row span {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #cbd5e1;
|
color: #cbd5e1;
|
||||||
@@ -44,16 +44,6 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-tooltip-label::before {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 18px;
|
|
||||||
height: 3px;
|
|
||||||
margin-right: 6px;
|
|
||||||
vertical-align: middle;
|
|
||||||
background: var(--chart-tooltip-marker-color, currentColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-tooltip-row strong {
|
.chart-tooltip-row strong {
|
||||||
color: #f8fafc;
|
color: #f8fafc;
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
|
|||||||
Reference in New Issue
Block a user