Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: remove unused files (#11033)

Prakhar Dewand1c9864f52d7
diff --git a/frontend/knip.json b/frontend/knip.json
new file mode 100644
index 0000000000..3641807b5c
--- /dev/null
+++ b/frontend/knip.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "https://unpkg.com/knip@5/schema.json",
+ "project": ["src/**/*.ts", "src/**/*.tsx"],
+ "ignore": ["src/api/generated/**/*.ts"]
+}
\ No newline at end of file
diff --git a/frontend/src/pages/AlertChannelCreate/config.tsx b/frontend/src/pages/AlertChannelCreate/config.tsx
deleted file mode 100644
index ff366ca5a8..0000000000
--- a/frontend/src/pages/AlertChannelCreate/config.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import ROUTES from 'constants/routes';
-import CreateAlertChannels from 'container/CreateAlertChannels';
-import { ChannelType } from 'container/CreateAlertChannels/config';
-import GeneralSettings from 'container/GeneralSettings';
-import { t } from 'i18next';
-
-export const alertsRoutesConfig = [
- {
- Component: GeneralSettings,
- name: t('routes.general'),
- route: ROUTES.SETTINGS,
- key: ROUTES.SETTINGS,
- },
- {
- Component: (): JSX.Element => (
- <CreateAlertChannels preType={ChannelType.Slack} />
- ),
- name: t('routes.alert_channels'),
- route: ROUTES.CHANNELS_NEW,
- key: ROUTES.CHANNELS_NEW,
- },
-];
diff --git a/frontend/src/pages/AlertChannelCreate/index.tsx b/frontend/src/pages/AlertChannelCreate/index.tsx
deleted file mode 100644
index 79944a0920..0000000000
--- a/frontend/src/pages/AlertChannelCreate/index.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import { useLocation } from 'react-router-dom';
-import RouteTab from 'components/RouteTab';
-import history from 'lib/history';
-
-import { alertsRoutesConfig } from './config';
-
-function SettingsPage(): JSX.Element {
- const { pathname } = useLocation();
-
- return (
- <RouteTab
- history={history}
- routes={alertsRoutesConfig}
- activeKey={pathname}
- />
- );
-}
-
-export default SettingsPage;
diff --git a/frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/AlertStatus.tsx b/frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/AlertStatus.tsx
deleted file mode 100644
index 9bd5c8ab11..0000000000
--- a/frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/AlertStatus.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { useMemo } from 'react';
-import { Color } from '@signozhq/design-tokens';
-import { CircleCheck, Siren } from 'lucide-react';
-import { getDurationFromNow } from 'utils/timeUtils';
-
-import { AlertStatusProps, StatusConfig } from './types';
-
-import './AlertStatus.styles.scss';
-
-export default function AlertStatus({
- status,
- timestamp,
-}: AlertStatusProps): JSX.Element {
- const statusConfig: StatusConfig = useMemo(
- () => ({
- firing: {
- icon: <Siren size={14} color={Color.TEXT_VANILLA_400} />,
- text: 'Firing since',
- extraInfo: timestamp ? (
- <>
- <div>⎯</div>
- <div className="time">{getDurationFromNow(timestamp)}</div>
- </>
- ) : null,
- className: 'alert-status-info--firing',
- },
- resolved: {
- icon: (
- <CircleCheck
- size={14}
- fill={Color.BG_VANILLA_400}
- color={Color.BG_INK_400}
- />
- ),
- text: 'Resolved',
- extraInfo: null,
- className: 'alert-status-info--resolved',
- },
- }),
- [timestamp],
- );
-
- const currentStatus = statusConfig[status];
-
- return (
- <div className={`alert-status-info ${currentStatus.className}`}>
- <div className="alert-status-info__icon">{currentStatus.icon}</div>
- <div className="alert-status-info__details">
- <div className="text">{currentStatus.text}</div>
- {currentStatus.extraInfo}
- </div>
- </div>
- );
-}
diff --git a/frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/types.ts b/frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/types.ts
deleted file mode 100644
index c297480f38..0000000000
--- a/frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/types.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-export type AlertStatusProps =
- | { status: 'firing'; timestamp: number }
- | { status: 'resolved'; timestamp?: number };
-
-export type StatusConfig = {
- firing: {
- icon: JSX.Element;
- text: string;
- extraInfo: JSX.Element | null;
- className: string;
- };
- resolved: {
- icon: JSX.Element;
- text: string;
- extraInfo: JSX.Element | null;
- className: string;
- };
-};
diff --git a/frontend/src/pages/AlertHistory/index.tsx b/frontend/src/pages/AlertHistory/index.tsx
deleted file mode 100644
index 7a7b0d01d8..0000000000
--- a/frontend/src/pages/AlertHistory/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import AlertHistory from 'container/AlertHistory';
-
-export default AlertHistory;
diff --git a/frontend/src/pages/AllErrors/utils.tsx b/frontend/src/pages/AllErrors/utils.tsx
deleted file mode 100644
index bde4354ec1..0000000000
--- a/frontend/src/pages/AllErrors/utils.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import {
- FiltersType,
- IQuickFiltersConfig,
-} from 'components/QuickFilters/types';
-import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
-import { DataSource } from 'types/common/queryBuilder';
-
-export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
- {
- type: FiltersType.CHECKBOX,
- title: 'Environment',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'deployment.environment',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: true,
- },
- {
- type: FiltersType.CHECKBOX,
- title: 'Service Name',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'service.name',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: false,
- },
- {
- type: FiltersType.CHECKBOX,
- title: 'Hostname',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'host.name',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: false,
- },
- {
- type: FiltersType.CHECKBOX,
- title: 'K8s Cluster Name',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'k8s.cluster.name',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: false,
- },
- {
- type: FiltersType.CHECKBOX,
- title: 'K8s Deployment Name',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'k8s.deployment.name',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: false,
- },
- {
- type: FiltersType.CHECKBOX,
- title: 'K8s Namespace Name',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'k8s.namespace.name',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: false,
- },
- {
- type: FiltersType.CHECKBOX,
- title: 'K8s Pod Name',
- dataSource: DataSource.TRACES,
- attributeKey: {
- key: 'k8s.pod.name',
- dataType: DataTypes.String,
- type: 'resource',
- },
- defaultOpen: false,
- },
-];
diff --git a/frontend/src/pages/Billing/BillingPage.tsx b/frontend/src/pages/Billing/BillingPage.tsx
deleted file mode 100644
index 7d1f43102a..0000000000
--- a/frontend/src/pages/Billing/BillingPage.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import BillingContainer from 'container/BillingContainer/BillingContainer';
-
-import './BillingPage.styles.scss';
-
-function BillingPage(): JSX.Element {
- return (
- <div className="billingPageContainer">
- <BillingContainer />
- </div>
- );
-}
-
-export default BillingPage;
diff --git a/frontend/src/pages/Billing/index.tsx b/frontend/src/pages/Billing/index.tsx
deleted file mode 100644
index 8dad400fe0..0000000000
--- a/frontend/src/pages/Billing/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import BillingPage from './BillingPage';
-
-export default BillingPage;
diff --git a/frontend/src/pages/CreateAlert/styles.ts b/frontend/src/pages/CreateAlert/styles.ts
deleted file mode 100644
index 9b66364b49..0000000000
--- a/frontend/src/pages/CreateAlert/styles.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Typography } from 'antd';
-import styled from 'styled-components';
-
-export const Title = styled(Typography)`
- &&& {
- margin-top: 1rem;
- margin-bottom: 1rem;
- }
-`;
-
-export const ButtonContainer = styled.div`
- &&& {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- margin-top: 1rem;
- }
-`;
diff --git a/frontend/src/pages/HomePage/index.tsx b/frontend/src/pages/HomePage/index.tsx
deleted file mode 100644
index d91fb083d2..0000000000
--- a/frontend/src/pages/HomePage/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import HomePage from './HomePage';
-
-export default HomePage;
diff --git a/frontend/src/pages/LogsExplorer/styles.ts b/frontend/src/pages/LogsExplorer/styles.ts
deleted file mode 100644
index 54d553bc3c..0000000000
--- a/frontend/src/pages/LogsExplorer/styles.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Col } from 'antd';
-import { themeColors } from 'constants/theme';
-import styled from 'styled-components';
-
-export const WrapperStyled = styled.div`
- display: flex;
- flex-direction: column;
- flex: 1;
- color: ${themeColors.lightWhite};
-`;
-
-export const ButtonWrapperStyled = styled(Col)`
- margin-left: auto;
-`;
diff --git a/frontend/src/pages/LogsModulePage/utils.ts b/frontend/src/pages/LogsModulePage/utils.ts
deleted file mode 100644
index 222c1c9ef6..0000000000
--- a/frontend/src/pages/LogsModulePage/utils.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export const removeSourcePageFromPath = (path: string): string => {
- const lastSlashIndex = path.lastIndexOf('/');
- if (lastSlashIndex !== -1) {
- return path.substring(0, lastSlashIndex);
- }
- return path;
-};
diff --git a/frontend/src/pages/MySettings/index.tsx b/frontend/src/pages/MySettings/index.tsx
deleted file mode 100644
index f3f821e466..0000000000
--- a/frontend/src/pages/MySettings/index.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import MySettingsContainer from 'container/MySettings';
-
-function MySettings(): JSX.Element {
- return <MySettingsContainer />;
-}
-export default MySettings;
diff --git a/frontend/src/pages/SomethingWentWrong/index.tsx b/frontend/src/pages/SomethingWentWrong/index.tsx
deleted file mode 100644
index cfd085254b..0000000000
--- a/frontend/src/pages/SomethingWentWrong/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Button, Typography } from 'antd';
-import SomethingWentWrongAsset from 'assets/SomethingWentWrong';
-import { Container } from 'components/NotFound/styles';
-import ROUTES from 'constants/routes';
-import history from 'lib/history';
-
-function SomethingWentWrong(): JSX.Element {
- return (
- <Container>
- <SomethingWentWrongAsset />
- <Typography.Title level={3}>Oops! Something went wrong</Typography.Title>
- <Button
- type="primary"
- onClick={(): void => {
- history.push(ROUTES.HOME);
- }}
- className="periscope-btn primary"
- >
- Return to Home
- </Button>
- </Container>
- );
-}
-
-export default SomethingWentWrong;
diff --git a/frontend/src/pages/TracesExplorer/styles.ts b/frontend/src/pages/TracesExplorer/styles.ts
deleted file mode 100644
index 9e68ad5a5c..0000000000
--- a/frontend/src/pages/TracesExplorer/styles.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import styled from 'styled-components';
-
-export const Container = styled.div`
- margin: 1rem 0;
-`;
-
-export const ActionsWrapper = styled.div`
- display: flex;
- justify-content: flex-end;
-`;