grafana / explore-profiles

Explore Profiles is a native Grafana application designed to integrate seamlessly with Pyroscope, the open-source continuous profiling platform, providing a smooth, query-less experience for browsing and analyzing profiling data.
GNU Affero General Public License v3.0
18 stars 1 forks source link

[bug] Disable "Optimize code" button when there's no code to optimize #203

Closed grafakus closed 3 weeks ago

grafakus commented 4 weeks ago

Bug description

The "Optimize code" button in the "Function details" panel is not disabled when there's no code.

Steps to reproduce

  1. Go to e.g. https://play.grafana.org/a/grafana-pyroscope-app/profiles-explorer?searchText=&panelType=time-series&layout=grid&hideNoData=off&explorationType=flame-graph&var-serviceName=pyroscope-rideshare-go&var-profileMetricId=process_cpu:cpu:nanoseconds:cpu:nanoseconds&var-dataSource=grafanacloud-profiles&var-groupBy=&maxNodes=16384&var-filters=&var-filtersBaseline=&var-filtersComparison=
  2. Click on a node on the flame graph (e.g. a node containing "FindNearestVehicle")
  3. In the contextual menu, click on "Function details"
  4. Click on "Optimize Code"

Actual behaviour

The button is enabled:

Image

Expected behaviour

The button should be disabled