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: added table column and row logic for the new api response structure for producer overview #6433

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SagarRajput-7
Copy link
Contributor

@SagarRajput-7 SagarRajput-7 commented Nov 12, 2024

Summary

We have a new API response structure, due to which need to change the column and table data handling -

slack thread for reference - https://signoz-team.slack.com/archives/C070V9S041L/p1731413223737439

Related Issues / PR's

Screenshots

Screen.Recording.2024-11-13.at.5.14.28.AM.mov

Affected Areas and Manually Tested Areas

  • Tested producer overview table under Producer Latency View

Important

Add logic for handling new API response structure for producer latency overview in messaging queues.

  • New Functionality:
    • Add getColumnsForProducerLatencyOverview and getTableDataForProducerLatencyOverview in MQTableUtils.tsx for new API response structure.
    • Introduce TopicThroughputProducerOverviewResponse interface in MQTableUtils.tsx.
  • Integration:
    • Update MessagingQueuesTable in MQTables.tsx to use new utility functions for producer latency overview.
    • Modify getTopicThroughputOverview in getTopicThroughputOverview.ts to return TopicThroughputProducerOverviewResponse.
  • Misc:
    • Remove evalTime from MessagingQueueOverview.tsx.

This description was created by Ellipsis for ff7f1a8. It will automatically update as commits are pushed.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added docs required enhancement New feature or request labels Nov 12, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 87fe6cd in 1 minute and 16 seconds

More details
  • Looked at 209 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/src/pages/MessagingQueues/MQDetails/MQTables/MQTables.tsx:36
  • Draft comment:
    Typo in function name getColumnsForProduderLatencyOverview. It should be getColumnsForProducerLatencyOverview. This typo is also present in other files where this function is used.
  • Reason this comment was not posted:
    Marked as duplicate.
2. frontend/src/pages/MessagingQueues/MQDetails/MQTables/MQTables.tsx:197
  • Draft comment:
    Typo in function name getColumnsForProduderLatencyOverview. It should be getColumnsForProducerLatencyOverview. This typo is also present in other files where this function is used.
  • Reason this comment was not posted:
    Marked as duplicate.
3. frontend/src/pages/MessagingQueues/MQDetails/MQTables/getTopicThroughputOverview.ts:8
  • Draft comment:
    Typo in function name getColumnsForProduderLatencyOverview. It should be getColumnsForProducerLatencyOverview. This typo is also present in other files where this function is used.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_vdZRYxKuNkKIW39E


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 531becc in 29 seconds

More details
  • Looked at 36 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_zPS8AVigd4SULVQJ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

};
}

export const getColumnsForProducerLatencyOverview = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name was misspelled as getColumnsForProduderLatencyOverview. It should be corrected to getColumnsForProducerLatencyOverview for consistency and to avoid potential issues. This issue is also present in MQTables.tsx.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@vikrantgupta25 vikrantgupta25 changed the title feat: added table column and row logic for the new api response structure for prodcure overview feat: added table column and row logic for the new api response structure for producer overview Nov 15, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@@ -126,7 +131,13 @@ function MessagingQueuesTable({
tableApi: (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is tableApi getting passed on like this ?

) {
setColumns(
getColumnsForProducerLatencyOverview(
(data?.payload as TopicThroughputProducerOverviewResponse['payload'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why as TopicThroughputProducerOverviewResponse['payload']?

setColumns(
getColumnsForProducerLatencyOverview(
(data?.payload as TopicThroughputProducerOverviewResponse['payload'])
.result[0].list,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will result[0].list always be present ?

Copy link
Collaborator

@vikrantgupta25 vikrantgupta25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i remember we had a discussion to move these to api folder instead of pages ?

SuccessResponse<MessagingQueuesPayloadProps['payload']> | ErrorResponse
| SuccessResponse<
(
| MessagingQueuesPayloadProps
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is ideally not a good structure to expect different types of responses based on different conditions.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on ff7f1a8 in 13 seconds

More details
  • Looked at 36 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/pages/MessagingQueues/MQDetails/MQTables/MQTableUtils.tsx:27
  • Draft comment:
    Typo in function name corrected from getColumnsForProduderLatencyOverview to getColumnsForProducerLatencyOverview. Ensure all references are updated accordingly.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The function name is misspelled in the original code and has been corrected in the PR. This is a straightforward fix.

Workflow ID: wflow_LbLmJo7hPUiGwWbg


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Dec 9, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs not required enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants