mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-25 14:54:26 +08:00
fix: update no logs text and link based on the datasource (#4594)
This commit is contained in:
parent
17de5836bd
commit
f9eddc9b18
@ -161,7 +161,7 @@ function LogsExplorerList({
|
|||||||
!isFetching &&
|
!isFetching &&
|
||||||
!isError &&
|
!isError &&
|
||||||
!isFilterApplied &&
|
!isFilterApplied &&
|
||||||
logs.length === 0 && <NoLogs />}
|
logs.length === 0 && <NoLogs dataSource={DataSource.LOGS} />}
|
||||||
|
|
||||||
{!isLoading &&
|
{!isLoading &&
|
||||||
!isFetching &&
|
!isFetching &&
|
||||||
|
@ -611,6 +611,7 @@ function LogsExplorerViews({
|
|||||||
data={data}
|
data={data}
|
||||||
isError={isError}
|
isError={isError}
|
||||||
isFilterApplied={!isEmpty(listQuery?.filters.items)}
|
isFilterApplied={!isEmpty(listQuery?.filters.items)}
|
||||||
|
dataSource={DataSource.LOGS}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -2,25 +2,31 @@ import './NoLogs.styles.scss';
|
|||||||
|
|
||||||
import { Typography } from 'antd';
|
import { Typography } from 'antd';
|
||||||
import { ArrowUpRight } from 'lucide-react';
|
import { ArrowUpRight } from 'lucide-react';
|
||||||
|
import { DataSource } from 'types/common/queryBuilder';
|
||||||
|
|
||||||
export default function NoLogs(): JSX.Element {
|
export default function NoLogs({
|
||||||
|
dataSource,
|
||||||
|
}: {
|
||||||
|
dataSource: DataSource;
|
||||||
|
}): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className="no-logs-container">
|
<div className="no-logs-container">
|
||||||
<div className="no-logs-container-content">
|
<div className="no-logs-container-content">
|
||||||
<img className="eyes-emoji" src="/Images/eyesEmoji.svg" alt="eyes emoji" />
|
<img className="eyes-emoji" src="/Images/eyesEmoji.svg" alt="eyes emoji" />
|
||||||
<Typography className="no-logs-text">
|
<Typography className="no-logs-text">
|
||||||
No logs yet.
|
No {dataSource} yet.
|
||||||
<span className="sub-text">
|
<span className="sub-text">
|
||||||
When we receive logs, they would show up here
|
{' '}
|
||||||
|
When we receive {dataSource}, they would show up here
|
||||||
</span>
|
</span>
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography.Link
|
<Typography.Link
|
||||||
className="send-logs-link"
|
className="send-logs-link"
|
||||||
href="https://signoz.io/docs/userguide/logs/"
|
href={`https://signoz.io/docs/userguide/${dataSource}/`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Sending Logs to SigNoz <ArrowUpRight size={16} />
|
Sending {dataSource} to SigNoz <ArrowUpRight size={16} />
|
||||||
</Typography.Link>
|
</Typography.Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,6 +14,7 @@ import { useSelector } from 'react-redux';
|
|||||||
import { AppState } from 'store/reducers';
|
import { AppState } from 'store/reducers';
|
||||||
import { SuccessResponse } from 'types/api';
|
import { SuccessResponse } from 'types/api';
|
||||||
import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';
|
import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';
|
||||||
|
import { DataSource } from 'types/common/queryBuilder';
|
||||||
import { GlobalReducer } from 'types/reducer/globalTime';
|
import { GlobalReducer } from 'types/reducer/globalTime';
|
||||||
import { getTimeRange } from 'utils/getTimeRange';
|
import { getTimeRange } from 'utils/getTimeRange';
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ function TimeSeriesView({
|
|||||||
isError,
|
isError,
|
||||||
yAxisUnit,
|
yAxisUnit,
|
||||||
isFilterApplied,
|
isFilterApplied,
|
||||||
|
dataSource,
|
||||||
}: TimeSeriesViewProps): JSX.Element {
|
}: TimeSeriesViewProps): JSX.Element {
|
||||||
const graphRef = useRef<HTMLDivElement>(null);
|
const graphRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
@ -93,7 +95,7 @@ function TimeSeriesView({
|
|||||||
chartData[0]?.length === 0 &&
|
chartData[0]?.length === 0 &&
|
||||||
!isLoading &&
|
!isLoading &&
|
||||||
!isError &&
|
!isError &&
|
||||||
!isFilterApplied && <NoLogs />}
|
!isFilterApplied && <NoLogs dataSource={dataSource} />}
|
||||||
|
|
||||||
{!isLoading &&
|
{!isLoading &&
|
||||||
!isError &&
|
!isError &&
|
||||||
@ -111,6 +113,7 @@ interface TimeSeriesViewProps {
|
|||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
isError: boolean;
|
isError: boolean;
|
||||||
isFilterApplied: boolean;
|
isFilterApplied: boolean;
|
||||||
|
dataSource: DataSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeSeriesView.defaultProps = {
|
TimeSeriesView.defaultProps = {
|
||||||
|
@ -74,6 +74,7 @@ function TimeSeriesViewContainer({
|
|||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
data={responseData}
|
data={responseData}
|
||||||
yAxisUnit={isValidToConvertToMs ? 'ms' : 'short'}
|
yAxisUnit={isValidToConvertToMs ? 'ms' : 'short'}
|
||||||
|
dataSource={dataSource}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user