Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update no logs text and link based on the data source #4594

Merged
merged 1 commit into from
Feb 26, 2024
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/container/LogsExplorerList/index.tsx
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ function LogsExplorerList({
!isFetching &&
!isError &&
!isFilterApplied &&
logs.length === 0 && <NoLogs />}
logs.length === 0 && <NoLogs dataSource={DataSource.LOGS} />}

{!isLoading &&
!isFetching &&
1 change: 1 addition & 0 deletions frontend/src/container/LogsExplorerViews/index.tsx
Original file line number Diff line number Diff line change
@@ -611,6 +611,7 @@ function LogsExplorerViews({
data={data}
isError={isError}
isFilterApplied={!isEmpty(listQuery?.filters.items)}
dataSource={DataSource.LOGS}
/>
)}

16 changes: 11 additions & 5 deletions frontend/src/container/NoLogs/NoLogs.tsx
Original file line number Diff line number Diff line change
@@ -2,25 +2,31 @@ import './NoLogs.styles.scss';

import { Typography } from 'antd';
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 (
<div className="no-logs-container">
<div className="no-logs-container-content">
<img className="eyes-emoji" src="/Images/eyesEmoji.svg" alt="eyes emoji" />
<Typography className="no-logs-text">
No logs yet.
No {dataSource} yet.
<span className="sub-text">
When we receive logs, they would show up here
{' '}
When we receive {dataSource}, they would show up here
</span>
</Typography>

<Typography.Link
className="send-logs-link"
href="https://signoz.io/docs/userguide/logs/"
href={`https://signoz.io/docs/userguide/${dataSource}/`}
target="_blank"
>
Sending Logs to SigNoz <ArrowUpRight size={16} />
Sending {dataSource} to SigNoz <ArrowUpRight size={16} />
</Typography.Link>
</div>
</div>
5 changes: 4 additions & 1 deletion frontend/src/container/TimeSeriesView/TimeSeriesView.tsx
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ import { useSelector } from 'react-redux';
import { AppState } from 'store/reducers';
import { SuccessResponse } from 'types/api';
import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';
import { DataSource } from 'types/common/queryBuilder';
import { GlobalReducer } from 'types/reducer/globalTime';
import { getTimeRange } from 'utils/getTimeRange';

@@ -25,6 +26,7 @@ function TimeSeriesView({
isError,
yAxisUnit,
isFilterApplied,
dataSource,
}: TimeSeriesViewProps): JSX.Element {
const graphRef = useRef<HTMLDivElement>(null);

@@ -93,7 +95,7 @@ function TimeSeriesView({
chartData[0]?.length === 0 &&
!isLoading &&
!isError &&
!isFilterApplied && <NoLogs />}
!isFilterApplied && <NoLogs dataSource={dataSource} />}

{!isLoading &&
!isError &&
@@ -111,6 +113,7 @@ interface TimeSeriesViewProps {
isLoading: boolean;
isError: boolean;
isFilterApplied: boolean;
dataSource: DataSource;
}

TimeSeriesView.defaultProps = {
1 change: 1 addition & 0 deletions frontend/src/container/TimeSeriesView/index.tsx
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ function TimeSeriesViewContainer({
isLoading={isLoading}
data={responseData}
yAxisUnit={isValidToConvertToMs ? 'ms' : 'short'}
dataSource={dataSource}
/>
);
}