repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/apollo/resolvers/executeQuery.test.ts
src/app/apollo/resolvers/executeQuery.test.ts
import { executeQuery } from './executeQuery'; import { queryBase } from '../../helpers/queryBase'; jest.mock('../../helpers/queryBase'); describe('executeQuery()', () => { test('is handled by queryBase() helper', async () => { const queryArgs = { q: 'SELECT * FROM test', url: '', db: '', ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/form.tsx
src/app/helpers/form.tsx
import React, { useState } from 'react'; import { InputLabel, FormControl, FormControlLabel, FormHelperText, TextField, Checkbox, Input, InputAdornment, IconButton, } from '@material-ui/core'; import { Visibility, VisibilityOff } from '@material-ui/icons'; export function RenderField({ input, lab...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/connections.test.ts
src/app/helpers/connections.test.ts
import { getConnections, updateConnections } from './connections'; import storage from './storage'; jest.mock('./storage'); const connections = [ { id: 'test', url: 'http://test.test', u: 'user', }, { id: 'test2', url: 'http://test2.test', db: 'mydb', }, ]; const cacheMock = { writeDa...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/parseQueryResults.test.ts
src/app/helpers/parseQueryResults.test.ts
import { parseQueryResults } from './parseQueryResults'; describe('parseQueryResults()', () => { test('standard and qouted tag values', async () => { // given const data = `name,tags,key ,,"weather,location=eu" ,,"weather,location=us" test,,"weather,location=us-midwest" ,123,"weather,location123=eu" test123,...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/connections.ts
src/app/helpers/connections.ts
import gql from 'graphql-tag'; import storage from './storage'; export const getConnections = (cache: any) => { const { connections } = cache.readQuery({ query: gql` { connections @client { id url u p db unsafeSsl } } `, ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/queryBase.ts
src/app/helpers/queryBase.ts
import { isElectron } from './isElectron'; import { executeViaElectron } from './executeViaElectron'; import { parseQueryResults } from './parseQueryResults'; import { influxRequest } from '../shared/influxRequest'; export async function queryBase( form: any, ): Promise<{ request: { params: any }; response: any }> {...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/executeViaElectron.test.ts
src/app/helpers/executeViaElectron.test.ts
import { executeViaElectron } from './executeViaElectron'; jest.mock('./getIpcRenderer'); import { getIpcRenderer } from './getIpcRenderer'; const params = { url: 'http://test.test:8086', db: 'db', u: 'username', p: 'password', q: 'SELECT * FROM test', }; describe('executeViaElectron()', () => { test('su...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/executeViaElectron.ts
src/app/helpers/executeViaElectron.ts
import { getIpcRenderer } from './getIpcRenderer'; export async function executeViaElectron(params: any): Promise<any> { return new Promise((resolve, reject) => { const ipc = getIpcRenderer(); ipc.send('influx-query', { params }); ipc.once( 'influx-query-response', (_event: Event, { response,...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/storage.test.ts
src/app/helpers/storage.test.ts
import storage from './storage'; describe('storage', () => { test('get() default value', () => { const res = storage.get('test', 123); expect(res).toBe(123); }); test('set() and get()', () => { storage.set('test', '456'); expect(storage.get('test')).toBe('456'); }); });
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/isElectron.test.ts
src/app/helpers/isElectron.test.ts
import { isElectron } from './isElectron'; test('isElectron()', () => { const navigator = (global as any).window.navigator; delete (global as any).window.navigator; (global as any).window.navigator = { userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) ti...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/validators.ts
src/app/helpers/validators.ts
type Validator = (value: any) => void | string; export const isRequired: Validator = (value) => value && `${value}`.length > 0 ? undefined : 'Value is required'; export const isPositiveInt: Validator = (value) => value && /^[1-9][0-9]*$/.test(value) ? undefined : 'Value has to be a positive integer'; export...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/getIpcRenderer.ts
src/app/helpers/getIpcRenderer.ts
export function getIpcRenderer(): any { return (window as any).ipcRenderer; }
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/isElectron.ts
src/app/helpers/isElectron.ts
export function isElectron(): boolean { // https://github.com/electron/electron/issues/2288#issuecomment-337858978 return window.navigator.userAgent.toLowerCase().indexOf(' electron/') > -1; }
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/queryBase.test.ts
src/app/helpers/queryBase.test.ts
import { queryBase } from './queryBase'; jest.mock('./isElectron'); import { isElectron } from './isElectron'; jest.mock('./executeViaElectron'); import { executeViaElectron } from './executeViaElectron'; jest.mock('./parseQueryResults'); import { parseQueryResults } from './parseQueryResults'; jest.mock('../shared/in...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/parseQueryResults.ts
src/app/helpers/parseQueryResults.ts
import { parse } from 'papaparse'; export function parseQueryResults(data: string): any { // Influx escapes double quotes with two additional double quotes const unescapedData = data.replace(/"""/g, '"'); const parsed = parse(unescapedData, { header: true, skipEmptyLines: 'greedy', // skip empty and whi...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/storage.ts
src/app/helpers/storage.ts
export default { get: (name: string, defaultVal?: any): any => { const val = window.localStorage.getItem(name) || defaultVal; return val || ''; }, set: (name: string, value: string) => window.localStorage.setItem(name, value), };
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/helpers/validators.test.ts
src/app/helpers/validators.test.ts
import { isRequired, isPositiveInt, inRange, hasLength, composeValidators, } from './validators'; describe('validators', () => { test('isRequired()', () => { expect(isRequired(5)).toBe(undefined); expect(isRequired('')).toBe('Value is required'); expect(isRequired(null)).toBe('Value is required...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/hooks/useStateAndStorage.ts
src/app/hooks/useStateAndStorage.ts
import { useState } from 'react'; import useLocalStorage from 'react-use/lib/useLocalStorage'; /** * Keep state and Local Storage in-sync * @param storageKey Local Storage key * @param initValue Initial value if Local Storage is empty */ export function useStateAndStorage<T>( storageKey: string, initValue: T, ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/theme.ts
src/app/components/theme.ts
import { createMuiTheme } from '@material-ui/core/styles'; import { grey, cyan } from '@material-ui/core/colors'; const theme = createMuiTheme({ typography: {}, palette: { // type: 'dark', primary: { light: grey['500'], main: grey['800'], dark: grey['900'], }, secondary: { l...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TooltipError/index.tsx
src/app/components/TooltipError/index.tsx
// TODO: add click away and set z-index correctly import React from 'react'; import { Collapse, Typography, Paper, Button } from '@material-ui/core'; import { Manager, Reference, Popper } from 'react-popper'; import { Report as ErrorIcon } from '@material-ui/icons'; type Props = { content: string; }; type State = { ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/index.test.tsx
src/app/components/TopBar/index.test.tsx
import React from 'react'; import { render, fireEvent } from 'utils/test-utils'; import TopBar from './index'; import { VersionInfo } from './version/VersionInfo'; jest.mock('./version/VersionInfo'); (VersionInfo as jest.Mock<any>).mockReturnValue(<div></div>); describe('<TopBar />', () => { test('rendering and ope...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/index.tsx
src/app/components/TopBar/index.tsx
import React from 'react'; import { AppBar, Toolbar, Typography, IconButton, Tooltip, } from '@material-ui/core'; import DrawerOpenIcon from '@material-ui/icons/Menu'; import DrawerCloseIcon from '@material-ui/icons/ChevronRight'; import { withStyles } from '@material-ui/core/styles'; import classNames from '...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/styles.ts
src/app/components/TopBar/styles.ts
import { grey } from '@material-ui/core/colors'; import { Theme } from '@material-ui/core/styles/createMuiTheme'; export default function (theme: Theme) { return { flex: { flex: 1, }, appBar: { background: grey['900'], }, toolbar: { ...theme.mixins.toolbar, paddingLeft: th...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/icon/IconMain.tsx
src/app/components/TopBar/icon/IconMain.tsx
import React from 'react'; import { SvgIcon } from '@material-ui/core'; export const IconMain = (props: any) => { return ( <SvgIcon {...props} viewBox="0 0 48 48" width="48" height="48"> <g id="Page-1" fill="none" fillRule="evenodd"> <g id="48---svg-export" fillRule="nonzero"> <g id="icon...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/version/VersionInfo.tsx
src/app/components/TopBar/version/VersionInfo.tsx
import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import { makeStyles } from '@material-ui/core'; import { CURRENT_VERSION } from '../../../../config'; import { getLatestVersion, LATEST_RELEASE...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/version/VersionInfo.test.tsx
src/app/components/TopBar/version/VersionInfo.test.tsx
import React from 'react'; import { render, wait } from 'utils/test-utils'; import { VersionInfo } from './VersionInfo'; import { getLatestVersion } from './getLatestVersion'; jest.mock('./getLatestVersion'); import '../../../../config'; jest.mock('../../../../config', () => ({ CURRENT_VERSION: '0.1.1', })); describ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/version/isVersionOutdated.ts
src/app/components/TopBar/version/isVersionOutdated.ts
import compareVersions from 'compare-versions'; import { CURRENT_VERSION } from '../../../../config'; export function isVersionOutdated(version: string): boolean { return compareVersions(version, CURRENT_VERSION) > 0; }
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/version/getLatestVersion.ts
src/app/components/TopBar/version/getLatestVersion.ts
import axios from 'axios'; const REPO_PATH = 'timeseriesadmin/timeseriesadmin'; export const API_LATEST_RELEASE_URL = `https://api.github.com/repos/${REPO_PATH}/releases/latest`; export const LATEST_RELEASE_URL = `https://timeseriesadmin.github.io/#download`; export async function getLatestVersion() { const respons...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/version/isVersionOutdated.test.ts
src/app/components/TopBar/version/isVersionOutdated.test.ts
import { isVersionOutdated } from './isVersionOutdated'; import '../../../../config'; jest.mock('../../../../config', () => ({ CURRENT_VERSION: '0.1.1', })); test('isVersionOutdated()', () => { expect(isVersionOutdated('v0.1.2')).toBe(true); expect(isVersionOutdated('v0.2.1')).toBe(true); expect(isVersionOutda...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/TopBar/version/getLatestVersion.test.ts
src/app/components/TopBar/version/getLatestVersion.test.ts
import axios from 'axios'; import { getLatestVersion } from './getLatestVersion'; jest.mock('axios'); describe('github resolvers', () => { test('successful API reponse', async () => { (axios as any).get.mockReturnValueOnce({ data: { tag_name: 'v0.1.1' }, }); const ver = await getLatestVersion(); ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/root/Root.test.tsx
src/app/components/root/Root.test.tsx
import React from 'react'; import { render, wait } from 'utils/test-utils'; import { Root } from './Root'; import { fireEvent, within } from '@testing-library/react'; jest.mock('app/helpers/queryBase', () => ({ queryBase: jest.fn().mockResolvedValue({ response: { status: 200 } }), })); describe('<App />', () => { ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/root/Root.tsx
src/app/components/root/Root.tsx
import React from 'react'; import { ApolloProvider } from 'react-apollo'; import { MuiThemeProvider } from '@material-ui/core/styles'; import theme from '../theme'; import { App } from '../App'; import client from '../../apollo'; import { ErrorBoundary } from './errorBoundary/ErrorBoundary'; export const Root: React....
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/root/errorBoundary/ErrorBoundary.tsx
src/app/components/root/errorBoundary/ErrorBoundary.tsx
import React, { ReactNode } from 'react'; type State = { hasError: boolean; error?: Error; componentStack: string; }; export class ErrorBoundary extends React.Component<{}, State> { state = { hasError: false, error: null, componentStack: '' }; static getDerivedStateFromError(error: Error): State { // U...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/MainContent.tsx
src/app/components/MainContent/MainContent.tsx
import React, { useState, useContext } from 'react'; import Form from './form/Form'; import Results from './results/Results'; import { queryBase } from 'app/helpers/queryBase'; import { commonError } from 'app/shared/commonError'; import { QueryHistoryContext } from 'app/contexts/QueryHistoryContext'; const MainConten...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/MainContent.test.tsx
src/app/components/MainContent/MainContent.test.tsx
import React from 'react'; import { render } from 'utils/test-utils'; import { QueryHistoryContext } from 'app/contexts/QueryHistoryContext'; import MainContent from './MainContent'; import Form from './form/Form'; import Results from './results/Results'; jest.mock('./form/Form', () => jest.fn(() => <div></div>)); jes...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/Results.tsx
src/app/components/MainContent/results/Results.tsx
import React from 'react'; import { withStyles, Theme } from '@material-ui/core/styles'; import { CircularProgress, Typography, Paper } from '@material-ui/core'; import { SettingsContext } from 'app/contexts/SettingsContext'; import QueryError from './error/QueryError'; import ResultsTable from './table/ResultsTable';...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/Results.test.tsx
src/app/components/MainContent/results/Results.test.tsx
import React from 'react'; import { render } from '@testing-library/react'; import Results from './Results'; import ResultsTable from './table/ResultsTable'; jest.mock('./table/ResultsTable', () => jest.fn(() => <div />)); const query = { executeQuery: { request: { params: { q: 'SELECT * FROM test' }, ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/error/QueryError.tsx
src/app/components/MainContent/results/error/QueryError.tsx
import React from 'react'; import Inspector from 'react-inspector'; import Typography from '@material-ui/core/Typography'; // import { commonError } from 'app/shared/commonError'; const QueryError: React.FC<any> = ({ error }: any) => ( <div> <Typography variant="h5" component="h3" style={{ marg...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/parseTime.ts
src/app/components/MainContent/results/table/parseTime.ts
import { TimeFormat } from 'app/contexts/SettingsContext'; export const parseTime = (date: string, timeFormat: TimeFormat): string => { const paddedTimestamp = date.padStart(7, '0'); const isoDate = new Date( parseInt(paddedTimestamp.slice(0, -6), 10), ).toISOString(); switch (timeFormat) { case 's': ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/ResultsTable.tsx
src/app/components/MainContent/results/table/ResultsTable.tsx
import React, { FC, useContext } from 'react'; import { withStyles, Theme } from '@material-ui/core/styles'; import MUIDataTable from 'mui-datatables'; import { unparse } from 'papaparse'; import TableToolbar from './TableToolbar'; import orderBy from 'lodash/orderBy'; import { createMuiTheme, MuiThemeProvider } from...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/parseTime.test.ts
src/app/components/MainContent/results/table/parseTime.test.ts
import { parseTime } from './parseTime'; describe('parseTime()', () => { test('regular params', () => { expect(parseTime('1598808980000000000', 's')).toBe('2020-08-30T17:36:20Z'); expect(parseTime('1598808980000000000', 'ms')).toBe( '2020-08-30T17:36:20.000Z', ); expect(parseTime('1598808980000...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/ResultsTable.test.tsx
src/app/components/MainContent/results/table/ResultsTable.test.tsx
import React from 'react'; import { render, fireEvent } from '@testing-library/react'; import ResultsTable, { parseDate } from './ResultsTable'; describe('<ResultsTable />', () => { test('rendering', async () => { const { getAllByText, getByText } = render( <ResultsTable title="Test title" ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/TableToolbar/index.test.tsx
src/app/components/MainContent/results/table/TableToolbar/index.test.tsx
import React from 'react'; import { render, fireEvent } from '@testing-library/react'; import TableToolbar from './index'; describe('TableToolbar', () => { test('rendering', () => { const spy = jest.fn(); const { getByText, getAllByText } = render( <TableToolbar title="Toolbar title" ti...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/TableToolbar/index.tsx
src/app/components/MainContent/results/table/TableToolbar/index.tsx
import React, { ReactNode, ChangeEvent } from 'react'; import { withStyles } from '@material-ui/core/styles'; import { FormGroup, Toolbar, Typography, FormLabel, Select, MenuItem, } from '@material-ui/core'; import { TimeFormat } from 'app/contexts/SettingsContext'; import styles from './style'; interface...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/results/table/TableToolbar/style.ts
src/app/components/MainContent/results/table/TableToolbar/style.ts
const styles = (theme: any) => ({ root: { paddingRight: theme.spacing(), }, spacer: { // flex: '1 1 100%', }, actions: { minWidth: 320, // flex: '0 0 auto', color: theme.palette.text.secondary, }, title: { paddingTop: 18, flexGrow: 1, // flex: '0 0 auto', }, }); export d...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/form/Form.test.tsx
src/app/components/MainContent/form/Form.test.tsx
import React from 'react'; import { render, wait, fireEvent } from 'utils/test-utils'; // The component AND the query need to be exported import FormInflux, { GET_INITIAL, SAVE_CONNECTION } from './Form'; const mocks = [ { request: { query: GET_INITIAL, }, result: { data: { form: { ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/MainContent/form/Form.tsx
src/app/components/MainContent/form/Form.tsx
import React, { ChangeEvent } from 'react'; import gql from 'graphql-tag'; import { useQuery, useMutation } from 'react-apollo'; import { withStyles } from '@material-ui/core/styles'; import { Button, Grid, Theme } from '@material-ui/core'; import { Form, Field } from 'react-final-form'; import get from 'lodash/get'; ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/DrawerRight.tsx
src/app/components/sidebar/DrawerRight.tsx
import React, { useState, ChangeEvent } from 'react'; import Tabs from '@material-ui/core/Tabs'; import Tab from '@material-ui/core/Tab'; import QueryHistoryIcon from '@material-ui/icons/History'; import QueryReferenceIcon from '@material-ui/icons/Flip'; import InfluxExplorerIcon from '@material-ui/icons/Explore'; impo...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/DrawerRight.test.tsx
src/app/components/sidebar/DrawerRight.test.tsx
import React from 'react'; import { render, fireEvent } from '@testing-library/react'; import { DrawerRight } from './DrawerRight'; import PanelExplorer from './PanelExplorer/PanelExplorer'; import PanelHistory from './PanelHistory'; import PanelReference from './PanelReference'; import PanelConnect from './PanelConne...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/styles.ts
src/app/components/sidebar/styles.ts
import { createStyles, makeStyles, Theme } from '@material-ui/core'; const mediaRule = '@media (min-width:0px) and (orientation: landscape)'; export const useStyles = makeStyles((theme: Theme) => createStyles({ root: { width: '100%', }, header: { ...theme.mixins.toolbar, position: 'fix...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/QueryReference/index.tsx
src/app/components/sidebar/QueryReference/index.tsx
import React from 'react'; import gql from 'graphql-tag'; import { List, ListItem, ListItemText, Theme } from '@material-ui/core'; import { Mutation } from 'react-apollo'; import { withStyles } from '@material-ui/core/styles'; const references = [ { query: 'SHOW DATABASES' }, { query: 'SHOW MEASUREMENTS' }, { ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelHistory/index.test.tsx
src/app/components/sidebar/PanelHistory/index.test.tsx
import React from 'react'; import { render, fireEvent, setupClient, wait } from 'utils/test-utils'; import PanelHistory from './index'; import { QueryHistoryContext } from 'app/contexts/QueryHistoryContext'; const mocks = { Mutation: { // mutation has to return something updateForm: jest.fn(() => null), }...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelHistory/index.tsx
src/app/components/sidebar/PanelHistory/index.tsx
import React from 'react'; import Typography from '@material-ui/core/Typography'; import { withStyles, Theme } from '@material-ui/core/styles'; import QueryHistory from '../QueryHistory'; import { HISTORY_MAX_LENGTH } from '../../../../config'; const styles = (theme: Theme): any => ({ root: { paddingTop: theme....
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/PanelExplorer.test.tsx
src/app/components/sidebar/PanelExplorer/PanelExplorer.test.tsx
import React from 'react'; import { render, fireEvent, setupClient, within, wait } from 'utils/test-utils'; jest.mock('app/helpers/queryBase'); import { queryBase } from 'app/helpers/queryBase'; import PanelExplorer from './PanelExplorer'; const mocks = { Query: { form: () => ({ __typename: 'FormData', ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/PanelExplorer.tsx
src/app/components/sidebar/PanelExplorer/PanelExplorer.tsx
import React from 'react'; import gql from 'graphql-tag'; import { Query } from 'react-apollo'; import Typography from '@material-ui/core/Typography'; import { withStyles, Theme } from '@material-ui/core/styles'; import Explorer from './explorer/Explorer'; const styles = (theme: Theme): any => ({ root: { padding...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/explorer/Explorer.tsx
src/app/components/sidebar/PanelExplorer/explorer/Explorer.tsx
import React, { ReactNode } from 'react'; import { MuiThemeProvider } from '@material-ui/core/styles'; import ListItem from '@material-ui/core/ListItem'; import ListItemText from '@material-ui/core/ListItemText'; import { withStyles } from '@material-ui/core/styles'; import ExplorerItem from './ExplorerItem'; import E...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/explorer/theme.ts
src/app/components/sidebar/PanelExplorer/explorer/theme.ts
import { createMuiTheme } from '@material-ui/core/styles'; export default createMuiTheme({ typography: {}, overrides: { MuiSvgIcon: { root: { marginRight: 3, fontSize: 18, }, }, MuiButton: { label: { paddingRight: 8, }, sizeSmall: { paddingT...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/explorer/ExplorerCollapse/index.tsx
src/app/components/sidebar/PanelExplorer/explorer/ExplorerCollapse/index.tsx
import React from 'react'; import { Collapse } from '@material-ui/core'; // TODO: it might be rewritten to use React Context API (like react Popper do) type Props = { renderToggler: (toggle: () => void, isExpanded: boolean) => any; children: any; }; type State = { isExpanded: boolean; }; class ExplorerCollapse e...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/explorer/ExplorerButton/index.tsx
src/app/components/sidebar/PanelExplorer/explorer/ExplorerButton/index.tsx
import React from 'react'; import Button from '@material-ui/core/Button'; import { withStyles, Theme } from '@material-ui/core/styles'; import ExpandIcon from '@material-ui/icons/ExpandMore'; import CollapseIcon from '@material-ui/icons/ExpandLess'; const styles = (theme: Theme): any => ({ featuredText: { textT...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelExplorer/explorer/ExplorerItem/index.tsx
src/app/components/sidebar/PanelExplorer/explorer/ExplorerItem/index.tsx
import React, { useState, ReactNode } from 'react'; import Typography from '@material-ui/core/Typography'; import Collapse from '@material-ui/core/Collapse'; import IconButton from '@material-ui/core/IconButton'; import List from '@material-ui/core/List'; import RefreshIcon from '@material-ui/icons/Refresh'; import use...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelConnect/index.tsx
src/app/components/sidebar/PanelConnect/index.tsx
import React from 'react'; import Typography from '@material-ui/core/Typography'; import { withStyles, Theme } from '@material-ui/core/styles'; import Connections from '../Connections'; const styles = (theme: Theme): any => ({ root: { paddingTop: theme.spacing(), paddingLeft: 0, }, info: { padding: t...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/PanelReference/index.tsx
src/app/components/sidebar/PanelReference/index.tsx
import React from 'react'; import Typography from '@material-ui/core/Typography'; import { withStyles, Theme } from '@material-ui/core/styles'; import QueryReference from '../QueryReference'; import { DOCS_URL } from '../../../../config'; const styles = (theme: Theme): any => ({ root: { paddingTop: theme.spacing...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/QueryHistory/index.tsx
src/app/components/sidebar/QueryHistory/index.tsx
import React, { useContext } from 'react'; import gql from 'graphql-tag'; import { List, ListItem, ListItemIcon, ListItemText, Theme, } from '@material-ui/core'; import { ErrorOutline as ErrorIcon } from '@material-ui/icons'; import { Mutation } from 'react-apollo'; import { withStyles } from '@material-ui/co...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/Connections/index.test.tsx
src/app/components/sidebar/Connections/index.test.tsx
import React from 'react'; import { render, wait } from 'utils/test-utils'; import Connections, { GET_CONNECTIONS, DELETE_CONNECTION } from './index'; const mocks = (connections: any = []) => [ { request: { query: GET_CONNECTIONS, }, result: { data: { connections, }, }, },...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/sidebar/Connections/index.tsx
src/app/components/sidebar/Connections/index.tsx
import React, { ReactNode } from 'react'; import gql from 'graphql-tag'; import { useQuery, useMutation } from 'react-apollo'; import { List, ListItem, Button, Typography } from '@material-ui/core'; import DeleteIcon from '@material-ui/icons/Delete'; import { withStyles } from '@material-ui/core/styles'; const styles ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/App/index.tsx
src/app/components/App/index.tsx
import React, { useState } from 'react'; import Drawer from '@material-ui/core/Drawer'; import TopBar from '../TopBar'; import MainContent from '../MainContent/MainContent'; import { DrawerRight } from '../sidebar/DrawerRight'; import { useStyles } from './styles'; import { SettingsContextProvider } from 'app/context...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/components/App/styles.ts
src/app/components/App/styles.ts
import { makeStyles, createStyles, Theme } from '@material-ui/core/styles'; const mediaRule = '@media (min-width:0px) and (orientation: landscape)'; export const useStyles = makeStyles((theme: Theme) => createStyles({ root: { display: 'flex', flexGrow: 1, overflow: 'hidden', position: 'r...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/types/HistoryEntry.d.ts
src/app/types/HistoryEntry.d.ts
export type HistoryEntry = { query: string; error?: string; };
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/shared/influxRequest.test.ts
src/app/shared/influxRequest.test.ts
import { influxRequest } from './influxRequest'; jest.mock('axios'); import axios from 'axios'; describe('influxRequest()', () => { test('base request with additional Axios params', async () => { // given const params = { q: 'SELECT * FROM test', u: 'admin', p: 'admin', url: 'http://...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/shared/commonError.ts
src/app/shared/commonError.ts
export function commonError(error: any): any { if (error.isCommon) { return error; } if (error.response && error.response.status && error.response.statusText) { // console.log('request error'); // probably a request error return { title: `${error.response.status}: ${error.response.statusTex...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/shared/influxRequest.ts
src/app/shared/influxRequest.ts
import qs from 'qs'; import axios from 'axios'; export async function influxRequest({ q, u, p, url, db, ...axiosParams }: any): Promise<any> { return axios({ headers: { Accept: 'application/csv', }, data: qs.stringify({ q }), auth: { username: u, password: p, }, ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/shared/commonError.test.ts
src/app/shared/commonError.test.ts
import { commonError } from './commonError'; describe('commonError()', () => { test('already common', () => { // given const error = { isCommon: true }; // when/then expect(commonError(error)).toStrictEqual(error); }); test('request error', () => { // given const error = { response: { st...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/contexts/SettingsContext.tsx
src/app/contexts/SettingsContext.tsx
import React, { useState } from 'react'; export type TimeFormat = 's' | 'ms' | 'ns' | 'timestamp'; export type SettingsContext = { compactLayout: boolean; timeFormat: TimeFormat; setCompactLayout: (compactLayout: boolean) => void; setTimeFormat: (timeFormat: TimeFormat) => void; }; export const SETTINGS_CONTE...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/app/contexts/QueryHistoryContext.tsx
src/app/contexts/QueryHistoryContext.tsx
import React, { ReactNode } from 'react'; import { useStateAndStorage } from 'app/hooks/useStateAndStorage'; import { HistoryEntry } from 'app/types/HistoryEntry'; import { HISTORY_MAX_LENGTH } from '../../config'; type Props = { children: ReactNode; }; type QueryHistoryContext = { queryHistory: HistoryEntry[]; ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
timeseriesadmin/timeseriesadmin
https://github.com/timeseriesadmin/timeseriesadmin/blob/b9dd7e11789e5becf76d60a7cf48d00144c630d1/src/utils/test-utils.tsx
src/utils/test-utils.tsx
import React from 'react'; import { render, act } from '@testing-library/react'; import { MockedProvider } from '@apollo/react-testing'; import { ApolloProvider } from 'react-apollo'; import { ApolloClient } from 'apollo-client'; import { InMemoryCache } from 'apollo-cache-inmemory'; function customRender(node: any, ...
typescript
MIT
b9dd7e11789e5becf76d60a7cf48d00144c630d1
2026-01-05T05:00:12.129121Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/karma.shim.ts
karma.shim.ts
import 'es6-shim'; import 'reflect-metadata'; import 'zone.js/dist/zone'; import 'zone.js/dist/zone-testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; import { TestBed } from '@angular/core/testing'; TestBed.initTestEnvironment( Brows...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/app.component.ts
dev/app/app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'my-app', templateUrl: './app.component.html', moduleId: __moduleName }) export class AppComponent {}
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/app.module.ts
dev/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HttpClientModule } from '@angular/common/http'; import { BlockUIModule } from 'ng-block-ui'; import { BlockUIRouterModule, BlockUIPreventNavigation } fro...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/main.ts
dev/app/main.ts
import 'core-js/es7/reflect'; import 'zone.js/dist/zone'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app.module'; const platform = platformBrowserDynamic(); platform.bootstrapModule(AppModule);
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/block-template/block-template.component.ts
dev/app/block-template/block-template.component.ts
import { Component } from '@angular/core'; @Component({ styles: [` :host { color: #fff; } `], template: ` <div class="block-ui-template"> <div>{{message}}</div> <div>Custom Template</div> </div> `, }) export class BlockTemplateComponent { constructor() {} }
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/default/default.component.ts
dev/app/default/default.component.ts
import { Component } from '@angular/core'; import { BlockUI, NgBlockUI, BlockUIService } from 'ng-block-ui'; @Component({ selector: 'default', templateUrl: './default.component.html', styleUrls: ['./default.component.css'], moduleId: __moduleName }) export class DefaultComponent { @BlockUI() blockUI: NgBlock...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/landing-page/landing-page.component.ts
dev/app/landing-page/landing-page.component.ts
import { Component } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { BlockUI, NgBlockUI } from 'ng-block-ui'; @Component({ selector: 'landing-page', templateUrl: './landing-page.component.html', styleUrls: ['./landing-page.component.css'], moduleId: __moduleName }) export clas...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/block-element/block-element.component.ts
dev/app/block-element/block-element.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'block-element', templateUrl: './block-element.component.html', styleUrls: ['./block-element.component.css'], moduleId: __moduleName }) export class BlockElementComponent { constructor() { } }
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/block-element/block-element.module.ts
dev/app/block-element/block-element.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { BlockUIModule } from 'ng-block-ui'; import { BlockElementComponent } from './block-element.component'; @NgModule({ imports: [ BrowserModule, BlockUIModule ], declarations: [ BlockElementComp...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/dev/app/multi-http/multi-http.component.ts
dev/app/multi-http/multi-http.component.ts
import { Component } from "@angular/core"; import { HttpClient } from "@angular/common/http"; @Component({ selector: "multi-http", templateUrl: "./multi-http.component.html", styleUrls: [], moduleId: __moduleName }) export class MultiHttpComponent { requests = { first: "undefined", second: "undefined...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/test.ts
examples/default-message/src/test.ts
// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; declare ...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/typings.d.ts
examples/default-message/src/typings.d.ts
/* SystemJS module definition */ declare var module: NodeModule; interface NodeModule { id: string; }
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/polyfills.ts
examples/default-message/src/polyfills.ts
/** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. * 2. Application imports. Files imported...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/main.ts
examples/default-message/src/main.ts
import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } platformBrowserDynamic().bootstrapMod...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/app/app.component.ts
examples/default-message/src/app/app.component.ts
import { Component } from '@angular/core'; import { BlockUI, NgBlockUI } from 'ng-block-ui'; @Component({ selector: 'app-root', templateUrl: 'app.component.html', styleUrls: ['app.component.css'] }) export class AppComponent { // Wires up BlockUI instance @BlockUI() blockUI: NgBlockUI; constructor() {} ...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/app/app.module.ts
examples/default-message/src/app/app.module.ts
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { BlockUIModule } from 'ng-block-ui'; @NgModule({ imports: [ BrowserModule, BlockUIModule.forRoot({ message: 'Default Message...' }) ], dec...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/environments/environment.ts
examples/default-message/src/environments/environment.ts
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angul...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default-message/src/environments/environment.prod.ts
examples/default-message/src/environments/environment.prod.ts
export const environment = { production: true };
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/test.ts
examples/default/src/test.ts
// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; declare ...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/typings.d.ts
examples/default/src/typings.d.ts
/* SystemJS module definition */ declare var module: NodeModule; interface NodeModule { id: string; }
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/polyfills.ts
examples/default/src/polyfills.ts
/** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. * 2. Application imports. Files imported...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/main.ts
examples/default/src/main.ts
import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } platformBrowserDynamic().bootstrapMod...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/app/app.component.ts
examples/default/src/app/app.component.ts
import { Component } from '@angular/core'; import { BlockUI, NgBlockUI } from 'ng-block-ui'; @Component({ selector: 'app-root', templateUrl: 'app.component.html', styleUrls: ['app.component.css'] }) export class AppComponent { // Wires up BlockUI instance @BlockUI() blockUI: NgBlockUI; constructor() {} ...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/app/app.module.ts
examples/default/src/app/app.module.ts
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { BlockUIModule } from 'ng-block-ui'; @NgModule({ imports: [ BrowserModule, BlockUIModule.forRoot() ], declarations: [AppComponent], bootstrap: [Ap...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false
kuuurt13/ng-block-ui
https://github.com/kuuurt13/ng-block-ui/blob/88b2d21680c2f88217f17db1750230687550bd58/examples/default/src/environments/environment.ts
examples/default/src/environments/environment.ts
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angul...
typescript
MIT
88b2d21680c2f88217f17db1750230687550bd58
2026-01-05T05:00:13.531518Z
false