IndexAdvisorPopover.tsx 1.0 KB

12345678910111213141516171819202122232425262728
  1. import { Lightbulb } from 'lucide-react'
  2. import { Button, Popover, PopoverContent, PopoverTrigger } from 'ui'
  3. import { EnableIndexAdvisorButton } from '../QueryPerformance/IndexAdvisor/EnableIndexAdvisorButton'
  4. export const IndexAdvisorPopover = () => {
  5. return (
  6. <Popover modal={false}>
  7. <PopoverTrigger asChild>
  8. <Button type="default" icon={<Lightbulb strokeWidth={1.5} />}>
  9. Index Advisor
  10. </Button>
  11. </PopoverTrigger>
  12. <PopoverContent className="w-80 text-sm" align="end">
  13. <h4 className="flex items-center gap-2">
  14. <Lightbulb size={16} /> Index Advisor
  15. </h4>
  16. <div className="grid gap-2 mt-4 text-foreground-light text-xs">
  17. <p>Index Advisor recommends indexes to improve query performance on this table.</p>
  18. <p>Enable Index Advisor to get recommendations based on your actual query patterns.</p>
  19. <div className="mt-2">
  20. <EnableIndexAdvisorButton />
  21. </div>
  22. </div>
  23. </PopoverContent>
  24. </Popover>
  25. )
  26. }