UpgradePage.tsx 763 B

1234567891011121314151617181920212223
  1. import React, { useEffect } from 'react';
  2. import Page from 'app/core/components/Page/Page';
  3. import { UpgradeBox } from 'app/core/components/Upgrade/UpgradeBox';
  4. import { connector, DataSourceCacheUpgradeContent, Props } from './DataSourceCache';
  5. export const DataSourceUpgradePage = ({ navModel, pageId, loadDataSource, loadDataSourceMeta }: Props) => {
  6. useEffect(() => {
  7. loadDataSource(pageId).then(loadDataSourceMeta);
  8. }, [pageId, loadDataSourceMeta, loadDataSource]);
  9. return (
  10. <Page navModel={navModel}>
  11. <Page.Contents>
  12. <UpgradeBox featureName={'query caching'} featureId={'query-caching'} />
  13. <DataSourceCacheUpgradeContent />
  14. </Page.Contents>
  15. </Page>
  16. );
  17. };
  18. export default connector(DataSourceUpgradePage);