-
- Downloads
Feature | More Granular Caching Controls (Frontend) (#17802)
* Rename dashboard details edit action * Use render props at dashboard edit form * Add enterprise caching plugin * Move dashboard entity forms to own file * Make FormField's margin configurable * Pass custom style to FormField * Use null as a default cacheTTLFormField value * Add tests for DashboardDetailsModal * Add cache_ttl field to DashboardDetailsModal * Add tests for CreateDashboardModal * Test cache_ttl is invisible when creating a dashboard * Remove not used mocks * Add tests for EditQuestionInfoModal * Move question entity forms to own file * Add cache_ttl field to EditQuestionInfoModal * Test cache_ttl is invisible when creating a question * Extract CacheTTLField component * Don't show cache field if caching is disabled * Fix typo * Update cache_ttl field look * Revert "Pass custom style to FormField" This reverts commit 3944ca8ff1dcad478f0f1c3a1973f454447c88c1. * Revert "Make FormField's margin configurable" This reverts commit ca7dc434532038da736012147f6889e6cc01ec11. * Fix CacheTTLField width * Add descriptionPosition prop to FormField * Add DatabaseCacheTTLField * Show cache_ttl field on database form * Use 24h as a default database cache TTL field value * Fallback to database cache_ttl in question form * Remove console.log * Fix request body assertion for CreateDashboardModal * Fix request body assertions for EditQuestionModal * Fix request body assertions for DashboardDetailsModal * Fix cache_ttl not included in `PUT /api/card/:id` * Use simple for for EditQuestionInfoModal * Refactor how unit tests mock caching settings * Add dashboard caching EE test * Add question caching EE test * Add caching e2e test for database add/edit * Remove debug stuff * Add error state to CacheTTLField * Fix DB cache field reverts to default value on 0 * Validate cache_ttl field * Add getQuestionsImplicitCacheTTL helper * Remove redundant tests * Remove not used import * Nomalize `cache_ttl: 0` to null * Fix duplicated card update request * Add QuestionCacheTTLField component * Add test-id to Radio's option names * Use a new cache TTL field for questions * Check setting cache_ttl to null in E2E tests * Style question cache TTL field * Add dashboard ID to query request body * Extend `duration` formatting helper to support hours * Fix default caching duration display * Fix tests * Fix old dashboard edit action title * Fix missing translations * Add prop types to EditQuestionInfoModal * Remove `test.todo` * Simplify `getQuestionsImplicitCacheTTL` * Use `space` style helper * Add `key` prop to `jt` * Move time coverting utils to lib/time * Hide caching field label if just showing the input * Fix unit tests * Fix flacky E2E test * Add hover style for "More options" control * Fix missing translation * Use placeholder for cache inputs * Fix E2E tests to use cache field's placeholder * Feature flag for caching UI
Showing
- enterprise/frontend/src/metabase-enterprise/caching/components/CacheTTLField/CacheTTLField.jsx 41 additions, 0 deletions...rprise/caching/components/CacheTTLField/CacheTTLField.jsx
- enterprise/frontend/src/metabase-enterprise/caching/components/CacheTTLField/CacheTTLField.styled.js 33 additions, 0 deletions.../caching/components/CacheTTLField/CacheTTLField.styled.js
- enterprise/frontend/src/metabase-enterprise/caching/components/CacheTTLField/CacheTTLField.unit.spec.js 64 additions, 0 deletions...ching/components/CacheTTLField/CacheTTLField.unit.spec.js
- enterprise/frontend/src/metabase-enterprise/caching/components/CacheTTLField/index.js 1 addition, 0 deletions...base-enterprise/caching/components/CacheTTLField/index.js
- enterprise/frontend/src/metabase-enterprise/caching/components/DatabaseCacheTTLField/DatabaseCacheTTLField.jsx 57 additions, 0 deletions...omponents/DatabaseCacheTTLField/DatabaseCacheTTLField.jsx
- enterprise/frontend/src/metabase-enterprise/caching/components/DatabaseCacheTTLField/DatabaseCacheTTLField.styled.jsx 12 additions, 0 deletions...ts/DatabaseCacheTTLField/DatabaseCacheTTLField.styled.jsx
- enterprise/frontend/src/metabase-enterprise/caching/components/DatabaseCacheTTLField/DatabaseCacheTTLField.unit.spec.js 72 additions, 0 deletions.../DatabaseCacheTTLField/DatabaseCacheTTLField.unit.spec.js
- enterprise/frontend/src/metabase-enterprise/caching/components/DatabaseCacheTTLField/index.js 1 addition, 0 deletions...erprise/caching/components/DatabaseCacheTTLField/index.js
- enterprise/frontend/src/metabase-enterprise/caching/components/QuestionCacheTTLField/QuestionCacheTTLField.jsx 75 additions, 0 deletions...omponents/QuestionCacheTTLField/QuestionCacheTTLField.jsx
- enterprise/frontend/src/metabase-enterprise/caching/components/QuestionCacheTTLField/QuestionCacheTTLField.styled.jsx 21 additions, 0 deletions...ts/QuestionCacheTTLField/QuestionCacheTTLField.styled.jsx
- enterprise/frontend/src/metabase-enterprise/caching/components/QuestionCacheTTLField/QuestionCacheTTLField.unit.spec.js 149 additions, 0 deletions.../QuestionCacheTTLField/QuestionCacheTTLField.unit.spec.js
- enterprise/frontend/src/metabase-enterprise/caching/components/QuestionCacheTTLField/index.js 1 addition, 0 deletions...erprise/caching/components/QuestionCacheTTLField/index.js
- enterprise/frontend/src/metabase-enterprise/caching/index.js 51 additions, 0 deletionsenterprise/frontend/src/metabase-enterprise/caching/index.js
- enterprise/frontend/src/metabase-enterprise/caching/utils.js 56 additions, 0 deletionsenterprise/frontend/src/metabase-enterprise/caching/utils.js
- enterprise/frontend/src/metabase-enterprise/caching/utils.unit.spec.js 94 additions, 0 deletions...ontend/src/metabase-enterprise/caching/utils.unit.spec.js
- enterprise/frontend/src/metabase-enterprise/plugins.js 1 addition, 0 deletionsenterprise/frontend/src/metabase-enterprise/plugins.js
- frontend/src/metabase/admin/databases/containers/DatabaseEditApp.unit.spec.js 105 additions, 0 deletions...e/admin/databases/containers/DatabaseEditApp.unit.spec.js
- frontend/src/metabase/components/CreateDashboardModal.jsx 1 addition, 0 deletionsfrontend/src/metabase/components/CreateDashboardModal.jsx
- frontend/src/metabase/components/CreateDashboardModal.unit.spec.js 170 additions, 0 deletions...src/metabase/components/CreateDashboardModal.unit.spec.js
- frontend/src/metabase/components/Radio.jsx 1 addition, 1 deletionfrontend/src/metabase/components/Radio.jsx
Loading
Please register or sign in to comment