Compare commits
1 Commits
fix-lockfi
...
1-max-seri
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b5d4ee6a5 |
@@ -1,38 +0,0 @@
|
||||
name: PR Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
IMAGE_PR: git.sebse.de/${{ github.repository }}
|
||||
IMAGE_MIGRATE_PR: git.sebse.de/${{ github.repository }}-migrate
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build app
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./web
|
||||
push: false
|
||||
tags: ${{ env.IMAGE_PR }}:pr-${{ github.event.pull_request.head.sha }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_PR }}:latest
|
||||
|
||||
- name: Build migrate
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./web
|
||||
file: ./web/Dockerfile.migrate
|
||||
push: false
|
||||
tags: ${{ env.IMAGE_MIGRATE_PR }}:pr-${{ github.event.pull_request.head.sha }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_MIGRATE_PR }}:latest
|
||||
@@ -50,7 +50,7 @@ export default function SignalsChart({
|
||||
|
||||
const { containerRef, legendRef } = usePlot(
|
||||
(el, w, h, lRef) => {
|
||||
const data = buildSeriesData(rows, config.signal_type, timeMode);
|
||||
const data = buildSeriesData(rows, config.signal_type, timeMode, config.series_limit);
|
||||
if (!data) return null;
|
||||
|
||||
const { keys, allXs, data: seriesData } = data;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import type { SignalRow, ChartConfig, TimeMode } from '@/lib/types';
|
||||
|
||||
const MAX_SERIES = 80;
|
||||
|
||||
export interface SeriesData {
|
||||
keys: string[];
|
||||
allXs: number[];
|
||||
@@ -12,6 +10,7 @@ export function buildSeriesData(
|
||||
rows: SignalRow[],
|
||||
signalType: ChartConfig['signal_type'],
|
||||
timeMode: TimeMode,
|
||||
seriesLimit: number = 80,
|
||||
): SeriesData | null {
|
||||
const seriesMap = new Map<string, Map<number, number>>();
|
||||
|
||||
@@ -34,7 +33,7 @@ export function buildSeriesData(
|
||||
|
||||
if (seriesMap.size === 0) return null;
|
||||
|
||||
const keys = [...seriesMap.keys()].slice(0, MAX_SERIES);
|
||||
const keys = [...seriesMap.keys()].slice(0, seriesLimit);
|
||||
const allXs = [
|
||||
...new Set(
|
||||
keys.flatMap((k) => {
|
||||
|
||||
1
web/package-lock.json
generated
1
web/package-lock.json
generated
@@ -1593,7 +1593,6 @@
|
||||
"integrity": "sha512-h2MPBLoNtjc3qZWfY3Tl51yPorQ2McHn8pJfcMNTcIvrrZrr90Ykffit0yjrPFWQcRcUxzH20+6OcVdW4yHtUg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.60.1",
|
||||
|
||||
Reference in New Issue
Block a user