diff --git a/frontend/src/AppRoutes/pageComponents.ts b/frontend/src/AppRoutes/pageComponents.ts index 0857ea4664..55edfc54a7 100644 --- a/frontend/src/AppRoutes/pageComponents.ts +++ b/frontend/src/AppRoutes/pageComponents.ts @@ -229,7 +229,7 @@ export const InstalledIntegrations = Loadable( ), ); -export const MessagingQueues = Loadable( +export const MessagingQueuesMainPage = Loadable( () => import(/* webpackChunkName: "MessagingQueues" */ 'pages/MessagingQueues'), ); @@ -247,3 +247,10 @@ export const InfrastructureMonitoring = Loadable( /* webpackChunkName: "InfrastructureMonitoring" */ 'pages/InfrastructureMonitoring' ), ); + +export const CeleryTask = Loadable( + () => + import( + /* webpackChunkName: "CeleryTask" */ 'pages/Celery/CeleryTask/CeleryTask' + ), +); diff --git a/frontend/src/AppRoutes/routes.ts b/frontend/src/AppRoutes/routes.ts index dda546167f..5a259e3968 100644 --- a/frontend/src/AppRoutes/routes.ts +++ b/frontend/src/AppRoutes/routes.ts @@ -1,4 +1,5 @@ import ROUTES from 'constants/routes'; +import MessagingQueues from 'pages/MessagingQueues'; import { RouteProps } from 'react-router-dom'; import { @@ -27,7 +28,6 @@ import { LogsExplorer, LogsIndexToFields, LogsSaveViews, - MessagingQueues, MQDetailPage, MySettings, NewDashboardPage, @@ -401,6 +401,13 @@ const routes: AppRoutes[] = [ key: 'MESSAGING_QUEUES', isPrivate: true, }, + { + path: ROUTES.MESSAGING_QUEUES_CELERY_TASK, + exact: true, + component: MessagingQueues, + key: 'MESSAGING_QUEUES_CELERY_TASK', + isPrivate: true, + }, { path: ROUTES.MESSAGING_QUEUES_DETAIL, exact: true, diff --git a/frontend/src/components/CeleryTask/CeleryTaskConfigOptions/CeleryTaskConfigOptions.styles.scss b/frontend/src/components/CeleryTask/CeleryTaskConfigOptions/CeleryTaskConfigOptions.styles.scss new file mode 100644 index 0000000000..1ffd4af3ff --- /dev/null +++ b/frontend/src/components/CeleryTask/CeleryTaskConfigOptions/CeleryTaskConfigOptions.styles.scss @@ -0,0 +1,39 @@ +.celery-task-filters { + display: flex; + justify-content: space-between; + width: 100%; + + .celery-filters { + display: flex; + align-items: center; + gap: 8px; + + .config-select-option { + width: 100%; + .ant-select-selector { + display: flex; + min-height: 32px; + align-items: center; + gap: 16px; + min-width: 164px; + + border-radius: 2px; + border: 1px solid var(--bg-slate-400); + background: var(--bg-ink-300); + } + } + } +} + +.lightMode { + .celery-task-filters { + .celery-filters { + .config-select-option { + .ant-select-selector { + border: 1px solid var(--bg-vanilla-300); + background: var(--bg-vanilla-100); + } + } + } + } +} diff --git a/frontend/src/components/CeleryTask/CeleryTaskConfigOptions/CeleryTaskConfigOptions.tsx b/frontend/src/components/CeleryTask/CeleryTaskConfigOptions/CeleryTaskConfigOptions.tsx new file mode 100644 index 0000000000..ebb514c40a --- /dev/null +++ b/frontend/src/components/CeleryTask/CeleryTaskConfigOptions/CeleryTaskConfigOptions.tsx @@ -0,0 +1,92 @@ +import './CeleryTaskConfigOptions.styles.scss'; + +import { Color } from '@signozhq/design-tokens'; +import { Button, Select, Spin, Tooltip, Typography } from 'antd'; +import { SelectMaxTagPlaceholder } from 'components/MessagingQueues/MQCommon/MQCommon'; +import { QueryParams } from 'constants/query'; +import useUrlQuery from 'hooks/useUrlQuery'; +import { Check, Share2 } from 'lucide-react'; +import { useState } from 'react'; +import { useHistory, useLocation } from 'react-router-dom'; +import { useCopyToClipboard } from 'react-use'; + +import { + getValuesFromQueryParams, + setQueryParamsFromOptions, +} from '../CeleryUtils'; +import { useCeleryFilterOptions } from '../useCeleryFilterOptions'; + +function CeleryTaskConfigOptions(): JSX.Element { + const { handleSearch, isFetching, options } = useCeleryFilterOptions( + 'celery.task_name', + ); + const history = useHistory(); + const location = useLocation(); + + const [isURLCopied, setIsURLCopied] = useState(false); + const urlQuery = useUrlQuery(); + + const [, handleCopyToClipboard] = useCopyToClipboard(); + + return ( +
+
+ + Task Name + +