The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/features/datasources/components/DataSourcePluginConfigPage.tsx

23 lines
576 B

import React from 'react';
import { GenericDataSourcePlugin } from '../types';
export type Props = {
plugin?: GenericDataSourcePlugin | null;
pageId: string;
};
export function DataSourcePluginConfigPage({ plugin, pageId }: Props) {
if (!plugin || !plugin.configPages) {
return null;
}
const page = plugin.configPages.find(({ id }) => id === pageId);
if (page) {
// TODO: Investigate if any plugins are using this? We should change this interface
return <page.body plugin={plugin} query={{}} />;
}
return <div>Page not found: {page}</div>;
}