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

feat: Kafka UI feedbacks #5801

Merged
merged 3 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions frontend/src/container/SideNav/NavItem/NavItem.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
text-overflow: ellipsis;
}
}

.beta-tag {
padding-right: 0;
}
SagarRajput-7 marked this conversation as resolved.
Show resolved Hide resolved
}

.lightMode {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/container/SideNav/NavItem/NavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function NavItem({
onClick={(event): void => onClick(event)}
>
<div className="nav-item-active-marker" />
<div className="nav-item-data">
<div className={cx('nav-item-data', isBeta ? 'beta-tag' : '')}>
<div className="nav-item-icon">{icon}</div>

<div className="nav-item-label">{label}</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/container/SideNav/menuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const menuItems: SidebarItem[] = [
key: ROUTES.MESSAGING_QUEUES,
label: 'Messaging Queues',
icon: <ListMinus size={16} />,
isBeta: true,
},
{
key: ROUTES.LIST_ALL_ALERT,
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/pages/MessagingQueues/MQCommon/MQCommon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ import { Info } from 'lucide-react';
export function ComingSoon(): JSX.Element {
return (
<Tooltip
title="Contact us at cloud-support@signoz.io for more details."
title={
<div>
Join our Slack community for more details:{' '}
<a
href="https://signoz.io/slack"
rel="noopener noreferrer"
target="_blank"
onClick={(e): void => e.stopPropagation()}
>
SigNoz Community
</a>
</div>
}
placement="top"
overlayClassName="tooltip-overlay"
>
Expand Down
38 changes: 25 additions & 13 deletions frontend/src/pages/MessagingQueues/MQDetailPage/MQDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@ import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';
import { ListMinus } from 'lucide-react';
import { useHistory } from 'react-router-dom';

import { MessagingQueuesViewType } from '../MessagingQueuesUtils';
import { SelectLabelWithComingSoon } from '../MQCommon/MQCommon';
import MessagingQueuesDetails from '../MQDetails/MQDetails';
import MessagingQueuesConfigOptions from '../MQGraph/MQConfigOptions';
import MessagingQueuesGraph from '../MQGraph/MQGraph';

enum MessagingQueueViewType {
consumerLag = 'consumerLag',
avgPartitionLatency = 'avgPartitionLatency',
avgProducerLatency = 'avgProducerLatency',
}

function MQDetailPage(): JSX.Element {
const history = useHistory();

Expand All @@ -36,21 +31,38 @@ function MQDetailPage(): JSX.Element {
Kafka / views /
<Select
className="messaging-queue-options"
defaultValue="consumerLag"
defaultValue={MessagingQueuesViewType.consumerLag.value}
popupClassName="messaging-queue-options-popup"
options={[
{
label: 'Consumer Lag view',
value: MessagingQueueViewType.consumerLag,
label: MessagingQueuesViewType.consumerLag.label,
value: MessagingQueuesViewType.consumerLag.value,
},
{
label: (
<SelectLabelWithComingSoon
label={MessagingQueuesViewType.partitionLatency.label}
/>
),
value: MessagingQueuesViewType.partitionLatency.value,
disabled: true,
},
{
label: <SelectLabelWithComingSoon label="Avg. Partition latency" />,
value: MessagingQueueViewType.avgPartitionLatency,
label: (
<SelectLabelWithComingSoon
label={MessagingQueuesViewType.producerLatency.label}
/>
),
value: MessagingQueuesViewType.producerLatency.value,
disabled: true,
},
{
label: <SelectLabelWithComingSoon label="Avg. Producer latency" />,
value: MessagingQueueViewType.avgProducerLatency,
label: (
<SelectLabelWithComingSoon
label={MessagingQueuesViewType.consumerLatency.label}
/>
),
value: MessagingQueuesViewType.consumerLatency.value,
disabled: true,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
}

.messaging-queue-options-popup {
width: 260px !important;
width: 264px !important;
}

.messaging-overview {
Expand Down
13 changes: 8 additions & 5 deletions frontend/src/pages/MessagingQueues/MessagingQueues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { Calendar, ListMinus } from 'lucide-react';
import { useHistory } from 'react-router-dom';
import { isCloudUser } from 'utils/app';

import { KAFKA_SETUP_DOC_LINK } from './MessagingQueuesUtils';
import {
KAFKA_SETUP_DOC_LINK,
MessagingQueuesViewType,
} from './MessagingQueuesUtils';
import { ComingSoon } from './MQCommon/MQCommon';

function MessagingQueues(): JSX.Element {
Expand Down Expand Up @@ -114,7 +117,7 @@ function MessagingQueues(): JSX.Element {
<div className="summary-section">
<div className="summary-card">
<div className="summary-title">
<p>Consumer Lag</p>
<p>{MessagingQueuesViewType.consumerLag.label}</p>
<div className="time-value">
<Calendar size={14} color={Color.BG_SLATE_200} />
<p className="time-value">1D</p>
Expand All @@ -128,7 +131,7 @@ function MessagingQueues(): JSX.Element {
</div>
<div className="summary-card coming-soon-card">
<div className="summary-title">
<p>Avg. Partition latency</p>
<p>{MessagingQueuesViewType.partitionLatency.label}</p>
<div className="time-value">
<Calendar size={14} color={Color.BG_SLATE_200} />
<p className="time-value">1D</p>
Expand All @@ -140,7 +143,7 @@ function MessagingQueues(): JSX.Element {
</div>
<div className="summary-card coming-soon-card">
<div className="summary-title">
<p>Avg. Partition latency</p>
<p>{MessagingQueuesViewType.producerLatency.label}</p>
<div className="time-value">
<Calendar size={14} color={Color.BG_SLATE_200} />
<p className="time-value">1D</p>
Expand All @@ -152,7 +155,7 @@ function MessagingQueues(): JSX.Element {
</div>
<div className="summary-card coming-soon-card">
<div className="summary-title">
<p>Avg. Partition latency</p>
<p>{MessagingQueuesViewType.consumerLatency.label}</p>
<div className="time-value">
<Calendar size={14} color={Color.BG_SLATE_200} />
<p className="time-value">1D</p>
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/pages/MessagingQueues/MessagingQueuesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,22 @@ export function setSelectedTimelineQuery(
const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;
history.replace(generatedUrl);
}

export const MessagingQueuesViewType = {
consumerLag: {
label: 'Consumer Lag view',
value: 'consumerLag',
},
partitionLatency: {
label: 'Partition Latency view',
value: 'partitionLatency',
},
producerLatency: {
label: 'Producer Latency view',
value: 'producerLatency',
},
consumerLatency: {
label: 'Consumer latency view',
value: 'consumerLatency',
},
};
Loading