Compare commits

..

17 Commits

Author SHA1 Message Date
Manika Malhotra
17b993dea5 chore(frontend): remove the knip entry for the deleted floatingUiDomMock 2026-11-25 03:44:09 +05:30
Manika Malhotra
e5ee8ae42c Merge branch 'main' into chore/cleanup-unused-code 2026-11-25 03:34:18 +05:30
Manika Malhotra
b97344775b chore(frontend): add userEventWithDefaults to knip entries 2026-11-25 03:30:54 +05:30
Manika Malhotra
f0885ce51e fix(frontend): restore what main's new tests import 2026-11-25 03:30:51 +05:30
Manika Malhotra
66464f84f2 Merge branch 'main' into chore/cleanup-unused-code 2026-11-24 22:42:25 +05:30
Manika Malhotra
94709aa1d7 chore(frontend): remove dead global styles 2026-11-24 22:38:59 +05:30
Manika Malhotra
7f63f9ac37 chore(frontend): remove unused CSS module classes 2026-11-24 22:38:51 +05:30
Manika Malhotra
7b149ee98d refactor(frontend): remove unused exports 2026-11-24 22:38:35 +05:30
Manika Malhotra
a8a105ad41 test(frontend): remove mocks of modules the tests no longer load 2026-11-24 22:38:16 +05:30
Manika Malhotra
2056a7ec93 chore(frontend): give knip the entry points it cannot infer 2026-11-24 22:38:14 +05:30
Manika Malhotra
5a64826123 build(frontend): remove dead jest, vite and TypeScript config 2026-11-24 22:37:57 +05:30
Manika Malhotra
f5121fd0b6 chore(frontend): remove Radix leftovers and stale @signozhq/ui hints 2026-11-24 22:37:43 +05:30
Manika Malhotra
0338e22054 chore(frontend): remove unused images 2026-11-24 22:37:41 +05:30
Manika Malhotra
5bd30836b2 chore(query-builder): remove the unreachable v3 autocomplete client 2026-11-24 22:37:31 +05:30
Manika Malhotra
8fff975812 chore(dashboard): remove the unused first-section migration flow 2026-11-24 22:19:51 +05:30
Manika Malhotra
4cd0d972bb chore(frontend): remove components only their own tests and stories use 2026-11-24 22:19:44 +05:30
Manika Malhotra
7b6bf286b0 chore(frontend): remove unused files 2026-11-24 22:19:42 +05:30
1410 changed files with 4924 additions and 32856 deletions

View File

@@ -9,7 +9,7 @@ paths:
Examples and the harness API live in [`frontend/src/tests/README.md`](../../frontend/src/tests/README.md).
- **Import from the harness.** `render`, `screen`, `userEvent`, `waitFor` and the rest come from `tests/test-utils`, never from `@testing-library/react`. The harness mounts the router, React Query, Redux, app context and preferences. When it can't do what a test needs, extend `tests/test-utils` instead of importing around it.
- **Find elements by test ID.** Query with `getByTestId`/`findByTestId` on the `data-testid` or `testId` the component exposes, and add one to the component when it has none. Fall back to role or text only for markup the app doesn't own. A test ID matches exactly one element and survives copy and markup changes; `getByRole` checks the computed style of every element it visits and is the slowest query. Always go through Testing Library (`screen`, `within`), never the DOM: no `querySelector`, `closest`, `container` or `document.body`. `signoz/no-dom-node-access` flags the DOM calls in test files; a test that checks DOM structure on purpose disables it on that line with a reason. Never call a `*ByRole` query inside `waitFor` or a loop: `waitFor` re-runs its callback every 50 ms. Wait with `findByTestId`, then query.
- **Find elements by test ID.** Query with `getByTestId`/`findByTestId` on the `data-testid` or `testId` the component exposes, and add one to the component when it has none. Fall back to role or text only for markup the app doesn't own. A test ID matches exactly one element and survives copy and markup changes; `getByRole` checks the computed style of every element it visits and is the slowest query. Always go through Testing Library (`screen`, `within`), never the DOM: no `querySelector`, `closest`, `container` or `document.body`. Never call a `*ByRole` query inside `waitFor` or a loop: `waitFor` re-runs its callback every 50 ms. Wait with `findByTestId`, then query.
- **Interact like a user.** `const user = userEvent.setup()`, then an awaited `user.click`, `hover`, `keyboard` or `type`. The harness turns off the pointer-events check: Base UI popups sit inside an element with an inline `pointer-events: none`, and the stylesheet that turns it back on for the popup never loads in jsdom, so the check would block every click on them. Never turn it back on. `fireEvent` only for events `userEvent` has no equivalent for: scroll, resize, setting `scrollTop`.
- **Fake timers per test only**, for debounce or throttle, with `userEvent.setup({ advanceTimers: (ms) => jest.advanceTimersByTime(ms) })`. Never global.
- **Network through MSW.** The global server runs for every test; override per test with `server.use(...)` from `mocks-server/server`. Large fixtures go in `mocks-server/__mockdata__`.

View File

@@ -10,6 +10,5 @@
- **Use convensional commit format** for commits and PR title.
- **Do not amend the commits once pushed.** Always create a new commit once changes are pushed to remote.
- **Review fixes are new commits too.** A force push hides what changed from human reviewers and makes Greptile post its findings again. Bring in `main` with a merge; only a stacked branch (`gh stack`) rebases, since the stack moves as a unit.
- **A review fix to an AI-owned file fixes its generator too.** A file with the AI-owned banner (story mocks and plays, `tests/e2e/drivers/`) is rewritten by the skill or agent that made it, so a fix made only in the file comes back on the next run. In the same PR, add the lesson to that skill or agent as a concrete case.
- **Answer every Greptile thread.** Reply with the commit that fixes it (`Fixed in 4df6f3198d: <what changed>`) or the reason it stays, then resolve. Never resolve one with neither: Greptile withdraws a finding, and remembers it, only when told why.
- **Leave human review threads to the author.** Fix the code they ask for, but never reply to or resolve a human reviewer's thread.

View File

@@ -110,9 +110,8 @@ await expect(toggle.getAttribute('aria-checked')).toBe(before);
CI runs each play once, with its story's own args. Anyone can flip a control in the panel, and nothing runs the play against that value, so a play that breaks on it goes unnoticed. Write each play so it cannot.
Before writing the clicks, list what has to be on screen for the play's target to exist. Then walk every control the story exposes, the page's own as well as the shared ones, and return early for each value that takes something on that list away. These are the cases plays have missed:
Before writing the clicks, list what has to be on screen for the play's target to exist, and return early when the args take it away. These are the cases plays have missed:
- An arg the story sets. The story sets it because the play needs what that value renders, and the panel can flip it. On the `mine` view the dashboards Created-by filter opens with a tag to remove; on the other views it opens empty and there is no × to click. Check the tag is there by parsing the route the view resolves to.
- The controls every story has. `State` on loading or error renders no rows and no filter suggestions. `Access`, `Permissions` and `Revoked` remove rows, row actions and gated buttons, and the `editor` and `viewer` presets grant telemetry reads only, so a page gated on its own resource shows them nothing. `Check state` on loading disables every gated control, and on error an `AuthZButton` stays enabled while an `AuthZGuardContent` set to fail closed hides what it wraps. `License` and `Banner` decide the plan, so a cloud-only form is gone on the others. `Hold tooltips open` shows a label a second time, inside its tooltip.
- A count at 0. The page can swap its whole list for an empty state, and the header, filters and column picker go with it.
- A view, filter or invalid query that leaves no rows, even when the count is above 0.

View File

@@ -63,7 +63,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: check-semconv-generated-files
@@ -78,7 +78,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: qemu-install
@@ -114,7 +114,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: generate-openapi
@@ -131,7 +131,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: generate-authz
@@ -148,7 +148,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: generate-web-settings
@@ -165,7 +165,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: generate-transaction-groups

View File

@@ -131,10 +131,6 @@ func runGenerateAuthz(_ context.Context) error {
coretypes.NewResourceRef(coretypes.ResourceMetaResourceNotificationChannel).String(): true,
coretypes.NewResourceRef(coretypes.ResourceUser).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceFactorPassword).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceIngestionKey).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceIngestionLimit).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceAuthDomain).String(): true,
coretypes.NewResourceRef(coretypes.ResourceOrganization).String(): true,
}
allowedTypes := map[string]bool{}

View File

@@ -296,8 +296,6 @@
// Bans msw imports in *.stories.tsx; handlers/mock data belong in the sibling .stories.mocks.tsx
"signoz/no-direct-react-router-import": "error",
// Steers call sites to the src/lib/router facade (allowlisted in overrides below)
"signoz/no-builder-ai-query-access": "error",
// Steers AI slot access to lib/query/builderSlot (allowlisted in overrides below)
"no-restricted-globals": [
"error",
{
@@ -318,11 +316,6 @@
"name": "redux",
"message": "[State mgmt] redux is deprecated. Migrate to Zustand, nuqs, or react-query."
},
{
"name": "@signozhq/design-tokens",
"importNames": ["Style"],
"message": "[bundle] Style is a large object of CSS variable strings and is not tree-shaken. Write the CSS variable directly, for example 'var(--l3-foreground)'."
},
{
"name": "react-redux",
"message": "[State mgmt] react-redux is deprecated. Migrate to Zustand, nuqs, or react-query."
@@ -345,11 +338,6 @@
"importNames": ["patchDashboardV2", "usePatchDashboardV2"],
"message": "[dashboard-v2] Don't call patchDashboardV2/usePatchDashboardV2 directly — use useOptimisticPatch().patchAsync so spec edits update the react-query cache optimistically and reconcile on settle."
},
{
"name": "antd/lib",
"allowTypeImports": true,
"message": "[bundle] antd/lib is the CommonJS root and bundles every antd component. Import from 'antd' instead."
},
{
"name": "motion/react-client",
"message": "[motion] motion/react-client is for React Server Components only. Use 'motion/react' instead — it provides the same exports and works correctly in client-side SPAs."
@@ -518,7 +506,6 @@
"ignorePatterns": [
"src/parser/*.ts",
"scripts/update-registry.cjs",
"scripts/generate-permissions-type.cjs",
"**/node_modules",
"**/build",
"**/*.typegen.ts",
@@ -564,7 +551,6 @@
],
"rules": {
"import/first": "off",
"signoz/no-dom-node-access": "error",
// Should ignore due to mocks
"signoz/no-navigator-clipboard": "off",
// Tests can use navigator.clipboard directly,
@@ -572,8 +558,6 @@
"no-restricted-globals": "off",
// Tests need raw localStorage/sessionStorage to seed DOM state for isolation
"signoz/no-zustand-getstate-in-hooks": "off",
"signoz/no-builder-ai-query-access": "off",
// Fixtures build and assert on the raw AI slot
"@typescript-eslint/no-explicit-any": "off", // Tests often need any for mocks/stubs
"@typescript-eslint/explicit-module-boundary-types": "off", // Return types not required in tests
"@typescript-eslint/explicit-function-return-type": "off" // Same as above rule, don't need to care about return type
@@ -630,20 +614,6 @@
"rules": {
"signoz/no-direct-react-router-import": "off"
}
},
{
// builderSlot owns the AI slot; the rest normalise its wire shape or test whether it exists, which the helpers hide
"files": [
"src/lib/query/builderSlot.ts",
"src/hooks/queryBuilder/normalizeCompositeQuery.ts",
"src/hooks/queryBuilder/useGetCompositeQueryParam.ts",
"src/providers/QueryBuilder.tsx",
"src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelKindChange.ts",
"src/pages/DashboardPage/DashboardContainer/Panels/utils/seedBuilderForMode.ts"
],
"rules": {
"signoz/no-builder-ai-query-access": "off"
}
}
]
}

View File

@@ -15,6 +15,8 @@
content="frame-src 'self' blob: data:"
/>
<link rel="stylesheet" href="css/uPlot.min.css" />
<script>
// i18n's language detector would pick the browser locale (e.g. `en-US`), which
// /public/locales does not ship; pin it to the bundled language instead.

View File

@@ -21,8 +21,7 @@ import i18n from '../src/ReactI18';
// `src/index.tsx` does this at boot: without it `@monaco-editor/react` falls back
// to its loader default and pulls Monaco from cdn.jsdelivr.net, which msw does
// not report because the requests look like static assets.
import '../src/lib/monaco/loader';
import '../src/lib/uPlotStylesheet';
import '../src/lib/monaco/setup';
import '../src/styles.scss';
@@ -177,7 +176,6 @@ const preview: Preview = {
'AI Observability',
['Overview', 'Explorer', 'Model Pricing', 'Attribute Mapping'],
'Noz',
['Overview', 'Modal', 'Panel'],
'Metering',
['Cost Meter', 'Usage Explorer'],
'Messaging Queues',
@@ -198,9 +196,7 @@ const preview: Preview = {
['Overview', 'Authz'],
'Service Accounts',
'Ingestion',
['Overview', 'Authz'],
'Single Sign-on',
['Overview', 'Authz'],
'Keyboard Shortcuts',
],
'Auth',

View File

@@ -12,7 +12,6 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preconnect" href="https://cdn.vercel.com" crossorigin />
<title data-react-helmet="true">
Open source Observability platform | SigNoz
@@ -157,6 +156,7 @@
})(document, 'script');
}
</script>
<link rel="stylesheet" href="css/uPlot.min.css" />
<script type="module" src="./src/index.tsx"></script>
</body>
</html>

View File

