mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 23:24:03 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import { addDays, addHours, endOfDay, startOfDay } from 'date-fns'
|
|
|
|
import { DatePreset } from './DataTable.types'
|
|
|
|
export const ARRAY_DELIMITER = ','
|
|
export const SLIDER_DELIMITER = '-'
|
|
export const SPACE_DELIMITER = '_'
|
|
export const RANGE_DELIMITER = '-'
|
|
export const SORT_DELIMITER = '.'
|
|
|
|
export const LEVELS = ['success', 'warning', 'error'] as const
|
|
|
|
export const presets = [
|
|
{
|
|
label: 'Today',
|
|
from: startOfDay(new Date()),
|
|
to: endOfDay(new Date()),
|
|
shortcut: 'd', // day
|
|
},
|
|
{
|
|
label: 'Yesterday',
|
|
from: startOfDay(addDays(new Date(), -1)),
|
|
to: endOfDay(addDays(new Date(), -1)),
|
|
shortcut: 'y',
|
|
},
|
|
{
|
|
label: 'Last hour',
|
|
from: addHours(new Date(), -1),
|
|
to: new Date(),
|
|
shortcut: 'h',
|
|
},
|
|
{
|
|
label: 'Last 7 days',
|
|
from: startOfDay(addDays(new Date(), -7)),
|
|
to: endOfDay(new Date()),
|
|
shortcut: 'w',
|
|
},
|
|
{
|
|
label: 'Last 14 days',
|
|
from: startOfDay(addDays(new Date(), -14)),
|
|
to: endOfDay(new Date()),
|
|
shortcut: 'b', // bi-weekly
|
|
},
|
|
{
|
|
label: 'Last 30 days',
|
|
from: startOfDay(addDays(new Date(), -30)),
|
|
to: endOfDay(new Date()),
|
|
shortcut: 'm',
|
|
},
|
|
] satisfies DatePreset[]
|