Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 26, 2022
  2. Jun 24, 2022
    • Natalie's avatar
      docs - troubleshooting models (#23544) · 4c55a0e6
      Natalie authored
      4c55a0e6
    • Diogo Mendes's avatar
      Removing cancel on concurrency (#23536) · c7926fb8
      Diogo Mendes authored
      c7926fb8
    • Aleksandr Lesnenko's avatar
      Fix alerts and subscriptions bugs (#23523) · 85be305a
      Aleksandr Lesnenko authored
      * fix subscriptions and alerts
      
      * review
      
      * specs
      85be305a
    • Nick Fitzpatrick's avatar
      Updating Dashboard Action Menu, Moving bookmark action (#23528) · 2486c54f
      Nick Fitzpatrick authored
      * Updating Dashboard Action Menu, Moving bookmark action
      
      * Fixing Tests
      2486c54f
    • Alexander Polyankin's avatar
      da76aaa0
    • Anton Kulyk's avatar
      Respect DB management permission for model caching (#23507) · c191c47f
      Anton Kulyk authored
      * Add `can-manage` property to `Database` types
      
      * Only show enable/disable caching with DB access
      
      * Rename `tooltip` which is not a tooltip anymore
      
      * Remove redundant variable
      c191c47f
    • Anton Kulyk's avatar
      Move model cache section back to OSS (#23485) · 8655a146
      Anton Kulyk authored
      * Move model cache section to OSS
      
      * Don't handle "off" state as it won't be shown
      
      * Tweak copy
      8655a146
    • Alexander Polyankin's avatar
      Fix e2e tests (#23541) · 96d4efe4
      Alexander Polyankin authored
      96d4efe4
    • dpsutton's avatar
      Join slack channels with slack-id (#23495) · f25b6115
      dpsutton authored
      * Join slack channels with slack-id
      
      Fixes https://github.com/metabase/metabase/issues/23229
      
      We upload images to a channel and then send messages to the desired
      channel referencing those images from the channel we uploaded. But the
      slack bot must be in the channel to upload images.
      
      We handle this in `slack/upload-image!` where we watch the error message
      and join the channel if we recognize that is our issue. This special
      upload channel is set in the admin section when setting up, typed in by
      a human.
      
      Slack now requires us to use the internal id of the channel when
      joining. IE we used to use "metabase_files" but now we need to use
      something like "C87LQNL0Y23". But we do not have this information and we
      don't want humans to have to look this up.
      
      SOLUTION:
      change our cache. We currently just get a list of channels and users
      ```
      ["#general" "@dan" ...]
      ```
      
      Change this to
      ```
      {:version 2,
       :channels [{:display-name "#random",
                   :name "random",
                   :id "CT2FNGZSRPL",
                   :type "channel"}
                  {:display-name "#general",
                   :name "general",
                   :id "C87LQNL0Y23",
                   :type "channel"}
                  {:display-name "@dan",
                   :type "user",
                   :name "dan",
                   :id "UR65C4ZJVIW"}
                  ...]}
      ```
      
      Now we have slack internal ids present. When we attempt to join the
      slack channel, look for this id and attempt to use that.
      
      This has some knock-on effects. The UI still lists the channels in a
      channel picker when sending pulses. The list sent over the wire still
      mimics the previous shape (a flat list) and the choice is still the
      human readable name.
      
      In the future we should switch over to using the stable ids rather than
      solely channel names. Channel names can be renamed.
      
      I didn't go down this route because of the files channel. It is set at
      setup before we have a channel list. We could do some kind of run time
      migration but it is difficult because it would change the type of
      `slack-files-channel` from string to :json to handle the more complex
      type. Or perhaps we could make another setting to hold the json form and
      set that when we can positively identify things.
      
      In either case, these changes were not required yet to fix our slack
      issue. We just upgrade the information we have about slack channels,
      downgrade it when it hits the wire so the UI needs no changes, and use
      the extra information in the one spot where we need it.
      
      The cache is populated at startup and every four hours after that. So we
      do not need to worry about the old cache shape. If the new code is
      running, its the new cache.
      
      * Send #channel and @user forms over wire
      
      We store `{"channel": "#slack-pulses"}` in the pulse_channel.details
      column so we should keep those types of values around.
      
      We use the bare portion ("slack-pulses") rather than with the hash on it
      so we seem to be mixing usernames and channels. But these sets are
      distinct and you cannot create a channel with the same name as a
      user. Also, channel names are lowercase while channel-ids are uppercase
      so those are also non-overlapping sets.
      
      * Put slack token so slack reports as configured
      
      * Errant tap>
      
      * Alignment and docstring fixes
      
      * Remove slack-cache version information
      
      remove the `:version 2` from the cache. We are always in charge of the
      cache, and we compute it on startup so there's little risk of other data
      shapes being present.
      f25b6115
    • Natalie's avatar
      docs - known issues (#23522) · 0544f7d1
      Natalie authored
      0544f7d1
    • Aleksandr Lesnenko's avatar
      fix tooltip overflow (#23475) · 908375c2
      Aleksandr Lesnenko authored
      * fix tooltip overflow
      
      * explicit default for preventOverflow
      
      * check ci
      908375c2
    • metamben's avatar
      a99ec1df
    • Ariya Hidayat's avatar
    • Alexander Polyankin's avatar
    • Ryan Laurie's avatar
      Bulk Filter Modal: Show autocomplete options in popover (#23516) · a1e23ac7
      Ryan Laurie authored
      * show field options in popover
      a1e23ac7
    • Alexander Polyankin's avatar
      Fix editable text issues (#23532) · d1a2294a
      Alexander Polyankin authored
      d1a2294a
    • Diogo Mendes's avatar
    • Cal Herries's avatar
      Specify table for id column (#23525) · 2e34bd0d
      Cal Herries authored
      2e34bd0d
  3. Jun 23, 2022
    • adam-james's avatar
      application-colors have new keys that may be added via the getter (#23493) · 4bfd682f
      adam-james authored
      * application-colors have new keys that may be added via the getter
      
      Some colors previously had multiple usage contexts. For example, `accent1` was used both in charts and other parts of
      the summarize UI. Now, those notions are being separated, so `accent1` remains a valid key, and `summarize` is a new
      valid key. To make sure behaviour remains the same for existing whitelabel users who may have set these keys, when
      such a key exists, it is 'split' by the getter.
      
      For example, if the existing application-colors json contains `accent1`, the getter will add a new key `summarize`
      with the same value as `accent1`, but only if `accent1` already exists, otherwise it does nothing. This is also true
      for keys `brand`, which adds `accent0`, and `accent7`, which adds `filter`
      
      * Make application colors getter make change only once
      
      * Premium feature flag for test
      4bfd682f
    • Ariya Hidayat's avatar
    • Ryan Laurie's avatar
      Inline Date Filters (#23464) · 56357c04
      Ryan Laurie authored
      Add Inline Date picker to bulk filter modal
      56357c04
    • Cal Herries's avatar
      Stop caching /api/geojson/:key requests (#23474) · 02f26e07
      Cal Herries authored
      * Stop caching /api/geojson/:key requests
      
      * Remove extra require
      02f26e07
    • Nick Fitzpatrick's avatar
      b6e6e07c
    • Braden Shepherdson's avatar
      Foundation for v2 serialization and deserialization (#23204) · 2eb89b4d
      Braden Shepherdson authored
      This supports serialization of only Collections and Settings so far, but
      it demonstrates the design of the new serialization system.
      
      `metabase.models.serialization.base` defines the multimethods, which
      are to be implemented by all the exported models eventually.
      The actual serialization code that drives the larger process is in
      `metabase_enterprise.serialization.v2.extract` and `.merge`, since
      serialization is an enterprise feature.
      
      The design calls for two matching phases on each side:
      - Serialization is extract + store;
      - Deserialization is ingest + load.
      
      Extract and load deal with vanilla Clojure maps with a `serdes/meta` key
      giving common details; they deliberately know nothing about files.
      
      Store and ingest deal with the storage medium and the process of
      listing and reading a stored export.
      
      Laziness is retained: the `load` process ingests full details on demand,
      so only the metadata of the importing database needs to fit in memory.
      2eb89b4d
    • Alexander Polyankin's avatar
      932e8bf7
    • Alexander Polyankin's avatar
      0a986a58
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Fix OSS embedding test failing (#23513) · db3a2882
      Mahatthana (Kelvin) Nomsawadi authored
      Since I forgot to add a condition to only test pro/enterprise version
      only. :pray:
      db3a2882
    • Ryan Laurie's avatar
      Better filter validity check (#23492) · 3af70ad1
      Ryan Laurie authored
      * better filter validity check
      3af70ad1
    • dpsutton's avatar
      Enterprise settings (#23441) · 9c4e7389
      dpsutton authored
      * Allow for disabling settings
      
      Disabled settings will return their default value (else nil if no
      default is set). This allows us to have enterprise override settings and
      use them from regular OSS code without classloaders, extra vars,
      remembering to check if the feature is enabled, etc.
      
      Motivating examples are the appearance settings. We allow
      `application-font` setting to change the font of the application. This
      is an enterprise feature, but anyone can post to
      `api/setting/application-font` and set a new value or startup as
      `MB_APPLICATION_FONT=comic-sans java -jar metabase.jar` and have the
      functionality.
      
      Same thing for application colors in static viz. The calling code just
      calls `(settings/application-colors)` and uses them but doesn't check if
      the enterprise settings are enabled. To do this correctly, you have to
      remember to implement the following onerous procedure:
      
      A whole namespace for a setting
      ```clojure
      (ns metabase-enterprise.embedding.utils
        (:require [metabase.models.setting :as setting :refer [defsetting]]
                  [metabase.public-settings :as public-settings]
                  [metabase.public-settings.premium-features :as premium-features]
                  [metabase.util.i18n :refer [deferred-tru]]))
      
      (defsetting notification-link-base-url
        (deferred-tru "By default \"Site Url\" is used in notification links, but can be overridden.")
        :visibility :internal
        :getter (fn []
                  (when (premium-features/hide-embed-branding?)
                    (or (setting/get-value-of-type :string :notification-link-base-url)
                        (public-settings/site-url)))))
      ```
      
      And then in the calling code you have to do the procedure to
      conditionally require it and put it behind a var that can handle it
      being nil:
      
      ```clojure
      ;; we want to load this at the top level so the Setting the namespace defines gets loaded
      (def ^:private site-url*
        (or (u/ignore-exceptions
              (classloader/require 'metabase-enterprise.embedding.utils)
              (resolve 'metabase-enterprise.embedding.utils/notification-link-base-url))
            (constantly nil)))
      
      ;; and then the usage
      (defn- site-url
        "Return the Notification Link Base URL if set by enterprise env var, or Site URL."
        []
        (or (site-url*) (public-settings/site-url)))
      ```
      
      Far nicer to just place the following into the regular public-settings
      namespace:
      
      ```clojure
      (defsetting notification-link-base-url
        (deferred-tru "By default \"Site Url\" is used in notification links, but can be overridden.")
        :visibility :internal
        :enabled?    premium-features/hide-embed-branding?)
      ```
      
      Then no need for a custom namespace to hold this setting, no need to
      have an extra var to point to the setting else a fallback value.
      
      Note that this feature is not required on every enterprise feature we
      have. We a namespace `metabase-enterprise.sso.integrations.sso-settings`
      that has 24 settings in it, all of which are enterprise features. But
      these features are used in our enterprise sso offerings and are directly
      referenced from the enterprise features. No need for the extra var to
      point to them and the flag checks happen in other parts.
      
      * Mark the UI/UX customization settings as requiring whitelabeling
      
      Mark the following settings as requiring
      premium-settings/enable-whitelabeling? (aka token check)
      
      - application-name
      - loading-message (override of "doing science")
      - show-metabot (override of showing our friendly metabot)
      - application-colors
      - application-font
      - application-logo-url
      - application-favicon-url
      
      Updates the helper functions for colors to use the setting rather than
      feeling entitled to use a lower level `setting/get-value-of-type`. We
      need the higher level api so it takes into account if its enabled or
      not.
      
      * Move notification-link-base-url into regular settings with enabled?
      
      * Cleanup ns
      9c4e7389
    • Ariya Hidayat's avatar
      084fa781
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Hide password + user form fields when logged in via JWT and SAML (#23476) · 7f246b7e
      Mahatthana (Kelvin) Nomsawadi authored
      
      * Hide password + user form fields when logged in via JWT and SAML
      
      * ngoc - update the maybe-add-sso_soruce
      
      * Address review: removing deprecated Cypress functions
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      7f246b7e
    • Ngoc Khuat's avatar
      Make schema for parameters and parameter_mappings on card more strict (#23456) · 22d77dbe
      Ngoc Khuat authored
      * make schema for parameters and parameter_mappings more strict
      
      * no duplicate id for parameterlist in mbql schema
      
      * reverse a change in mbql schema
      
      * allow blank name and slug for parameter
      
      * add sectionId
      
      * trying to use mbql.s/Parameter instead
      
      * reverse change to use mbql.s/Parameter, there are too many failing tests
      22d77dbe
    • Cal Herries's avatar
      Remove panning of choropleth (#23454) · ba8148cb
      Cal Herries authored
      ba8148cb
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Configure show download button in embedding (#23479) · 9d1b4f21
      Mahatthana (Kelvin) Nomsawadi authored
      * Configure show download button in embedding
      
      * Address review + fix tests
      9d1b4f21
  4. Jun 22, 2022
Loading