@@ -11,17 +11,16 @@ const config: Config.InitialOptions = {
coverageReporters: ['text', 'cobertura', 'html', 'json-summary'],
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
modulePathIgnorePatterns: ['dist'],
moduleNameMapper: {
'\\.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff|wav)$':
'\\.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)$':
'<rootDir>/__mocks__/fileMock.ts',
// The icon glob module uses `import.meta.glob` (Vite-only); jest can't parse
// it, so redirect any import of it to a stub.
'(^|/)iconAssets$': '<rootDir>/__mocks__/iconAssetsMock.ts',
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|less|scss)$': '<rootDir>/__mocks__/cssMock.ts',
'\\.(css|scss)$': '<rootDir>/__mocks__/cssMock.ts',
'\\.module\\.mjs$': '<rootDir>/__mocks__/cssMock.ts',
'\\.md$': '<rootDir>/__mocks__/cssMock.ts',
'^uplot$': '<rootDir>/__mocks__/uplotMock.ts',
'^motion/react$': '<rootDir>/__mocks__/motionMock.tsx',
'^hooks/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
@@ -56,12 +55,11 @@ const config: Config.InitialOptions = {
},
// TODO: https://github.com/SigNoz/engineering-pod/issues/5334
transformIgnorePatterns: [
// @chenglou/pretext is ESM-only; @signozhq/ui pulls it in via text-ellipsis.
// Pattern 1: allow .pnpm virtual store through (handled by pattern 2), plus root-level ESM packages.
'node_modules/(?!(\\.pnpm|react-json-tree|react-base16-styling|lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@chenglou/pretext|@signozhq/design-tokens|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|api|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|copy-text-to-clipboard|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|micromark-core-commonmark|micromark-extension-gfm|micromark-extension-gfm-autolink-literal|micromark-extension-gfm-footnote|micromark-extension-gfm-strikethrough|micromark-extension-gfm-table|micromark-extension-gfm-tagfilter|micromark-extension-gfm-task-list-item|micromark-factory-destination|micromark-factory-label|micromark-factory-space|micromark-factory-title|micromark-factory-whitespace|micromark-util-character|micromark-util-chunked|micromark-util-classify-character|micromark-util-combine-extensions|micromark-util-decode-numeric-character-reference|micromark-util-decode-string|micromark-util-encode|micromark-util-html-tag-name|micromark-util-normalize-identifier|micromark-util-resolve-all|micromark-util-sanitize-uri|micromark-util-subtokenize|micromark-util-symbol|micromark-util-types|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)/)',
'node_modules/(?!(\\.pnpm|react-json-tree|react-base16-styling|lodash-es|react-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq/design-tokens|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|micromark-core-commonmark|micromark-extension-gfm|micromark-extension-gfm-autolink-literal|micromark-extension-gfm-footnote|micromark-extension-gfm-strikethrough|micromark-extension-gfm-table|micromark-extension-gfm-tagfilter|micromark-extension-gfm-task-list-item|micromark-factory-destination|micromark-factory-label|micromark-factory-space|micromark-factory-title|micromark-factory-whitespace|micromark-util-character|micromark-util-chunked|micromark-util-classify-character|micromark-util-combine-extensions|micromark-util-decode-numeric-character-reference|micromark-util-decode-string|micromark-util-encode|micromark-util-html-tag-name|micromark-util-normalize-identifier|micromark-util-resolve-all|micromark-util-sanitize-uri|micromark-util-subtokenize|micromark-util-symbol|micromark-util-types|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)/)',
// Pattern 2: pnpm virtual store — ignore everything except ESM-only packages.
// pnpm encodes scoped packages as @scope+name@version, so match on scope prefix.
'node_modules/\\.pnpm/(?!(react-json-tree|react-base16-styling|lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@chenglou|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|api|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|copy-text-to-clipboard|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)[^/]*/node_modules)',
'node_modules/\\.pnpm/(?!(react-json-tree|react-base16-styling|lodash-es|react-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)[^/]*/node_modules)',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['/node_modules/', '/public/'],

View File

@@ -8,12 +8,10 @@
import { TextDecoder, TextEncoder } from 'node:util';
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';
import 'jest-styled-components';
import { server } from './src/mocks-server/server';
import './src/styles.scss';
// Establish API mocking before all tests.
// react-router@7's entry point pulls in its server-runtime cookie signing,
@@ -52,8 +50,8 @@ if (!Range.prototype.getClientRects) {
document.body.getBoundingClientRect();
}
// jsdom doesn't implement the Pointer Capture API, which Radix UI primitives
// (e.g. @signozhq/ui Select) call when opening. Stub them so those components
// jsdom doesn't implement the Pointer Capture API, which Base UI primitives
// (e.g. @signozhq/ui Slider and ScrollArea) call. Stub them so those components
// can be exercised in tests.
if (!HTMLElement.prototype.hasPointerCapture) {
HTMLElement.prototype.hasPointerCapture = function (): boolean {

View File

@@ -1,8 +1,18 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"scripts/**/*.{mjs,cjs}",
"src/storybook/mocks/*.mock.{ts,tsx}",
"src/tests/userEventWithDefaults.ts"
],
"project": ["src/**/*.ts", "src/**/*.tsx"],
"ignore": ["src/api/generated/**/*.ts", "src/typings/*.ts"],
"ignore": [
"src/api/generated/**/*.ts",
"src/typings/*.ts",
"src/constants/generated/semconvFamilies.gen.ts",
".storybook/public/**"
],
"ignoreDependencies": [
"@typescript/native-preview"
]
}
}

View File

@@ -57,7 +57,7 @@
"@signozhq/design-tokens": "2.8.0",
"@signozhq/icons": "0.4.0",
"@signozhq/noz-client": "1.13.0",
"@signozhq/ui": "0.4.1-rc.2",
"@signozhq/ui": "0.4.0-rc.5",
"@tanstack/react-table": "8.21.3",
"@tanstack/react-virtual": "3.13.22",
"@uiw/codemirror-theme-copilot": "4.23.11",

View File

@@ -1,59 +0,0 @@
import { ruleTester } from './rule-tester.mjs';
const message =
'from lib/query/builderSlot instead of accessing builder_ai_query';
await ruleTester({
rule: 'no-builder-ai-query-access',
valid: [
{
name: 'reading through the slot helper',
code: 'export const data = getActiveBuilder(query).queryData;',
},
{
name: 'reading the builder slot',
code: 'export const data = query.builder.queryData;',
},
{
name: 'building a query with the AI slot',
code: 'export const next = { ...query, builder_ai_query: builder };',
},
{
name: 'generated enum member',
code:
'export const type = Querybuildertypesv5QueryTypeDTO.builder_ai_query;',
},
{
name: 'type position',
code: "export type Slot = Query['builder_ai_query'];",
},
],
invalid: [
{
name: 'picking the slot by query type',
code:
'export const data =\n\tquery.queryType === EQueryType.AI_QUERY_BUILDER\n\t\t? query.builder_ai_query?.queryData\n\t\t: query.builder.queryData;',
errors: [{ message, line: 3 }],
},
{
name: 'optional chaining',
code: 'export const slot = query?.builder_ai_query;',
errors: [{ message, line: 1 }],
},
{
name: 'writing the slot',
code: 'query.builder_ai_query = builder;',
errors: [{ message, line: 1 }],
},
{
name: 'bracket access',
code: "export const slot = query['builder_ai_query'];",
errors: [{ message, line: 1 }],
},
{
name: 'destructuring',
code: 'export const { builder_ai_query: slot } = query;',
errors: [{ message, line: 1 }],
},
],
});

View File

@@ -1,60 +0,0 @@
import { ruleTester } from './rule-tester.mjs';
const message = (name) =>
`Find elements through Testing Library (\`screen\`, \`within\`) instead of \`${name}\`.`;
await ruleTester({
rule: 'no-dom-node-access',
valid: [
{
name: 'Testing Library queries',
code: "within(screen.getByTestId('row')).getByText('Name');",
},
{
name: 'a query method that is not called',
code:
'jest.spyOn(document, "querySelector");\nconst q = Element.prototype.closest;',
},
{
name: 'computed access',
code: "const name = 'closest';\nel[name]('tr');",
},
],
invalid: [
{
name: 'querySelector on the container',
code: "container.querySelector('.row');",
errors: [{ message: message('querySelector'), line: 1, column: 11 }],
},
{
name: 'closest after a screen query',
code: "screen.getByText('Name').closest('tr');",
errors: [{ message: message('closest'), line: 1, column: 26 }],
},
{
name: 'optional call',
code: "row?.querySelectorAll('td');",
errors: [{ message: message('querySelectorAll'), line: 1, column: 6 }],
},
{
name: 'traversal property',
code: 'expect(cell.parentElement).toBeVisible();',
errors: [{ message: message('parentElement'), line: 1, column: 13 }],
},
{
name: 'children of a DOM node',
code: "expect(screen.getByTestId('list').children).toHaveLength(2);",
errors: [{ message: message('children'), line: 1, column: 35 }],
},
{
name: 'children of a data tree',
code: 'expect(tree.children).toHaveLength(2);',
errors: [{ message: message('children'), line: 1, column: 13 }],
},
{
name: 'document lookup by id',
code: "document.getElementById('root');",
errors: [{ message: message('getElementById'), line: 1, column: 10 }],
},
],
});

View File

@@ -18,7 +18,7 @@ const BANNED_COMPONENTS = {
'Use @signozhq/ui/typography Typography instead of antd Typography.',
Switch: 'Use @signozhq/ui/switch Switch instead of antd Switch.',
Dropdown:
'Use @signozhq/ui DropdownMenuSimple (or the composable DropdownMenu primitives) from @signozhq/ui/dropdown-menu instead of antd Dropdown.',
'Use @signozhq/ui/dropdown Dropdown instead of antd Dropdown.',
Badge: 'Use @signozhq/ui/badge instead of antd Badge.',
Radio:
'Use @signozhq/ui/radio-group RadioGroup (dots) or @signozhq/ui/toggle-group ToggleGroup (segmented buttons) instead of antd Radio.',

View File

@@ -1,51 +0,0 @@
const SLOT = 'builder_ai_query';
function isSlotKey(key, computed) {
if (key.type === 'Literal') {
return key.value === SLOT;
}
return !computed && key.type === 'Identifier' && key.name === SLOT;
}
// Generated enums like Querybuildertypesv5QueryTypeDTO.builder_ai_query are not queries
function isGeneratedEnum(object) {
return object.type === 'Identifier' && /^[A-Z]/.test(object.name);
}
export default {
meta: {
type: 'suggestion',
docs: {
description:
'Disallow direct builder_ai_query access; use the lib/query/builderSlot helpers',
category: 'Query Builder',
},
schema: [],
messages: {
useSlotHelper:
'Use getActiveBuilder, getBuilderBySlotKey or replaceBuilderBySlotKey from lib/query/builderSlot instead of accessing builder_ai_query directly.',
},
},
create(context) {
return {
MemberExpression(node) {
if (
isSlotKey(node.property, node.computed) &&
!isGeneratedEnum(node.object)
) {
context.report({ node, messageId: 'useSlotHelper' });
}
},
ObjectPattern(node) {
node.properties.forEach((property) => {
if (
property.type === 'Property' &&
isSlotKey(property.key, property.computed)
) {
context.report({ node: property, messageId: 'useSlotHelper' });
}
});
},
};
},
};

View File

@@ -1,60 +0,0 @@
/**
* Rule: no-dom-node-access
*
* Tests find elements through Testing Library (`screen`, `within`), not by
* walking the DOM. Flags calls to DOM query methods and reads of node
* traversal properties:
* container.querySelector('.row')
* screen.getByText('Name').closest('tr')
* cell.parentElement
* list.children
*
* A non-DOM `children` read (a data tree, React props) disables the rule on
* that line with a reason.
*/
const QUERY_METHODS = new Set([
'querySelector',
'querySelectorAll',
'closest',
'getElementById',
'getElementsByClassName',
'getElementsByTagName',
'getElementsByName',
]);
const TRAVERSAL_PROPERTIES = new Set([
'parentElement',
'parentNode',
'firstChild',
'lastChild',
'firstElementChild',
'lastElementChild',
'nextSibling',
'previousSibling',
'nextElementSibling',
'previousElementSibling',
'childNodes',
'children',
]);
export default {
create(context) {
return {
MemberExpression(node) {
if (node.computed || node.property.type !== 'Identifier') {
return;
}
const { name } = node.property;
const isCall =
node.parent?.type === 'CallExpression' && node.parent.callee === node;
if ((isCall && QUERY_METHODS.has(name)) || TRAVERSAL_PROPERTIES.has(name)) {
context.report({
node: node.property,
message: `Find elements through Testing Library (\`screen\`, \`within\`) instead of \`${name}\`.`,
});
}
},
};
},
};

View File

@@ -12,10 +12,10 @@
* And expects:
* import { Typography } from '@signozhq/ui/typography'
* import { Button } from '@signozhq/ui/button'
* import { toast } from '@signozhq/ui/sonner'
* import { toast } from '@signozhq/ui/toast'
*
* Why: the barrel eagerly require()s every component (~90 of them) along with
* their Radix/cmdk/motion/react-day-picker dependencies. Under Jest this caused
* Why: the barrel eagerly require()s every component along with their
* Base UI/react-day-picker dependencies. Under Jest this caused
* 5s timeouts and flaky tests after the Antd→@signozhq/ui Typography migration
* (#11199). Subpath imports (added in @signozhq/ui@0.0.18) load only what's
* used.
@@ -198,7 +198,7 @@ export default {
const report = {
node: node.source,
message:
"Do not import from the '@signozhq/ui' barrel. Use the matching subpath instead (e.g. '@signozhq/ui/typography', '@signozhq/ui/button', '@signozhq/ui/sonner'). The barrel eagerly loads ~90 components and slows tests substantially.",
"Do not import from the '@signozhq/ui' barrel. Use the matching subpath instead (e.g. '@signozhq/ui/typography', '@signozhq/ui/button', '@signozhq/ui/toast'). The barrel eagerly loads every component and slows tests substantially.",
};
if (replacement) {
report.fix = (fixer) => fixer.replaceText(node, replacement);

View File

@@ -19,8 +19,6 @@ import noMswInStoryFile from './rules/no-msw-in-story-file.mjs';
import noDirectReactRouterImport from './rules/no-direct-react-router-import.mjs';
import noTextCss from './rules/no-text-css.mjs';
import requireDisableReason from './rules/require-disable-reason.mjs';
import noDomNodeAccess from './rules/no-dom-node-access.mjs';
import noBuilderAiQueryAccess from './rules/no-builder-ai-query-access.mjs';
export default {
meta: {
@@ -41,7 +39,5 @@ export default {
'no-direct-react-router-import': noDirectReactRouterImport,
'no-text-css': noTextCss,
'require-disable-reason': requireDisableReason,
'no-dom-node-access': noDomNodeAccess,
'no-builder-ai-query-access': noBuilderAiQueryAccess,
},
};

View File

@@ -86,8 +86,8 @@ importers:
specifier: 1.13.0
version: 1.13.0(axios@1.21.1)(react-query@3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)
'@signozhq/ui':
specifier: 0.4.1-rc.2
version: 0.4.1-rc.2(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
specifier: 0.4.0-rc.5
version: 0.4.0-rc.5(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@tanstack/react-table':
specifier: 8.21.3
version: 8.21.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
@@ -3258,8 +3258,8 @@ packages:
react: ^18.2.0
react-query: ^3.39.3
'@signozhq/ui@0.4.1-rc.2':
resolution: {integrity: sha512-pCMRzrJ6CmGjEgAQ2B6wRRengP2sy7Y860Npr5nkCapc9NPH5jy4VO48CDv5gnKwWSKShmLHwzbiK2E1cGndKQ==}
'@signozhq/ui@0.4.0-rc.5':
resolution: {integrity: sha512-WlJMfeDfvL2hjMpTpHhhND/tuK7X0sfXQlx6E1ZG+6E/DYHpuhYljfvW3E6/BohIlHFlTyCs/ZMl9wnV2k9Zcw==}
peerDependencies:
'@signozhq/design-tokens': '>=2.7.0'
'@signozhq/icons': 0.3.0
@@ -12389,7 +12389,7 @@ snapshots:
react: 18.2.0
react-query: 3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@signozhq/ui@0.4.1-rc.2(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
'@signozhq/ui@0.4.0-rc.5(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
dependencies:
'@base-ui/react': 1.8.0(@date-fns/tz@1.4.1)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@signozhq/design-tokens': 2.8.0

1
frontend/public/css/uPlot.min.css vendored Normal file
View File

@@ -0,0 +1 @@
.uplot, .uplot *, .uplot *::before, .uplot *::after {box-sizing: border-box;}.uplot {font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";line-height: 1.5;width: min-content;}.u-title {text-align: center;font-size: 18px;font-weight: bold;}.u-wrap {position: relative;user-select: none;}.u-over, .u-under {position: absolute;}.u-under {overflow: hidden;}.uplot canvas {display: block;position: relative;width: 100%;height: 100%;}.u-axis {position: absolute;}.u-legend {font-size: 14px;margin: auto;text-align: center;}.u-inline {display: block;}.u-inline * {display: inline-block;}.u-inline tr {margin-right: 16px;}.u-legend th {font-weight: 600;}.u-legend th > * {vertical-align: middle;display: inline-block;}.u-legend .u-marker {width: 1em;height: 1em;margin-right: 4px;background-clip: padding-box !important;}.u-inline.u-live th::after {content: ":";vertical-align: middle;}.u-inline:not(.u-live) .u-value {display: none;}.u-series > * {padding: 4px;}.u-series th {cursor: pointer;}.u-legend .u-off > * {opacity: 0.3;}.u-select {background: rgba(0,0,0,0.07);position: absolute;pointer-events: none;}.u-cursor-x, .u-cursor-y {position: absolute;left: 0;top: 0;pointer-events: none;will-change: transform;}.u-hz .u-cursor-x, .u-vt .u-cursor-y {height: 100%;border-right: 1px dashed #607D8B;}.u-hz .u-cursor-y, .u-vt .u-cursor-x {width: 100%;border-bottom: 1px dashed #607D8B;}.u-cursor-pt {position: absolute;top: 0;left: 0;border-radius: 50%;border: 0 solid;pointer-events: none;will-change: transform;/*this has to be !important since we set inline "background" shorthand */background-clip: padding-box !important;}.u-axis.u-off, .u-select.u-off, .u-cursor-x.u-off, .u-cursor-y.u-off, .u-cursor-pt.u-off {display: none;}

View File

@@ -117,8 +117,6 @@
"log_based_alert_desc": "Send a notification when a condition occurs in the logs data.",
"traces_based_alert": "Trace-based Alert",
"traces_based_alert_desc": "Send a notification when a condition occurs in the traces data.",
"ai_traces_based_alert": "AI Trace-based Alert",
"ai_traces_based_alert_desc": "Send a notification when a condition occurs in AI and LLM traces.",
"exceptions_based_alert": "Exceptions-based Alert",
"exceptions_based_alert_desc": "Send a notification when a condition occurs in the exceptions data.",
"field_unit": "Threshold unit",

View File

@@ -121,8 +121,6 @@
"log_based_alert_desc": "Send a notification when a condition occurs in the logs data.",
"traces_based_alert": "Trace-based Alert",
"traces_based_alert_desc": "Send a notification when a condition occurs in the traces data.",
"ai_traces_based_alert": "AI Trace-based Alert",
"ai_traces_based_alert_desc": "Send a notification when a condition occurs in AI and LLM traces.",
"exceptions_based_alert": "Exceptions-based Alert",
"exceptions_based_alert_desc": "Send a notification when a condition occurs in the exceptions data.",
"field_unit": "Threshold unit",

View File

@@ -175,8 +175,8 @@ function PrivateRoute({ children }: PrivateRouteProps): JSX.Element {
pathname === ROUTES.SETTINGS ||
pathname === ROUTES.BILLING ||
pathname === ROUTES.MEMBERS_SETTINGS ||
pathname === ROUTES.ORG_SETTINGS ||
(isAdmin && pathname === ROUTES.MY_SETTINGS);
(isAdmin &&
(pathname === ROUTES.ORG_SETTINGS || pathname === ROUTES.MY_SETTINGS));
if (
pathname !== ROUTES.WORKSPACE_LOCKED &&

View File

@@ -808,7 +808,7 @@ describe('PrivateRoute', () => {
assertStaysOnRoute(ROUTES.BILLING);
});
it('should allow VIEWER to access org-settings when workspace is blocked', () => {
it('should redirect VIEWER to workspace locked when trying to access org-settings', async () => {
renderPrivateRoute({
initialRoute: ROUTES.ORG_SETTINGS,
appContext: {
@@ -821,7 +821,7 @@ describe('PrivateRoute', () => {
isCloudUser: true,
});
assertStaysOnRoute(ROUTES.ORG_SETTINGS);
await assertRedirectsTo(ROUTES.WORKSPACE_LOCKED);
});
it('should allow VIEWER to access members settings when workspace is blocked', () => {
@@ -1707,7 +1707,6 @@ describe('PrivateRoute', () => {
// Everything under /settings resolves to the non-exact SETTINGS route
SETTINGS: { path: ROUTES.SETTINGS, deniedRoles: DENIED_ROLES },
MY_SETTINGS: { path: ROUTES.MY_SETTINGS, deniedRoles: DENIED_ROLES },
ORG_SETTINGS: { path: ROUTES.ORG_SETTINGS, deniedRoles: DENIED_ROLES },
ROLES_SETTINGS: { path: ROUTES.ROLES_SETTINGS, deniedRoles: DENIED_ROLES },
ROLE_CREATE: { path: ROUTES.ROLE_CREATE, deniedRoles: DENIED_ROLES },
ROLE_DETAILS: {

View File

@@ -129,18 +129,6 @@ export const StatusPage = Loadable(
() => import(/* webpackChunkName: "All Status" */ 'pages/Status'),
);
export const OrganizationSettings = Loadable(
() => import(/* webpackChunkName: "All Settings" */ 'pages/Settings'),
);
export const IngestionSettings = Loadable(
() => import(/* webpackChunkName: "Ingestion Settings" */ 'pages/Settings'),
);
export const MySettings = Loadable(
() => import(/* webpackChunkName: "All MySettings" */ 'pages/Settings'),
);
export const Logs = Loadable(
() => import(/* webpackChunkName: "Logs" */ 'pages/LogsModulePage'),
);
@@ -181,10 +169,6 @@ export const LogsIndexToFields = Loadable(
import(/* webpackChunkName: "LogsIndexToFields Page" */ 'pages/LogsSettings'),
);
export const BillingPage = Loadable(
() => import(/* webpackChunkName: "BillingPage" */ 'pages/Settings'),
);
export const SupportPage = Loadable(
() => import(/* webpackChunkName: "SupportPage" */ 'pages/Support'),
);
@@ -208,10 +192,6 @@ export const WorkspaceAccessRestricted = Loadable(
),
);
export const ShortcutsPage = Loadable(
() => import(/* webpackChunkName: "ShortcutsPage" */ 'pages/Settings'),
);
export const Integrations = Loadable(
() =>
import(
@@ -230,13 +210,6 @@ export const MessagingQueuesMainPage = Loadable(
import(/* webpackChunkName: "MessagingQueues" */ 'pages/MessagingQueues'),
);
export const MQDetailPage = Loadable(
() =>
import(
/* webpackChunkName: "MQDetailPage" */ 'pages/MessagingQueues/MQDetailPage'
),
);
export const InfrastructureMonitoring = Loadable(
() =>
import(
@@ -244,20 +217,6 @@ export const InfrastructureMonitoring = Loadable(
),
);
export const CeleryTask = Loadable(
() =>
import(
/* webpackChunkName: "CeleryTask" */ 'pages/Celery/CeleryTask/CeleryTask'
),
);
export const CeleryOverview = Loadable(
() =>
import(
/* webpackChunkName: "CeleryOverview" */ 'pages/Celery/CeleryOverview/CeleryOverview'
),
);
export const MetricsExplorer = Loadable(
() =>
import(/* webpackChunkName: "MetricsExplorer" */ 'pages/MetricsExplorer'),

View File

@@ -19,7 +19,7 @@ export const SIGNOZ_URL_HEADER = 'X-SigNoz-URL';
* needs the originating SigNoz instance URL for multi-tenant deployments;
* when omitted it falls back to its `SIGNOZ_API_URL` env var.
*/
export const interceptorsRequestSigNozUrl = (
const interceptorsRequestSigNozUrl = (
value: InternalAxiosRequestConfig,
): InternalAxiosRequestConfig => {
if (value.headers) {

View File

@@ -35,7 +35,6 @@ import type {
ClarifyResponseDTO,
CreateMessageResponseDTO,
CreateThreadResponseDTO,
ExecutionStateDTO,
FeedbackRatingDTO,
ListThreadsApiV1AssistantThreadsGetArchived,
ListThreadsApiV1AssistantThreadsGetParams,
@@ -177,9 +176,6 @@ async function fetchSSEWithAuth(
return res;
}
/** String-literal view of `ExecutionStateDTO` for ergonomic comparisons. */
export type ExecutionState = `${ExecutionStateDTO}`;
// ---------------------------------------------------------------------------
// Re-exported DTOs — the wire shape, used directly without remapping.
// ---------------------------------------------------------------------------
@@ -375,7 +371,7 @@ async function* readSSEReader(
* Carries the HTTP status so callers can branch on rate-limit vs. other
* failures (e.g. show a "please wait a moment" message on 429).
*/
export class SSEStreamError extends Error {
class SSEStreamError extends Error {
status: number;
constructor(status: number, statusText: string) {

View File

@@ -1,34 +0,0 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import convertObjectIntoParams from 'lib/query/convertObjectIntoParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/alerts/getTriggered';
/**
* @deprecated Use the generated `useGetAlerts` hook (or `getAlerts` fetcher) from
* `api/generated/services/alerts` instead. This hand-written client targets the
* same endpoint and will be removed once call sites migrate.
*
* Part of https://github.com/SigNoz/engineering-pod/issues/5289, add a comment or update when removing this method.
*/
const getTriggered = async (
props: Props,
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
try {
const queryParams = convertObjectIntoParams(props);
const response = await axios.get(`/alerts?${queryParams}`);
return {
statusCode: 200,
error: null,
message: response.data.status,
payload: response.data.data,
};
} catch (error) {
return ErrorResponseHandler(error as AxiosError);
}
};
export default getTriggered;

View File

@@ -17,11 +17,13 @@ function loadGetModule(href: string): GetModule {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../get');
});
base.remove();
return mod;
}
afterEach(() => {
for (const el of document.head.querySelectorAll('base')) {
el.remove();
}
localStorage.clear();
});

View File

@@ -15,11 +15,13 @@ function loadGetModule(href: string): GetModule {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../get');
});
base.remove();
return mod;
}
afterEach(() => {
for (const el of document.head.querySelectorAll('base')) {
el.remove();
}
sessionStorage.clear();
});

View File

@@ -40,5 +40,3 @@ export const getFieldKeys = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default getFieldKeys;

View File

@@ -93,5 +93,3 @@ export const getFieldValues = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default getFieldValues;

View File

@@ -15,37 +15,6 @@ const generatedAPIAxiosInstance = axios.create({
paramsSerializer: { indexes: null },
});
let generatedAPIQueryKeyHeaderContext: Record<string, unknown> | undefined;
export const setGeneratedAPIQueryKeyHeaderContext = <THeaders extends object>(
headers?: THeaders,
): void => {
generatedAPIQueryKeyHeaderContext = headers
? { ...(headers as Record<string, unknown>) }
: undefined;
};
const hashHeaderValue = (value: string): string => {
let hash = 0;
for (let index = 0; index < value.length; index += 1) {
hash = (hash * 31 + value.charCodeAt(index)) >>> 0;
}
return hash.toString(16);
};
const mergeHeaderRecord = (
target: Record<string, unknown>,
source: unknown,
): Record<string, unknown> => {
if (!source || typeof source !== 'object') {
return target;
}
return Object.assign(target, source as Record<string, unknown>);
};
export const GeneratedAPIInstance = <T>(
config: AxiosRequestConfig,
): Promise<T> => {
@@ -60,59 +29,5 @@ generatedAPIAxiosInstance.interceptors.response.use(
interceptorRejected,
);
const getDefaultQueryKeyHeaders = (): Record<string, unknown> => {
const defaults = generatedAPIAxiosInstance.defaults
.headers as unknown as Record<string, unknown>;
const headers: Record<string, unknown> = {};
const methodKeys = new Set([
'common',
'delete',
'get',
'head',
'options',
'patch',
'post',
'put',
]);
mergeHeaderRecord(headers, defaults?.common);
mergeHeaderRecord(headers, defaults?.get);
for (const [key, value] of Object.entries(defaults ?? {})) {
if (!methodKeys.has(key)) {
headers[key] = value;
}
}
return headers;
};
export const getGeneratedAPIQueryKeyHeaders = <THeaders extends object>(
headers?: THeaders,
): [{ headers: Record<string, unknown> }] | [] => {
const mergedHeaders = {
...getDefaultQueryKeyHeaders(),
...generatedAPIQueryKeyHeaderContext,
...(headers as Record<string, unknown> | undefined),
};
const queryKeyHeaders = Object.fromEntries(
Object.entries(mergedHeaders)
.filter(([, value]) => value !== undefined)
.sort(([left], [right]) => left.localeCompare(right))
.map(([key, value]) => {
if (key.toLowerCase() === 'authorization' && typeof value === 'string') {
return [key, hashHeaderValue(value)];
}
return [key, value];
}),
);
return Object.keys(queryKeyHeaders).length
? [{ headers: queryKeyHeaders }]
: [];
};
export type ErrorType<Error> = AxiosError<Error>;
export type BodyType<BodyData> = BodyData;

View File

@@ -179,7 +179,7 @@ instance.interceptors.request.use(interceptorsRequestResponse);
instance.interceptors.request.use(interceptorsRequestBasePath);
instance.interceptors.response.use(interceptorsResponse, interceptorRejected);
export const AxiosAlertManagerInstance = axios.create({
const AxiosAlertManagerInstance = axios.create({
baseURL: `${ENVIRONMENT.baseURL}${apiAlertManager}`,
});
@@ -252,5 +252,4 @@ AxiosAlertManagerInstance.interceptors.response.use(
AxiosAlertManagerInstance.interceptors.request.use(interceptorsRequestResponse);
AxiosAlertManagerInstance.interceptors.request.use(interceptorsRequestBasePath);
export { apiV1 };
export default instance;

View File

@@ -1,50 +0,0 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, AxiosResponse } from 'axios';
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder';
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
import createQueryParams from 'lib/createQueryParams';
// ** Helpers
import { ErrorResponse, SuccessResponse } from 'types/api';
// ** Types
import { IGetAggregateAttributePayload } from 'types/api/queryBuilder/getAggregatorAttribute';
import {
BaseAutocompleteData,
IQueryAutocompleteResponse,
} from 'types/api/queryBuilder/queryAutocompleteResponse';
export const getAggregateAttribute = async ({
aggregateOperator,
searchText,
dataSource,
source,
}: IGetAggregateAttributePayload): Promise<
SuccessResponse<IQueryAutocompleteResponse> | ErrorResponse
> => {
try {
const response: AxiosResponse<{
data: IQueryAutocompleteResponse;
}> = await ApiV3Instance.get(
`/autocomplete/aggregate_attributes?${createQueryParams({
aggregateOperator,
searchText,
dataSource: source === 'meter' ? 'meter' : dataSource,
})}`,
);
const payload: BaseAutocompleteData[] =
response.data.data.attributeKeys?.map(({ id: _, ...item }) => ({
...item,
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder),
})) || [];
return {
statusCode: 200,
error: null,
message: response.statusText,
payload: { attributeKeys: payload },
};
} catch (e) {
return ErrorResponseHandler(e as AxiosError);
}
};

View File

@@ -1,50 +0,0 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, AxiosResponse } from 'axios';
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder';
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { IGetAttributeKeysPayload } from 'types/api/queryBuilder/getAttributeKeys';
import {
BaseAutocompleteData,
IQueryAutocompleteResponse,
} from 'types/api/queryBuilder/queryAutocompleteResponse';
export const getAggregateKeys = async ({
aggregateOperator,
searchText,
dataSource,
aggregateAttribute,
tagType,
}: IGetAttributeKeysPayload): Promise<
SuccessResponse<IQueryAutocompleteResponse> | ErrorResponse
> => {
try {
const response: AxiosResponse<{
data: IQueryAutocompleteResponse;
}> = await ApiV3Instance.get(
`/autocomplete/attribute_keys?${createQueryParams({
aggregateOperator,
searchText,
dataSource,
aggregateAttribute,
})}&tagType=${tagType}`,
);
const payload: BaseAutocompleteData[] =
response.data.data.attributeKeys?.map(({ id: _, ...item }) => ({
...item,
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder),
})) || [];
return {
statusCode: 200,
error: null,
message: response.statusText,
payload: { attributeKeys: payload },
};
} catch (e) {
return ErrorResponseHandler(e as AxiosError);
}
};

View File

@@ -1,63 +0,0 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, AxiosResponse } from 'axios';
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder';
import { encode } from 'js-base64';
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
IGetAttributeSuggestionsPayload,
IGetAttributeSuggestionsSuccessResponse,
} from 'types/api/queryBuilder/getAttributeSuggestions';
import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';
export const getAttributeSuggestions = async ({
searchText,
dataSource,
filters,
}: IGetAttributeSuggestionsPayload): Promise<
SuccessResponse<IGetAttributeSuggestionsSuccessResponse> | ErrorResponse
> => {
try {
let base64EncodedFiltersString;
try {
// the replace function is to remove the padding at the end of base64 encoded string which is auto added to make it a multiple of 4
// why ? because the current working of qs doesn't work well with padding
base64EncodedFiltersString = encode(JSON.stringify(filters)).replace(
/=+$/,
'',
);
} catch {
// default base64 encoded string for empty filters object
base64EncodedFiltersString = 'eyJpdGVtcyI6W10sIm9wIjoiQU5EIn0';
}
const response: AxiosResponse<{
data: IGetAttributeSuggestionsSuccessResponse;
}> = await ApiV3Instance.get(
`/filter_suggestions?${createQueryParams({
searchText,
dataSource,
existingFilter: base64EncodedFiltersString,
})}`,
);
const payload: BaseAutocompleteData[] =
response.data.data.attributes?.map(({ id: _, ...item }) => ({
...item,
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder),
})) || [];
return {
statusCode: 200,
error: null,
message: response.statusText,
payload: {
attributes: payload,
example_queries: response.data.data.example_queries,
},
};
} catch (e) {
return ErrorResponseHandler(e as AxiosError);
}
};

View File

@@ -1,42 +0,0 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
IAttributeValuesResponse,
IGetAttributeValuesPayload,
} from 'types/api/queryBuilder/getAttributesValues';
export const getAttributesValues = async ({
aggregateOperator,
dataSource,
aggregateAttribute,
attributeKey,
filterAttributeKeyDataType,
tagType,
searchText,
}: IGetAttributeValuesPayload): Promise<
SuccessResponse<IAttributeValuesResponse> | ErrorResponse
> => {
try {
const response = await ApiV3Instance.get(
`/autocomplete/attribute_values?${createQueryParams({
aggregateOperator,
dataSource,
aggregateAttribute,
attributeKey,
searchText,
})}&filterAttributeKeyDataType=${filterAttributeKeyDataType}&tagType=${tagType}`,
);
return {
statusCode: 200,
error: null,
message: response.data.status,
payload: response.data.data,
};
} catch (error) {
return ErrorResponseHandler(error as AxiosError);
}
};

View File

@@ -1,27 +0,0 @@
import { ApiV2Instance as axios } from 'api';
import { omit } from 'lodash-es';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
GetTraceFlamegraphPayloadProps,
GetTraceFlamegraphSuccessResponse,
} from 'types/api/trace/getTraceFlamegraph';
const getTraceFlamegraph = async (
props: GetTraceFlamegraphPayloadProps,
): Promise<
SuccessResponse<GetTraceFlamegraphSuccessResponse> | ErrorResponse
> => {
const response = await axios.post<GetTraceFlamegraphSuccessResponse>(
`/traces/flamegraph/${props.traceId}`,
omit(props, 'traceId'),
);
return {
statusCode: 200,
error: null,
message: 'Success',
payload: response.data,
};
};
export default getTraceFlamegraph;

View File

@@ -150,15 +150,6 @@ export const validateFunnelSteps = async (
};
};
export interface UpdateFunnelStepDetailsPayload {
funnel_id: string;
steps: Array<{
step_name: string;
description: string;
}>;
updated_at: number;
}
interface UpdateFunnelDescriptionPayload {
funnel_id: string;
description: string;

View File

@@ -73,5 +73,3 @@ export const downloadExportData = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default downloadExportData;

View File

@@ -1,24 +1,11 @@
// V5 Query Range Constants
import { ENTITY_VERSION_V5 } from 'constants/app';
import {
FunctionName,
RequestType,
SignalType,
Step,
} from 'types/api/v5/queryRange';
import { RequestType } from 'types/api/v5/queryRange';
// ===================== Schema and Version Constants =====================
export const SCHEMA_VERSION_V5 = ENTITY_VERSION_V5;
export const API_VERSION_V5 = 'v5';
// ===================== Default Values =====================
export const DEFAULT_STEP_INTERVAL: Step = '60s';
export const DEFAULT_LIMIT = 100;
export const DEFAULT_OFFSET = 0;
// ===================== Request Type Constants =====================
export const REQUEST_TYPES: Record<string, RequestType> = {
@@ -30,139 +17,14 @@ export const REQUEST_TYPES: Record<string, RequestType> = {
// ===================== Signal Type Constants =====================
export const SIGNAL_TYPES: Record<string, SignalType> = {
TRACES: 'traces',
LOGS: 'logs',
METRICS: 'metrics',
} as const;
// ===================== Common Aggregation Expressions =====================
export const TRACE_AGGREGATIONS = {
COUNT: 'count()',
COUNT_DISTINCT_TRACE_ID: 'count_distinct(traceID)',
AVG_DURATION: 'avg(duration_nano)',
P50_DURATION: 'p50(duration_nano)',
P95_DURATION: 'p95(duration_nano)',
P99_DURATION: 'p99(duration_nano)',
MAX_DURATION: 'max(duration_nano)',
MIN_DURATION: 'min(duration_nano)',
SUM_DURATION: 'sum(duration_nano)',
} as const;
export const LOG_AGGREGATIONS = {
COUNT: 'count()',
COUNT_DISTINCT_HOST: 'count_distinct(host.name)',
COUNT_DISTINCT_SERVICE: 'count_distinct(service.name)',
COUNT_DISTINCT_CONTAINER: 'count_distinct(container.name)',
} as const;
// ===================== Common Filter Expressions =====================
export const COMMON_FILTERS = {
// Trace filters
SERVER_SPANS: "kind_string = 'Server'",
CLIENT_SPANS: "kind_string = 'Client'",
INTERNAL_SPANS: "kind_string = 'Internal'",
ERROR_SPANS: 'http.status_code >= 400',
SUCCESS_SPANS: 'http.status_code < 400',
// Common service filters
EXCLUDE_HEALTH_CHECKS: "http.route != '/health' AND http.route != '/ping'",
HTTP_REQUESTS: "http.method != ''",
// Log filters
ERROR_LOGS: "severity_text = 'ERROR'",
WARN_LOGS: "severity_text = 'WARN'",
INFO_LOGS: "severity_text = 'INFO'",
DEBUG_LOGS: "severity_text = 'DEBUG'",
} as const;
// ===================== Common Group By Fields =====================
export const COMMON_GROUP_BY_FIELDS = {
SERVICE_NAME: {
name: 'service.name',
fieldDataType: 'string' as const,
fieldContext: 'resource' as const,
},
HTTP_METHOD: {
name: 'http.method',
fieldDataType: 'string' as const,
fieldContext: 'attribute' as const,
},
HTTP_ROUTE: {
name: 'http.route',
fieldDataType: 'string' as const,
fieldContext: 'attribute' as const,
},
HTTP_STATUS_CODE: {
name: 'http.status_code',
fieldDataType: 'int64' as const,
fieldContext: 'attribute' as const,
},
HOST_NAME: {
name: 'host.name',
fieldDataType: 'string' as const,
fieldContext: 'resource' as const,
},
CONTAINER_NAME: {
name: 'container.name',
fieldDataType: 'string' as const,
fieldContext: 'resource' as const,
},
} as const;
// ===================== Function Names =====================
export const FUNCTION_NAMES: Record<string, FunctionName> = {
CUT_OFF_MIN: 'cutOffMin',
CUT_OFF_MAX: 'cutOffMax',
CLAMP_MIN: 'clampMin',
CLAMP_MAX: 'clampMax',
ABSOLUTE: 'absolute',
RUNNING_DIFF: 'runningDiff',
LOG2: 'log2',
LOG10: 'log10',
CUM_SUM: 'cumulativeSum',
EWMA3: 'ewma3',
EWMA5: 'ewma5',
EWMA7: 'ewma7',
MEDIAN3: 'median3',
MEDIAN5: 'median5',
MEDIAN7: 'median7',
TIME_SHIFT: 'timeShift',
ANOMALY: 'anomaly',
} as const;
// ===================== Common Step Intervals =====================
export const STEP_INTERVALS = {
FIFTEEN_SECONDS: '15s',
THIRTY_SECONDS: '30s',
ONE_MINUTE: '60s',
FIVE_MINUTES: '300s',
TEN_MINUTES: '600s',
FIFTEEN_MINUTES: '900s',
THIRTY_MINUTES: '1800s',
ONE_HOUR: '3600s',
TWO_HOURS: '7200s',
SIX_HOURS: '21600s',
TWELVE_HOURS: '43200s',
ONE_DAY: '86400s',
} as const;
// ===================== Time Range Presets =====================
export const TIME_RANGE_PRESETS = {
LAST_5_MINUTES: 5 * 60 * 1000,
LAST_15_MINUTES: 15 * 60 * 1000,
LAST_30_MINUTES: 30 * 60 * 1000,
LAST_HOUR: 60 * 60 * 1000,
LAST_3_HOURS: 3 * 60 * 60 * 1000,
LAST_6_HOURS: 6 * 60 * 60 * 1000,
LAST_12_HOURS: 12 * 60 * 60 * 1000,
LAST_24_HOURS: 24 * 60 * 60 * 1000,
LAST_3_DAYS: 3 * 24 * 60 * 60 * 1000,
LAST_7_DAYS: 7 * 24 * 60 * 60 * 1000,
} as const;

View File

@@ -48,5 +48,3 @@ export const getQueryRangeV5 = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default getQueryRangeV5;

View File

@@ -10,7 +10,7 @@ import { QueryBuilderContextType } from 'types/common/queryBuilder';
import { AppLayer } from './types';
export interface AppPageProvidersProps {
interface AppPageProvidersProps {
children: ReactNode;
layout: AppLayer;
/** When set, replaces `QueryBuilderProvider` with a fixed context value. */

View File

@@ -11,7 +11,7 @@ import TimezoneProvider from 'providers/Timezone';
import { AppLayer } from './types';
export interface AppProvidersProps {
interface AppProvidersProps {
children: ReactNode;
store: Store;
queryClient: QueryClient;

View File

@@ -5,7 +5,7 @@ import { NotificationProvider } from 'hooks/useNotifications';
import { CmdKProvider } from 'providers/cmdKProvider';
import { ErrorModalProvider } from 'providers/ErrorModalProvider';
export interface AppShellProps {
interface AppShellProps {
children: ReactNode;
/** Mounted beside the routed content: the command palette and its siblings. */
overlays?: ReactNode;

View File

@@ -1,39 +0,0 @@
interface SeverityCriticalIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
}
function SeverityCriticalIcon({
width,
height,
fill,
stroke,
}: SeverityCriticalIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M.99707.666056.99707 2.99939M.99707 5.33337H.991237M3.00293.666056 3.00293 2.99939M3.00293 5.33337H2.9971M5.00879.666056V2.99939M5.00879 5.33337H5.00296"
stroke={stroke}
strokeWidth="1.16667"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityCriticalIcon.defaultProps = {
width: 6,
height: 6,
fill: 'none',
stroke: '#F56C87',
};
export default SeverityCriticalIcon;

View File

@@ -1,42 +0,0 @@
interface SeverityErrorIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
strokeWidth?: string;
}
function SeverityErrorIcon({
width,
height,
fill,
stroke,
strokeWidth,
}: SeverityErrorIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.00781.957845 1.00781 2.99951M1.00781 5.04175H1.00228"
stroke={stroke}
strokeWidth={strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityErrorIcon.defaultProps = {
width: 2,
height: 6,
fill: 'none',
stroke: '#F56C87',
strokeWidth: '1.02083',
};
export default SeverityErrorIcon;

View File

@@ -1,46 +0,0 @@
interface SeverityInfoIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
}
function SeverityInfoIcon({
width,
height,
fill,
stroke,
}: SeverityInfoIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<rect
width={width}
height={height}
rx="3.5"
fill={stroke}
fillOpacity=".2"
/>
<path
d="M7 9.33346V7.00012M7 4.66675H7.00583"
stroke={stroke}
strokeWidth="1.16667"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityInfoIcon.defaultProps = {
width: 14,
height: 14,
fill: 'none',
stroke: '#7190F9',
};
export default SeverityInfoIcon;

View File

@@ -1,42 +0,0 @@
interface SeverityWarningIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
strokeWidth?: string;
}
function SeverityWarningIcon({
width,
height,
fill,
stroke,
strokeWidth,
}: SeverityWarningIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.00732.957845 1.00732 2.99951M1.00732 5.04175H1.00179"
stroke={stroke}
strokeWidth={strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityWarningIcon.defaultProps = {
width: 2,
height: 6,
fill: 'none',
stroke: '#FFD778',
strokeWidth: '0.978299',
};
export default SeverityWarningIcon;

View File

@@ -1,17 +0,0 @@
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_2445_31698)">
<circle cx="23" cy="23" r="3" fill="#51E7A8"/>
</g>
<defs>
<filter id="filter0_d_2445_31698" x="0" y="0" width="46" height="46" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="10"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.317647 0 0 0 0 0.905882 0 0 0 0 0.658824 0 0 0 0.6 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2445_31698"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2445_31698" result="shape"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 910 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 204 KiB

View File

@@ -1,458 +0,0 @@
<svg
width="1348"
height="8"
viewBox="0 0 1348 8"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="2" height="2" rx="1" fill="#242834" />
<rect x="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="12" width="2" height="2" rx="1" fill="#242834" />
<rect x="18" width="2" height="2" rx="1" fill="#242834" />
<rect x="24" width="2" height="2" rx="1" fill="#242834" />
<rect x="30" width="2" height="2" rx="1" fill="#242834" />
<rect x="36" width="2" height="2" rx="1" fill="#242834" />
<rect x="42" width="2" height="2" rx="1" fill="#242834" />
<rect x="48" width="2" height="2" rx="1" fill="#242834" />
<rect x="54" width="2" height="2" rx="1" fill="#242834" />
<rect x="60" width="2" height="2" rx="1" fill="#242834" />
<rect x="66" width="2" height="2" rx="1" fill="#242834" />
<rect x="72" width="2" height="2" rx="1" fill="#242834" />
<rect x="78" width="2" height="2" rx="1" fill="#242834" />
<rect x="84" width="2" height="2" rx="1" fill="#242834" />
<rect x="90" width="2" height="2" rx="1" fill="#242834" />
<rect x="96" width="2" height="2" rx="1" fill="#242834" />
<rect x="102" width="2" height="2" rx="1" fill="#242834" />
<rect x="108" width="2" height="2" rx="1" fill="#242834" />
<rect x="114" width="2" height="2" rx="1" fill="#242834" />
<rect x="120" width="2" height="2" rx="1" fill="#242834" />
<rect x="126" width="2" height="2" rx="1" fill="#242834" />
<rect x="132" width="2" height="2" rx="1" fill="#242834" />
<rect x="138" width="2" height="2" rx="1" fill="#242834" />
<rect x="144" width="2" height="2" rx="1" fill="#242834" />
<rect x="150" width="2" height="2" rx="1" fill="#242834" />
<rect x="156" width="2" height="2" rx="1" fill="#242834" />
<rect x="162" width="2" height="2" rx="1" fill="#242834" />
<rect x="168" width="2" height="2" rx="1" fill="#242834" />
<rect x="174" width="2" height="2" rx="1" fill="#242834" />
<rect x="180" width="2" height="2" rx="1" fill="#242834" />
<rect x="186" width="2" height="2" rx="1" fill="#242834" />
<rect x="192" width="2" height="2" rx="1" fill="#242834" />
<rect x="198" width="2" height="2" rx="1" fill="#242834" />
<rect x="204" width="2" height="2" rx="1" fill="#242834" />
<rect x="210" width="2" height="2" rx="1" fill="#242834" />
<rect x="216" width="2" height="2" rx="1" fill="#242834" />
<rect x="222" width="2" height="2" rx="1" fill="#242834" />
<rect x="228" width="2" height="2" rx="1" fill="#242834" />
<rect x="234" width="2" height="2" rx="1" fill="#242834" />
<rect x="240" width="2" height="2" rx="1" fill="#242834" />
<rect x="246" width="2" height="2" rx="1" fill="#242834" />
<rect x="252" width="2" height="2" rx="1" fill="#242834" />
<rect x="258" width="2" height="2" rx="1" fill="#242834" />
<rect x="264" width="2" height="2" rx="1" fill="#242834" />
<rect x="270" width="2" height="2" rx="1" fill="#242834" />
<rect x="276" width="2" height="2" rx="1" fill="#242834" />
<rect x="282" width="2" height="2" rx="1" fill="#242834" />
<rect x="288" width="2" height="2" rx="1" fill="#242834" />
<rect x="294" width="2" height="2" rx="1" fill="#242834" />
<rect x="300" width="2" height="2" rx="1" fill="#242834" />
<rect x="306" width="2" height="2" rx="1" fill="#242834" />
<rect x="312" width="2" height="2" rx="1" fill="#242834" />
<rect x="318" width="2" height="2" rx="1" fill="#242834" />
<rect x="324" width="2" height="2" rx="1" fill="#242834" />
<rect x="330" width="2" height="2" rx="1" fill="#242834" />
<rect x="336" width="2" height="2" rx="1" fill="#242834" />
<rect x="342" width="2" height="2" rx="1" fill="#242834" />
<rect x="348" width="2" height="2" rx="1" fill="#242834" />
<rect x="354" width="2" height="2" rx="1" fill="#242834" />
<rect x="360" width="2" height="2" rx="1" fill="#242834" />
<rect x="366" width="2" height="2" rx="1" fill="#242834" />
<rect x="372" width="2" height="2" rx="1" fill="#242834" />
<rect x="378" width="2" height="2" rx="1" fill="#242834" />
<rect x="384" width="2" height="2" rx="1" fill="#242834" />
<rect x="390" width="2" height="2" rx="1" fill="#242834" />
<rect x="396" width="2" height="2" rx="1" fill="#242834" />
<rect x="402" width="2" height="2" rx="1" fill="#242834" />
<rect x="408" width="2" height="2" rx="1" fill="#242834" />
<rect x="414" width="2" height="2" rx="1" fill="#242834" />
<rect x="420" width="2" height="2" rx="1" fill="#242834" />
<rect x="426" width="2" height="2" rx="1" fill="#242834" />
<rect x="432" width="2" height="2" rx="1" fill="#242834" />
<rect x="438" width="2" height="2" rx="1" fill="#242834" />
<rect x="444" width="2" height="2" rx="1" fill="#242834" />
<rect x="450" width="2" height="2" rx="1" fill="#242834" />
<rect x="456" width="2" height="2" rx="1" fill="#242834" />
<rect x="462" width="2" height="2" rx="1" fill="#242834" />
<rect x="468" width="2" height="2" rx="1" fill="#242834" />
<rect x="474" width="2" height="2" rx="1" fill="#242834" />
<rect x="480" width="2" height="2" rx="1" fill="#242834" />
<rect x="486" width="2" height="2" rx="1" fill="#242834" />
<rect x="492" width="2" height="2" rx="1" fill="#242834" />
<rect x="498" width="2" height="2" rx="1" fill="#242834" />
<rect x="504" width="2" height="2" rx="1" fill="#242834" />
<rect x="510" width="2" height="2" rx="1" fill="#242834" />
<rect x="516" width="2" height="2" rx="1" fill="#242834" />
<rect x="522" width="2" height="2" rx="1" fill="#242834" />
<rect x="528" width="2" height="2" rx="1" fill="#242834" />
<rect x="534" width="2" height="2" rx="1" fill="#242834" />
<rect x="540" width="2" height="2" rx="1" fill="#242834" />
<rect x="546" width="2" height="2" rx="1" fill="#242834" />
<rect x="552" width="2" height="2" rx="1" fill="#242834" />
<rect x="558" width="2" height="2" rx="1" fill="#242834" />
<rect x="564" width="2" height="2" rx="1" fill="#242834" />
<rect x="570" width="2" height="2" rx="1" fill="#242834" />
<rect x="576" width="2" height="2" rx="1" fill="#242834" />
<rect x="582" width="2" height="2" rx="1" fill="#242834" />
<rect x="588" width="2" height="2" rx="1" fill="#242834" />
<rect x="594" width="2" height="2" rx="1" fill="#242834" />
<rect x="600" width="2" height="2" rx="1" fill="#242834" />
<rect x="606" width="2" height="2" rx="1" fill="#242834" />
<rect x="612" width="2" height="2" rx="1" fill="#242834" />
<rect x="618" width="2" height="2" rx="1" fill="#242834" />
<rect x="624" width="2" height="2" rx="1" fill="#242834" />
<rect x="630" width="2" height="2" rx="1" fill="#242834" />
<rect x="636" width="2" height="2" rx="1" fill="#242834" />
<rect x="642" width="2" height="2" rx="1" fill="#242834" />
<rect x="648" width="2" height="2" rx="1" fill="#242834" />
<rect x="654" width="2" height="2" rx="1" fill="#242834" />
<rect x="660" width="2" height="2" rx="1" fill="#242834" />
<rect x="666" width="2" height="2" rx="1" fill="#242834" />
<rect x="672" width="2" height="2" rx="1" fill="#242834" />
<rect x="678" width="2" height="2" rx="1" fill="#242834" />
<rect x="684" width="2" height="2" rx="1" fill="#242834" />
<rect x="690" width="2" height="2" rx="1" fill="#242834" />
<rect x="696" width="2" height="2" rx="1" fill="#242834" />
<rect x="702" width="2" height="2" rx="1" fill="#242834" />
<rect x="708" width="2" height="2" rx="1" fill="#242834" />
<rect x="714" width="2" height="2" rx="1" fill="#242834" />
<rect x="720" width="2" height="2" rx="1" fill="#242834" />
<rect x="726" width="2" height="2" rx="1" fill="#242834" />
<rect x="732" width="2" height="2" rx="1" fill="#242834" />
<rect x="738" width="2" height="2" rx="1" fill="#242834" />
<rect x="744" width="2" height="2" rx="1" fill="#242834" />
<rect x="750" width="2" height="2" rx="1" fill="#242834" />
<rect x="756" width="2" height="2" rx="1" fill="#242834" />
<rect x="762" width="2" height="2" rx="1" fill="#242834" />
<rect x="768" width="2" height="2" rx="1" fill="#242834" />
<rect x="774" width="2" height="2" rx="1" fill="#242834" />
<rect x="780" width="2" height="2" rx="1" fill="#242834" />
<rect x="786" width="2" height="2" rx="1" fill="#242834" />
<rect x="792" width="2" height="2" rx="1" fill="#242834" />
<rect x="798" width="2" height="2" rx="1" fill="#242834" />
<rect x="804" width="2" height="2" rx="1" fill="#242834" />
<rect x="810" width="2" height="2" rx="1" fill="#242834" />
<rect x="816" width="2" height="2" rx="1" fill="#242834" />
<rect x="822" width="2" height="2" rx="1" fill="#242834" />
<rect x="828" width="2" height="2" rx="1" fill="#242834" />
<rect x="834" width="2" height="2" rx="1" fill="#242834" />
<rect x="840" width="2" height="2" rx="1" fill="#242834" />
<rect x="846" width="2" height="2" rx="1" fill="#242834" />
<rect x="852" width="2" height="2" rx="1" fill="#242834" />
<rect x="858" width="2" height="2" rx="1" fill="#242834" />
<rect x="864" width="2" height="2" rx="1" fill="#242834" />
<rect x="870" width="2" height="2" rx="1" fill="#242834" />
<rect x="876" width="2" height="2" rx="1" fill="#242834" />
<rect x="882" width="2" height="2" rx="1" fill="#242834" />
<rect x="888" width="2" height="2" rx="1" fill="#242834" />
<rect x="894" width="2" height="2" rx="1" fill="#242834" />
<rect x="900" width="2" height="2" rx="1" fill="#242834" />
<rect x="906" width="2" height="2" rx="1" fill="#242834" />
<rect x="912" width="2" height="2" rx="1" fill="#242834" />
<rect x="918" width="2" height="2" rx="1" fill="#242834" />
<rect x="924" width="2" height="2" rx="1" fill="#242834" />
<rect x="930" width="2" height="2" rx="1" fill="#242834" />
<rect x="936" width="2" height="2" rx="1" fill="#242834" />
<rect x="942" width="2" height="2" rx="1" fill="#242834" />
<rect x="948" width="2" height="2" rx="1" fill="#242834" />
<rect x="954" width="2" height="2" rx="1" fill="#242834" />
<rect x="960" width="2" height="2" rx="1" fill="#242834" />
<rect x="966" width="2" height="2" rx="1" fill="#242834" />
<rect x="972" width="2" height="2" rx="1" fill="#242834" />
<rect x="978" width="2" height="2" rx="1" fill="#242834" />
<rect x="984" width="2" height="2" rx="1" fill="#242834" />
<rect x="990" width="2" height="2" rx="1" fill="#242834" />
<rect x="996" width="2" height="2" rx="1" fill="#242834" />
<rect x="1002" width="2" height="2" rx="1" fill="#242834" />
<rect x="1008" width="2" height="2" rx="1" fill="#242834" />
<rect x="1014" width="2" height="2" rx="1" fill="#242834" />
<rect x="1020" width="2" height="2" rx="1" fill="#242834" />
<rect x="1026" width="2" height="2" rx="1" fill="#242834" />
<rect x="1032" width="2" height="2" rx="1" fill="#242834" />
<rect x="1038" width="2" height="2" rx="1" fill="#242834" />
<rect x="1044" width="2" height="2" rx="1" fill="#242834" />
<rect x="1050" width="2" height="2" rx="1" fill="#242834" />
<rect x="1056" width="2" height="2" rx="1" fill="#242834" />
<rect x="1062" width="2" height="2" rx="1" fill="#242834" />
<rect x="1068" width="2" height="2" rx="1" fill="#242834" />
<rect x="1074" width="2" height="2" rx="1" fill="#242834" />
<rect x="1080" width="2" height="2" rx="1" fill="#242834" />
<rect x="1086" width="2" height="2" rx="1" fill="#242834" />
<rect x="1092" width="2" height="2" rx="1" fill="#242834" />
<rect x="1098" width="2" height="2" rx="1" fill="#242834" />
<rect x="1104" width="2" height="2" rx="1" fill="#242834" />
<rect x="1110" width="2" height="2" rx="1" fill="#242834" />
<rect x="1116" width="2" height="2" rx="1" fill="#242834" />
<rect x="1122" width="2" height="2" rx="1" fill="#242834" />
<rect x="1128" width="2" height="2" rx="1" fill="#242834" />
<rect x="1134" width="2" height="2" rx="1" fill="#242834" />
<rect x="1140" width="2" height="2" rx="1" fill="#242834" />
<rect x="1146" width="2" height="2" rx="1" fill="#242834" />
<rect x="1152" width="2" height="2" rx="1" fill="#242834" />
<rect x="1158" width="2" height="2" rx="1" fill="#242834" />
<rect x="1164" width="2" height="2" rx="1" fill="#242834" />
<rect x="1170" width="2" height="2" rx="1" fill="#242834" />
<rect x="1176" width="2" height="2" rx="1" fill="#242834" />
<rect x="1182" width="2" height="2" rx="1" fill="#242834" />
<rect x="1188" width="2" height="2" rx="1" fill="#242834" />
<rect x="1194" width="2" height="2" rx="1" fill="#242834" />
<rect x="1200" width="2" height="2" rx="1" fill="#242834" />
<rect x="1206" width="2" height="2" rx="1" fill="#242834" />
<rect x="1212" width="2" height="2" rx="1" fill="#242834" />
<rect x="1218" width="2" height="2" rx="1" fill="#242834" />
<rect x="1224" width="2" height="2" rx="1" fill="#242834" />
<rect x="1230" width="2" height="2" rx="1" fill="#242834" />
<rect x="1236" width="2" height="2" rx="1" fill="#242834" />
<rect x="1242" width="2" height="2" rx="1" fill="#242834" />
<rect x="1248" width="2" height="2" rx="1" fill="#242834" />
<rect x="1254" width="2" height="2" rx="1" fill="#242834" />
<rect x="1260" width="2" height="2" rx="1" fill="#242834" />
<rect x="1266" width="2" height="2" rx="1" fill="#242834" />
<rect x="1272" width="2" height="2" rx="1" fill="#242834" />
<rect x="1278" width="2" height="2" rx="1" fill="#242834" />
<rect x="1284" width="2" height="2" rx="1" fill="#242834" />
<rect x="1290" width="2" height="2" rx="1" fill="#242834" />
<rect x="1296" width="2" height="2" rx="1" fill="#242834" />
<rect x="1302" width="2" height="2" rx="1" fill="#242834" />
<rect x="1308" width="2" height="2" rx="1" fill="#242834" />
<rect x="1314" width="2" height="2" rx="1" fill="#242834" />
<rect x="1320" width="2" height="2" rx="1" fill="#242834" />
<rect x="1326" width="2" height="2" rx="1" fill="#242834" />
<rect x="1332" width="2" height="2" rx="1" fill="#242834" />
<rect x="1338" width="2" height="2" rx="1" fill="#242834" />
<rect x="1344" width="2" height="2" rx="1" fill="#242834" />
<rect y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="6" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="12" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="18" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="24" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="30" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="36" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="42" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="48" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="54" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="60" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="66" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="72" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="78" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="84" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="90" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="96" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="102" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="108" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="114" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="120" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="126" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="132" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="138" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="144" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="150" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="156" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="162" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="168" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="174" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="180" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="186" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="192" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="198" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="204" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="210" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="216" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="222" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="228" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="234" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="240" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="246" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="252" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="258" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="264" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="270" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="276" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="282" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="288" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="294" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="300" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="306" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="312" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="318" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="324" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="330" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="336" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="342" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="348" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="354" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="360" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="366" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="372" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="378" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="384" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="390" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="396" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="402" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="408" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="414" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="420" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="426" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="432" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="438" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="444" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="450" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="456" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="462" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="468" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="474" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="480" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="486" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="492" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="498" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="504" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="510" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="516" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="522" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="528" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="534" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="540" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="546" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="552" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="558" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="564" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="570" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="576" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="582" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="588" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="594" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="600" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="606" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="612" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="618" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="624" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="630" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="636" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="642" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="648" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="654" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="660" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="666" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="672" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="678" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="684" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="690" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="696" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="702" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="708" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="714" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="720" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="726" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="732" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="738" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="744" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="750" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="756" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="762" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="768" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="774" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="780" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="786" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="792" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="798" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="804" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="810" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="816" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="822" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="828" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="834" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="840" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="846" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="852" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="858" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="864" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="870" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="876" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="882" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="888" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="894" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="900" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="906" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="912" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="918" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="924" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="930" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="936" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="942" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="948" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="954" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="960" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="966" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="972" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="978" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="984" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="990" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="996" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1002" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1008" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1014" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1020" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1026" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1032" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1038" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1044" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1050" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1056" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1062" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1068" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1074" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1080" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1086" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1092" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1098" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1104" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1110" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1116" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1122" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1128" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1134" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1140" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1146" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1152" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1158" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1164" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1170" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1176" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1182" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1188" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1194" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1200" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1206" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1212" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1218" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1224" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1230" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1236" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1242" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1248" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1254" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1260" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1266" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1272" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1278" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1284" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1290" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1296" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1302" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1308" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1314" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1320" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1326" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1332" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1338" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1344" y="6" width="2" height="2" rx="1" fill="#242834" />
</svg>

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.7 MiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 565.65 130.02"><defs><style>.cls-1{fill:#17181a;}.cls-2{fill:#f15931;}.cls-3{fill:#f9f2f8;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M157.17,97.54q-7.86-7.79-7.85-21.71h17.22q0,6.58,3.35,10.32t9.31,3.73h14.06a15.93,15.93,0,0,0,9.05-2.34,7.22,7.22,0,0,0,3.48-6.27V77q0-6.21-9.12-7.73l-23.29-3.92Q162,63.42,156.09,58A17.81,17.81,0,0,1,150.2,44.3V37.21a20.09,20.09,0,0,1,3.61-11.84,23.11,23.11,0,0,1,10.26-7.92,39.67,39.67,0,0,1,15.38-2.78h14.31a30.14,30.14,0,0,1,14.56,3.42,24.37,24.37,0,0,1,9.82,9.56,28.37,28.37,0,0,1,3.48,14.24H204.4a12.27,12.27,0,0,0-2.92-8.55,9.89,9.89,0,0,0-7.72-3.22H179.45a14.51,14.51,0,0,0-8.54,2.28,7.05,7.05,0,0,0-3.23,6.07v3.42q0,6.33,8.73,7.85l23.18,4q11.52,2,17.6,7.16a16.52,16.52,0,0,1,6.07,13.23v8.36a19.86,19.86,0,0,1-3.73,11.9,24.08,24.08,0,0,1-10.45,8,39.54,39.54,0,0,1-15.57,2.85H179Q165,105.33,157.17,97.54Z"/><path class="cls-1" d="M237.89,32.33a9.93,9.93,0,0,1-3-7.53,10,10,0,0,1,3-7.54,12.42,12.42,0,0,1,15.83,0,10,10,0,0,1,3,7.54,10,10,0,0,1-3,7.53,12.42,12.42,0,0,1-15.83,0Zm-.7,8.8h17.22v63.19H237.19Z"/><path class="cls-1" d="M279.1,124.26a21.43,21.43,0,0,1-7.47-15.13h17a6.41,6.41,0,0,0,2.28,4.49,7.58,7.58,0,0,0,5.06,1.71h11.4a7.65,7.65,0,0,0,6.39-3.23,13.46,13.46,0,0,0,2.47-8.42v-6a18.47,18.47,0,0,1-6.14,4.43,16.59,16.59,0,0,1-6.9,1.65h-8.74q-11.52,0-18.55-6.84t-7-18V66.08a27.41,27.41,0,0,1,3.3-13.62,22.83,22.83,0,0,1,9.24-9.11,28.27,28.27,0,0,1,13.68-3.23h7.34a18.87,18.87,0,0,1,8.42,2,18.64,18.64,0,0,1,6.65,5.31V41.13h15.95v62.55a28.43,28.43,0,0,1-3.23,13.81,22.81,22.81,0,0,1-9.18,9.24A27.79,27.79,0,0,1,307.34,130h-11.4Q285.82,130,279.1,124.26Zm25.2-35a10.11,10.11,0,0,0,8.1-4,18.2,18.2,0,0,0,3.8-10.45V66.08A13.26,13.26,0,0,0,312.78,58a9.76,9.76,0,0,0-7.34-3h-8.86a9.5,9.5,0,0,0-7.6,3.42,13.4,13.4,0,0,0-2.91,9V77.73a12.55,12.55,0,0,0,2.65,8.35,8.55,8.55,0,0,0,6.84,3.17Z"/><path class="cls-1" d="M348.62,15.68h15.57L406.73,76V15.68h17.1v88.64H408.26L365.71,44v60.28H348.62Z"/><path class="cls-1" d="M449.34,102.23a22.51,22.51,0,0,1-9.49-8.8,25.45,25.45,0,0,1-3.36-13.17V65.44a25.42,25.42,0,0,1,3.42-13.23,23.29,23.29,0,0,1,9.56-8.93,30.5,30.5,0,0,1,14.12-3.16H475a30.5,30.5,0,0,1,14.12,3.16,23.35,23.35,0,0,1,9.56,8.93,25.42,25.42,0,0,1,3.42,13.23V80.26a25.1,25.1,0,0,1-3.42,13.17,23,23,0,0,1-9.56,8.8,31.14,31.14,0,0,1-14.24,3.1h-11.4A30.86,30.86,0,0,1,449.34,102.23ZM474.6,90.52a9.37,9.37,0,0,0,7.47-3.23,12.43,12.43,0,0,0,2.79-8.42V66.58a12.43,12.43,0,0,0-2.79-8.42,9.21,9.21,0,0,0-7.34-3.23H463.84a9.21,9.21,0,0,0-7.34,3.23,12.43,12.43,0,0,0-2.79,8.42V78.87a12.43,12.43,0,0,0,2.79,8.42,9.08,9.08,0,0,0,7.21,3.23Z"/><path class="cls-1" d="M506.89,95.71l34.19-40H508.41V41.13h57.24v8.61l-34.19,40H565v14.56H506.89Z"/><path class="cls-2" d="M61.1,119.86C27.16,119.86,0,93.22,0,59.93,0,27,27.16,0,61.1,0H99.46a22.17,22.17,0,0,1,22.4,22v38C121.86,93.22,94.71,119.86,61.1,119.86Z"/><path class="cls-3" d="M60.62,34C35.27,34,21,55,20.39,55.87a6.53,6.53,0,0,0,0,7.26C21,64,35.27,85,60.62,85s39.64-21,40.23-21.89a6.51,6.51,0,0,0,0-7.25C100.26,55,86,34,60.62,34ZM23.9,60.79a2.33,2.33,0,0,1,0-2.58c.48-.72,10.65-15.65,28.83-19.24a22,22,0,0,0,0,41.05C34.55,76.44,24.38,61.5,23.9,60.79ZM50.49,59.5a2.11,2.11,0,0,1-4.22,0A14.36,14.36,0,0,1,60.62,45.15a2.11,2.11,0,1,1,0,4.21A10.14,10.14,0,0,0,50.49,59.5Zm10.13,5.13a5.13,5.13,0,1,1,5.13-5.13A5.13,5.13,0,0,1,60.62,64.63Zm36.72-3.84C96.86,61.5,86.7,76.44,68.52,80a22,22,0,0,0,0-41C86.7,42.56,96.86,57.49,97.34,58.21A2.29,2.29,0,0,1,97.34,60.79Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 565.65 130.02"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#f15931;}.cls-3{fill:#f9f2f8;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M157.17,97.54q-7.86-7.79-7.85-21.71h17.22q0,6.58,3.35,10.32t9.31,3.73h14.06a15.93,15.93,0,0,0,9.05-2.34,7.22,7.22,0,0,0,3.48-6.27V77q0-6.21-9.12-7.73l-23.29-3.92Q162,63.42,156.09,58A17.81,17.81,0,0,1,150.2,44.3V37.21a20.09,20.09,0,0,1,3.61-11.84,23.11,23.11,0,0,1,10.26-7.92,39.67,39.67,0,0,1,15.38-2.78h14.31a30.14,30.14,0,0,1,14.56,3.42,24.37,24.37,0,0,1,9.82,9.56,28.37,28.37,0,0,1,3.48,14.24H204.4a12.27,12.27,0,0,0-2.92-8.55,9.89,9.89,0,0,0-7.72-3.22H179.45a14.51,14.51,0,0,0-8.54,2.28,7.05,7.05,0,0,0-3.23,6.07v3.42q0,6.33,8.73,7.85l23.18,4q11.52,2,17.6,7.16a16.52,16.52,0,0,1,6.07,13.23v8.36a19.86,19.86,0,0,1-3.73,11.9,24.08,24.08,0,0,1-10.45,8,39.54,39.54,0,0,1-15.57,2.85H179Q165,105.33,157.17,97.54Z"/><path class="cls-1" d="M237.89,32.33a9.93,9.93,0,0,1-3-7.53,10,10,0,0,1,3-7.54,12.42,12.42,0,0,1,15.83,0,10,10,0,0,1,3,7.54,10,10,0,0,1-3,7.53,12.42,12.42,0,0,1-15.83,0Zm-.7,8.8h17.22v63.19H237.19Z"/><path class="cls-1" d="M279.1,124.26a21.43,21.43,0,0,1-7.47-15.13h17a6.41,6.41,0,0,0,2.28,4.49,7.58,7.58,0,0,0,5.06,1.71h11.4a7.65,7.65,0,0,0,6.39-3.23,13.46,13.46,0,0,0,2.47-8.42v-6a18.47,18.47,0,0,1-6.14,4.43,16.59,16.59,0,0,1-6.9,1.65h-8.74q-11.52,0-18.55-6.84t-7-18V66.08a27.41,27.41,0,0,1,3.3-13.62,22.83,22.83,0,0,1,9.24-9.11,28.27,28.27,0,0,1,13.68-3.23h7.34a18.87,18.87,0,0,1,8.42,2,18.64,18.64,0,0,1,6.65,5.31V41.13h15.95v62.55a28.43,28.43,0,0,1-3.23,13.81,22.81,22.81,0,0,1-9.18,9.24A27.79,27.79,0,0,1,307.34,130h-11.4Q285.82,130,279.1,124.26Zm25.2-35a10.11,10.11,0,0,0,8.1-4,18.2,18.2,0,0,0,3.8-10.45V66.08A13.26,13.26,0,0,0,312.78,58a9.76,9.76,0,0,0-7.34-3h-8.86a9.5,9.5,0,0,0-7.6,3.42,13.4,13.4,0,0,0-2.91,9V77.73a12.55,12.55,0,0,0,2.65,8.35,8.55,8.55,0,0,0,6.84,3.17Z"/><path class="cls-1" d="M348.62,15.68h15.57L406.73,76V15.68h17.1v88.64H408.26L365.71,44v60.28H348.62Z"/><path class="cls-1" d="M449.34,102.23a22.51,22.51,0,0,1-9.49-8.8,25.45,25.45,0,0,1-3.36-13.17V65.44a25.42,25.42,0,0,1,3.42-13.23,23.29,23.29,0,0,1,9.56-8.93,30.5,30.5,0,0,1,14.12-3.16H475a30.5,30.5,0,0,1,14.12,3.16,23.35,23.35,0,0,1,9.56,8.93,25.42,25.42,0,0,1,3.42,13.23V80.26a25.1,25.1,0,0,1-3.42,13.17,23,23,0,0,1-9.56,8.8,31.14,31.14,0,0,1-14.24,3.1h-11.4A30.86,30.86,0,0,1,449.34,102.23ZM474.6,90.52a9.37,9.37,0,0,0,7.47-3.23,12.43,12.43,0,0,0,2.79-8.42V66.58a12.43,12.43,0,0,0-2.79-8.42,9.21,9.21,0,0,0-7.34-3.23H463.84a9.21,9.21,0,0,0-7.34,3.23,12.43,12.43,0,0,0-2.79,8.42V78.87a12.43,12.43,0,0,0,2.79,8.42,9.08,9.08,0,0,0,7.21,3.23Z"/><path class="cls-1" d="M506.89,95.71l34.19-40H508.41V41.13h57.24v8.61l-34.19,40H565v14.56H506.89Z"/><path class="cls-2" d="M61.1,119.86C27.16,119.86,0,93.22,0,59.93,0,27,27.16,0,61.1,0H99.46a22.17,22.17,0,0,1,22.4,22v38C121.86,93.22,94.71,119.86,61.1,119.86Z"/><path class="cls-3" d="M60.62,34C35.27,34,21,55,20.39,55.87a6.53,6.53,0,0,0,0,7.26C21,64,35.27,85,60.62,85s39.64-21,40.23-21.89a6.51,6.51,0,0,0,0-7.25C100.26,55,86,34,60.62,34ZM23.9,60.79a2.33,2.33,0,0,1,0-2.58c.48-.72,10.65-15.65,28.83-19.24a22,22,0,0,0,0,41.05C34.55,76.44,24.38,61.5,23.9,60.79ZM50.49,59.5a2.11,2.11,0,0,1-4.22,0A14.36,14.36,0,0,1,60.62,45.15a2.11,2.11,0,1,1,0,4.21A10.14,10.14,0,0,0,50.49,59.5Zm10.13,5.13a5.13,5.13,0,1,1,5.13-5.13A5.13,5.13,0,0,1,60.62,64.63Zm36.72-3.84C96.86,61.5,86.7,76.44,68.52,80a22,22,0,0,0,0-41C86.7,42.56,96.86,57.49,97.34,58.21A2.29,2.29,0,0,1,97.34,60.79Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -4,7 +4,7 @@ import { Divider } from '@signozhq/ui/divider';
import styles from './AlertBreadcrumb.module.scss';
import BreadcrumbItem, { BreadcrumbItemConfig } from './BreadcrumbItem';
export interface AlertBreadcrumbProps {
interface AlertBreadcrumbProps {
items: BreadcrumbItemConfig[];
className?: string;
showDivider?: boolean;

View File

@@ -1,6 +1 @@
export { default } from './AlertBreadcrumb';
export {
default as BreadcrumbItem,
type BreadcrumbItemConfig,
} from './BreadcrumbItem';
export type { AlertBreadcrumbProps } from './AlertBreadcrumb';

View File

@@ -29,33 +29,6 @@
min-width: 0;
}
.overflowTrigger {
all: unset;
cursor: pointer;
}
.labelPopover {
display: flex;
flex-direction: column;
gap: 6px;
padding: 8px;
max-height: 300px;
overflow-y: auto;
}
.labelTooltip {
display: flex;
flex-direction: column;
gap: 6px;
max-height: 300px;
overflow-y: auto;
}
.labelValue {
text-overflow: ellipsis;
overflow: hidden;
}
.tooltipContent {
display: flex;
align-items: center;

View File

@@ -1,4 +1,4 @@
import { act, render, screen } from 'tests/test-utils';
import { act, render, screen } from '@testing-library/react';
import LabelColumn from './LabelColumn';
@@ -92,9 +92,7 @@ describe('LabelColumn', () => {
renderWithProviders(<LabelColumn labels={labels} />);
const isHidden = (label: string): boolean =>
screen
.getByTestId(`label-tag-container-${label}`)
.classList.contains('overflowed');
screen.getByTestId(`label-tag-${label}`).closest('.overflowed') !== null;
expect(labels.filter(isHidden)).toStrictEqual(['team', 'owner', 'version']);
expect(screen.getByTestId('label-overflow-badge')).toHaveTextContent('+3');
@@ -159,7 +157,8 @@ describe('LabelColumn', () => {
it('should render empty when no labels provided', () => {
renderWithProviders(<LabelColumn labels={[]} />);
expect(screen.getByTestId('label-column')).toBeEmptyDOMElement();
const column = screen.getByTestId('label-column');
expect(column.children).toHaveLength(0);
});
it('should use primary color by default', () => {

View File

@@ -11,7 +11,7 @@ import LabelTag from './LabelTag';
import styles from './LabelColumn.module.scss';
import { getVisibleCount } from './utils';
export interface LabelColumnProps {
interface LabelColumnProps {
labels: string[];
color?: BadgeColorType;
value?: { [key: string]: string };

View File

@@ -6,7 +6,7 @@ import { useCopyToClipboard } from 'react-use';
import styles from './LabelTag.module.scss';
export interface LabelTagProps {
interface LabelTagProps {
label: string;
color?: BadgeColorType;
value?: string;
@@ -45,7 +45,7 @@ function LabelTag({
</div>
}
>
<span className={className} data-testid={`label-tag-container-${label}`}>
<span className={className}>
<Badge
textTransform="none"
color={color ?? 'secondary'}

View File

@@ -1,2 +1 @@
export { default } from './LabelColumn';
export type { LabelColumnProps } from './LabelColumn';

View File

@@ -1,4 +1,4 @@
export const OVERFLOW_BADGE_WIDTH = 40;
const OVERFLOW_BADGE_WIDTH = 40;
/**
* How many leading labels fit in `available` px, reserving room for the `+N` badge

View File

@@ -1,29 +1,5 @@
import type { BadgeColorType } from '@signozhq/ui/badge';
export const STATE_ORDER = ['firing', 'pending', 'inactive', 'disabled'];
export const SEVERITY_ORDER = ['critical', 'error', 'warning', 'info'];
export const STATE_LABELS: Record<string, string> = {
firing: 'Firing',
pending: 'Pending',
inactive: 'OK',
disabled: 'Disabled',
};
export const STATE_COLORS: Record<string, string> = {
firing: 'var(--bg-cherry-500)',
pending: 'var(--bg-amber-500)',
inactive: 'var(--bg-forest-500)',
disabled: 'var(--l2-foreground)',
};
export const SEVERITY_COLORS: Record<string, string> = {
critical: 'var(--bg-cherry-500)',
error: 'var(--bg-cherry-400)',
warning: 'var(--bg-amber-500)',
info: 'var(--bg-robin-500)',
};
export const SEVERITY_BADGE_COLORS: Record<string, BadgeColorType> = {
critical: 'danger',
error: 'danger',

View File

@@ -33,10 +33,6 @@
.brand-tagline {
margin-bottom: 24px;
.ant-typography {
color: var(--l2-foreground); // Secondary text
}
}
/* HTML: <div class="loader"></div> */

View File

@@ -22,10 +22,7 @@ function AppLoading(): JSX.Element {
const isDarkMode = getThemeFromStorage();
return (
<div
className={`app-loading-container ${isDarkMode ? 'dark' : 'lightMode'}`}
data-testid="app-loading-container"
>
<div className={`app-loading-container ${isDarkMode ? 'dark' : 'lightMode'}`}>
<div className="perilin-bg" />
<div className="app-loading-content">
<div className="brand">
@@ -56,7 +53,7 @@ function AppLoading(): JSX.Element {
</Typography>
</div>
<div className="loader" data-testid="app-loading-loader" />
<div className="loader" />
</div>
</div>
);

View File

@@ -1,5 +1,4 @@
import { render } from '@testing-library/react';
import { screen } from 'tests/test-utils';
import { render, screen } from '@testing-library/react';
import getLocal from '../../../api/browser/localstorage/get';
import AppLoading from '../AppLoading';
@@ -16,6 +15,7 @@ describe('AppLoading', () => {
const SIGNOZ_TEXT = 'SigNoz';
const TAGLINE_TEXT =
'OpenTelemetry-Native Logs, Metrics and Traces in a single pane';
const CONTAINER_SELECTOR = '.app-loading-container';
beforeEach(() => {
jest.clearAllMocks();
@@ -33,7 +33,7 @@ describe('AppLoading', () => {
expect(screen.getByText(TAGLINE_TEXT)).toBeInTheDocument();
// Check if dark theme class is applied
const container = screen.getByTestId('app-loading-container');
const container = screen.getByText(SIGNOZ_TEXT).closest(CONTAINER_SELECTOR);
expect(container).toHaveClass('dark');
expect(container).not.toHaveClass('lightMode');
});
@@ -58,7 +58,7 @@ describe('AppLoading', () => {
expect(tagline).toBeInTheDocument();
// Check for loader
const loader = screen.getByTestId('app-loading-loader');
const loader = document.querySelector('.loader');
expect(loader).toBeInTheDocument();
});
@@ -72,7 +72,7 @@ describe('AppLoading', () => {
// Should still render with dark theme as fallback
expect(screen.getByText(SIGNOZ_TEXT)).toBeInTheDocument();
const container = screen.getByTestId('app-loading-container');
const container = screen.getByText(SIGNOZ_TEXT).closest(CONTAINER_SELECTOR);
expect(container).toHaveClass('dark');
});
});

View File

@@ -3,7 +3,7 @@ import { Toaster } from '@signozhq/ui/toast';
const PAGE_INSET = { bottom: 'var(--bottom-strip-height, 0px)' };
function AppToaster(): JSX.Element {
return <Toaster position="top-right" pageInset={PAGE_INSET} />;
return <Toaster position="bottom-right" pageInset={PAGE_INSET} />;
}
export default AppToaster;

View File

@@ -7,7 +7,7 @@ import { isModifierKeyPressed } from 'utils/app';
import styles from './BackHeader.module.scss';
export interface BackHeaderProps {
interface BackHeaderProps {
/** Where the page came from, named as the place rather than the action. */
backLabel: string;
backRoute: string;

View File

@@ -57,9 +57,5 @@
.ant-drawer-footer {
border-top: 1px solid var(--l1-border);
.footer-text {
color: var(--l2-foreground);
}
}
}

View File

@@ -18,7 +18,7 @@ import { useNavigateToExplorer } from '../useNavigateToExplorer';
import './CeleryTaskDetail.style.scss';
export type CeleryTaskData = {
type CeleryTaskData = {
entity: string;
value: string | number;
timeRange: [number, number];

View File

@@ -141,10 +141,6 @@
border-radius: 4px;
padding: 6px 24px 6px 12px;
width: max-content;
.configure-option-Info-text {
color: var(--l2-foreground);
}
}
.row-panel {
@@ -157,11 +153,6 @@
height: 48px !important;
width: 100%;
.ant-typography {
font-size: 14px;
font-weight: 500;
}
.row-panel-section {
display: flex;
gap: 6px;

View File

@@ -41,7 +41,7 @@ interface TabData {
key: string;
}
export enum CeleryTaskGraphState {
enum CeleryTaskGraphState {
P99 = 'p99',
P95 = 'p95',
P90 = 'p90',

View File

@@ -1,25 +0,0 @@
.scrollHint {
position: sticky;
bottom: 0;
height: 0;
}
.scrollButton {
position: absolute;
bottom: var(--spacing-7);
left: 50%;
transform: translateX(-50%);
}
.scrollIcon {
animation: pulse 1s infinite;
}
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}

View File

@@ -0,0 +1,129 @@
.changelog-modal {
.ant-modal-content {
padding: unset;
background-color: var(--l2-background);
.ant-modal-header {
margin-bottom: unset;
}
.ant-modal-footer {
margin-top: unset;
}
}
&-title {
display: flex;
align-items: center;
gap: 8px;
background-color: var(--l2-background);
padding: 16px;
font-size: 14px;
line-height: 20px;
color: var(--l1-foreground);
border-bottom: 1px solid var(--l1-border);
}
&-footer.scroll-available {
.scroll-btn-container {
display: block;
}
}
&-footer {
position: relative;
border: 1px solid var(--l1-border);
padding: 12px;
display: flex;
align-items: center;
justify-content: space-between;
&-label {
color: var(--text-robin-400);
font-size: 14px;
line-height: 24px;
position: relative;
padding-left: 14px;
&::before {
content: '';
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
width: 6px;
height: 6px;
border-radius: 100%;
background-color: var(--primary-background);
}
}
&-ctas {
display: flex;
margin-left: auto;
& svg {
font-size: 14px;
}
}
.scroll-btn-container {
display: none;
position: absolute;
top: -40px;
left: 50%;
transform: translateX(-50%);
.scroll-btn {
all: unset;
padding: 4px 12px 4px 10px;
background-color: var(--l1-border);
border-radius: 20px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
transition: background-color 0.1s;
&:hover {
background-color: var(--l1-border);
}
&:active {
background-color: var(--l1-border);
}
span {
font-size: 12px;
line-height: 18px;
color: var(--l2-foreground);
}
// add animation to the chevrons down icon
svg {
animation: pulse 1s infinite;
}
}
}
}
&-content {
max-height: calc(100vh - 300px);
overflow-y: auto;
padding: 16px 16px 18px 16px;
border: 1px solid var(--l1-border);
border-top-width: 0;
border-bottom-width: 0;
}
}
// pulse for the scroll for more icon
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}

View File

@@ -1,9 +1,10 @@
import { useEffect } from 'react';
import { useCallback, useEffect, useRef, useState } from 'react';
import { useMutation } from 'react-query';
import { Check, ChevronsDown, ScrollText, X } from '@signozhq/icons';
import { Button } from '@signozhq/ui/button';
import { Dialog } from '@signozhq/ui/dialog';
import { Button, Modal } from 'antd';
import Flex from 'periscope/components/Flex/Flex';
import updateUserPreference from 'api/v1/user/preferences/name/update';
import cx from 'classnames';
import { USER_PREFERENCES } from 'constants/userPreferences';
import dayjs from 'dayjs';
import { useGetTenantLicense } from 'hooks/useGetTenantLicense';
@@ -12,9 +13,8 @@ import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
import { UserPreference } from 'types/api/preferences/preference';
import ChangelogRenderer from './components/ChangelogRenderer';
import { useChangelogScroll } from './useChangelogScroll';
import styles from './ChangelogModal.module.scss';
import './ChangelogModal.styles.scss';
interface Props {
changelog: ChangelogSchema;
@@ -22,7 +22,8 @@ interface Props {
}
function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
const { contentRef, hasScroll, scrollForMore } = useChangelogScroll();
const [hasScroll, setHasScroll] = useState(false);
const changelogContentSectionRef = useRef<HTMLDivElement>(null);
const { userPreferences, updateUserPreferenceInContext } = useAppContext();
const formattedReleaseDate = dayjs(changelog?.release_date).format(
@@ -56,6 +57,30 @@ function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
updateUserPreferenceInContext,
]);
const checkScroll = useCallback((): void => {
if (changelogContentSectionRef.current) {
const { scrollHeight, clientHeight, scrollTop } =
changelogContentSectionRef.current;
const isAtBottom = scrollHeight - clientHeight - scrollTop <= 8;
setHasScroll(scrollHeight > clientHeight + 24 && !isAtBottom); // 24px - buffer height to show show more
}
}, []);
useEffect(() => {
checkScroll();
const changelogContentSection = changelogContentSectionRef.current;
if (changelogContentSection) {
changelogContentSection.addEventListener('scroll', checkScroll);
}
return (): void => {
if (changelogContentSection) {
changelogContentSection.removeEventListener('scroll', checkScroll);
}
};
}, [checkScroll]);
const onClickUpdateWorkspace = (): void => {
window.open(
'https://signoz.io/upgrade-path',
@@ -64,61 +89,75 @@ function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
);
};
const onClickScrollForMore = (): void => {
if (changelogContentSectionRef.current) {
changelogContentSectionRef.current.scrollTo({
top: changelogContentSectionRef.current.scrollTop + 600, // Scroll 600px from the current position
behavior: 'smooth',
});
}
};
// TODO: antd stacks at 1000, under `@signozhq/ui` dialogs (1001). It opens on
// its own a second after load, so a dialog opened from a deep link
// (`?add-key`, `?invite=true`) covers it. Moving to the `@signozhq/ui` Dialog
// fixes it.
return (
<Dialog
<Modal
className={cx('changelog-modal')}
title={
<div className="changelog-modal-title">
<ScrollText size={16} />
What’s New ⎯ Changelog : {formattedReleaseDate}
</div>
}
width={820}
open
onClose={onClose}
title={`What’s New ⎯ Changelog : ${formattedReleaseDate}`}
titleIcon={<ScrollText size={16} />}
width="extra-wide"
testId="changelog-dialog"
footerSuffix={
isCloudUser ? undefined : (
<>
<Button
variant="outlined"
color="secondary"
size="md"
prefix={<X size={12} />}
onClick={onClose}
testId="changelog-skip-btn"
>
Skip for now
</Button>
<Button
variant="solid"
color="primary"
size="md"
prefix={<Check size={12} />}
onClick={onClickUpdateWorkspace}
testId="changelog-update-btn"
>
Update my workspace
</Button>
</>
)
onCancel={onClose}
footer={
<div
className={cx('changelog-modal-footer', hasScroll && 'scroll-available')}
>
{!isCloudUser && (
<div className="changelog-modal-footer-ctas">
<Button type="default" onClick={onClose}>
<Flex align="center" gap="4px">
<X size="md" />
Skip for now
</Flex>
</Button>
<Button type="primary" onClick={onClickUpdateWorkspace}>
<Flex align="center" gap="4px">
<Check size="md" />
Update my workspace
</Flex>
</Button>
</div>
)}
{changelog && (
<div className="scroll-btn-container">
<button
data-testid="scroll-more-btn"
type="button"
className="scroll-btn"
onClick={onClickScrollForMore}
>
<ChevronsDown size={14} />
<span>Scroll for more</span>
</button>
</div>
)}
</div>
}
>
<div data-testid="changelog-content" ref={contentRef}>
<ChangelogRenderer changelog={changelog} />
<div
className="changelog-modal-content"
data-testid="changelog-content"
ref={changelogContentSectionRef}
>
{changelog && <ChangelogRenderer changelog={changelog} />}
</div>
{hasScroll && (
<div className={styles.scrollHint}>
<div className={styles.scrollButton}>
<Button
variant="solid"
color="primary"
size="sm"
prefix={<ChevronsDown size={14} className={styles.scrollIcon} />}
onClick={scrollForMore}
testId="scroll-more-btn"
>
Scroll for more
</Button>
</div>
</div>
)}
</Dialog>
</Modal>
);
}

View File

@@ -1,23 +1,12 @@
import { ReactNode } from 'react';
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { fireEvent, render, screen } from '@testing-library/react';
import { USER_PREFERENCES } from 'constants/userPreferences';
import { IAppContext } from 'providers/App/types';
import {
fireEvent,
getAppContextMock,
render,
screen,
userEvent,
waitFor,
} from 'tests/test-utils';
import MockQueryClientProvider from 'providers/test/MockQueryClientProvider';
import {
ChangelogSchema,
DeploymentType,
} from 'types/api/changelog/getChangelogByVersion';
import {
LicensePlatform,
LicenseResModel,
} from 'types/api/licensesV3/getActive';
import { UserPreference } from 'types/api/preferences/preference';
import ChangelogModal from '../ChangelogModal';
@@ -51,165 +40,71 @@ const mockChangelog: ChangelogSchema = {
jest.mock(
'react-markdown',
() =>
function ReactMarkdown({ children }: { children: ReactNode }): JSX.Element {
function ReactMarkdown({ children }: any) {
return <div>{children}</div>;
},
);
const seenChangelogVersion: UserPreference = {
name: USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
description: '',
valueType: 'string',
defaultValue: '',
allowedValues: [],
allowedScopes: ['user'],
value: 'v1.0.0',
};
const selfHostedContext: Partial<IAppContext> = {
activeLicense: {
...(getAppContextMock('ADMIN').activeLicense as LicenseResModel),
platform: LicensePlatform.SELF_HOSTED,
},
};
function renderChangelog(
onClose: () => void = jest.fn(),
appContextOverrides: Partial<IAppContext> = {},
): void {
render(
<ChangelogModal changelog={mockChangelog} onClose={onClose} />,
undefined,
{
appContextOverrides: {
userPreferences: [seenChangelogVersion],
...appContextOverrides,
// mock useAppContext
jest.mock('providers/App/App', () => ({
useAppContext: jest.fn(() => ({
updateUserPreferenceInContext: jest.fn(),
userPreferences: [
{
name: USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
value: 'v1.0.0',
},
},
],
})),
}));
function renderChangelog(onClose: () => void = jest.fn()): void {
render(
<MockQueryClientProvider>
<ChangelogModal changelog={mockChangelog} onClose={onClose} />
</MockQueryClientProvider>,
);
}
describe('ChangelogModal', () => {
it('renders the dialog with the changelog data', async () => {
it('renders modal with changelog data', () => {
renderChangelog();
await expect(
screen.findByTestId('changelog-dialog-title'),
).resolves.toHaveTextContent('What’s New ⎯ Changelog : June 10, 2025');
expect(
screen.getByText('What’s New ⎯ Changelog : June 10, 2025'),
).toBeInTheDocument();
expect(screen.getByText('Feature 1')).toBeInTheDocument();
expect(screen.getByText('Description for feature 1')).toBeInTheDocument();
expect(screen.getByText('Bug fix details')).toBeInTheDocument();
expect(screen.getByText('Maintenance details')).toBeInTheDocument();
});
it('calls onClose when the close button is clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
it('calls onClose when Skip for now is clicked', () => {
const onClose = jest.fn();
renderChangelog(onClose);
await user.click(await screen.findByTestId('changelog-dialog-close'));
expect(onClose).toHaveBeenCalledTimes(1);
fireEvent.click(screen.getByText('Skip for now'));
expect(onClose).toHaveBeenCalled();
});
it('offers no upgrade actions to a cloud workspace', async () => {
it('opens migration docs when Update my workspace is clicked', () => {
window.open = jest.fn();
renderChangelog();
await screen.findByTestId('changelog-content');
expect(
screen.queryByTestId('changelog-dialog-footer'),
).not.toBeInTheDocument();
expect(screen.queryByTestId('changelog-skip-btn')).not.toBeInTheDocument();
expect(screen.queryByTestId('changelog-update-btn')).not.toBeInTheDocument();
});
it('calls onClose when Skip for now is clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const onClose = jest.fn();
renderChangelog(onClose, selfHostedContext);
await user.click(await screen.findByTestId('changelog-skip-btn'));
expect(onClose).toHaveBeenCalledTimes(1);
});
it('opens migration docs when Update my workspace is clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const open = jest.spyOn(window, 'open').mockImplementation(() => null);
renderChangelog(jest.fn(), selfHostedContext);
await user.click(await screen.findByTestId('changelog-update-btn'));
expect(open).toHaveBeenCalledWith(
fireEvent.click(screen.getByText('Update my workspace'));
expect(window.open).toHaveBeenCalledWith(
'https://signoz.io/upgrade-path',
'_blank',
'noopener,noreferrer',
);
open.mockRestore();
});
describe('scroll for more', () => {
let scrollHeight: jest.SpyInstance;
let clientHeight: jest.SpyInstance;
beforeEach(() => {
scrollHeight = jest.spyOn(Element.prototype, 'scrollHeight', 'get');
clientHeight = jest.spyOn(Element.prototype, 'clientHeight', 'get');
});
afterEach(() => {
scrollHeight.mockRestore();
clientHeight.mockRestore();
});
it('is hidden while the content fits', async () => {
scrollHeight.mockReturnValue(400);
clientHeight.mockReturnValue(400);
renderChangelog();
await screen.findByTestId('changelog-content');
expect(screen.queryByTestId('scroll-more-btn')).not.toBeInTheDocument();
});
it('scrolls 600px further from the current position when clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
scrollHeight.mockReturnValue(2000);
clientHeight.mockReturnValue(400);
renderChangelog();
const content = await screen.findByTestId('changelog-dialog-body');
Object.defineProperty(content, 'scrollTop', {
value: 100,
configurable: true,
});
const scrollTo = jest.fn();
Object.defineProperty(content, 'scrollTo', { value: scrollTo });
await user.click(await screen.findByTestId('scroll-more-btn'));
expect(scrollTo).toHaveBeenCalledWith({
top: 700,
behavior: 'smooth',
});
});
it('hides once the content is scrolled to the bottom', async () => {
scrollHeight.mockReturnValue(1000);
clientHeight.mockReturnValue(400);
renderChangelog();
const content = await screen.findByTestId('changelog-dialog-body');
await screen.findByTestId('scroll-more-btn');
Object.defineProperty(content, 'scrollTop', {
value: 600,
configurable: true,
});
fireEvent.scroll(content);
await waitFor(() =>
expect(screen.queryByTestId('scroll-more-btn')).not.toBeInTheDocument(),
);
});
it('scrolls for more when Scroll for more is clicked', () => {
renderChangelog();
const scrollBtn = screen.getByTestId('scroll-more-btn');
const contentDiv = screen.getByTestId('changelog-content');
if (contentDiv) {
contentDiv.scrollTo = jest.fn();
}
fireEvent.click(scrollBtn);
if (contentDiv) {
expect(contentDiv.scrollTo).toHaveBeenCalled();
}
});
});

View File

@@ -34,7 +34,7 @@
&-line {
position: absolute;
left: 3px;
left: 0;
top: 6px;
bottom: -30px;
width: 1px;

View File

@@ -1,52 +0,0 @@
import { useCallback, useEffect, useState } from 'react';
const SCROLL_STEP_PX = 600;
const MIN_OVERFLOW_PX = 24;
const BOTTOM_TOLERANCE_PX = 8;
interface UseChangelogScrollReturn {
contentRef: (node: HTMLDivElement | null) => void;
hasScroll: boolean;
scrollForMore: () => void;
}
export function useChangelogScroll(): UseChangelogScrollReturn {
const [content, setContent] = useState<HTMLElement | null>(null);
const [hasScroll, setHasScroll] = useState(false);
const checkScroll = useCallback((): void => {
if (!content) {
return;
}
const { scrollHeight, clientHeight, scrollTop } = content;
const isAtBottom =
scrollHeight - clientHeight - scrollTop <= BOTTOM_TOLERANCE_PX;
setHasScroll(scrollHeight > clientHeight + MIN_OVERFLOW_PX && !isAtBottom);
}, [content]);
useEffect(() => {
if (!content) {
return undefined;
}
checkScroll();
content.addEventListener('scroll', checkScroll);
return (): void => {
content.removeEventListener('scroll', checkScroll);
};
}, [content, checkScroll]);
const scrollForMore = useCallback((): void => {
content?.scrollTo({
top: content.scrollTop + SCROLL_STEP_PX,
behavior: 'smooth',
});
}, [content]);
// The dialog body owns the scroll; a second scroller inside it shows two scrollbars.
const contentRef = useCallback((node: HTMLDivElement | null): void => {
setContent(node?.closest<HTMLElement>('[data-slot="dialog-body"]') ?? null);
}, []);
return { contentRef, hasScroll, scrollForMore };
}

View File

@@ -9,7 +9,7 @@ import SyntaxHighlighter, {
import styles from './CodeBlock.module.scss';
export interface CodeBlockProps {
interface CodeBlockProps {
code: string;
language?: string;
className?: string;

View File

@@ -21,9 +21,4 @@
line-height: var(--paragraph-small-400-line-height);
margin: 0;
}
&__helper {
color: var(--l3-foreground);
margin: calc(var(--spacing-2) * -1) 0 var(--spacing-4) 0;
}
}

View File

@@ -68,7 +68,7 @@ describe('CreateServiceAccountModal', () => {
});
it('submit button becomes disabled after clearing the name field', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderModal();
const nameInput = await screen.findByTestId('create-sa-name-input-field');
@@ -86,7 +86,7 @@ describe('CreateServiceAccountModal', () => {
});
it('successful submit shows toast.success and closes modal', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderModal();
const nameInput = await screen.findByTestId('create-sa-name-input-field');
@@ -112,7 +112,7 @@ describe('CreateServiceAccountModal', () => {
});
it('pressing Enter again while creating sends one request', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
let requests = 0;
server.use(
rest.post(SERVICE_ACCOUNTS_ENDPOINT, (_, res, ctx) => {
@@ -146,7 +146,7 @@ describe('CreateServiceAccountModal', () => {
});
it('shows toast.error on API error and keeps modal open', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
server.use(
rest.post(SERVICE_ACCOUNTS_ENDPOINT, (_, res, ctx) =>
@@ -186,7 +186,7 @@ describe('CreateServiceAccountModal', () => {
});
it('Cancel button closes modal without submitting', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderModal();
const cancelBtn = await screen.findByTestId('create-sa-cancel-btn');
@@ -217,7 +217,7 @@ describe('CreateServiceAccountModal', () => {
});
it('keeps the footer usable when create permission is denied', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
server.use(setupAuthzDenyAll());
renderModal();
@@ -242,7 +242,7 @@ describe('CreateServiceAccountModal', () => {
});
it('shows "Name is required" after clearing the name field', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderModal();
const nameInput = await screen.findByTestId('create-sa-name-input-field');

View File

@@ -67,21 +67,6 @@
color: var(--bg-cherry-400) !important;
}
.info-text {
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
cursor: default;
color: var(--l2-foreground) !important;
}
.info-text:hover {
&.ant-btn-text {
background-color: unset !important;
}
}
.date-time-popover__footer {
border-top: 1px solid var(--l1-border);
padding: 8px 14px;

View File

@@ -1,6 +1,5 @@
import { useState } from 'react';
import { render } from '@testing-library/react';
import { fireEvent, screen, userEvent } from 'tests/test-utils';
import { fireEvent, render, screen } from '@testing-library/react';
import dayjs from 'dayjs';
import { mockAppLocation } from 'tests/router-mocks';
import * as timeUtils from 'utils/timeUtils';
@@ -158,8 +157,7 @@ describe('CustomTimePicker', () => {
expect(onValid).not.toHaveBeenCalled();
});
it('treats close after change like pressing Enter (blur + chevron)', async () => {
const user = userEvent.setup();
it('treats close after change like pressing Enter (blur + chevron)', () => {
const onValid = jest.fn();
const onError = jest.fn();
@@ -168,13 +166,16 @@ describe('CustomTimePicker', () => {
const input = screen.getByRole('textbox');
// Open and change value so "changed since open" is true
await user.click(input);
await user.clear(input);
await user.type(input, '5m');
await user.tab();
fireEvent.focus(input);
fireEvent.change(input, { target: { value: '5m' } });
fireEvent.blur(input);
// Click the chevron (which triggers handleClose)
await user.click(screen.getByTestId('time-picker-close-chevron'));
const chevron = document.querySelector(
'.time-input-suffix-icon-badge',
) as HTMLElement;
fireEvent.click(chevron);
// Should have applied the value (same as Enter)
expect(onValid).toHaveBeenCalledTimes(1);

View File

@@ -640,14 +640,12 @@ function CustomTimePicker({
size={14}
className="cursor-pointer time-input-suffix-icon-badge"
onClick={handleClose}
data-testid="time-picker-close-chevron"
/>
) : (
<ChevronDown
size={14}
className="cursor-pointer time-input-suffix-icon-badge"
onClick={handleOpen}
data-testid="time-picker-open-chevron"
/>
)}
</div>

View File

@@ -24,10 +24,4 @@
gap: 4px;
flex-shrink: 0;
}
&__nav {
display: flex;
align-items: center;
gap: 2px;
}
}

View File

@@ -9,7 +9,7 @@ export interface HeaderAction {
component: ReactNode; // check later if we can use direct btn itself or not.
}
export interface DetailsHeaderProps {
interface DetailsHeaderProps {
title: string;
onClose: () => void;
actions?: HeaderAction[];

View File

@@ -1,8 +1,4 @@
export type {
DetailsHeaderProps,
HeaderAction,
} from './DetailsHeader/DetailsHeader';
export type { HeaderAction } from './DetailsHeader/DetailsHeader';
export { default as DetailsHeader } from './DetailsHeader/DetailsHeader';
export { default as DetailsPanelDrawer } from './DetailsPanelDrawer';
export type { DetailsPanelState, UseDetailsPanelOptions } from './types';
export { default as useDetailsPanel } from './useDetailsPanel';

View File

@@ -273,7 +273,7 @@ describe('EditMemberDrawer', () => {
it('enables Save after editing name and calls updateUser on confirm', async () => {
const onComplete = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const mockMutateAsync = jest.fn().mockResolvedValue({});
(useUpdateUser as jest.Mock).mockReturnValue({
@@ -306,7 +306,7 @@ describe('EditMemberDrawer', () => {
it('does not close the drawer after a successful save', async () => {
const onClose = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer({ onClose });
@@ -331,7 +331,7 @@ describe('EditMemberDrawer', () => {
it('adding a new role creates a user role without removing existing ones', async () => {
const onComplete = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const mockSet = jest.fn().mockResolvedValue({});
(useCreateUserRole as jest.Mock).mockReturnValue({
@@ -365,7 +365,7 @@ describe('EditMemberDrawer', () => {
it('deselecting a role deletes the user role by its assignment id', async () => {
const onComplete = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer({ onComplete });
@@ -392,7 +392,7 @@ describe('EditMemberDrawer', () => {
it('shows delete confirm dialog and calls deleteUser for active members', async () => {
const onComplete = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -553,7 +553,7 @@ describe('EditMemberDrawer', () => {
it('calls deleteUser after confirming revoke invite for invited members', async () => {
const onComplete = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -583,7 +583,7 @@ describe('EditMemberDrawer', () => {
it('calls updateUser when saving name change for an invited member', async () => {
const onComplete = jest.fn();
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const mockMutateAsync = jest.fn().mockResolvedValue({});
(useGetUser as jest.Mock).mockReturnValue({
@@ -641,7 +641,7 @@ describe('EditMemberDrawer', () => {
});
it('shows SaveErrorItem when updateUser fails for name change', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
(useUpdateUser as jest.Mock).mockReturnValue({
mutateAsync: jest.fn().mockRejectedValue(new Error('server error')),
@@ -669,7 +669,7 @@ describe('EditMemberDrawer', () => {
});
it('shows API error message when deleteUser fails for active member', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -700,7 +700,7 @@ describe('EditMemberDrawer', () => {
});
it('shows API error message when deleteUser fails for invited member', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -740,7 +740,7 @@ describe('EditMemberDrawer', () => {
});
it('does not open delete confirm dialog when Delete is clicked while disabled (isSelf)', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer({ member: selfMember });
await user.click(screen.getByRole('button', { name: /delete member/i }));
@@ -811,7 +811,7 @@ describe('EditMemberDrawer', () => {
isLoading: false,
});
server.use(setupAuthzDeny(buildUserUpdatePermission(selfMember.id)));
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer({ member: selfMember });
const input = await screen.findByDisplayValue('Alice Smith');
@@ -875,7 +875,7 @@ describe('EditMemberDrawer', () => {
});
it('does not open delete confirm dialog when Delete is clicked while disabled (root)', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer();
await user.click(screen.getByRole('button', { name: /delete member/i }));
@@ -886,7 +886,7 @@ describe('EditMemberDrawer', () => {
});
it('does not call createResetPasswordToken when Reset Link is clicked while disabled (root)', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer();
await user.click(
@@ -903,7 +903,7 @@ describe('EditMemberDrawer', () => {
});
it('calls POST and opens the reset link dialog with the generated link and expiry', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
renderDrawer();
@@ -925,7 +925,7 @@ describe('EditMemberDrawer', () => {
});
it('copies the link to clipboard and shows "Copied!" on the button', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const mockToast = jest.mocked(toast);
renderDrawer();

View File

@@ -1,2 +1 @@
export type { WithErrorBoundaryOptions } from './withErrorBoundary';
export { default as withErrorBoundary } from './withErrorBoundary';

View File

@@ -53,7 +53,7 @@ describe('ErrorModal Component', () => {
// Click the close button
const closeButton = screen.getByTestId('close-button');
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
await user.click(closeButton);
// Check if onClose was called
@@ -145,7 +145,7 @@ it('should open the modal when the trigger component is clicked', async () => {
// Click the trigger component
const triggerButton = screen.getByText('Open Error Modal');
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
await user.click(triggerButton);
// Check if the modal is displayed
@@ -165,13 +165,12 @@ it('should close the modal when the onCancel event is triggered', async () => {
// Click the trigger component
const triggerButton = screen.getByText('error');
const user = userEvent.setup();
const user = userEvent.setup({ pointerEventsCheck: 0 });
await user.click(triggerButton);
await waitFor(() => {
expect(screen.getByText('An error occurred')).toBeInTheDocument();
});
const modal = screen.getByRole('dialog');
// Trigger the onCancel event
await user.click(screen.getByTestId('close-button'));
@@ -181,6 +180,8 @@ it('should close the modal when the onCancel event is triggered', async () => {
await waitFor(() => {
// check if the modal is not visible
expect(modal).toHaveStyle({ display: 'none' });
const modal = document.getElementsByClassName('ant-modal');
const style = window.getComputedStyle(modal[0]);
expect(style.display).toBe('none');
});
});

View File

@@ -20,7 +20,7 @@
display: flex;
flex-direction: column;
// radio option labels — radix popover content inherits the root font
// radio option labels — popover content inherits the root font
// size; pin to the app's 13px base the antd popover used to impose
label {
font-size: var(--label-base-400-font-size);

View File

@@ -1,6 +1,6 @@
// eslint-disable-next-line no-restricted-imports
import { Provider } from 'react-redux';
import { act, render, renderHook } from 'tests/test-utils';
import { act, render, renderHook } from '@testing-library/react';
import { DEFAULT_TIME_RANGE } from 'container/TopNav/DateTimeSelectionV2/constants';
import configureStore, { MockStoreEnhanced } from 'redux-mock-store';
import { useGlobalTimeStore } from 'store/globalTime/globalTimeStore';
@@ -42,13 +42,13 @@ describe('GlobalTimeStoreAdapter', () => {
globalTime: createGlobalTimeState(),
});
const { asFragment } = render(
const { container } = render(
<Provider store={store}>
<GlobalTimeStoreAdapter />
</Provider>,
);
expect(asFragment().hasChildNodes()).toBe(false);
expect(container.firstChild).toBeNull();
});
it('should sync relative time from Redux to Zustand store', () => {

View File

@@ -12,7 +12,7 @@ export type IntersectionCursorPluginOptions = {
gapSize?: number;
};
export const defaultIntersectionCursorPluginOptions: Required<IntersectionCursorPluginOptions> =
const defaultIntersectionCursorPluginOptions: Required<IntersectionCursorPluginOptions> =
{
color: 'white',
dashSize: 3,

View File

@@ -2,14 +2,8 @@ import { Typography } from '@signozhq/ui/typography';
function AnnouncementsModal(): JSX.Element {
return (
<div
className="announcements-modal-container"
data-testid="announcements-modal"
>
<div
className="announcements-modal-container-header"
data-testid="announcements-modal-header"
>
<div className="announcements-modal-container">
<div className="announcements-modal-container-header">
<Typography
variant="paragraph"
size="base"

Some files were not shown because too many files have changed in this diff Show More