Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jan 17, 2023
    • Ryan Laurie's avatar
      Refactor PivotTable Visualization into a functional typescript component (#27651) · 7b81f1d0
      Ryan Laurie authored
      * add PivotTable unit tests
      
      * obey the linter
      
      * measure leftHeader cell content
      
      * test cell data width detection
      
      * extract static properties
      
      * convert to functional component
      
      * cleanup refs
      
      * extract cellRenderers
      
      * extract size and position getter functions
      
      * replace item measurement
      
      * convert rowToggleIcon to typescript
      
      * convert PivotTable to typescript
      
      * remove unused hasCustomColors
      
      * update tests to typescript
      
      * fix rebase
      7b81f1d0
    • Cal Herries's avatar
      Fix for #6884: Update dashboard save to create only one revision when you add a card (#27708) · 6ffd3c1b
      Cal Herries authored
      * Update dashboard save to save all dashcard data on create, not update
      
      * Remove repro e2e test
      
      * Add e2e test
      
      * Add series to POST request, missing by mistake
      
      * Formatting
      
      * Rename DashboardApi methods for consistent names and cases
      6ffd3c1b
    • Alexander Polyankin's avatar
    • Anton Kulyk's avatar
      Add actions tab to model detail page (#27657) · 4460a4b1
      Anton Kulyk authored
      * Add Fira Code
      
      * Add basic actions tab
      
      * Add "New action" flow
      
      * Fix actions tab width
      
      * Fix code doesn't show newlines
      
      * Add action editing flow
      
      * Fix console error
      
      * Use Monaco for code snippet
      
      * Add an empty state
      
      * List implicit actions
      
      * Make it possible to add implicit actions
      
      * Hide actions tab if actions are turned off
      
      * Handle read-only permissions
      
      * Fix loader
      
      * Sort actions
      
      * Add server mocks for action endpoints
      
      * Add `createMockImplicitCUDActions` helper
      
      * Add tests for the actions tab
      
      * Add E2E test for action create-read-update flows
      
      * Clean up
      
      * Move e2e test to models for now
      
      * Fix `EmptyState` usage
      
      * Fix action sorting
      
      * Avoid boolean casting
      
      * Ensure the page explicitly loads database
      
      * Use existing color for action query card
      
      * Use `space` function
      
      * Fix length check
      4460a4b1
    • Nick Fitzpatrick's avatar
      adding onlyText button variant (#27720) · 01b4b80e
      Nick Fitzpatrick authored
      * adding onlyText button variant
      
      * PR feedback
      01b4b80e
    • Anton Kulyk's avatar
      Clean up `PublicApp` component and add tests (#27724) · 434e7868
      Anton Kulyk authored
      * Move `PublicApp` to its own directory
      
      * Fix `renderWithProviders` for public environment
      
      * Clean up `PublicApp` and add tests
      
      * Extend coverage
      
      * Wasn't planning to commit this yet
      
      * Swap condition
      434e7868
    • metamben's avatar
      Enable connecting to Oracle DBs using SSL cert auth (#27709) · 61395781
      metamben authored
      Also point out that PKCS12 (.p12) keystores are now supported.
      61395781
  2. Jan 16, 2023
  3. Jan 13, 2023
    • Case Nelson's avatar
      FieldValues skipping but not updating last used at (#27655) · 33d54e53
      Case Nelson authored
      * FieldValues skipping but not updating last used at
      
      Related to #26863
      
      When fieldvalues synching was being skipped, the
      `get-or-create-full-field-values!` call was erroneously forgetting to
      update the `last_used_at` time; the time was only being updated if new
      field values came in since the last sync.
      
      * Add test for inactive field values
      
      * Only update last_used_at when there's an existing fieldvalues
      33d54e53
    • metamben's avatar
      Support nested queries for MongoDB (#27615) · 76db79d9
      metamben authored
      76db79d9
    • Braden Shepherdson's avatar
      [metabase-lib] Number and currency formatting polish (#27616) · e7e422cf
      Braden Shepherdson authored
      - Use currency-specific decimals count (eg. 0 for JPY, 8 for BTC)
      - Use plural currency names in Java, matching JS
          - previously: singular proper name "7.23 US Dollar"
          - now: plural prose "7.23 US dollars"
      - "Small numbers" hack to treat min/max fraction digits as significant
        digits now applies to percentages under 1%, as well as the original
        |n| < 1
      e7e422cf
    • Mark Bastian's avatar
      Fixed regex for latitude name type matching (#27614) · f395e2f2
      Mark Bastian authored
      * Fixed regex for latitude name type matching
      
      * Grouping regexes by lon/lat
      f395e2f2
    • Braden Shepherdson's avatar
      [metabase-lib] Port date and time parsing and formatting to CLJC (#27551) · 335d161f
      Braden Shepherdson authored
      This adds a cross-platform date/time formatting library in CLJC, with
      (nearly) identical output in both JVM and JS environments.
      
      The only known difference is week numbers.
      
      CLJS (through Moment.js) has ordinal numbers, and renders the week
      number as "34th". Neither the JVM nor Clojure has a handy library for
      this (I'm sure it's out there somewhere, but it seems like a silly
      dep to add) so it renders week numbers as simply "34".
      
      Both platforms have date formatters that use pattern strings (eg.
      `"YYYY-MM-dd"`) to turn date/time objects into strings. There's a strong
      resemblance in how these work and what letters stand for what parts of
      the date and time, but they are far from identical.
      
      Rather than try to hackily convert one set of strings to another with
      regexes or other manipulations, this PR defines a set of names for
      fragments of dates (eg. `:year`, `:day-of-week-full`, `:hour-24-dd`)
      and includes functions to transform a list of these keys into a
      platform-specific format function.
      
      This is portable and transparent, and can be written in Clojure or
      JS code:
      
      ```clj
      [:year "-" :month-dd "-" :day-of-month-dd]   ; 2022-04-08
      [:month-full " " :day-of-month-d ", " :year] ; April 8, 2022
      [:hour-12-dd ":" :minute-dd " " :am-pm]      ; 7:52 AM
      ```
      
      ```js
      [":year", "-", ":month-dd", "-", ":day-of-month-dd"]   ; 2022-04-08
      [":month-full", " ", ":day-of-month-d", ", ", ":year"] ; April 8, 2022
      [":hour-12-dd", ":", ":minute-dd", " ", ":am-pm"]      ; 7:52 AM
      ```
      
      Note that the original code allowed an unrecognized `:date-style` string
      to be used directly as the formatting string. With the move to
      formatting data structures that no longer works. Instead there is a
      fixed map of format strings to the above data structures, that contains
      all the currently used `:date-style` inputs.
      
      If some caller needs a new format someday, we can either: (a) add the
      style to the map; or (b) pass the data structure form directly to the
      `:date-format` option, which if provided is used as the format.
      
      It's tempting to go to all the call sites and replace these `:date-style`
      strings with the new format structures. However, the strings are still
      embedded in the `:visualization_settings` in user appDBs, so we still
      need to recognize them.
      
      Most of the existing functions in the TS library have the same API.
      
      The set of allowed `:date-style` and `:time-style` values is turned into
      a type using `keyof`, so that we get precise type-checking of these
      values rather than simply `string`.
      
      One function has been dropped from the API: `getDateFormatFromStyle`.
      There was no practical way to implement it using the new format data
      structures. The only caller was the date format column settings, and it
      has been rewritten to use the formatted string for its sample date as
      its key instead.
      335d161f
    • Nemanja Glumac's avatar
      [CI] Fix Trivy scans timing out (#27670) · e908df7c
      Nemanja Glumac authored
      e908df7c
  4. Jan 12, 2023
  5. Jan 11, 2023
    • Bryan Maass's avatar
      Ensure api errors remain strings + provide structural hints (#27563) · c3d1a35b
      Bryan Maass authored
      * - ensure errors are strings + provide strucrual hints
      
      Instead of just overwriting the (string) erorr messages, swap in the
      malli string description at [:errors :<field-name>] key. Adds humanized
      error (which highlights which parts of req were not sufficient) under
      the :specific-errors key.
      
      * fix tests + note about auto-cohersion
      c3d1a35b
    • Cam Saul's avatar
      Migrate most application DB code to Honey SQL 2 (Part 2 of 2) (#27543) · 2cd0bb39
      Cam Saul authored
      * Switch to Honey SQL 2 for some application DB things
      
      * Fix Chain Filter query
      
      * More fixes
      
      * Test fixes :wrench
      
      * Fix Kondo lint errors
      
      * Test fixes :wrench:
      
      * Test and formatting fixes for MySQL
      
      * Fix new code using `db/query`
      
      * Fix circular references
      
      * Switch to Honey SQL 2, Part 1
      
      * Test fix
      
      * Revert deletion of ratios-test
      
      * Fix Kondo error
      
      * Fix stack overflow
      
      * Update code to use new names for schemas
      2cd0bb39
    • Ryan Laurie's avatar
      Add basic model detail page (#27311) · 5225977e
      Ryan Laurie authored
      
      * make model detail work in master
      
      * bring basic model detail page in
      
      * Remove page URL helper leftovers
      
      * Rename `Urls.dataset` into `Urls.model`
      
      * Add tests to `Urls.model`
      
      * Move `Urls.model` to its own file
      
      * Add `Urls.modelEditor`
      
      * Use correct URL helpers in model detail page
      
      * Add link to query editor
      
      * Extract `ModelDetailHeader` component
      
      * Small readability fix
      
      * Clean up `QuestionMoveToast`
      
      * Fix model archiving
      
      * Add move and archive actions
      
      * Add border below tab controls
      
      * Fix import
      
      * Add page title
      
      * Extend server mocks
      
      * Fix console errors
      
      * Add `role: dialog` to `Modal`
      
      * Add tests
      
      * Add `ActionsContainer` to `PinnedItemCard`
      
      * Handle read-only model permissions
      
      * Remove data app leftovers
      
      * Don't add `result_metadata` to shared mocks
      
      * Fix spacing
      
      * Fix i18n
      
      * Remove `console.warn` block
      
      * Fix import
      
      * Fix type error
      
      * Add links to reach the model detail page (#27628)
      
      * Add `Urls.modelDetail` helper
      
      * Add `ModelDetailLink` component
      
      * Clean up `PinnedItemCard's` unit tests
      
      * Add model detail link to `PinnedItemCard`
      
      * Clean up `BaseItemsTable's` unit tests
      
      * Add model detail link to `BaseTableItem`
      
      * Add model detail link to model info sidebar
      
      * Fix tests
      
      * Fix spacing
      
      * Add tooltip
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      5225977e
    • Jeff Bruemmer's avatar
      eb0a51b7
    • Alexander Polyankin's avatar
      0870cc7f
    • Nemanja Glumac's avatar
      Remove forced `yarn` resolutions (#27419) · 799afb45
      Nemanja Glumac authored
      * Removed forced `node-forge` resolution
      
      It now resolves to the `version "1.3.0"` anyway.
      
      * Removed forced `nanoid` resolution
      
      It now resolves to the `version "3.1.31"` anyway.
      
      * Removed forced `immer` resolution
      
      It doesn't appear in the list of dependencies anymore.
      
      * Removed forced `prismjs` resolution
      
      It doesn't appear in the list of dependencies anymore.
      
      * Removed forced `minimist` resolution
      
      It now resolves to the `version "1.2.6"` anyway.
      
      * Removed forced `nth-check` resolution
      
      It now resolves to the `version "1.0.2"` anyway.
      799afb45
    • Aleksandr Lesnenko's avatar
      9e0d7fd7
Loading