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

[#noissue] fix servermap numaric display #10931

Merged

Conversation

BillionaireDY
Copy link
Contributor

  • display
    • node instance count
    • unit of average response time (ms)

Copy link
Contributor

@binDongKim binDongKim left a comment

Choose a reason for hiding this comment

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

  • Change transactionInfoStatus svg string variable name
  • Handle when there's no edge

const { transactionInfo } = nodeData;
const transactionStatus = getTransactionStatusSVGCircle(transactionInfo, !transactionInfo);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const transactionStatus = getTransactionStatusSVGCircle(transactionInfo, !transactionInfo);
const transactionStatusSVGString = getTransactionStatusSVGCircle(transactionInfo, !transactionInfo);

return (
'data:image/svg+xml;charset=utf-8,' +
encodeURIComponent(`
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" xmlns:xlink="http://www.w3.org/1999/xlink">
${getTransactionStatusSVGCircle(transactionInfo, !transactionInfo)}
${renderNode ? renderNode(nodeData, transactionStatus) : transactionStatus}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
${renderNode ? renderNode(nodeData, transactionStatus) : transactionStatus}
${renderNode ? renderNode(nodeData, transactionStatusSVGString) : transactionStatusSVGString}

renderEdgeLabel={(edge: MergedEdge) => {
if (edge?.transactionInfo?.totalCount) {
return `${addCommas(edge?.transactionInfo?.totalCount)}${edge.transactionInfo?.avgResponseTime ? ` (${edge.transactionInfo.avgResponseTime} ms)` : ''}`;
} else if (edge.edges) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else if (edge.edges) {
} else if (edge?.edges) {

@binDongKim binDongKim merged commit 80e6969 into pinpoint-apm:master Apr 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants