import React from 'react'; import { Field, Switch, Input, Button, HorizontalGroup, Tooltip, Icon, Label } from '@grafana/ui'; import { CacheSettingsDisable } from './CacheSettingsDisable'; import { Props } from './DataSourceCache'; interface CacheSettingsProps { loading: boolean; setUseDefaultTTL: (useDefaultTTL: boolean) => void; setTtlQueriesMs: (ttl: number) => void; setTtlResourcesMs: (ttl: number) => void; } export const CacheSettingsForm = (props: Props & CacheSettingsProps) => { const { updateDataSourceCache, pageId, useDefaultTTL, setUseDefaultTTL, defaultTTLMs, ttlQueriesMs, setTtlQueriesMs, ttlResourcesMs, setTtlResourcesMs, loading, enabled, dataSourceID, dataSourceUID, } = props; return (