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/core/components/AppChrome/AppChromeUpdate.tsx

23 lines
651 B

import React, { useEffect } from 'react';
import { NavModelItem } from '@grafana/data';
import { appChromeService } from './AppChromeService';
export interface AppChromeUpdateProps {
pageNav?: NavModelItem;
actions?: React.ReactNode;
}
/**
* This needs to be moved to @grafana/ui or runtime.
* This is the way core pages and plugins update the breadcrumbs and page toolbar actions
*/
export const AppChromeUpdate = React.memo<AppChromeUpdateProps>(({ pageNav, actions }: AppChromeUpdateProps) => {
useEffect(() => {
appChromeService.update({ pageNav, actions });
});
return null;
});
AppChromeUpdate.displayName = 'TopNavUpdate';