InspectMetadataTab.tsx 534 B

1234567891011121314
  1. import React from 'react';
  2. import { DataSourceApi, PanelData } from '@grafana/data';
  3. interface InspectMetadataTabProps {
  4. data: PanelData;
  5. metadataDatasource?: DataSourceApi;
  6. }
  7. export const InspectMetadataTab: React.FC<InspectMetadataTabProps> = ({ data, metadataDatasource }) => {
  8. if (!metadataDatasource || !metadataDatasource.components?.MetadataInspector) {
  9. return <div>No Metadata Inspector</div>;
  10. }
  11. return <metadataDatasource.components.MetadataInspector datasource={metadataDatasource} data={data.series} />;
  12. };