Skip to content

Commit

Permalink
StatsHouse UI: update copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
vauweb committed Jan 21, 2025
1 parent 2e9e229 commit 2485ed4
Show file tree
Hide file tree
Showing 179 changed files with 1,034 additions and 128 deletions.
7 changes: 6 additions & 1 deletion statshouse-ui/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/// <reference types="vite/client" />
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

interface ImportMetaEnv {
readonly VITE_PROXY: string;
readonly REACT_APP_PROXY: string;
Expand Down
10 changes: 8 additions & 2 deletions statshouse-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import js from '@eslint/js';
import globals from 'globals';
import react from 'eslint-plugin-react';
Expand Down Expand Up @@ -40,9 +46,9 @@ export default tseslint.config({
'no-console': 'warn',
'no-empty': ['error', { allowEmptyCatch: true }],
'@typescript-eslint/no-unused-vars': [
'error',
'warn',
{
args: 'all',
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/** @returns {Promise<import('jest').Config>} */

const jestConfig = async () => {
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/EventObserver.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export type EventObserverCallback = (...payload: any[]) => void;
export class EventObserver<T extends string> {
protected _ob: Record<string, EventObserverCallback[]> = {};
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/Queue.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export type QueueTask<T = unknown> = () => Promise<T>;
export class Queue {
_queue: QueueTask[] = [];
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/TimeHelper.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { TimeHelper } from './TimeHelper';

const weekSec = 7 * 24 * 60 * 60;
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/appHistory.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { createBrowserHistory } from 'history';

export const appHistory = createBrowserHistory();
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/dataIdxNearest.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import uPlot from 'uplot';

function getMinDeltaYValue(
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/formatByMetricType.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { formatByMetricType, splitByMetricType } from './formatByMetricType';
import { METRIC_TYPE } from '../api/enum';

Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/formatByMetricType.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { formatFixed } from './formatFixed';
import { METRIC_TYPE, MetricType, QUERY_WHAT, QueryWhat, toMetricType } from '@/api/enum';
import { fixFloat, floor, incrRoundUp, round } from './helpers';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/formatFixed.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export function formatFixed(n: number, maxFrac: number): string {
const k = Math.pow(10, maxFrac);
return (Math.round(n * k) / k).toString();
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/formatFixedFloor.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export function formatFixedFloor(n: number, maxFrac: number): string {
const k = Math.pow(10, maxFrac);
return (Math.floor(n * k) / k).toString();
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/getEmptyVariableParams.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { VariableParams } from '../url/queryParams';

export function getEmptyVariableParams(): VariableParams {
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/getNextState.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React from 'react';

export function getNextState<T>(prevState: T, nextState: React.SetStateAction<T>): T {
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/getUrlObject.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export function getUrlObject(search: string): { hash?: string; search?: string } {
if (search.length > 5000) {
return { search };
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/prepareItemsGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import type { QueryParams } from '@/url2';

export function prepareItemsGroup({
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/queryClient.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { QueryClient } from '@tanstack/react-query';

export const queryClient = new QueryClient({
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/stackData.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import uPlot, { TypedArray } from 'uplot';

export function stackData(data: uPlot.AlignedData): { data: uPlot.AlignedData; bands: uPlot.Band[] } {
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/common/toggleKeyboard.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export const mapKeyboardRuToEn = {
й: 'q',
ц: 'w',
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/AppRouter/AppRouter.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React, { useLayoutEffect } from 'react';
import { Router } from 'react-router-dom';
import { appHistory } from '@/common/appHistory';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/AppRouter/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export * from './AppRouter';
7 changes: 6 additions & 1 deletion statshouse-ui/src/components/BuildVersion/BuildVersion.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import React from 'react';
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { buildVersion } from '@/common/settings';
import cn from 'classnames';
import { appVersionToggle } from '@/components2/AppVersionToggle';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/BuildVersion/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export { BuildVersion } from './BuildVersion';
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import React from 'react';
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export type DashboardGroupTooltipTitleProps = {
name?: string;
Expand Down
7 changes: 6 additions & 1 deletion statshouse-ui/src/components/Dashboard/DashboardName.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import React from 'react';
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { selectorParams, useStore } from '@/store';
import { useWindowSize } from '@/hooks/useWindowSize';
import cn from 'classnames';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import React from 'react';
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export type DashboardNameTitleProps = {
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React, { useCallback, useState } from 'react';
import cn from 'classnames';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { formatTagValue } from '../../view/api';
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React from 'react';
import { formatTagValue } from '../../view/api';
import { MetricMetaTag } from '../../api/metric';

export type DashboardVariablesBadgeProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React, { useCallback } from 'react';
import { useCallback } from 'react';
import { useError } from '@/hooks/useError';
import { useErrorStore } from '@/store/errors';
import { Button } from '@/components/UI';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/Plot/EventFormatters.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { ReactNode } from 'react';
import { RenderCellProps, RenderHeaderCellProps } from 'react-data-grid';
import { formatTagValue, querySeriesMetaTag } from '../../view/api';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/Plot/PlotControlAggregation.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React, { useCallback, useMemo } from 'react';
import cn from 'classnames';
import { isMetricAggregation, METRIC_AGGREGATION, METRIC_AGGREGATION_DESCRIPTION } from '../../api/enum';
Expand Down
8 changes: 7 additions & 1 deletion statshouse-ui/src/components/Plot/PlotControlView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import React, { useCallback, useRef, useState } from 'react';
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { useCallback, useRef, useState } from 'react';
import { POPPER_HORIZONTAL, POPPER_VERTICAL, SwitchBox, Tooltip } from '../UI';
import { ReactComponent as SVGGear } from 'bootstrap-icons/icons/gear.svg';
import { useOnClickOutside } from '../../hooks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { memo, useCallback, useMemo, useRef } from 'react';
import css from './style.module.css';
import { Popper } from '../../UI';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { memo, MutableRefObject, useCallback, useEffect, useRef, useState } from 'react';
import { EventObserver } from '@/common/EventObserver';
import { UPlotWrapperPropsHooks } from '../../UPlotWrapper';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/Plot/PlotEventOverlay/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

export * from './PlotEventOverlay';
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/* Copyright 2025 V Kontakte LLC
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

.overlay {
--plot-padding-top-loc: min(var(--plot-padding-top), var(--plot-padding-top-max));
position: absolute;
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/Plot/PlotEvents.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React, { Key, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import DataGrid, { Column, DataGridHandle, RenderRowProps, Row, SortColumn } from 'react-data-grid';
import cn from 'classnames';
Expand Down
6 changes: 6 additions & 0 deletions statshouse-ui/src/components/Plot/PlotEventsButtonColumns.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2025 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import React, { useCallback, useState } from 'react';
import { ReactComponent as SVGListCheck } from 'bootstrap-icons/icons/list-check.svg';
import { PlotEventsSelectColumns } from './PlotEventsSelectColumns';
Expand Down
Loading

0 comments on commit 2485ed4

Please sign in to comment.