mirror of
https://github.com/SigNoz/signoz.git
synced 2026-03-06 05:42:02 +00:00
Compare commits
8 Commits
main
...
refactor/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a09dc325de | ||
|
|
379b4f7fc4 | ||
|
|
5e536ae077 | ||
|
|
234585e642 | ||
|
|
2cc14f1ad4 | ||
|
|
dc4ed4d239 | ||
|
|
7281c36873 | ||
|
|
40288776e8 |
26
.github/workflows/build-enterprise.yaml
vendored
26
.github/workflows/build-enterprise.yaml
vendored
@@ -58,19 +58,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p frontend
|
mkdir -p frontend
|
||||||
echo 'CI=1' > frontend/.env
|
echo 'CI=1' > frontend/.env
|
||||||
echo 'VITE_INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' >> frontend/.env
|
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
|
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' >> frontend/.env
|
echo 'SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' >> frontend/.env
|
||||||
echo 'VITE_SENTRY_ORG="${{ secrets.SENTRY_ORG }}"' >> frontend/.env
|
echo 'SENTRY_ORG="${{ secrets.SENTRY_ORG }}"' >> frontend/.env
|
||||||
echo 'VITE_SENTRY_PROJECT_ID="${{ secrets.SENTRY_PROJECT_ID }}"' >> frontend/.env
|
echo 'SENTRY_PROJECT_ID="${{ secrets.SENTRY_PROJECT_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_SENTRY_DSN="${{ secrets.SENTRY_DSN }}"' >> frontend/.env
|
echo 'SENTRY_DSN="${{ secrets.SENTRY_DSN }}"' >> frontend/.env
|
||||||
echo 'VITE_TUNNEL_URL="${{ secrets.TUNNEL_URL }}"' >> frontend/.env
|
echo 'TUNNEL_URL="${{ secrets.TUNNEL_URL }}"' >> frontend/.env
|
||||||
echo 'VITE_TUNNEL_DOMAIN="${{ secrets.TUNNEL_DOMAIN }}"' >> frontend/.env
|
echo 'TUNNEL_DOMAIN="${{ secrets.TUNNEL_DOMAIN }}"' >> frontend/.env
|
||||||
echo 'VITE_POSTHOG_KEY="${{ secrets.POSTHOG_KEY }}"' >> frontend/.env
|
echo 'POSTHOG_KEY="${{ secrets.POSTHOG_KEY }}"' >> frontend/.env
|
||||||
echo 'VITE_PYLON_APP_ID="${{ secrets.PYLON_APP_ID }}"' >> frontend/.env
|
echo 'PYLON_APP_ID="${{ secrets.PYLON_APP_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_APPCUES_APP_ID="${{ secrets.APPCUES_APP_ID }}"' >> frontend/.env
|
echo 'APPCUES_APP_ID="${{ secrets.APPCUES_APP_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_PYLON_IDENTITY_SECRET="${{ secrets.PYLON_IDENTITY_SECRET }}"' >> frontend/.env
|
echo 'PYLON_IDENTITY_SECRET="${{ secrets.PYLON_IDENTITY_SECRET }}"' >> frontend/.env
|
||||||
echo 'VITE_DOCS_BASE_URL="https://signoz.io"' >> frontend/.env
|
echo 'DOCS_BASE_URL="https://signoz.io"' >> frontend/.env
|
||||||
- name: cache-dotenv
|
- name: cache-dotenv
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
12
.github/workflows/build-staging.yaml
vendored
12
.github/workflows/build-staging.yaml
vendored
@@ -64,12 +64,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p frontend
|
mkdir -p frontend
|
||||||
echo 'CI=1' > frontend/.env
|
echo 'CI=1' > frontend/.env
|
||||||
echo 'VITE_TUNNEL_URL="${{ secrets.NP_TUNNEL_URL }}"' >> frontend/.env
|
echo 'TUNNEL_URL="${{ secrets.NP_TUNNEL_URL }}"' >> frontend/.env
|
||||||
echo 'VITE_TUNNEL_DOMAIN="${{ secrets.NP_TUNNEL_DOMAIN }}"' >> frontend/.env
|
echo 'TUNNEL_DOMAIN="${{ secrets.NP_TUNNEL_DOMAIN }}"' >> frontend/.env
|
||||||
echo 'VITE_PYLON_APP_ID="${{ secrets.NP_PYLON_APP_ID }}"' >> frontend/.env
|
echo 'PYLON_APP_ID="${{ secrets.NP_PYLON_APP_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_APPCUES_APP_ID="${{ secrets.NP_APPCUES_APP_ID }}"' >> frontend/.env
|
echo 'APPCUES_APP_ID="${{ secrets.NP_APPCUES_APP_ID }}"' >> frontend/.env
|
||||||
echo 'VITE_PYLON_IDENTITY_SECRET="${{ secrets.NP_PYLON_IDENTITY_SECRET }}"' >> frontend/.env
|
echo 'PYLON_IDENTITY_SECRET="${{ secrets.NP_PYLON_IDENTITY_SECRET }}"' >> frontend/.env
|
||||||
echo 'VITE_DOCS_BASE_URL="https://staging.signoz.io"' >> frontend/.env
|
echo 'DOCS_BASE_URL="https://staging.signoz.io"' >> frontend/.env
|
||||||
- name: cache-dotenv
|
- name: cache-dotenv
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
26
.github/workflows/gor-signoz.yaml
vendored
26
.github/workflows/gor-signoz.yaml
vendored
@@ -24,19 +24,19 @@ jobs:
|
|||||||
- name: dotenv-frontend
|
- name: dotenv-frontend
|
||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
run: |
|
run: |
|
||||||
echo 'VITE_INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > .env
|
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > .env
|
||||||
echo 'VITE_SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> .env
|
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> .env
|
||||||
echo 'VITE_SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' >> .env
|
echo 'SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' >> .env
|
||||||
echo 'VITE_SENTRY_ORG="${{ secrets.SENTRY_ORG }}"' >> .env
|
echo 'SENTRY_ORG="${{ secrets.SENTRY_ORG }}"' >> .env
|
||||||
echo 'VITE_SENTRY_PROJECT_ID="${{ secrets.SENTRY_PROJECT_ID }}"' >> .env
|
echo 'SENTRY_PROJECT_ID="${{ secrets.SENTRY_PROJECT_ID }}"' >> .env
|
||||||
echo 'VITE_SENTRY_DSN="${{ secrets.SENTRY_DSN }}"' >> .env
|
echo 'SENTRY_DSN="${{ secrets.SENTRY_DSN }}"' >> .env
|
||||||
echo 'VITE_TUNNEL_URL="${{ secrets.TUNNEL_URL }}"' >> .env
|
echo 'TUNNEL_URL="${{ secrets.TUNNEL_URL }}"' >> .env
|
||||||
echo 'VITE_TUNNEL_DOMAIN="${{ secrets.TUNNEL_DOMAIN }}"' >> .env
|
echo 'TUNNEL_DOMAIN="${{ secrets.TUNNEL_DOMAIN }}"' >> .env
|
||||||
echo 'VITE_POSTHOG_KEY="${{ secrets.POSTHOG_KEY }}"' >> .env
|
echo 'POSTHOG_KEY="${{ secrets.POSTHOG_KEY }}"' >> .env
|
||||||
echo 'VITE_PYLON_APP_ID="${{ secrets.PYLON_APP_ID }}"' >> .env
|
echo 'PYLON_APP_ID="${{ secrets.PYLON_APP_ID }}"' >> .env
|
||||||
echo 'VITE_APPCUES_APP_ID="${{ secrets.APPCUES_APP_ID }}"' >> .env
|
echo 'APPCUES_APP_ID="${{ secrets.APPCUES_APP_ID }}"' >> .env
|
||||||
echo 'VITE_PYLON_IDENTITY_SECRET="${{ secrets.PYLON_IDENTITY_SECRET }}"' >> .env
|
echo 'PYLON_IDENTITY_SECRET="${{ secrets.PYLON_IDENTITY_SECRET }}"' >> .env
|
||||||
echo 'VITE_DOCS_BASE_URL="https://signoz.io"' >> .env
|
echo 'DOCS_BASE_URL="https://signoz.io"' >> .env
|
||||||
- name: node-setup
|
- name: node-setup
|
||||||
uses: actions/setup-node@v5
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
3
.github/workflows/jsci.yaml
vendored
3
.github/workflows/jsci.yaml
vendored
@@ -103,9 +103,8 @@ jobs:
|
|||||||
make py-test-setup
|
make py-test-setup
|
||||||
|
|
||||||
- name: Generate permissions.type.ts
|
- name: Generate permissions.type.ts
|
||||||
working-directory: ./frontend
|
|
||||||
run: |
|
run: |
|
||||||
yarn generate:permissions-type
|
node frontend/scripts/generate-permissions-type.js
|
||||||
|
|
||||||
- name: Teardown test environment
|
- name: Teardown test environment
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -238,4 +238,4 @@ py-clean: ## Clear all pycache and pytest cache from tests directory recursively
|
|||||||
.PHONY: gen-mocks
|
.PHONY: gen-mocks
|
||||||
gen-mocks:
|
gen-mocks:
|
||||||
@echo ">> Generating mocks"
|
@echo ">> Generating mocks"
|
||||||
@mockery --config .mockery.yml
|
@mockery --config .mockery.yml
|
||||||
@@ -190,7 +190,7 @@ services:
|
|||||||
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
||||||
signoz:
|
signoz:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz:v0.114.0
|
image: signoz/signoz:v0.113.0
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # signoz port
|
- "8080:8080" # signoz port
|
||||||
# - "6060:6060" # pprof port
|
# - "6060:6060" # pprof port
|
||||||
@@ -213,7 +213,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
otel-collector:
|
otel-collector:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:v0.144.2
|
image: signoz/signoz-otel-collector:v0.144.1
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
command:
|
command:
|
||||||
@@ -241,7 +241,7 @@ services:
|
|||||||
replicas: 3
|
replicas: 3
|
||||||
signoz-telemetrystore-migrator:
|
signoz-telemetrystore-migrator:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:v0.144.2
|
image: signoz/signoz-otel-collector:v0.144.1
|
||||||
environment:
|
environment:
|
||||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
||||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
|
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ services:
|
|||||||
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
||||||
signoz:
|
signoz:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz:v0.114.0
|
image: signoz/signoz:v0.113.0
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # signoz port
|
- "8080:8080" # signoz port
|
||||||
volumes:
|
volumes:
|
||||||
@@ -139,7 +139,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
otel-collector:
|
otel-collector:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:v0.144.2
|
image: signoz/signoz-otel-collector:v0.144.1
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
command:
|
command:
|
||||||
@@ -167,7 +167,7 @@ services:
|
|||||||
replicas: 3
|
replicas: 3
|
||||||
signoz-telemetrystore-migrator:
|
signoz-telemetrystore-migrator:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:v0.144.2
|
image: signoz/signoz-otel-collector:v0.144.1
|
||||||
environment:
|
environment:
|
||||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
||||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
|
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ services:
|
|||||||
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
||||||
signoz:
|
signoz:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz:${VERSION:-v0.114.0}
|
image: signoz/signoz:${VERSION:-v0.113.0}
|
||||||
container_name: signoz
|
container_name: signoz
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # signoz port
|
- "8080:8080" # signoz port
|
||||||
@@ -204,7 +204,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
otel-collector:
|
otel-collector:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.2}
|
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.1}
|
||||||
container_name: signoz-otel-collector
|
container_name: signoz-otel-collector
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@@ -229,7 +229,7 @@ services:
|
|||||||
- "4318:4318" # OTLP HTTP receiver
|
- "4318:4318" # OTLP HTTP receiver
|
||||||
signoz-telemetrystore-migrator:
|
signoz-telemetrystore-migrator:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.2}
|
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.1}
|
||||||
container_name: signoz-telemetrystore-migrator
|
container_name: signoz-telemetrystore-migrator
|
||||||
environment:
|
environment:
|
||||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ services:
|
|||||||
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
|
||||||
signoz:
|
signoz:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz:${VERSION:-v0.114.0}
|
image: signoz/signoz:${VERSION:-v0.113.0}
|
||||||
container_name: signoz
|
container_name: signoz
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # signoz port
|
- "8080:8080" # signoz port
|
||||||
@@ -132,7 +132,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
otel-collector:
|
otel-collector:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.2}
|
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.1}
|
||||||
container_name: signoz-otel-collector
|
container_name: signoz-otel-collector
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@@ -157,7 +157,7 @@ services:
|
|||||||
- "4318:4318" # OTLP HTTP receiver
|
- "4318:4318" # OTLP HTTP receiver
|
||||||
signoz-telemetrystore-migrator:
|
signoz-telemetrystore-migrator:
|
||||||
!!merge <<: *db-depend
|
!!merge <<: *db-depend
|
||||||
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.2}
|
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.144.1}
|
||||||
container_name: signoz-telemetrystore-migrator
|
container_name: signoz-telemetrystore-migrator
|
||||||
environment:
|
environment:
|
||||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://clickhouse:9000
|
||||||
|
|||||||
@@ -6167,10 +6167,6 @@ paths:
|
|||||||
name: searchText
|
name: searchText
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
|
||||||
name: source
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
content:
|
content:
|
||||||
|
|||||||
16
frontend/.babelrc
Normal file
16
frontend/.babelrc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"@babel/preset-env",
|
||||||
|
["@babel/preset-react", { "runtime": "automatic" }],
|
||||||
|
"@babel/preset-typescript"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"react-hot-loader/babel",
|
||||||
|
"@babel/plugin-proposal-class-properties"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"production": {
|
||||||
|
"presets": ["minify"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ module.exports = {
|
|||||||
browser: true,
|
browser: true,
|
||||||
es2021: true,
|
es2021: true,
|
||||||
node: true,
|
node: true,
|
||||||
|
'jest/globals': true,
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
@@ -24,7 +25,6 @@ module.exports = {
|
|||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: './tsconfig.json',
|
project: './tsconfig.json',
|
||||||
tsconfigRootDir: __dirname,
|
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
jsx: true,
|
jsx: true,
|
||||||
},
|
},
|
||||||
@@ -37,7 +37,7 @@ module.exports = {
|
|||||||
'simple-import-sort', // Auto-sort imports
|
'simple-import-sort', // Auto-sort imports
|
||||||
'react-hooks', // React Hooks rules
|
'react-hooks', // React Hooks rules
|
||||||
'prettier', // Code formatting
|
'prettier', // Code formatting
|
||||||
// 'jest', // TODO: Wait support on Biome to enable again
|
'jest', // Jest test rules
|
||||||
'jsx-a11y', // Accessibility rules
|
'jsx-a11y', // Accessibility rules
|
||||||
'import', // Import/export linting
|
'import', // Import/export linting
|
||||||
'sonarjs', // Code quality/complexity
|
'sonarjs', // Code quality/complexity
|
||||||
@@ -1 +1 @@
|
|||||||
22
|
16.15.0
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
export const ENVIRONMENT = {
|
|
||||||
baseURL: process.env.VITE_FRONTEND_API_ENDPOINT || '',
|
|
||||||
wsURL: process.env.VITE_WEBSOCKET_API_ENDPOINT || '',
|
|
||||||
};
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
presets: [
|
|
||||||
['@babel/preset-env', { modules: 'auto' }],
|
|
||||||
['@babel/preset-react', { runtime: 'automatic' }],
|
|
||||||
['@babel/preset-typescript'],
|
|
||||||
],
|
|
||||||
plugins: ['@babel/plugin-proposal-class-properties'],
|
|
||||||
env: {
|
|
||||||
test: {
|
|
||||||
presets: [
|
|
||||||
[
|
|
||||||
'@babel/preset-env',
|
|
||||||
{ modules: 'commonjs', targets: { node: 'current' } },
|
|
||||||
],
|
|
||||||
['@babel/preset-react', { runtime: 'automatic' }],
|
|
||||||
['@babel/preset-typescript'],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
6
frontend/babel.config.js
Normal file
6
frontend/babel.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
['@babel/preset-env', { targets: { node: 'current' } }],
|
||||||
|
'@babel/preset-typescript',
|
||||||
|
],
|
||||||
|
};
|
||||||
8
frontend/bundlesize.config.json
Normal file
8
frontend/bundlesize.config.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "./build/**.js",
|
||||||
|
"maxSize": "1.2MB"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
NODE_ENV="development"
|
NODE_ENV="development"
|
||||||
BUNDLE_ANALYSER="true"
|
BUNDLE_ANALYSER="true"
|
||||||
VITE_FRONTEND_API_ENDPOINT="http://localhost:8080/"
|
FRONTEND_API_ENDPOINT="http://localhost:8080/"
|
||||||
VITE_PYLON_APP_ID="pylon-app-id"
|
PYLON_APP_ID="pylon-app-id"
|
||||||
VITE_APPCUES_APP_ID="appcess-app-id"
|
APPCUES_APP_ID="appcess-app-id"
|
||||||
VITE_PYLON_IDENTITY_SECRET="pylon-identity-secret"
|
PYLON_IDENTITY_SECRET="pylon-identity-secret"
|
||||||
|
|
||||||
CI="1"
|
CI="1"
|
||||||
@@ -17,53 +17,29 @@ const config: Config.InitialOptions = {
|
|||||||
'^hooks/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
|
'^hooks/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
|
||||||
'^src/hooks/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
|
'^src/hooks/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
|
||||||
'^.*/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
|
'^.*/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
|
||||||
'^constants/env$': '<rootDir>/__mocks__/env.ts',
|
|
||||||
'^src/constants/env$': '<rootDir>/__mocks__/env.ts',
|
|
||||||
'^@signozhq/icons$':
|
'^@signozhq/icons$':
|
||||||
'<rootDir>/node_modules/@signozhq/icons/dist/index.esm.js',
|
'<rootDir>/node_modules/@signozhq/icons/dist/index.esm.js',
|
||||||
'^react-syntax-highlighter/dist/esm/(.*)$':
|
'^react-syntax-highlighter/dist/esm/(.*)$':
|
||||||
'<rootDir>/node_modules/react-syntax-highlighter/dist/cjs/$1',
|
'<rootDir>/node_modules/react-syntax-highlighter/dist/cjs/$1',
|
||||||
'^@signozhq/sonner$':
|
|
||||||
'<rootDir>/node_modules/@signozhq/sonner/dist/sonner.js',
|
|
||||||
'^@signozhq/button$':
|
|
||||||
'<rootDir>/node_modules/@signozhq/button/dist/button.js',
|
|
||||||
'^@signozhq/calendar$':
|
|
||||||
'<rootDir>/node_modules/@signozhq/calendar/dist/calendar.js',
|
|
||||||
'^@signozhq/badge': '<rootDir>/node_modules/@signozhq/badge/dist/badge.js',
|
|
||||||
'^@signozhq/checkbox':
|
|
||||||
'<rootDir>/node_modules/@signozhq/checkbox/dist/checkbox.js',
|
|
||||||
'^@signozhq/switch': '<rootDir>/node_modules/@signozhq/switch/dist/switch.js',
|
|
||||||
'^@signozhq/callout':
|
|
||||||
'<rootDir>/node_modules/@signozhq/callout/dist/callout.js',
|
|
||||||
'^@signozhq/combobox':
|
|
||||||
'<rootDir>/node_modules/@signozhq/combobox/dist/combobox.js',
|
|
||||||
'^@signozhq/input': '<rootDir>/node_modules/@signozhq/input/dist/input.js',
|
|
||||||
'^@signozhq/command':
|
|
||||||
'<rootDir>/node_modules/@signozhq/command/dist/command.js',
|
|
||||||
'^@signozhq/radio-group':
|
|
||||||
'<rootDir>/node_modules/@signozhq/radio-group/dist/radio-group.js',
|
|
||||||
'^@signozhq/toggle-group$':
|
|
||||||
'<rootDir>/node_modules/@signozhq/toggle-group/dist/toggle-group.js',
|
|
||||||
'^@signozhq/dialog$':
|
|
||||||
'<rootDir>/node_modules/@signozhq/dialog/dist/dialog.js',
|
|
||||||
},
|
},
|
||||||
extensionsToTreatAsEsm: ['.ts'],
|
globals: {
|
||||||
|
extensionsToTreatAsEsm: ['.ts'],
|
||||||
|
'ts-jest': {
|
||||||
|
useESM: true,
|
||||||
|
isolatedModules: true,
|
||||||
|
tsconfig: '<rootDir>/tsconfig.jest.json',
|
||||||
|
},
|
||||||
|
},
|
||||||
testMatch: ['<rootDir>/src/**/*?(*.)(test).(ts|js)?(x)'],
|
testMatch: ['<rootDir>/src/**/*?(*.)(test).(ts|js)?(x)'],
|
||||||
preset: 'ts-jest/presets/js-with-ts-esm',
|
preset: 'ts-jest/presets/js-with-ts-esm',
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.(ts|tsx)?$': [
|
'^.+\\.(ts|tsx)?$': 'ts-jest',
|
||||||
'ts-jest',
|
|
||||||
{
|
|
||||||
useESM: true,
|
|
||||||
tsconfig: '<rootDir>/tsconfig.jest.json',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'^.+\\.(js|jsx)$': 'babel-jest',
|
'^.+\\.(js|jsx)$': 'babel-jest',
|
||||||
},
|
},
|
||||||
transformIgnorePatterns: [
|
transformIgnorePatterns: [
|
||||||
'node_modules/(?!(lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq/design-tokens|@signozhq/table|@signozhq/calendar|@signozhq/input|@signozhq/popover|@signozhq/button|@signozhq/sonner|@signozhq/*|date-fns|d3-interpolate|d3-color|api|@codemirror|@lezer|@marijn|@grafana)/)',
|
'node_modules/(?!(lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq/design-tokens|@signozhq/table|@signozhq/calendar|@signozhq/input|@signozhq/popover|@signozhq/button|@signozhq/sonner|@signozhq/*|date-fns|d3-interpolate|d3-color|api|@codemirror|@lezer|@marijn)/)',
|
||||||
],
|
],
|
||||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
setupFilesAfterEnv: ['<rootDir>jest.setup.ts'],
|
||||||
testPathIgnorePatterns: ['/node_modules/', '/public/'],
|
testPathIgnorePatterns: ['/node_modules/', '/public/'],
|
||||||
moduleDirectories: ['node_modules', 'src'],
|
moduleDirectories: ['node_modules', 'src'],
|
||||||
testEnvironment: 'jest-environment-jsdom',
|
testEnvironment: 'jest-environment-jsdom',
|
||||||
|
|||||||
@@ -1,285 +1,293 @@
|
|||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"main": "webpack.config.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n:generate-hash": "node ./i18-generate-hash.cjs",
|
"i18n:generate-hash": "node ./i18-generate-hash.js",
|
||||||
"dev": "vite",
|
"dev": "cross-env NODE_ENV=development webpack serve --progress",
|
||||||
"build": "vite build",
|
"build": "webpack --config=webpack.config.prod.js --progress",
|
||||||
"preview": "vite preview",
|
"prettify": "prettier --write .",
|
||||||
"prettify": "prettier --write .",
|
"fmt": "prettier --check .",
|
||||||
"fmt": "prettier --check .",
|
"lint": "eslint ./src",
|
||||||
"lint": "eslint ./src",
|
"lint:fix": "eslint ./src --fix",
|
||||||
"lint:fix": "eslint ./src --fix",
|
"jest": "jest",
|
||||||
"jest": "jest",
|
"jest:coverage": "jest --coverage",
|
||||||
"jest:coverage": "jest --coverage",
|
"jest:watch": "jest --watch",
|
||||||
"jest:watch": "jest --watch",
|
"postinstall": "yarn i18n:generate-hash && (is-ci || yarn husky:configure) && node scripts/update-registry.js",
|
||||||
"postinstall": "yarn i18n:generate-hash && (is-ci || yarn husky:configure) && node scripts/update-registry.cjs",
|
"husky:configure": "cd .. && husky install frontend/.husky && cd frontend && chmod ug+x .husky/*",
|
||||||
"husky:configure": "cd .. && husky install frontend/.husky && cd frontend && chmod ug+x .husky/*",
|
"commitlint": "commitlint --edit $1",
|
||||||
"commitlint": "commitlint --edit $1",
|
"test": "jest",
|
||||||
"test": "jest",
|
"test:changedsince": "jest --changedSince=main --coverage --silent",
|
||||||
"test:changedsince": "jest --changedSince=main --coverage --silent",
|
"generate:api": "orval --config ./orval.config.ts && sh scripts/post-types-generation.sh",
|
||||||
"generate:api": "orval --config ./orval.config.ts && sh scripts/post-types-generation.sh",
|
"generate:permissions-type": "node scripts/generate-permissions-type.js"
|
||||||
"generate:permissions-type": "node scripts/generate-permissions-type.cjs"
|
},
|
||||||
},
|
"engines": {
|
||||||
"engines": {
|
"node": ">=16.15.0"
|
||||||
"node": ">=22.0.0"
|
},
|
||||||
},
|
"author": "",
|
||||||
"author": "",
|
"license": "ISC",
|
||||||
"license": "ISC",
|
"dependencies": {
|
||||||
"dependencies": {
|
"@ant-design/colors": "6.0.0",
|
||||||
"@ant-design/colors": "6.0.0",
|
"@ant-design/icons": "4.8.0",
|
||||||
"@ant-design/icons": "4.8.0",
|
"@codemirror/autocomplete": "6.18.6",
|
||||||
"@codemirror/autocomplete": "6.18.6",
|
"@codemirror/lang-javascript": "6.2.3",
|
||||||
"@codemirror/lang-javascript": "6.2.3",
|
"@dnd-kit/core": "6.1.0",
|
||||||
"@dnd-kit/core": "6.1.0",
|
"@dnd-kit/modifiers": "7.0.0",
|
||||||
"@dnd-kit/modifiers": "7.0.0",
|
"@dnd-kit/sortable": "8.0.0",
|
||||||
"@dnd-kit/sortable": "8.0.0",
|
"@dnd-kit/utilities": "3.2.2",
|
||||||
"@dnd-kit/utilities": "3.2.2",
|
"@grafana/data": "^11.2.3",
|
||||||
"@grafana/data": "^11.2.3",
|
"@mdx-js/loader": "2.3.0",
|
||||||
"@mdx-js/loader": "2.3.0",
|
"@mdx-js/react": "2.3.0",
|
||||||
"@mdx-js/react": "2.3.0",
|
"@monaco-editor/react": "^4.3.1",
|
||||||
"@monaco-editor/react": "^4.3.1",
|
"@playwright/test": "1.55.1",
|
||||||
"@playwright/test": "1.55.1",
|
"@radix-ui/react-tabs": "1.0.4",
|
||||||
"@radix-ui/react-tabs": "1.0.4",
|
"@radix-ui/react-tooltip": "1.0.7",
|
||||||
"@radix-ui/react-tooltip": "1.0.7",
|
"@sentry/react": "8.41.0",
|
||||||
"@sentry/react": "8.41.0",
|
"@sentry/webpack-plugin": "2.22.6",
|
||||||
"@sentry/vite-plugin": "2.22.6",
|
"@signozhq/badge": "0.0.2",
|
||||||
"@signozhq/badge": "0.0.2",
|
"@signozhq/button": "0.0.2",
|
||||||
"@signozhq/button": "0.0.2",
|
"@signozhq/calendar": "0.0.0",
|
||||||
"@signozhq/calendar": "0.0.0",
|
"@signozhq/callout": "0.0.2",
|
||||||
"@signozhq/callout": "0.0.2",
|
"@signozhq/checkbox": "0.0.2",
|
||||||
"@signozhq/checkbox": "0.0.2",
|
"@signozhq/combobox": "0.0.2",
|
||||||
"@signozhq/combobox": "0.0.2",
|
"@signozhq/command": "0.0.0",
|
||||||
"@signozhq/command": "0.0.0",
|
"@signozhq/design-tokens": "2.1.1",
|
||||||
"@signozhq/design-tokens": "2.1.1",
|
"@signozhq/icons": "0.1.0",
|
||||||
"@signozhq/dialog": "^0.0.2",
|
"@signozhq/input": "0.0.2",
|
||||||
"@signozhq/icons": "0.1.0",
|
"@signozhq/popover": "0.0.0",
|
||||||
"@signozhq/input": "0.0.2",
|
"@signozhq/radio-group": "0.0.2",
|
||||||
"@signozhq/popover": "0.0.0",
|
"@signozhq/resizable": "0.0.0",
|
||||||
"@signozhq/radio-group": "0.0.2",
|
"@signozhq/sonner": "0.1.0",
|
||||||
"@signozhq/resizable": "0.0.0",
|
"@signozhq/switch": "0.0.2",
|
||||||
"@signozhq/sonner": "0.1.0",
|
"@signozhq/table": "0.3.7",
|
||||||
"@signozhq/switch": "0.0.2",
|
"@signozhq/tooltip": "0.0.2",
|
||||||
"@signozhq/table": "0.3.7",
|
"@tanstack/react-table": "8.20.6",
|
||||||
"@signozhq/toggle-group": "^0.0.1",
|
"@tanstack/react-virtual": "3.11.2",
|
||||||
"@signozhq/tooltip": "0.0.2",
|
"@uiw/codemirror-theme-copilot": "4.23.11",
|
||||||
"@tanstack/react-table": "8.20.6",
|
"@uiw/codemirror-theme-github": "4.24.1",
|
||||||
"@tanstack/react-virtual": "3.11.2",
|
"@uiw/react-codemirror": "4.23.10",
|
||||||
"@uiw/codemirror-theme-copilot": "4.23.11",
|
"@uiw/react-md-editor": "3.23.5",
|
||||||
"@uiw/codemirror-theme-github": "4.24.1",
|
"@visx/group": "3.3.0",
|
||||||
"@uiw/react-codemirror": "4.23.10",
|
"@visx/hierarchy": "3.12.0",
|
||||||
"@uiw/react-md-editor": "3.23.5",
|
"@visx/shape": "3.5.0",
|
||||||
"@visx/group": "3.3.0",
|
"@visx/tooltip": "3.3.0",
|
||||||
"@visx/hierarchy": "3.12.0",
|
"@xstate/react": "^3.0.0",
|
||||||
"@visx/shape": "3.5.0",
|
"ansi-to-html": "0.7.2",
|
||||||
"@visx/tooltip": "3.3.0",
|
"antd": "5.11.0",
|
||||||
"@vitejs/plugin-react": "5.1.4",
|
"antd-table-saveas-excel": "2.2.1",
|
||||||
"@xstate/react": "^3.0.0",
|
"antlr4": "4.13.2",
|
||||||
"ansi-to-html": "0.7.2",
|
"axios": "1.12.0",
|
||||||
"antd": "5.11.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"antd-table-saveas-excel": "2.2.1",
|
"babel-jest": "^29.6.4",
|
||||||
"antlr4": "4.13.2",
|
"babel-loader": "9.1.3",
|
||||||
"axios": "1.12.0",
|
"babel-plugin-named-asset-import": "^0.3.7",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-preset-minify": "^0.5.1",
|
||||||
"babel-jest": "^29.6.4",
|
"babel-preset-react-app": "^10.0.1",
|
||||||
"babel-loader": "9.1.3",
|
"chart.js": "3.9.1",
|
||||||
"babel-plugin-named-asset-import": "^0.3.7",
|
"chartjs-adapter-date-fns": "^2.0.0",
|
||||||
"babel-preset-minify": "^0.5.1",
|
"chartjs-plugin-annotation": "^1.4.0",
|
||||||
"babel-preset-react-app": "^10.0.1",
|
"classnames": "2.3.2",
|
||||||
"chart.js": "3.9.1",
|
"color": "^4.2.1",
|
||||||
"chartjs-adapter-date-fns": "^2.0.0",
|
"color-alpha": "1.1.3",
|
||||||
"chartjs-plugin-annotation": "^1.4.0",
|
"cross-env": "^7.0.3",
|
||||||
"classnames": "2.3.2",
|
"crypto-js": "4.2.0",
|
||||||
"color": "^4.2.1",
|
"css-loader": "5.0.0",
|
||||||
"color-alpha": "2.0.0",
|
"css-minimizer-webpack-plugin": "5.0.1",
|
||||||
"cross-env": "^7.0.3",
|
"d3-hierarchy": "3.1.2",
|
||||||
"crypto-js": "4.2.0",
|
"dayjs": "^1.10.7",
|
||||||
"d3-hierarchy": "3.1.2",
|
"dompurify": "3.2.4",
|
||||||
"dayjs": "^1.10.7",
|
"dotenv": "8.2.0",
|
||||||
"dompurify": "3.2.4",
|
"event-source-polyfill": "1.0.31",
|
||||||
"dotenv": "8.2.0",
|
"eventemitter3": "5.0.1",
|
||||||
"event-source-polyfill": "1.0.31",
|
"file-loader": "6.1.1",
|
||||||
"eventemitter3": "5.0.1",
|
"fontfaceobserver": "2.3.0",
|
||||||
"fontfaceobserver": "2.3.0",
|
"history": "4.10.1",
|
||||||
"history": "4.10.1",
|
"html-webpack-plugin": "5.5.0",
|
||||||
"http-proxy-middleware": "3.0.5",
|
"http-proxy-middleware": "3.0.5",
|
||||||
"http-status-codes": "2.3.0",
|
"http-status-codes": "2.3.0",
|
||||||
"i18next": "^21.6.12",
|
"i18next": "^21.6.12",
|
||||||
"i18next-browser-languagedetector": "^6.1.3",
|
"i18next-browser-languagedetector": "^6.1.3",
|
||||||
"i18next-http-backend": "^1.3.2",
|
"i18next-http-backend": "^1.3.2",
|
||||||
"immer": "11.1.3",
|
"immer": "11.1.3",
|
||||||
"jest": "30.2.0",
|
"jest": "^27.5.1",
|
||||||
"js-base64": "^3.7.2",
|
"js-base64": "^3.7.2",
|
||||||
"lodash-es": "^4.17.21",
|
"less": "^4.1.2",
|
||||||
"lucide-react": "0.498.0",
|
"less-loader": "^10.2.0",
|
||||||
"mini-css-extract-plugin": "2.4.5",
|
"lodash-es": "^4.17.21",
|
||||||
"motion": "12.4.13",
|
"lucide-react": "0.498.0",
|
||||||
"nuqs": "2.8.8",
|
"mini-css-extract-plugin": "2.4.5",
|
||||||
"overlayscrollbars": "^2.8.1",
|
"motion": "12.4.13",
|
||||||
"overlayscrollbars-react": "^0.5.6",
|
"nuqs": "2.8.8",
|
||||||
"papaparse": "5.4.1",
|
"overlayscrollbars": "^2.8.1",
|
||||||
"posthog-js": "1.298.0",
|
"overlayscrollbars-react": "^0.5.6",
|
||||||
"rc-tween-one": "3.0.6",
|
"papaparse": "5.4.1",
|
||||||
"react": "18.2.0",
|
"posthog-js": "1.298.0",
|
||||||
"react-addons-update": "15.6.3",
|
"rc-tween-one": "3.0.6",
|
||||||
"react-beautiful-dnd": "13.1.1",
|
"react": "18.2.0",
|
||||||
"react-dnd": "16.0.1",
|
"react-addons-update": "15.6.3",
|
||||||
"react-dnd-html5-backend": "16.0.1",
|
"react-beautiful-dnd": "13.1.1",
|
||||||
"react-dom": "18.2.0",
|
"react-dnd": "16.0.1",
|
||||||
"react-drag-listview": "2.0.0",
|
"react-dnd-html5-backend": "16.0.1",
|
||||||
"react-error-boundary": "4.0.11",
|
"react-dom": "18.2.0",
|
||||||
"react-force-graph-2d": "^1.29.1",
|
"react-drag-listview": "2.0.0",
|
||||||
"react-full-screen": "1.1.1",
|
"react-error-boundary": "4.0.11",
|
||||||
"react-grid-layout": "^1.3.4",
|
"react-force-graph-2d": "^1.29.1",
|
||||||
"react-helmet-async": "1.3.0",
|
"react-full-screen": "1.1.1",
|
||||||
"react-i18next": "^11.16.1",
|
"react-grid-layout": "^1.3.4",
|
||||||
"react-lottie": "1.2.10",
|
"react-helmet-async": "1.3.0",
|
||||||
"react-markdown": "8.0.7",
|
"react-i18next": "^11.16.1",
|
||||||
"react-query": "3.39.3",
|
"react-lottie": "1.2.10",
|
||||||
"react-redux": "^7.2.2",
|
"react-markdown": "8.0.7",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-query": "3.39.3",
|
||||||
"react-router-dom-v5-compat": "6.27.0",
|
"react-redux": "^7.2.2",
|
||||||
"react-syntax-highlighter": "15.5.0",
|
"react-router-dom": "^5.2.0",
|
||||||
"react-use": "^17.3.2",
|
"react-router-dom-v5-compat": "6.27.0",
|
||||||
"react-virtuoso": "4.0.3",
|
"react-syntax-highlighter": "15.5.0",
|
||||||
"redux": "^4.0.5",
|
"react-use": "^17.3.2",
|
||||||
"redux-thunk": "^2.3.0",
|
"react-virtuoso": "4.0.3",
|
||||||
"rehype-raw": "7.0.0",
|
"redux": "^4.0.5",
|
||||||
"rollup-plugin-visualizer": "7.0.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"rrule": "2.8.1",
|
"rehype-raw": "7.0.0",
|
||||||
"stream": "^0.0.2",
|
"rrule": "2.8.1",
|
||||||
"styled-components": "^5.3.11",
|
"stream": "^0.0.2",
|
||||||
"timestamp-nano": "^1.0.0",
|
"style-loader": "1.3.0",
|
||||||
"ts-node": "^10.2.1",
|
"styled-components": "^5.3.11",
|
||||||
"typescript": "5.9.3",
|
"terser-webpack-plugin": "^5.2.5",
|
||||||
"uplot": "1.6.31",
|
"timestamp-nano": "^1.0.0",
|
||||||
"uuid": "^8.3.2",
|
"ts-node": "^10.2.1",
|
||||||
"vite": "npm:rolldown-vite@7.3.1",
|
"tsconfig-paths-webpack-plugin": "^3.5.1",
|
||||||
"vite-plugin-html": "3.2.2",
|
"typescript": "^4.0.5",
|
||||||
"web-vitals": "^0.2.4",
|
"uplot": "1.6.31",
|
||||||
"xstate": "^4.31.0",
|
"uuid": "^8.3.2",
|
||||||
"zustand": "5.0.11"
|
"web-vitals": "^0.2.4",
|
||||||
},
|
"webpack": "5.94.0",
|
||||||
"browserslist": {
|
"webpack-dev-server": "^5.2.1",
|
||||||
"production": [
|
"webpack-retry-chunk-load-plugin": "3.1.1",
|
||||||
">0.2%",
|
"xstate": "^4.31.0",
|
||||||
"not dead",
|
"zustand": "5.0.11"
|
||||||
"not op_mini all"
|
},
|
||||||
],
|
"browserslist": {
|
||||||
"development": [
|
"production": [
|
||||||
"last 1 chrome version",
|
">0.2%",
|
||||||
"last 1 firefox version",
|
"not dead",
|
||||||
"last 1 safari version"
|
"not op_mini all"
|
||||||
]
|
],
|
||||||
},
|
"development": [
|
||||||
"devDependencies": {
|
"last 1 chrome version",
|
||||||
"@babel/core": "^7.22.11",
|
"last 1 firefox version",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
"last 1 safari version"
|
||||||
"@babel/plugin-syntax-jsx": "^7.12.13",
|
]
|
||||||
"@babel/preset-env": "^7.22.14",
|
},
|
||||||
"@babel/preset-react": "^7.12.13",
|
"devDependencies": {
|
||||||
"@babel/preset-typescript": "^7.21.4",
|
"@babel/core": "^7.22.11",
|
||||||
"@commitlint/cli": "^20.4.2",
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||||
"@commitlint/config-conventional": "^20.4.2",
|
"@babel/plugin-syntax-jsx": "^7.12.13",
|
||||||
"@faker-js/faker": "9.3.0",
|
"@babel/preset-env": "^7.22.14",
|
||||||
"@jest/globals": "30.2.0",
|
"@babel/preset-react": "^7.12.13",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@babel/preset-typescript": "^7.21.4",
|
||||||
"@testing-library/react": "13.4.0",
|
"@commitlint/cli": "^16.3.0",
|
||||||
"@testing-library/user-event": "14.4.3",
|
"@commitlint/config-conventional": "^16.2.4",
|
||||||
"@types/color": "^3.0.3",
|
"@faker-js/faker": "9.3.0",
|
||||||
"@types/crypto-js": "4.2.2",
|
"@jest/globals": "^27.5.1",
|
||||||
"@types/dompurify": "^2.4.0",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@types/event-source-polyfill": "^1.0.0",
|
"@testing-library/react": "13.4.0",
|
||||||
"@types/fontfaceobserver": "2.1.0",
|
"@testing-library/user-event": "14.4.3",
|
||||||
"@types/jest": "30.0.0",
|
"@types/color": "^3.0.3",
|
||||||
"@types/lodash-es": "^4.17.4",
|
"@types/compression-webpack-plugin": "^9.0.0",
|
||||||
"@types/mini-css-extract-plugin": "^2.5.1",
|
"@types/copy-webpack-plugin": "^8.0.1",
|
||||||
"@types/node": "^16.10.3",
|
"@types/crypto-js": "4.2.2",
|
||||||
"@types/papaparse": "5.3.7",
|
"@types/dompurify": "^2.4.0",
|
||||||
"@types/react": "18.0.26",
|
"@types/event-source-polyfill": "^1.0.0",
|
||||||
"@types/react-addons-update": "0.14.21",
|
"@types/fontfaceobserver": "2.1.0",
|
||||||
"@types/react-beautiful-dnd": "13.1.8",
|
"@types/jest": "^27.5.1",
|
||||||
"@types/react-dom": "18.0.10",
|
"@types/lodash-es": "^4.17.4",
|
||||||
"@types/react-grid-layout": "^1.1.2",
|
"@types/mini-css-extract-plugin": "^2.5.1",
|
||||||
"@types/react-helmet-async": "1.0.3",
|
"@types/node": "^16.10.3",
|
||||||
"@types/react-lottie": "1.2.10",
|
"@types/papaparse": "5.3.7",
|
||||||
"@types/react-redux": "^7.1.11",
|
"@types/react": "18.0.26",
|
||||||
"@types/react-resizable": "3.0.3",
|
"@types/react-addons-update": "0.14.21",
|
||||||
"@types/react-router-dom": "^5.1.6",
|
"@types/react-beautiful-dnd": "13.1.8",
|
||||||
"@types/react-syntax-highlighter": "15.5.13",
|
"@types/react-dom": "18.0.10",
|
||||||
"@types/redux-mock-store": "1.0.4",
|
"@types/react-grid-layout": "^1.1.2",
|
||||||
"@types/styled-components": "^5.1.4",
|
"@types/react-helmet-async": "1.0.3",
|
||||||
"@types/uuid": "^8.3.1",
|
"@types/react-lottie": "1.2.10",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
"@types/react-redux": "^7.1.11",
|
||||||
"@typescript-eslint/parser": "^4.33.0",
|
"@types/react-resizable": "3.0.3",
|
||||||
"autoprefixer": "10.4.19",
|
"@types/react-router-dom": "^5.1.6",
|
||||||
"babel-plugin-styled-components": "^1.12.0",
|
"@types/react-syntax-highlighter": "15.5.13",
|
||||||
"eslint": "^7.32.0",
|
"@types/redux-mock-store": "1.0.4",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"@types/styled-components": "^5.1.4",
|
||||||
"eslint-plugin-import": "^2.28.1",
|
"@types/uuid": "^8.3.1",
|
||||||
"eslint-plugin-jest": "^29.15.0",
|
"@types/webpack": "^5.28.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
"@types/webpack-dev-server": "^4.7.2",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||||
"eslint-plugin-react": "^7.24.0",
|
"@typescript-eslint/parser": "^4.33.0",
|
||||||
"eslint-plugin-react-hooks": "^4.3.0",
|
"autoprefixer": "10.4.19",
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
"babel-plugin-styled-components": "^1.12.0",
|
||||||
"eslint-plugin-sonarjs": "^0.12.0",
|
"compression-webpack-plugin": "9.0.0",
|
||||||
"husky": "^7.0.4",
|
"copy-webpack-plugin": "^11.0.0",
|
||||||
"imagemin": "^8.0.1",
|
"eslint": "^7.32.0",
|
||||||
"imagemin-svgo": "^10.0.1",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"is-ci": "^3.0.1",
|
"eslint-plugin-import": "^2.28.1",
|
||||||
"jest-environment-jsdom": "29.7.0",
|
"eslint-plugin-jest": "^26.9.0",
|
||||||
"jest-environment-node": "29.7.0",
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||||
"jest-styled-components": "^7.2.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"lint-staged": "^12.5.0",
|
"eslint-plugin-react": "^7.24.0",
|
||||||
"msw": "1.3.2",
|
"eslint-plugin-react-hooks": "^4.3.0",
|
||||||
"npm-run-all": "latest",
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"orval": "7.18.0",
|
"eslint-plugin-sonarjs": "^0.12.0",
|
||||||
"portfinder-sync": "^0.0.2",
|
"husky": "^7.0.4",
|
||||||
"postcss": "8.5.6",
|
"image-minimizer-webpack-plugin": "^4.0.0",
|
||||||
"prettier": "2.2.1",
|
"imagemin": "^8.0.1",
|
||||||
"prop-types": "15.8.1",
|
"imagemin-svgo": "^10.0.1",
|
||||||
"react-hooks-testing-library": "0.6.0",
|
"is-ci": "^3.0.1",
|
||||||
"react-resizable": "3.0.4",
|
"jest-styled-components": "^7.0.8",
|
||||||
"redux-mock-store": "1.5.4",
|
"lint-staged": "^12.5.0",
|
||||||
"sass": "1.97.3",
|
"msw": "1.3.2",
|
||||||
"sharp": "0.34.5",
|
"npm-run-all": "latest",
|
||||||
"svgo": "4.0.0",
|
"orval": "7.18.0",
|
||||||
"ts-api-utils": "2.4.0",
|
"portfinder-sync": "^0.0.2",
|
||||||
"ts-jest": "29.4.6",
|
"postcss": "8.4.38",
|
||||||
"ts-node": "^10.2.1",
|
"prettier": "2.2.1",
|
||||||
"typescript-plugin-css-modules": "5.2.0",
|
"prop-types": "15.8.1",
|
||||||
"vite-plugin-checker": "0.12.0",
|
"raw-loader": "4.0.2",
|
||||||
"vite-plugin-compression": "0.5.1",
|
"react-hooks-testing-library": "0.6.0",
|
||||||
"vite-plugin-image-optimizer": "2.0.3",
|
"react-hot-loader": "^4.13.0",
|
||||||
"vite-tsconfig-paths": "6.1.1"
|
"react-resizable": "3.0.4",
|
||||||
},
|
"redux-mock-store": "1.5.4",
|
||||||
"lint-staged": {
|
"sass": "1.66.1",
|
||||||
"*.(js|jsx|ts|tsx)": [
|
"sass-loader": "13.3.2",
|
||||||
"eslint --fix",
|
"sharp": "^0.33.4",
|
||||||
"sh scripts/typecheck-staged.sh"
|
"ts-jest": "^27.1.5",
|
||||||
]
|
"ts-node": "^10.2.1",
|
||||||
},
|
"typescript-plugin-css-modules": "5.2.0",
|
||||||
"resolutions": {
|
"webpack-bundle-analyzer": "^4.5.0",
|
||||||
"@types/react": "18.0.26",
|
"webpack-cli": "^5.1.4"
|
||||||
"@types/react-dom": "18.0.10",
|
},
|
||||||
"debug": "4.3.4",
|
"lint-staged": {
|
||||||
"semver": "7.5.4",
|
"*.(js|jsx|ts|tsx)": [
|
||||||
"xml2js": "0.5.0",
|
"eslint --fix",
|
||||||
"phin": "^3.7.1",
|
"sh scripts/typecheck-staged.sh"
|
||||||
"body-parser": "1.20.3",
|
]
|
||||||
"http-proxy-middleware": "3.0.5",
|
},
|
||||||
"cross-spawn": "7.0.5",
|
"resolutions": {
|
||||||
"cookie": "^0.7.1",
|
"@types/react": "18.0.26",
|
||||||
"serialize-javascript": "6.0.2",
|
"@types/react-dom": "18.0.10",
|
||||||
"prismjs": "1.30.0",
|
"debug": "4.3.4",
|
||||||
"got": "11.8.5",
|
"semver": "7.5.4",
|
||||||
"form-data": "4.0.4",
|
"xml2js": "0.5.0",
|
||||||
"brace-expansion": "^2.0.2",
|
"phin": "^3.7.1",
|
||||||
"on-headers": "^1.1.0",
|
"body-parser": "1.20.3",
|
||||||
"tmp": "0.2.4",
|
"http-proxy-middleware": "3.0.5",
|
||||||
"vite": "npm:rolldown-vite@7.3.1"
|
"cross-spawn": "7.0.5",
|
||||||
}
|
"cookie": "^0.7.1",
|
||||||
}
|
"serialize-javascript": "6.0.2",
|
||||||
|
"prismjs": "1.30.0",
|
||||||
|
"got": "11.8.5",
|
||||||
|
"form-data": "4.0.4",
|
||||||
|
"brace-expansion": "^2.0.2",
|
||||||
|
"on-headers": "^1.1.0",
|
||||||
|
"tmp": "0.2.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,5 @@
|
|||||||
"pipelines": "Pipelines",
|
"pipelines": "Pipelines",
|
||||||
"archives": "Archives",
|
"archives": "Archives",
|
||||||
"logs_to_metrics": "Logs To Metrics",
|
"logs_to_metrics": "Logs To Metrics",
|
||||||
"roles": "Roles",
|
"roles": "Roles"
|
||||||
"role_details": "Role Details"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,5 @@
|
|||||||
"pipelines": "Pipelines",
|
"pipelines": "Pipelines",
|
||||||
"archives": "Archives",
|
"archives": "Archives",
|
||||||
"logs_to_metrics": "Logs To Metrics",
|
"logs_to_metrics": "Logs To Metrics",
|
||||||
"roles": "Roles",
|
"roles": "Roles"
|
||||||
"role_details": "Role Details"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const signozPackages = Object.keys(allDeps).filter((dep) =>
|
|||||||
const fileContent = `// -------------------------------------------------------------------------
|
const fileContent = `// -------------------------------------------------------------------------
|
||||||
// AUTO-GENERATED FILE
|
// AUTO-GENERATED FILE
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// This file is generated by scripts/update-registry.cjs automatically
|
// This file is generated by scripts/update-registry.js automatically
|
||||||
// whenever you run 'yarn install' or 'npm install'.
|
// whenever you run 'yarn install' or 'npm install'.
|
||||||
//
|
//
|
||||||
// It forces VS Code to index these specific packages to fix auto-import
|
// It forces VS Code to index these specific packages to fix auto-import
|
||||||
@@ -218,9 +218,9 @@ function App(): JSX.Element {
|
|||||||
pathname === ROUTES.ONBOARDING ||
|
pathname === ROUTES.ONBOARDING ||
|
||||||
pathname.startsWith('/public/dashboard/')
|
pathname.startsWith('/public/dashboard/')
|
||||||
) {
|
) {
|
||||||
window.Pylon?.('hideChatBubble');
|
window.Pylon('hideChatBubble');
|
||||||
} else {
|
} else {
|
||||||
window.Pylon?.('showChatBubble');
|
window.Pylon('showChatBubble');
|
||||||
}
|
}
|
||||||
}, [pathname]);
|
}, [pathname]);
|
||||||
|
|
||||||
|
|||||||
@@ -165,6 +165,11 @@ export const MySettings = Loadable(
|
|||||||
() => import(/* webpackChunkName: "All MySettings" */ 'pages/Settings'),
|
() => import(/* webpackChunkName: "All MySettings" */ 'pages/Settings'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const CustomDomainSettings = Loadable(
|
||||||
|
() =>
|
||||||
|
import(/* webpackChunkName: "Custom Domain Settings" */ 'pages/Settings'),
|
||||||
|
);
|
||||||
|
|
||||||
export const Logs = Loadable(
|
export const Logs = Loadable(
|
||||||
() => import(/* webpackChunkName: "Logs" */ 'pages/LogsModulePage'),
|
() => import(/* webpackChunkName: "Logs" */ 'pages/LogsModulePage'),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas';
|
|||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import APIError from 'types/api/error';
|
import APIError from 'types/api/error';
|
||||||
|
|
||||||
// @deprecated Use convertToApiError instead
|
// Handles errors from generated API hooks (which use RenderErrorResponseDTO)
|
||||||
export function ErrorResponseHandlerForGeneratedAPIs(
|
export function ErrorResponseHandlerForGeneratedAPIs(
|
||||||
error: AxiosError<RenderErrorResponseDTO>,
|
error: AxiosError<RenderErrorResponseDTO>,
|
||||||
): never {
|
): never {
|
||||||
@@ -46,34 +46,3 @@ export function ErrorResponseHandlerForGeneratedAPIs(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// convertToApiError converts an AxiosError from generated API
|
|
||||||
// hooks into an APIError.
|
|
||||||
export function convertToApiError(
|
|
||||||
error: AxiosError<RenderErrorResponseDTO> | null,
|
|
||||||
): APIError | undefined {
|
|
||||||
if (!error) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = error.response;
|
|
||||||
const errorData = response?.data?.error;
|
|
||||||
|
|
||||||
return new APIError({
|
|
||||||
httpStatusCode: response?.status || error.status || 500,
|
|
||||||
error: {
|
|
||||||
code:
|
|
||||||
errorData?.code ||
|
|
||||||
String(response?.status || error.code || 'unknown_error'),
|
|
||||||
message:
|
|
||||||
errorData?.message ||
|
|
||||||
response?.statusText ||
|
|
||||||
error.message ||
|
|
||||||
'Something went wrong',
|
|
||||||
url: errorData?.url ?? '',
|
|
||||||
errors: (errorData?.errors ?? []).map((e) => ({
|
|
||||||
message: e.message ?? '',
|
|
||||||
})),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ import type {
|
|||||||
UpdateAuthDomainPathParameters,
|
UpdateAuthDomainPathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint lists all auth domains
|
* This endpoint lists all auth domains
|
||||||
* @summary List all auth domains
|
* @summary List all auth domains
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ import type {
|
|||||||
RenderErrorResponseDTO,
|
RenderErrorResponseDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the authenticated user has permissions for given transactions
|
* Checks if the authenticated user has permissions for given transactions
|
||||||
* @summary Check permissions
|
* @summary Check permissions
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ import type {
|
|||||||
UpdatePublicDashboardPathParameters,
|
UpdatePublicDashboardPathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint deletes the public sharing config and disables the public sharing of a dashboard
|
* This endpoint deletes the public sharing config and disables the public sharing of a dashboard
|
||||||
* @summary Delete public dashboard
|
* @summary Delete public dashboard
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ import type { ErrorType } from '../../../generatedAPIInstance';
|
|||||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||||
import type { GetFeatures200, RenderErrorResponseDTO } from '../sigNoz.schemas';
|
import type { GetFeatures200, RenderErrorResponseDTO } from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint returns the supported features and their details
|
* This endpoint returns the supported features and their details
|
||||||
* @summary Get features
|
* @summary Get features
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ import type {
|
|||||||
RenderErrorResponseDTO,
|
RenderErrorResponseDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint returns field keys
|
* This endpoint returns field keys
|
||||||
* @summary Get field keys
|
* @summary Get field keys
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ import type {
|
|||||||
UpdateIngestionKeyPathParameters,
|
UpdateIngestionKeyPathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint returns the ingestion keys for a workspace
|
* This endpoint returns the ingestion keys for a workspace
|
||||||
* @summary Get ingestion keys for workspace
|
* @summary Get ingestion keys for workspace
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import type {
|
|||||||
RenderErrorResponseDTO,
|
RenderErrorResponseDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint returns global config
|
* This endpoint returns global config
|
||||||
* @summary Get global config
|
* @summary Get global config
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ import type {
|
|||||||
RenderErrorResponseDTO,
|
RenderErrorResponseDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoints promotes and indexes paths
|
* This endpoints promotes and indexes paths
|
||||||
* @summary Promote and index paths
|
* @summary Promote and index paths
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ import type {
|
|||||||
UpdateMetricMetadataPathParameters,
|
UpdateMetricMetadataPathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint returns a list of distinct metric names within the specified time range
|
* This endpoint returns a list of distinct metric names within the specified time range
|
||||||
* @summary List metric names
|
* @summary List metric names
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ import type {
|
|||||||
TypesOrganizationDTO,
|
TypesOrganizationDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint returns the organization I belong to
|
* This endpoint returns the organization I belong to
|
||||||
* @summary Get my organization
|
* @summary Get my organization
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ import type {
|
|||||||
UpdateUserPreferencePathParameters,
|
UpdateUserPreferencePathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint lists all org preferences
|
* This endpoint lists all org preferences
|
||||||
* @summary List org preferences
|
* @summary List org preferences
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ import type {
|
|||||||
ReplaceVariables200,
|
ReplaceVariables200,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a composite query over a time range. Supports builder queries (traces, logs, metrics), formulas, trace operators, PromQL, and ClickHouse SQL.
|
* Execute a composite query over a time range. Supports builder queries (traces, logs, metrics), formulas, trace operators, PromQL, and ClickHouse SQL.
|
||||||
* @summary Query range
|
* @summary Query range
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ import type {
|
|||||||
RoletypesPostableRoleDTO,
|
RoletypesPostableRoleDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint lists all roles
|
* This endpoint lists all roles
|
||||||
* @summary List roles
|
* @summary List roles
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ import type {
|
|||||||
UpdateServiceAccountStatusPathParameters,
|
UpdateServiceAccountStatusPathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint lists the service accounts for an organisation
|
* This endpoint lists the service accounts for an organisation
|
||||||
* @summary List service accounts
|
* @summary List service accounts
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ import type {
|
|||||||
RotateSession200,
|
RotateSession200,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint creates a session for a user using google callback
|
* This endpoint creates a session for a user using google callback
|
||||||
* @summary Create session by google callback
|
* @summary Create session by google callback
|
||||||
|
|||||||
@@ -3451,11 +3451,6 @@ export type ListMetricsParams = {
|
|||||||
* @description undefined
|
* @description undefined
|
||||||
*/
|
*/
|
||||||
searchText?: string;
|
searchText?: string;
|
||||||
/**
|
|
||||||
* @type string
|
|
||||||
* @description undefined
|
|
||||||
*/
|
|
||||||
source?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListMetrics200 = {
|
export type ListMetrics200 = {
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ import type {
|
|||||||
UpdateUserPathParameters,
|
UpdateUserPathParameters,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint changes the password by id
|
* This endpoint changes the password by id
|
||||||
* @summary Change password
|
* @summary Change password
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ import type {
|
|||||||
ZeustypesPostableProfileDTO,
|
ZeustypesPostableProfileDTO,
|
||||||
} from '../sigNoz.schemas';
|
} from '../sigNoz.schemas';
|
||||||
|
|
||||||
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
||||||
|
|
||||||
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint gets the host info from zeus.
|
* This endpoint gets the host info from zeus.
|
||||||
* @summary Get host info from Zeus.
|
* @summary Get host info from Zeus.
|
||||||
|
|||||||
54
frontend/src/api/metricsExplorer/getMetricsTreeMap.ts
Normal file
54
frontend/src/api/metricsExplorer/getMetricsTreeMap.ts
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import axios from 'api';
|
||||||
|
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||||
|
import { AxiosError } from 'axios';
|
||||||
|
import { TreemapViewType } from 'container/MetricsExplorer/Summary/types';
|
||||||
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||||
|
import { TagFilter } from 'types/api/queryBuilder/queryBuilderData';
|
||||||
|
|
||||||
|
export interface MetricsTreeMapPayload {
|
||||||
|
filters: TagFilter;
|
||||||
|
limit?: number;
|
||||||
|
treemap?: TreemapViewType;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MetricsTreeMapResponse {
|
||||||
|
status: string;
|
||||||
|
data: {
|
||||||
|
[TreemapViewType.TIMESERIES]: TimeseriesData[];
|
||||||
|
[TreemapViewType.SAMPLES]: SamplesData[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TimeseriesData {
|
||||||
|
percentage: number;
|
||||||
|
total_value: number;
|
||||||
|
metric_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SamplesData {
|
||||||
|
percentage: number;
|
||||||
|
metric_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getMetricsTreeMap = async (
|
||||||
|
props: MetricsTreeMapPayload,
|
||||||
|
signal?: AbortSignal,
|
||||||
|
headers?: Record<string, string>,
|
||||||
|
): Promise<SuccessResponse<MetricsTreeMapResponse> | ErrorResponse> => {
|
||||||
|
try {
|
||||||
|
const response = await axios.post('/metrics/treemap', props, {
|
||||||
|
signal,
|
||||||
|
headers,
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
statusCode: 200,
|
||||||
|
error: null,
|
||||||
|
message: response.data.status,
|
||||||
|
payload: response.data,
|
||||||
|
params: props,
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
return ErrorResponseHandler(error as AxiosError);
|
||||||
|
}
|
||||||
|
};
|
||||||
36
frontend/src/api/metricsExplorer/updateMetricMetadata.ts
Normal file
36
frontend/src/api/metricsExplorer/updateMetricMetadata.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import axios from 'api';
|
||||||
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||||
|
|
||||||
|
import { Temporality } from './getMetricDetails';
|
||||||
|
import { MetricType } from './getMetricsList';
|
||||||
|
|
||||||
|
export interface UpdateMetricMetadataProps {
|
||||||
|
description: string;
|
||||||
|
metricType: MetricType;
|
||||||
|
temporality?: Temporality;
|
||||||
|
isMonotonic?: boolean;
|
||||||
|
unit?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UpdateMetricMetadataResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateMetricMetadata = async (
|
||||||
|
metricName: string,
|
||||||
|
props: UpdateMetricMetadataProps,
|
||||||
|
): Promise<SuccessResponse<UpdateMetricMetadataResponse> | ErrorResponse> => {
|
||||||
|
const response = await axios.post(`/metrics/${metricName}/metadata`, {
|
||||||
|
...props,
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
statusCode: 200,
|
||||||
|
error: null,
|
||||||
|
message: response.data.status,
|
||||||
|
payload: response.data.data,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default updateMetricMetadata;
|
||||||
4
frontend/src/auto-import-registry.d.ts
vendored
4
frontend/src/auto-import-registry.d.ts
vendored
@@ -1,7 +1,7 @@
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// AUTO-GENERATED FILE
|
// AUTO-GENERATED FILE
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// This file is generated by scripts/update-registry.cjs automatically
|
// This file is generated by scripts/update-registry.js automatically
|
||||||
// whenever you run 'yarn install' or 'npm install'.
|
// whenever you run 'yarn install' or 'npm install'.
|
||||||
//
|
//
|
||||||
// It forces VS Code to index these specific packages to fix auto-import
|
// It forces VS Code to index these specific packages to fix auto-import
|
||||||
@@ -18,7 +18,6 @@ import '@signozhq/checkbox';
|
|||||||
import '@signozhq/combobox';
|
import '@signozhq/combobox';
|
||||||
import '@signozhq/command';
|
import '@signozhq/command';
|
||||||
import '@signozhq/design-tokens';
|
import '@signozhq/design-tokens';
|
||||||
import '@signozhq/dialog';
|
|
||||||
import '@signozhq/icons';
|
import '@signozhq/icons';
|
||||||
import '@signozhq/input';
|
import '@signozhq/input';
|
||||||
import '@signozhq/popover';
|
import '@signozhq/popover';
|
||||||
@@ -27,5 +26,4 @@ import '@signozhq/resizable';
|
|||||||
import '@signozhq/sonner';
|
import '@signozhq/sonner';
|
||||||
import '@signozhq/switch';
|
import '@signozhq/switch';
|
||||||
import '@signozhq/table';
|
import '@signozhq/table';
|
||||||
import '@signozhq/toggle-group';
|
|
||||||
import '@signozhq/tooltip';
|
import '@signozhq/tooltip';
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import type { FilterDropdownProps } from 'antd/lib/table/interface';
|
import { FilterDropdownProps } from 'antd/lib/table/interface';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import {
|
import {
|
||||||
getQueueOverview,
|
getQueueOverview,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useQuery } from 'react-query';
|
import { useQuery } from 'react-query';
|
||||||
// eslint-disable-next-line no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import type { DefaultOptionType } from 'antd/es/select';
|
import { DefaultOptionType } from 'antd/es/select';
|
||||||
import { getAttributesValues } from 'api/queryBuilder/getAttributesValues';
|
import { getAttributesValues } from 'api/queryBuilder/getAttributesValues';
|
||||||
import { DATA_TYPE_VS_ATTRIBUTE_VALUES_KEY } from 'constants/queryBuilder';
|
import { DATA_TYPE_VS_ATTRIBUTE_VALUES_KEY } from 'constants/queryBuilder';
|
||||||
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import type { DefaultOptionType } from 'antd/es/select';
|
import { DefaultOptionType } from 'antd/es/select';
|
||||||
import useDebouncedFn from 'hooks/useDebouncedFunction';
|
import useDebouncedFn from 'hooks/useDebouncedFunction';
|
||||||
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
||||||
import { DataSource } from 'types/common/queryBuilder';
|
import { DataSource } from 'types/common/queryBuilder';
|
||||||
|
|||||||
@@ -1,279 +0,0 @@
|
|||||||
import { useState } from 'react';
|
|
||||||
import { fireEvent, render, screen } from '@testing-library/react';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import * as timeUtils from 'utils/timeUtils';
|
|
||||||
|
|
||||||
import CustomTimePicker from './CustomTimePicker';
|
|
||||||
|
|
||||||
jest.mock('react-router-dom', () => {
|
|
||||||
const actual = jest.requireActual('react-router-dom');
|
|
||||||
|
|
||||||
return {
|
|
||||||
...actual,
|
|
||||||
useLocation: jest.fn().mockReturnValue({
|
|
||||||
pathname: '/test-path',
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
jest.mock('providers/Timezone', () => {
|
|
||||||
const actual = jest.requireActual('providers/Timezone');
|
|
||||||
|
|
||||||
return {
|
|
||||||
...actual,
|
|
||||||
useTimezone: jest.fn().mockReturnValue({
|
|
||||||
timezone: {
|
|
||||||
value: 'UTC',
|
|
||||||
offset: '+00:00',
|
|
||||||
name: 'UTC',
|
|
||||||
},
|
|
||||||
browserTimezone: {
|
|
||||||
value: 'UTC',
|
|
||||||
offset: '+00:00',
|
|
||||||
name: 'UTC',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
interface WrapperProps {
|
|
||||||
initialValue?: string;
|
|
||||||
showLiveLogs?: boolean;
|
|
||||||
onValidCustomDateChange?: () => void;
|
|
||||||
onError?: () => void;
|
|
||||||
onSelect?: (value: string) => void;
|
|
||||||
onCustomDateHandler?: () => void;
|
|
||||||
onCustomTimeStatusUpdate?: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
function Wrapper({
|
|
||||||
initialValue = '2024-01-01 00:00:00 - 2024-01-01 01:00:00',
|
|
||||||
showLiveLogs = false,
|
|
||||||
onValidCustomDateChange = (): void => {},
|
|
||||||
onError = (): void => {},
|
|
||||||
onSelect = (): void => {},
|
|
||||||
onCustomDateHandler = (): void => {},
|
|
||||||
onCustomTimeStatusUpdate = (): void => {},
|
|
||||||
}: WrapperProps): JSX.Element {
|
|
||||||
const [open, setOpen] = useState(false);
|
|
||||||
const [selectedTime, setSelectedTime] = useState('custom');
|
|
||||||
const [selectedValue, setSelectedValue] = useState(initialValue);
|
|
||||||
|
|
||||||
const handleSelect = (value: string): void => {
|
|
||||||
setSelectedTime(value);
|
|
||||||
onSelect(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CustomTimePicker
|
|
||||||
open={open}
|
|
||||||
setOpen={setOpen}
|
|
||||||
onSelect={handleSelect}
|
|
||||||
onError={onError}
|
|
||||||
selectedTime={selectedTime}
|
|
||||||
selectedValue={selectedValue}
|
|
||||||
onValidCustomDateChange={({ timeStr }): void => {
|
|
||||||
setSelectedValue(timeStr);
|
|
||||||
onValidCustomDateChange();
|
|
||||||
}}
|
|
||||||
onCustomDateHandler={(): void => {
|
|
||||||
onCustomDateHandler();
|
|
||||||
}}
|
|
||||||
onCustomTimeStatusUpdate={(): void => {
|
|
||||||
onCustomTimeStatusUpdate();
|
|
||||||
}}
|
|
||||||
items={[
|
|
||||||
{ label: 'Last 5 minutes', value: '5m' },
|
|
||||||
{ label: 'Custom', value: 'custom' },
|
|
||||||
]}
|
|
||||||
minTime={dayjs('2024-01-01 00:00:00').valueOf() * 1000_000}
|
|
||||||
maxTime={dayjs('2024-01-01 01:00:00').valueOf() * 1000_000}
|
|
||||||
showLiveLogs={showLiveLogs}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('CustomTimePicker', () => {
|
|
||||||
it('does not close or reset when clicking input while open', () => {
|
|
||||||
render(<Wrapper />);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
// Open popover
|
|
||||||
fireEvent.focus(input);
|
|
||||||
|
|
||||||
// Type some text
|
|
||||||
fireEvent.change(input, { target: { value: '5m' } });
|
|
||||||
|
|
||||||
// Click the input again while open
|
|
||||||
fireEvent.mouseDown(input);
|
|
||||||
fireEvent.click(input);
|
|
||||||
|
|
||||||
// Value should remain as typed
|
|
||||||
expect((input as HTMLInputElement).value).toBe('5m');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('applies valid shorthand on Enter', () => {
|
|
||||||
const onValid = jest.fn();
|
|
||||||
const onError = jest.fn();
|
|
||||||
|
|
||||||
render(<Wrapper onValidCustomDateChange={onValid} onError={onError} />);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
fireEvent.focus(input);
|
|
||||||
fireEvent.change(input, { target: { value: '5m' } });
|
|
||||||
fireEvent.keyDown(input, { key: 'Enter', code: 'Enter' });
|
|
||||||
|
|
||||||
expect(onValid).toHaveBeenCalledTimes(1);
|
|
||||||
// onError(false) may be called by internal reset logic; we only assert that
|
|
||||||
// it was never called with a truthy error state
|
|
||||||
expect(onError).not.toHaveBeenCalledWith(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('sets error and updates custom time status for invalid shorthand exceeding max allowed window', () => {
|
|
||||||
const onValid = jest.fn();
|
|
||||||
const onError = jest.fn();
|
|
||||||
const onCustomTimeStatusUpdate = jest.fn();
|
|
||||||
|
|
||||||
render(
|
|
||||||
<Wrapper
|
|
||||||
onValidCustomDateChange={onValid}
|
|
||||||
onError={onError}
|
|
||||||
onCustomTimeStatusUpdate={onCustomTimeStatusUpdate}
|
|
||||||
/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
fireEvent.focus(input);
|
|
||||||
// large number of days to ensure it exceeds the 15 months allowed window
|
|
||||||
fireEvent.change(input, { target: { value: '9999d' } });
|
|
||||||
fireEvent.keyDown(input, { key: 'Enter', code: 'Enter' });
|
|
||||||
|
|
||||||
expect(onError).toHaveBeenCalledWith(true);
|
|
||||||
expect(onCustomTimeStatusUpdate).toHaveBeenCalledWith();
|
|
||||||
expect(onValid).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('treats close after change like pressing Enter (blur + chevron)', () => {
|
|
||||||
const onValid = jest.fn();
|
|
||||||
const onError = jest.fn();
|
|
||||||
|
|
||||||
render(<Wrapper onValidCustomDateChange={onValid} onError={onError} />);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
// Open and change value so "changed since open" is true
|
|
||||||
fireEvent.focus(input);
|
|
||||||
fireEvent.change(input, { target: { value: '5m' } });
|
|
||||||
fireEvent.blur(input);
|
|
||||||
|
|
||||||
// Click the chevron (which triggers handleClose)
|
|
||||||
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);
|
|
||||||
expect(onError).not.toHaveBeenCalledWith(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('applies epoch start/end range on Enter via onCustomDateHandler', () => {
|
|
||||||
const onCustomDateHandler = jest.fn();
|
|
||||||
const onError = jest.fn();
|
|
||||||
|
|
||||||
render(
|
|
||||||
<Wrapper onCustomDateHandler={onCustomDateHandler} onError={onError} />,
|
|
||||||
);
|
|
||||||
|
|
||||||
const now = dayjs().valueOf();
|
|
||||||
const later = dayjs().add(1, 'hour').valueOf();
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
fireEvent.focus(input);
|
|
||||||
fireEvent.change(input, {
|
|
||||||
target: { value: `${now} - ${later}` },
|
|
||||||
});
|
|
||||||
fireEvent.keyDown(input, { key: 'Enter', code: 'Enter' });
|
|
||||||
|
|
||||||
expect(onCustomDateHandler).toHaveBeenCalledTimes(1);
|
|
||||||
expect(onError).not.toHaveBeenCalledWith(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('uses validateTimeRange result for generic formatted ranges (valid case)', () => {
|
|
||||||
const validateTimeRangeSpy = jest.spyOn(timeUtils, 'validateTimeRange');
|
|
||||||
const onCustomDateHandler = jest.fn();
|
|
||||||
const onError = jest.fn();
|
|
||||||
|
|
||||||
validateTimeRangeSpy.mockReturnValue({
|
|
||||||
isValid: true,
|
|
||||||
errorDetails: undefined,
|
|
||||||
startTimeMs: dayjs('2024-01-01 00:00:00').valueOf(),
|
|
||||||
endTimeMs: dayjs('2024-01-01 01:00:00').valueOf(),
|
|
||||||
});
|
|
||||||
|
|
||||||
render(
|
|
||||||
<Wrapper onCustomDateHandler={onCustomDateHandler} onError={onError} />,
|
|
||||||
);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
fireEvent.focus(input);
|
|
||||||
fireEvent.change(input, {
|
|
||||||
target: { value: 'foo - bar' },
|
|
||||||
});
|
|
||||||
fireEvent.keyDown(input, { key: 'Enter', code: 'Enter' });
|
|
||||||
|
|
||||||
expect(validateTimeRangeSpy).toHaveBeenCalled();
|
|
||||||
expect(onCustomDateHandler).toHaveBeenCalledTimes(1);
|
|
||||||
expect(onError).not.toHaveBeenCalledWith(true);
|
|
||||||
|
|
||||||
validateTimeRangeSpy.mockRestore();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('uses validateTimeRange result for generic formatted ranges (invalid case)', () => {
|
|
||||||
const validateTimeRangeSpy = jest.spyOn(timeUtils, 'validateTimeRange');
|
|
||||||
const onValid = jest.fn();
|
|
||||||
const onError = jest.fn();
|
|
||||||
|
|
||||||
validateTimeRangeSpy.mockReturnValue({
|
|
||||||
isValid: false,
|
|
||||||
errorDetails: {
|
|
||||||
message: 'Invalid range',
|
|
||||||
code: 'INVALID_RANGE',
|
|
||||||
description: 'Start must be before end',
|
|
||||||
},
|
|
||||||
startTimeMs: 0,
|
|
||||||
endTimeMs: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<Wrapper onValidCustomDateChange={onValid} onError={onError} />);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
fireEvent.focus(input);
|
|
||||||
fireEvent.change(input, {
|
|
||||||
target: { value: 'foo - bar' },
|
|
||||||
});
|
|
||||||
fireEvent.keyDown(input, { key: 'Enter', code: 'Enter' });
|
|
||||||
|
|
||||||
expect(validateTimeRangeSpy).toHaveBeenCalled();
|
|
||||||
expect(onError).toHaveBeenCalledWith(true);
|
|
||||||
expect(onValid).not.toHaveBeenCalled();
|
|
||||||
|
|
||||||
validateTimeRangeSpy.mockRestore();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('opens live mode with correct label', () => {
|
|
||||||
render(<Wrapper showLiveLogs />);
|
|
||||||
|
|
||||||
const input = screen.getByRole('textbox');
|
|
||||||
|
|
||||||
fireEvent.focus(input);
|
|
||||||
|
|
||||||
expect((input as HTMLInputElement).value).toBe('Live');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -104,10 +104,6 @@ function CustomTimePicker({
|
|||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
const inputRef = useRef<InputRef>(null);
|
const inputRef = useRef<InputRef>(null);
|
||||||
const initialInputValueOnOpenRef = useRef<string>('');
|
|
||||||
const hasChangedSinceOpenRef = useRef<boolean>(false);
|
|
||||||
// Tracks if the last pointer down was on the input so we don't close the popover when user clicks the input again
|
|
||||||
const isClickFromInputRef = useRef(false);
|
|
||||||
|
|
||||||
const [activeView, setActiveView] = useState<ViewType>(DEFAULT_VIEW);
|
const [activeView, setActiveView] = useState<ViewType>(DEFAULT_VIEW);
|
||||||
|
|
||||||
@@ -242,21 +238,6 @@ function CustomTimePicker({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleOpenChange = (newOpen: boolean): void => {
|
const handleOpenChange = (newOpen: boolean): void => {
|
||||||
// Don't close when the user clicked the input (trigger); Ant Design treats trigger as "outside" overlay
|
|
||||||
if (!newOpen && isClickFromInputRef.current) {
|
|
||||||
isClickFromInputRef.current = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
isClickFromInputRef.current = false;
|
|
||||||
|
|
||||||
// If the popover is trying to close and the value changed since opening,
|
|
||||||
// treat it as if the user pressed Enter (attempt to apply the value)
|
|
||||||
if (!newOpen && hasChangedSinceOpenRef.current) {
|
|
||||||
hasChangedSinceOpenRef.current = false;
|
|
||||||
handleInputPressEnter();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setOpen(newOpen);
|
setOpen(newOpen);
|
||||||
|
|
||||||
if (!newOpen) {
|
if (!newOpen) {
|
||||||
@@ -425,18 +406,10 @@ function CustomTimePicker({
|
|||||||
const handleOpen = (e?: React.SyntheticEvent): void => {
|
const handleOpen = (e?: React.SyntheticEvent): void => {
|
||||||
e?.stopPropagation?.();
|
e?.stopPropagation?.();
|
||||||
|
|
||||||
// If the popover is already open, avoid resetting the input value
|
|
||||||
// so that any in-progress edits are preserved.
|
|
||||||
if (open) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showLiveLogs) {
|
if (showLiveLogs) {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
setSelectedTimePlaceholderValue('Live');
|
setSelectedTimePlaceholderValue('Live');
|
||||||
setInputValue('Live');
|
setInputValue('Live');
|
||||||
initialInputValueOnOpenRef.current = 'Live';
|
|
||||||
hasChangedSinceOpenRef.current = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,21 +424,11 @@ function CustomTimePicker({
|
|||||||
.tz(timezone.value)
|
.tz(timezone.value)
|
||||||
.format(DATE_TIME_FORMATS.UK_DATETIME_SECONDS);
|
.format(DATE_TIME_FORMATS.UK_DATETIME_SECONDS);
|
||||||
|
|
||||||
const nextValue = `${startTime} - ${endTime}`;
|
setInputValue(`${startTime} - ${endTime}`);
|
||||||
setInputValue(nextValue);
|
|
||||||
initialInputValueOnOpenRef.current = nextValue;
|
|
||||||
hasChangedSinceOpenRef.current = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = (e: React.MouseEvent): void => {
|
const handleClose = (e: React.MouseEvent): void => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
// If the value changed since opening, treat this like pressing Enter
|
|
||||||
if (hasChangedSinceOpenRef.current) {
|
|
||||||
hasChangedSinceOpenRef.current = false;
|
|
||||||
handleInputPressEnter();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
setCustomDTPickerVisible?.(false);
|
setCustomDTPickerVisible?.(false);
|
||||||
|
|
||||||
@@ -487,9 +450,6 @@ function CustomTimePicker({
|
|||||||
}, [location.pathname]);
|
}, [location.pathname]);
|
||||||
|
|
||||||
const handleInputBlur = (): void => {
|
const handleInputBlur = (): void => {
|
||||||
// Track whether the value was changed since the input was opened for editing
|
|
||||||
hasChangedSinceOpenRef.current =
|
|
||||||
inputValue !== initialInputValueOnOpenRef.current;
|
|
||||||
resetErrorStatus();
|
resetErrorStatus();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -592,12 +552,6 @@ function CustomTimePicker({
|
|||||||
readOnly={!open || showLiveLogs}
|
readOnly={!open || showLiveLogs}
|
||||||
placeholder={selectedTimePlaceholderValue}
|
placeholder={selectedTimePlaceholderValue}
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
onMouseDown={(e): void => {
|
|
||||||
// Only treat as "click from input" when the actual input element is clicked (not suffix/chevron)
|
|
||||||
if (e.target === inputRef.current?.input) {
|
|
||||||
isClickFromInputRef.current = true;
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFocus={handleOpen}
|
onFocus={handleOpen}
|
||||||
onClick={handleOpen}
|
onClick={handleOpen}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`DraggableTableRow Snapshot test should render DraggableTableRow 1`] = `
|
exports[`DraggableTableRow Snapshot test should render DraggableTableRow 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Editor renders correctly with custom props 1`] = `
|
exports[`Editor renders correctly with custom props 1`] = `
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ jest.mock('react-router-dom', () => ({
|
|||||||
}),
|
}),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
jest.mock('antd', () => ({
|
jest.mock('antd/es/form/Form', () => ({
|
||||||
...jest.requireActual('antd'),
|
|
||||||
useForm: jest.fn().mockReturnValue({
|
useForm: jest.fn().mockReturnValue({
|
||||||
onFinish: jest.fn(),
|
onFinish: jest.fn(),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { UseMutateAsyncFunction } from 'react-query';
|
import { UseMutateAsyncFunction } from 'react-query';
|
||||||
import { FormInstance } from 'antd';
|
import { FormInstance } from 'antd';
|
||||||
import type { NotificationInstance } from 'antd/es/notification/interface';
|
import { NotificationInstance } from 'antd/es/notification/interface';
|
||||||
import { AxiosResponse } from 'axios';
|
import { AxiosResponse } from 'axios';
|
||||||
import { PANEL_TYPES } from 'constants/queryBuilder';
|
import { PANEL_TYPES } from 'constants/queryBuilder';
|
||||||
import { OptionsQuery } from 'container/OptionsMenu/types';
|
import { OptionsQuery } from 'container/OptionsMenu/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { NotificationInstance } from 'antd/es/notification/interface';
|
import { NotificationInstance } from 'antd/es/notification/interface';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { SOMETHING_WENT_WRONG } from 'constants/api';
|
import { SOMETHING_WENT_WRONG } from 'constants/api';
|
||||||
import { QueryParams } from 'constants/query';
|
import { QueryParams } from 'constants/query';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { TableColumnsType as ColumnsType, Tag, Typography } from 'antd';
|
import { Tag, Typography } from 'antd';
|
||||||
|
import { ColumnsType } from 'antd/es/table';
|
||||||
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
|
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
|
||||||
import { getMs } from 'container/Trace/Filters/Panel/PanelBody/Duration/util';
|
import { getMs } from 'container/Trace/Filters/Panel/PanelBody/Duration/util';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Tag,
|
Tag,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import type { RadioChangeEvent } from 'antd/lib';
|
import { RadioChangeEvent } from 'antd/lib';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import { InfraMonitoringEvents } from 'constants/events';
|
import { InfraMonitoringEvents } from 'constants/events';
|
||||||
import { QueryParams } from 'constants/query';
|
import { QueryParams } from 'constants/query';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';
|
|||||||
import { useCopyToClipboard, useLocation } from 'react-use';
|
import { useCopyToClipboard, useLocation } from 'react-use';
|
||||||
import { Color, Spacing } from '@signozhq/design-tokens';
|
import { Color, Spacing } from '@signozhq/design-tokens';
|
||||||
import { Button, Divider, Drawer, Radio, Tooltip, Typography } from 'antd';
|
import { Button, Divider, Drawer, Radio, Tooltip, Typography } from 'antd';
|
||||||
import type { RadioChangeEvent } from 'antd/lib';
|
import { RadioChangeEvent } from 'antd/lib';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import { LogType } from 'components/Logs/LogStateIndicator/LogStateIndicator';
|
import { LogType } from 'components/Logs/LogStateIndicator/LogStateIndicator';
|
||||||
import QuerySearch from 'components/QueryBuilderV2/QueryV2/QuerySearch/QuerySearch';
|
import QuerySearch from 'components/QueryBuilderV2/QueryV2/QuerySearch/QuerySearch';
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import {
|
import { ColumnsType, ColumnType } from 'antd/es/table';
|
||||||
TableColumnsType as ColumnsType,
|
|
||||||
TableColumnType as ColumnType,
|
|
||||||
} from 'antd';
|
|
||||||
import { FontSize } from 'container/OptionsMenu/types';
|
import { FontSize } from 'container/OptionsMenu/types';
|
||||||
import { IField } from 'types/api/logs/fields';
|
import { IField } from 'types/api/logs/fields';
|
||||||
import { ILog } from 'types/api/logs/log';
|
import { ILog } from 'types/api/logs/log';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { TableColumnsType as ColumnsType, Typography } from 'antd';
|
import { Typography } from 'antd';
|
||||||
|
import { ColumnsType } from 'antd/es/table';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
|
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
|
||||||
import { getSanitizedLogBody } from 'container/LogDetailedView/utils';
|
import { getSanitizedLogBody } from 'container/LogDetailedView/utils';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import { Button, Input, InputNumber, Popover, Tooltip, Typography } from 'antd';
|
import { Button, Input, InputNumber, Popover, Tooltip, Typography } from 'antd';
|
||||||
import type { DefaultOptionType } from 'antd/es/select';
|
import { DefaultOptionType } from 'antd/es/select';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import { LogViewMode } from 'container/LogsTable';
|
import { LogViewMode } from 'container/LogsTable';
|
||||||
import { FontSize, OptionsMenuConfig } from 'container/OptionsMenu/types';
|
import { FontSize, OptionsMenuConfig } from 'container/OptionsMenu/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`MessageTip custom action 1`] = `
|
exports[`MessageTip custom action 1`] = `
|
||||||
.c0 {
|
.c0 {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Color } from '@signozhq/design-tokens';
|
import { Color } from '@signozhq/design-tokens';
|
||||||
import { Tooltip } from 'antd';
|
import { Tooltip } from 'antd';
|
||||||
import type { DefaultOptionType } from 'antd/es/select';
|
import { DefaultOptionType } from 'antd/es/select';
|
||||||
import { Info } from 'lucide-react';
|
import { Info } from 'lucide-react';
|
||||||
|
|
||||||
import './MQCommon.styles.scss';
|
import './MQCommon.styles.scss';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Not Found page test should render Not Found page without errors 1`] = `
|
exports[`Not Found page test should render Not Found page without errors 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
|
|||||||
@@ -60,30 +60,11 @@
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
||||||
margin-left: 108px;
|
margin-left: 108px;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
/* Vertical dashed line connecting query elements */
|
|
||||||
&::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left: -28px;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 1px;
|
|
||||||
background: repeating-linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
#1d212d,
|
|
||||||
#1d212d 4px,
|
|
||||||
transparent 4px,
|
|
||||||
transparent 8px
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-mirror-where-clause,
|
.code-mirror-where-clause,
|
||||||
.query-aggregation-container,
|
.query-aggregation-container,
|
||||||
.query-add-ons,
|
.query-add-ons,
|
||||||
.metrics-aggregation-section-content,
|
.metrics-aggregation-section-content {
|
||||||
.metrics-container {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
@@ -121,10 +102,6 @@
|
|||||||
.qb-elements-container {
|
.qb-elements-container {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
|
|
||||||
&::after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-mirror-where-clause,
|
.code-mirror-where-clause,
|
||||||
.query-aggregation-container,
|
.query-aggregation-container,
|
||||||
.query-add-ons,
|
.query-add-ons,
|
||||||
@@ -356,7 +333,28 @@
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
display: none;
|
content: '';
|
||||||
|
height: 120px;
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 31px;
|
||||||
|
bottom: 0;
|
||||||
|
width: 1px;
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
#1d212d,
|
||||||
|
#1d212d 4px,
|
||||||
|
transparent 4px,
|
||||||
|
transparent 8px
|
||||||
|
);
|
||||||
|
left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.has-trace-operator {
|
||||||
|
&::before {
|
||||||
|
height: 0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,21 +462,10 @@
|
|||||||
|
|
||||||
.qb-content-section {
|
.qb-content-section {
|
||||||
.qb-elements-container {
|
.qb-elements-container {
|
||||||
&::after {
|
|
||||||
background: repeating-linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
var(--bg-vanilla-300),
|
|
||||||
var(--bg-vanilla-300) 4px,
|
|
||||||
transparent 4px,
|
|
||||||
transparent 8px
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-mirror-where-clause,
|
.code-mirror-where-clause,
|
||||||
.query-aggregation-container,
|
.query-aggregation-container,
|
||||||
.query-add-ons,
|
.query-add-ons,
|
||||||
.metrics-aggregation-section-content,
|
.metrics-aggregation-section-content {
|
||||||
.metrics-container {
|
|
||||||
&::before {
|
&::before {
|
||||||
border-left: 6px dotted var(--bg-vanilla-300);
|
border-left: 6px dotted var(--bg-vanilla-300);
|
||||||
}
|
}
|
||||||
@@ -542,6 +529,18 @@
|
|||||||
|
|
||||||
.qb-entity-options {
|
.qb-entity-options {
|
||||||
.options {
|
.options {
|
||||||
|
.query-name {
|
||||||
|
&::before {
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
var(--bg-vanilla-300),
|
||||||
|
var(--bg-vanilla-300) 4px,
|
||||||
|
transparent 4px,
|
||||||
|
transparent 8px
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.formula-name {
|
.formula-name {
|
||||||
&::before {
|
&::before {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
|
|||||||
@@ -207,7 +207,6 @@ export const QueryBuilderV2 = memo(function QueryBuilderV2({
|
|||||||
queryVariant={config?.queryVariant || 'dropdown'}
|
queryVariant={config?.queryVariant || 'dropdown'}
|
||||||
showOnlyWhereClause={showOnlyWhereClause}
|
showOnlyWhereClause={showOnlyWhereClause}
|
||||||
isListViewPanel={isListViewPanel}
|
isListViewPanel={isListViewPanel}
|
||||||
signalSource={currentQuery.builder.queryData[0].source as 'meter' | ''}
|
|
||||||
onSignalSourceChange={onSignalSourceChange || ((): void => {})}
|
onSignalSourceChange={onSignalSourceChange || ((): void => {})}
|
||||||
signalSourceChangeEnabled={signalSourceChangeEnabled}
|
signalSourceChangeEnabled={signalSourceChangeEnabled}
|
||||||
queriesCount={1}
|
queriesCount={1}
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import { memo, useCallback, useMemo } from 'react';
|
import { memo, useCallback, useMemo, useState } from 'react';
|
||||||
import { Select } from 'antd';
|
import { Select } from 'antd';
|
||||||
import {
|
import {
|
||||||
initialQueriesMap,
|
initialQueriesMap,
|
||||||
initialQueryMeterWithType,
|
initialQueryMeterWithType,
|
||||||
PANEL_TYPES,
|
PANEL_TYPES,
|
||||||
} from 'constants/queryBuilder';
|
} from 'constants/queryBuilder';
|
||||||
import { MetricNameSelector } from 'container/QueryBuilder/filters';
|
import { AggregatorFilter } from 'container/QueryBuilder/filters';
|
||||||
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
|
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
|
||||||
import { useQueryOperations } from 'hooks/queryBuilder/useQueryBuilderOperations';
|
import { useQueryOperations } from 'hooks/queryBuilder/useQueryBuilderOperations';
|
||||||
|
import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
||||||
import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';
|
import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';
|
||||||
import { DataSource } from 'types/common/queryBuilder';
|
import { DataSource } from 'types/common/queryBuilder';
|
||||||
import { SelectOption } from 'types/common/select';
|
import { SelectOption } from 'types/common/select';
|
||||||
@@ -43,12 +44,21 @@ export const MetricsSelect = memo(function MetricsSelect({
|
|||||||
signalSourceChangeEnabled: boolean;
|
signalSourceChangeEnabled: boolean;
|
||||||
savePreviousQuery: boolean;
|
savePreviousQuery: boolean;
|
||||||
}): JSX.Element {
|
}): JSX.Element {
|
||||||
|
const [attributeKeys, setAttributeKeys] = useState<BaseAutocompleteData[]>([]);
|
||||||
|
|
||||||
const { handleChangeAggregatorAttribute } = useQueryOperations({
|
const { handleChangeAggregatorAttribute } = useQueryOperations({
|
||||||
index,
|
index,
|
||||||
query,
|
query,
|
||||||
entityVersion: version,
|
entityVersion: version,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const handleAggregatorAttributeChange = useCallback(
|
||||||
|
(value: BaseAutocompleteData, isEditMode?: boolean) => {
|
||||||
|
handleChangeAggregatorAttribute(value, isEditMode, attributeKeys || []);
|
||||||
|
},
|
||||||
|
[handleChangeAggregatorAttribute, attributeKeys],
|
||||||
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
updateAllQueriesOperators,
|
updateAllQueriesOperators,
|
||||||
handleSetQueryData,
|
handleSetQueryData,
|
||||||
@@ -154,10 +164,12 @@ export const MetricsSelect = memo(function MetricsSelect({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<MetricNameSelector
|
<AggregatorFilter
|
||||||
onChange={handleChangeAggregatorAttribute}
|
onChange={handleAggregatorAttributeChange}
|
||||||
query={query}
|
query={query}
|
||||||
|
index={index}
|
||||||
signalSource={signalSource || ''}
|
signalSource={signalSource || ''}
|
||||||
|
setAttributeKeys={setAttributeKeys}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ function QueryAddOns({
|
|||||||
} else {
|
} else {
|
||||||
filteredAddOns = Object.values(ADD_ONS);
|
filteredAddOns = Object.values(ADD_ONS);
|
||||||
|
|
||||||
|
// Filter out group_by for metrics data source
|
||||||
if (query.dataSource === DataSource.METRICS) {
|
if (query.dataSource === DataSource.METRICS) {
|
||||||
// Filter out group_by for metrics data source (handled in MetricsAggregateSection)
|
|
||||||
filteredAddOns = filteredAddOns.filter(
|
filteredAddOns = filteredAddOns.filter(
|
||||||
(addOn) => addOn.key !== ADD_ONS_KEYS.GROUP_BY,
|
(addOn) => addOn.key !== ADD_ONS_KEYS.GROUP_BY,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ jest.mock(
|
|||||||
);
|
);
|
||||||
jest.mock('container/QueryBuilder/filters', () => ({
|
jest.mock('container/QueryBuilder/filters', () => ({
|
||||||
AggregatorFilter: (): JSX.Element => <div />,
|
AggregatorFilter: (): JSX.Element => <div />,
|
||||||
MetricNameSelector: (): JSX.Element => <div />,
|
|
||||||
}));
|
}));
|
||||||
// Mock hooks
|
// Mock hooks
|
||||||
jest.mock('hooks/queryBuilder/useQueryBuilder');
|
jest.mock('hooks/queryBuilder/useQueryBuilder');
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import { memo, useEffect, useState } from 'react';
|
import { memo, useEffect, useState } from 'react';
|
||||||
import type {
|
|
||||||
TableColumnGroupType as ColumnGroupType,
|
|
||||||
TableColumnsType as ColumnsType,
|
|
||||||
TableColumnType as ColumnType,
|
|
||||||
} from 'antd';
|
|
||||||
import { Button, Dropdown, Flex, MenuProps, Switch } from 'antd';
|
import { Button, Dropdown, Flex, MenuProps, Switch } from 'antd';
|
||||||
|
import { ColumnGroupType, ColumnType } from 'antd/es/table';
|
||||||
|
import { ColumnsType } from 'antd/lib/table';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import LaunchChatSupport from 'components/LaunchChatSupport/LaunchChatSupport';
|
import LaunchChatSupport from 'components/LaunchChatSupport/LaunchChatSupport';
|
||||||
import { useSafeNavigate } from 'hooks/useSafeNavigate';
|
import { useSafeNavigate } from 'hooks/useSafeNavigate';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
import ReactDragListView from 'react-drag-listview';
|
import ReactDragListView from 'react-drag-listview';
|
||||||
import { ResizeCallbackData } from 'react-resizable';
|
import { ResizeCallbackData } from 'react-resizable';
|
||||||
import { Table } from 'antd';
|
import { Table } from 'antd';
|
||||||
import type { ColumnsType } from 'antd/lib/table';
|
import { ColumnsType } from 'antd/lib/table';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import { dragColumnParams } from 'hooks/useDragColumns/configs';
|
import { dragColumnParams } from 'hooks/useDragColumns/configs';
|
||||||
import { getColumnWidth, RowData } from 'lib/query/createTableColumnsFromQuery';
|
import { getColumnWidth, RowData } from 'lib/query/createTableColumnsFromQuery';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { TableProps } from 'antd';
|
import { TableProps } from 'antd';
|
||||||
import type { ColumnsType } from 'antd/es/table';
|
import { ColumnsType } from 'antd/es/table';
|
||||||
import type { PaginationProps } from 'antd/lib';
|
import { PaginationProps } from 'antd/lib';
|
||||||
import type { ColumnGroupType, ColumnType } from 'antd/lib/table';
|
import { ColumnGroupType, ColumnType } from 'antd/lib/table';
|
||||||
import { LaunchChatSupportProps } from 'components/LaunchChatSupport/LaunchChatSupport';
|
import { LaunchChatSupportProps } from 'components/LaunchChatSupport/LaunchChatSupport';
|
||||||
|
|
||||||
import { TableDataSource } from './contants';
|
import { TableDataSource } from './contants';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Radio, RadioChangeEvent } from 'antd';
|
import { Radio } from 'antd';
|
||||||
|
import { RadioChangeEvent } from 'antd/es/radio';
|
||||||
|
|
||||||
import './SignozRadioGroup.styles.scss';
|
import './SignozRadioGroup.styles.scss';
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import {
|
|||||||
TabsProps,
|
TabsProps,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import type { TextProps } from 'antd/lib/typography/Text';
|
import { TextProps } from 'antd/lib/typography/Text';
|
||||||
import type { TitleProps } from 'antd/lib/typography/Title';
|
import { TitleProps } from 'antd/lib/typography/Title';
|
||||||
import styled, { FlattenSimpleInterpolation } from 'styled-components';
|
import styled, { FlattenSimpleInterpolation } from 'styled-components';
|
||||||
|
|
||||||
import { IStyledClass } from './types';
|
import { IStyledClass } from './types';
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import type {
|
import { ColumnType } from 'antd/es/table';
|
||||||
TableColumnsType as ColumnsType,
|
import { ColumnsType } from 'antd/lib/table';
|
||||||
TableColumnType as ColumnType,
|
|
||||||
} from 'antd';
|
|
||||||
|
|
||||||
export const generatorResizeTableColumns = <T>({
|
export const generatorResizeTableColumns = <T>({
|
||||||
baseColumnOptions,
|
baseColumnOptions,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Radio } from 'antd';
|
import { Radio } from 'antd';
|
||||||
import type { RadioChangeEvent } from 'antd/lib';
|
import { RadioChangeEvent } from 'antd/lib';
|
||||||
import { History, Table } from 'lucide-react';
|
import { History, Table } from 'lucide-react';
|
||||||
|
|
||||||
import { ALERT_TABS } from '../constants';
|
import { ALERT_TABS } from '../constants';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { Dispatch, SetStateAction, useState } from 'react';
|
import React, { Dispatch, SetStateAction, useState } from 'react';
|
||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import { Button, Tag } from 'antd';
|
import { Button } from 'antd';
|
||||||
|
import { Tag } from 'antd/lib';
|
||||||
import Input from 'components/Input';
|
import Input from 'components/Input';
|
||||||
import { Check, X } from 'lucide-react';
|
import { Check, X } from 'lucide-react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { WarningFilled } from '@ant-design/icons';
|
import { WarningFilled } from '@ant-design/icons';
|
||||||
import { Select, Tooltip } from 'antd';
|
import { Select, Tooltip } from 'antd';
|
||||||
import type { DefaultOptionType } from 'antd/es/select';
|
import { DefaultOptionType } from 'antd/es/select';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import { UniversalYAxisUnitMappings } from './constants';
|
import { UniversalYAxisUnitMappings } from './constants';
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export enum LOCALSTORAGE {
|
|||||||
DONT_SHOW_SLOW_API_WARNING = 'DONT_SHOW_SLOW_API_WARNING',
|
DONT_SHOW_SLOW_API_WARNING = 'DONT_SHOW_SLOW_API_WARNING',
|
||||||
METRICS_LIST_OPTIONS = 'METRICS_LIST_OPTIONS',
|
METRICS_LIST_OPTIONS = 'METRICS_LIST_OPTIONS',
|
||||||
SHOW_EXCEPTIONS_QUICK_FILTERS = 'SHOW_EXCEPTIONS_QUICK_FILTERS',
|
SHOW_EXCEPTIONS_QUICK_FILTERS = 'SHOW_EXCEPTIONS_QUICK_FILTERS',
|
||||||
|
BANNER_DISMISSED = 'BANNER_DISMISSED',
|
||||||
QUICK_FILTERS_SETTINGS_ANNOUNCEMENT = 'QUICK_FILTERS_SETTINGS_ANNOUNCEMENT',
|
QUICK_FILTERS_SETTINGS_ANNOUNCEMENT = 'QUICK_FILTERS_SETTINGS_ANNOUNCEMENT',
|
||||||
FUNNEL_STEPS = 'FUNNEL_STEPS',
|
FUNNEL_STEPS = 'FUNNEL_STEPS',
|
||||||
SPAN_DETAILS_PINNED_ATTRIBUTES = 'SPAN_DETAILS_PINNED_ATTRIBUTES',
|
SPAN_DETAILS_PINNED_ATTRIBUTES = 'SPAN_DETAILS_PINNED_ATTRIBUTES',
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// ** Helpers
|
// ** Helpers
|
||||||
import { MetrictypesTypeDTO } from 'api/generated/services/sigNoz.schemas';
|
|
||||||
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
|
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
|
||||||
import { createNewBuilderItemName } from 'lib/newQueryBuilder/createNewBuilderItemName';
|
import { createNewBuilderItemName } from 'lib/newQueryBuilder/createNewBuilderItemName';
|
||||||
import { IAttributeValuesResponse } from 'types/api/queryBuilder/getAttributesValues';
|
import { IAttributeValuesResponse } from 'types/api/queryBuilder/getAttributesValues';
|
||||||
@@ -178,7 +177,7 @@ export const initialQueryBuilderFormValues: IBuilderQuery = {
|
|||||||
{
|
{
|
||||||
metricName: '',
|
metricName: '',
|
||||||
temporality: '',
|
temporality: '',
|
||||||
timeAggregation: MetricAggregateOperator.AVG,
|
timeAggregation: MetricAggregateOperator.COUNT,
|
||||||
spaceAggregation: MetricAggregateOperator.SUM,
|
spaceAggregation: MetricAggregateOperator.SUM,
|
||||||
reduceTo: ReduceOperators.AVG,
|
reduceTo: ReduceOperators.AVG,
|
||||||
},
|
},
|
||||||
@@ -226,7 +225,7 @@ export const initialQueryBuilderFormMeterValues: IBuilderQuery = {
|
|||||||
{
|
{
|
||||||
metricName: '',
|
metricName: '',
|
||||||
temporality: '',
|
temporality: '',
|
||||||
timeAggregation: MeterAggregateOperator.AVG,
|
timeAggregation: MeterAggregateOperator.COUNT,
|
||||||
spaceAggregation: MeterAggregateOperator.SUM,
|
spaceAggregation: MeterAggregateOperator.SUM,
|
||||||
reduceTo: ReduceOperators.AVG,
|
reduceTo: ReduceOperators.AVG,
|
||||||
},
|
},
|
||||||
@@ -372,31 +371,6 @@ export enum ATTRIBUTE_TYPES {
|
|||||||
EXPONENTIAL_HISTOGRAM = 'ExponentialHistogram',
|
EXPONENTIAL_HISTOGRAM = 'ExponentialHistogram',
|
||||||
}
|
}
|
||||||
|
|
||||||
const METRIC_TYPE_TO_ATTRIBUTE_TYPE: Record<
|
|
||||||
MetrictypesTypeDTO,
|
|
||||||
ATTRIBUTE_TYPES
|
|
||||||
> = {
|
|
||||||
[MetrictypesTypeDTO.sum]: ATTRIBUTE_TYPES.SUM,
|
|
||||||
[MetrictypesTypeDTO.gauge]: ATTRIBUTE_TYPES.GAUGE,
|
|
||||||
[MetrictypesTypeDTO.histogram]: ATTRIBUTE_TYPES.HISTOGRAM,
|
|
||||||
[MetrictypesTypeDTO.summary]: ATTRIBUTE_TYPES.GAUGE,
|
|
||||||
[MetrictypesTypeDTO.exponentialhistogram]:
|
|
||||||
ATTRIBUTE_TYPES.EXPONENTIAL_HISTOGRAM,
|
|
||||||
};
|
|
||||||
|
|
||||||
export function toAttributeType(
|
|
||||||
metricType: MetrictypesTypeDTO | undefined,
|
|
||||||
isMonotonic?: boolean,
|
|
||||||
): ATTRIBUTE_TYPES | '' {
|
|
||||||
if (!metricType) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
if (metricType === MetrictypesTypeDTO.sum && isMonotonic === false) {
|
|
||||||
return ATTRIBUTE_TYPES.GAUGE;
|
|
||||||
}
|
|
||||||
return METRIC_TYPE_TO_ATTRIBUTE_TYPE[metricType] || '';
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IQueryBuilderState = 'search';
|
export type IQueryBuilderState = 'search';
|
||||||
|
|
||||||
export const QUERY_BUILDER_SEARCH_VALUES = {
|
export const QUERY_BUILDER_SEARCH_VALUES = {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export const REACT_QUERY_KEY = {
|
|||||||
|
|
||||||
// Metrics Explorer Query Keys
|
// Metrics Explorer Query Keys
|
||||||
GET_METRICS_LIST: 'GET_METRICS_LIST',
|
GET_METRICS_LIST: 'GET_METRICS_LIST',
|
||||||
|
GET_METRICS_TREE_MAP: 'GET_METRICS_TREE_MAP',
|
||||||
GET_METRICS_LIST_FILTER_KEYS: 'GET_METRICS_LIST_FILTER_KEYS',
|
GET_METRICS_LIST_FILTER_KEYS: 'GET_METRICS_LIST_FILTER_KEYS',
|
||||||
GET_METRICS_LIST_FILTER_VALUES: 'GET_METRICS_LIST_FILTER_VALUES',
|
GET_METRICS_LIST_FILTER_VALUES: 'GET_METRICS_LIST_FILTER_VALUES',
|
||||||
GET_METRIC_DETAILS: 'GET_METRIC_DETAILS',
|
GET_METRIC_DETAILS: 'GET_METRIC_DETAILS',
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const ROUTES = {
|
|||||||
SETTINGS: '/settings',
|
SETTINGS: '/settings',
|
||||||
MY_SETTINGS: '/settings/my-settings',
|
MY_SETTINGS: '/settings/my-settings',
|
||||||
ORG_SETTINGS: '/settings/org-settings',
|
ORG_SETTINGS: '/settings/org-settings',
|
||||||
|
CUSTOM_DOMAIN_SETTINGS: '/settings/custom-domain-settings',
|
||||||
API_KEYS: '/settings/api-keys',
|
API_KEYS: '/settings/api-keys',
|
||||||
INGESTION_SETTINGS: '/settings/ingestion-settings',
|
INGESTION_SETTINGS: '/settings/ingestion-settings',
|
||||||
SOMETHING_WENT_WRONG: '/something-went-wrong',
|
SOMETHING_WENT_WRONG: '/something-went-wrong',
|
||||||
@@ -55,7 +56,6 @@ const ROUTES = {
|
|||||||
TRACE_EXPLORER: '/trace-explorer',
|
TRACE_EXPLORER: '/trace-explorer',
|
||||||
BILLING: '/settings/billing',
|
BILLING: '/settings/billing',
|
||||||
ROLES_SETTINGS: '/settings/roles',
|
ROLES_SETTINGS: '/settings/roles',
|
||||||
ROLE_DETAILS: '/settings/roles/:roleId',
|
|
||||||
SUPPORT: '/support',
|
SUPPORT: '/support',
|
||||||
LOGS_SAVE_VIEWS: '/logs/saved-views',
|
LOGS_SAVE_VIEWS: '/logs/saved-views',
|
||||||
TRACES_SAVE_VIEWS: '/traces/saved-views',
|
TRACES_SAVE_VIEWS: '/traces/saved-views',
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Col,
|
Col,
|
||||||
Collapse,
|
Collapse,
|
||||||
CollapseProps,
|
|
||||||
Flex,
|
Flex,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
@@ -21,7 +20,8 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import type { NotificationInstance } from 'antd/es/notification/interface';
|
import { NotificationInstance } from 'antd/es/notification/interface';
|
||||||
|
import { CollapseProps } from 'antd/lib';
|
||||||
import createAPIKeyApi from 'api/v1/pats/create';
|
import createAPIKeyApi from 'api/v1/pats/create';
|
||||||
import deleteAPIKeyApi from 'api/v1/pats/delete';
|
import deleteAPIKeyApi from 'api/v1/pats/delete';
|
||||||
import updateAPIKeyApi from 'api/v1/pats/update';
|
import updateAPIKeyApi from 'api/v1/pats/update';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { HTMLAttributes } from 'react';
|
import { HTMLAttributes } from 'react';
|
||||||
import { Color } from '@signozhq/design-tokens';
|
import { Color } from '@signozhq/design-tokens';
|
||||||
import { Progress, Table, TableColumnsType as ColumnsType } from 'antd';
|
import { Progress, Table } from 'antd';
|
||||||
|
import { ColumnsType } from 'antd/es/table';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import { ConditionalAlertPopover } from 'container/AlertHistory/AlertPopover/AlertPopover';
|
import { ConditionalAlertPopover } from 'container/AlertHistory/AlertPopover/AlertPopover';
|
||||||
import AlertLabels from 'pages/AlertDetails/AlertHeader/AlertLabels/AlertLabels';
|
import AlertLabels from 'pages/AlertDetails/AlertHeader/AlertLabels/AlertLabels';
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { EllipsisOutlined } from '@ant-design/icons';
|
import { EllipsisOutlined } from '@ant-design/icons';
|
||||||
import { Color } from '@signozhq/design-tokens';
|
import { Color } from '@signozhq/design-tokens';
|
||||||
import { Button, TableColumnsType as ColumnsType } from 'antd';
|
import { Button } from 'antd';
|
||||||
|
import { ColumnsType } from 'antd/es/table';
|
||||||
import ClientSideQBSearch, {
|
import ClientSideQBSearch, {
|
||||||
AttributeKey,
|
AttributeKey,
|
||||||
} from 'components/ClientSideQBSearch/ClientSideQBSearch';
|
} from 'components/ClientSideQBSearch/ClientSideQBSearch';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useCallback } from 'react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { generatePath } from 'react-router-dom';
|
import { generatePath } from 'react-router-dom';
|
||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
import type { ColumnsType } from 'antd/lib/table';
|
import { ColumnsType } from 'antd/lib/table';
|
||||||
import { ResizeTable } from 'components/ResizeTable';
|
import { ResizeTable } from 'components/ResizeTable';
|
||||||
import ROUTES from 'constants/routes';
|
import ROUTES from 'constants/routes';
|
||||||
import useComponentPermission from 'hooks/useComponentPermission';
|
import useComponentPermission from 'hooks/useComponentPermission';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useState } from 'react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useQueryClient } from 'react-query';
|
import { useQueryClient } from 'react-query';
|
||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
import type { NotificationInstance } from 'antd/es/notification/interface';
|
import { NotificationInstance } from 'antd/es/notification/interface';
|
||||||
import deleteChannel from 'api/channels/delete';
|
import deleteChannel from 'api/channels/delete';
|
||||||
import APIError from 'types/api/error';
|
import APIError from 'types/api/error';
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ describe('Alert Channels Settings List page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(successNotification).toHaveBeenCalledWith({
|
expect(successNotification).toBeCalledWith({
|
||||||
message: 'Success',
|
message: 'Success',
|
||||||
description: 'channel_delete_success',
|
description: 'channel_delete_success',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import type { ColumnType, TablePaginationConfig } from 'antd/es/table';
|
import { ColumnType, TablePaginationConfig } from 'antd/es/table';
|
||||||
import type { FilterValue, SorterResult } from 'antd/es/table/interface';
|
import { FilterValue, SorterResult } from 'antd/es/table/interface';
|
||||||
import type { ColumnsType } from 'antd/lib/table';
|
import { ColumnsType } from 'antd/lib/table';
|
||||||
import { FilterConfirmProps } from 'antd/lib/table/interface';
|
import { FilterConfirmProps } from 'antd/lib/table/interface';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import getAll from 'api/errors/getAll';
|
import getAll from 'api/errors/getAll';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { FilterDropdownProps } from 'antd/es/table/interface';
|
import { FilterDropdownProps } from 'antd/es/table/interface';
|
||||||
|
|
||||||
export interface FilterDropdownExtendsProps {
|
export interface FilterDropdownExtendsProps {
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { FilterValue, SortOrder } from 'antd/lib/table/interface';
|
import { FilterValue, SortOrder } from 'antd/lib/table/interface';
|
||||||
import Timestamp from 'timestamp-nano';
|
import Timestamp from 'timestamp-nano';
|
||||||
import { Order, OrderBy } from 'types/api/errors/getAll';
|
import { Order, OrderBy } from 'types/api/errors/getAll';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { Color, Spacing } from '@signozhq/design-tokens';
|
import { Color, Spacing } from '@signozhq/design-tokens';
|
||||||
import { Button, Divider, Drawer, Radio, Typography } from 'antd';
|
import { Button, Divider, Drawer, Radio, Typography } from 'antd';
|
||||||
import type { RadioChangeEvent } from 'antd/lib';
|
import { RadioChangeEvent } from 'antd/lib';
|
||||||
import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';
|
import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';
|
||||||
import {
|
import {
|
||||||
CustomTimeType,
|
CustomTimeType,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { UseQueryResult } from 'react-query';
|
import { UseQueryResult } from 'react-query';
|
||||||
import { Skeleton, Table, TablePaginationConfig, Typography } from 'antd';
|
import { Table, TablePaginationConfig, Typography } from 'antd';
|
||||||
|
import Skeleton from 'antd/lib/skeleton';
|
||||||
import { QueryParams } from 'constants/query';
|
import { QueryParams } from 'constants/query';
|
||||||
import {
|
import {
|
||||||
dependentServicesColumns,
|
dependentServicesColumns,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useQueries } from 'react-query';
|
|||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { LoadingOutlined } from '@ant-design/icons';
|
import { LoadingOutlined } from '@ant-design/icons';
|
||||||
import { Spin, Table } from 'antd';
|
import { Spin, Table } from 'antd';
|
||||||
import type { ColumnType } from 'antd/lib/table';
|
import { ColumnType } from 'antd/lib/table';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import { ENTITY_VERSION_V4 } from 'constants/app';
|
import { ENTITY_VERSION_V4 } from 'constants/app';
|
||||||
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ jest.mock('antd', () => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)),
|
)),
|
||||||
|
Skeleton: jest
|
||||||
|
.fn()
|
||||||
|
.mockImplementation(() => <div data-testid="skeleton-mock" />),
|
||||||
Typography: {
|
Typography: {
|
||||||
Text: jest
|
Text: jest
|
||||||
.fn()
|
.fn()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { Color } from '@signozhq/design-tokens';
|
import { Color } from '@signozhq/design-tokens';
|
||||||
import { Progress, TableColumnType as ColumnType, Tag, Tooltip } from 'antd';
|
import { Progress, Tag, Tooltip } from 'antd';
|
||||||
|
import { ColumnType } from 'antd/es/table';
|
||||||
import { convertFiltersToExpressionWithExistingQuery } from 'components/QueryBuilderV2/utils';
|
import { convertFiltersToExpressionWithExistingQuery } from 'components/QueryBuilderV2/utils';
|
||||||
import {
|
import {
|
||||||
FiltersType,
|
FiltersType,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user