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

use new graphs on the performance tab #8609

Open
linear bot opened this issue May 17, 2024 · 2 comments
Open

use new graphs on the performance tab #8609

linear bot opened this issue May 17, 2024 · 2 comments
Assignees

Comments

@linear
Copy link

linear bot commented May 17, 2024

image.png

loading state / empty state

use full height

Copy link
Author

linear bot commented May 17, 2024

Copy link

greptile-apps bot commented May 17, 2024

To use the new graphs on the performance tab, follow these steps:

  1. Update Performance Tab Component:

    • Locate the performance tab component file.
    • Import the Graph component from /frontend/src/pages/Graphing/components/Graph.tsx.
  2. Fetch Data:

    • Use the useGetMetricsTimelineQuery hook from /frontend/src/pages/Player/Toolbar/DevToolsWindow/ResourcePage/components/RequestMetrics/RequestMetrics.tsx to fetch the necessary metrics data.
  3. Render Graph:

    <Graph
      title="Performance Metrics"
      viewConfig={viewConfig}
      productType={productType}
      projectId={projectId}
      startDate={startDate}
      endDate={endDate}
      query={query}
      metric={metric}
      functionType={functionType}
      bucketByKey={bucketByKey}
      bucketCount={bucketCount}
      groupByKey={groupByKey}
      limit={limit}
      limitFunctionType={limitFunctionType}
      limitMetric={limitMetric}
      onShare={onShare}
      onExpand={onExpand}
      onEdit={onEdit}
    />
  4. Configure Graph:

    • Define the viewConfig, productType, projectId, startDate, endDate, query, metric, functionType, bucketByKey, bucketCount, groupByKey, limit, limitFunctionType, limitMetric, onShare, onExpand, and onEdit props as needed.
  5. Styling:

    • Ensure the graph is styled appropriately by using the existing styles or adding new styles in the performance tab component's CSS module.

References

/frontend/src/pages/Graphing/GraphingEditor.tsx
/frontend/src/pages/Graphing/Dashboard.tsx
/frontend/src/pages/Graphing/ExpandedGraph.tsx
/frontend/src/pages/Graphing/components/Graph.tsx
/frontend/src/pages/Player/Toolbar/DevToolsWindow/ResourcePage/components/RequestMetrics/RequestMetrics.tsx

Ask Greptile

@Vadman97 Vadman97 self-assigned this May 17, 2024
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

No branches or pull requests

1 participant