CacheCTA.tsx 692 B

12345678910111213141516171819202122
  1. import React from 'react';
  2. import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA';
  3. import { Props } from './DataSourceCache';
  4. export const CacheCTA = (props: Props) => {
  5. const { enableDataSourceCache, pageId } = props;
  6. return (
  7. <EmptyListCTA
  8. title="Caching is not enabled for this data source."
  9. buttonTitle="Enable"
  10. buttonIcon="database"
  11. onClick={() => {
  12. enableDataSourceCache(pageId);
  13. }}
  14. proTip="Enabling caching can reduce the amount of redundant requests sent to the data source."
  15. proTipLink="https://grafana.com/docs/grafana/latest/enterprise/query-caching/"
  16. proTipLinkTitle="Learn more"
  17. />
  18. );
  19. };