mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 21:41:59 +08:00

* Signoz Cloud - Onboarding Flow - Getting Started page * Signoz Cloud - Onboarding Flow - Java lang setup flow * Signoz Cloud - Onboarding Flow - Wireup other lang docs for APM and create empty base component for other modules * Signoz Cloud - Onboarding Flow - remove try signoz cloud button, Update code background * Signoz Cloud - Onboarding Flow - Wire up all docs and modules * Signoz Cloud - Onboarding Flow - Integrate Intercom and other minor fixes * Signoz Cloud - Onboarding Flow - Logs Management - Update Connection Status component * Signoz Cloud - Onboarding Flow - Logs Management - Update light mode styles * Signoz Cloud - Onboarding Flow - Logs Management - Update Logs * Signoz Cloud - Update yarn.lock * Signoz Cloud - Delete Progress Steps component * Signoz Cloud - Poll for connection status, created common Header component * Signoz Cloud - Add polling to check connection status, update components to use common Header component * Signoz Cloud - Render onboarding only if feature flag is enabled * Signoz Cloud - Configure Logs Management Steps * Signoz Cloud - Update intercom snippet and set max width for onboarding flow container to 1440px * Signoz Cloud - Use andD card component for displaying modules * chore: first clean up * Signoz Cloud - Use ONBOARDING and CHAT_SUPPORT FF * Signoz Cloud - Update version check logic and fix minor css issues * fix: feature flag is updated * chore: docusaurus is removed * chore: docusaurus is removed * feat: signoz cloud - fix typecheck errors * feat: signoz cloud - enable chat support based on FF * feat: signoz cloud - fix type errors * feat: signoz cloud - fix type errors * feat: signoz cloud - update webpack config rules --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com>
33 lines
897 B
TypeScript
33 lines
897 B
TypeScript
import getService from 'api/metrics/getService';
|
|
import { AxiosError } from 'axios';
|
|
import { Time } from 'container/TopNav/DateTimeSelection/config';
|
|
import {
|
|
QueryKey,
|
|
useQuery,
|
|
UseQueryOptions,
|
|
UseQueryResult,
|
|
} from 'react-query';
|
|
import { PayloadProps } from 'types/api/metrics/getService';
|
|
import { Tags } from 'types/reducer/trace';
|
|
|
|
export const useQueryService = ({
|
|
minTime,
|
|
maxTime,
|
|
selectedTime,
|
|
selectedTags,
|
|
options,
|
|
}: UseQueryServiceProps): UseQueryResult<PayloadProps, AxiosError> =>
|
|
useQuery<PayloadProps, AxiosError>({
|
|
queryFn: () => getService({ end: maxTime, selectedTags, start: minTime }),
|
|
queryKey: [minTime, maxTime, selectedTime, selectedTags],
|
|
...options,
|
|
});
|
|
|
|
interface UseQueryServiceProps {
|
|
minTime: number;
|
|
maxTime: number;
|
|
selectedTime: Time;
|
|
selectedTags: Tags[];
|
|
options?: UseQueryOptions<PayloadProps, AxiosError, PayloadProps, QueryKey>;
|
|
}
|