Compare commits
1 Commits
1-max-seri
...
fix-lockfi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22fa5d4aa2 |
38
.gitea/workflows/pr.yml
Normal file
38
.gitea/workflows/pr.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
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(
|
const { containerRef, legendRef } = usePlot(
|
||||||
(el, w, h, lRef) => {
|
(el, w, h, lRef) => {
|
||||||
const data = buildSeriesData(rows, config.signal_type, timeMode, config.series_limit);
|
const data = buildSeriesData(rows, config.signal_type, timeMode);
|
||||||
if (!data) return null;
|
if (!data) return null;
|
||||||
|
|
||||||
const { keys, allXs, data: seriesData } = data;
|
const { keys, allXs, data: seriesData } = data;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import type { SignalRow, ChartConfig, TimeMode } from '@/lib/types';
|
import type { SignalRow, ChartConfig, TimeMode } from '@/lib/types';
|
||||||
|
|
||||||
|
const MAX_SERIES = 80;
|
||||||
|
|
||||||
export interface SeriesData {
|
export interface SeriesData {
|
||||||
keys: string[];
|
keys: string[];
|
||||||
allXs: number[];
|
allXs: number[];
|
||||||
@@ -10,7 +12,6 @@ export function buildSeriesData(
|
|||||||
rows: SignalRow[],
|
rows: SignalRow[],
|
||||||
signalType: ChartConfig['signal_type'],
|
signalType: ChartConfig['signal_type'],
|
||||||
timeMode: TimeMode,
|
timeMode: TimeMode,
|
||||||
seriesLimit: number = 80,
|
|
||||||
): SeriesData | null {
|
): SeriesData | null {
|
||||||
const seriesMap = new Map<string, Map<number, number>>();
|
const seriesMap = new Map<string, Map<number, number>>();
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ export function buildSeriesData(
|
|||||||
|
|
||||||
if (seriesMap.size === 0) return null;
|
if (seriesMap.size === 0) return null;
|
||||||
|
|
||||||
const keys = [...seriesMap.keys()].slice(0, seriesLimit);
|
const keys = [...seriesMap.keys()].slice(0, MAX_SERIES);
|
||||||
const allXs = [
|
const allXs = [
|
||||||
...new Set(
|
...new Set(
|
||||||
keys.flatMap((k) => {
|
keys.flatMap((k) => {
|
||||||
|
|||||||
1
web/package-lock.json
generated
1
web/package-lock.json
generated
@@ -1593,6 +1593,7 @@
|
|||||||
"integrity": "sha512-h2MPBLoNtjc3qZWfY3Tl51yPorQ2McHn8pJfcMNTcIvrrZrr90Ykffit0yjrPFWQcRcUxzH20+6OcVdW4yHtUg==",
|
"integrity": "sha512-h2MPBLoNtjc3qZWfY3Tl51yPorQ2McHn8pJfcMNTcIvrrZrr90Ykffit0yjrPFWQcRcUxzH20+6OcVdW4yHtUg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.9.1",
|
"@eslint-community/eslint-utils": "^4.9.1",
|
||||||
"@typescript-eslint/scope-manager": "8.60.1",
|
"@typescript-eslint/scope-manager": "8.60.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user