Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 03, 2021
    • Dalton's avatar
      Add the ability to verify/unverify questions (#17030) · b7fa2f34
      Dalton authored
      * rmv old bucm icons and remove verified fill color
      
      * add moderation action section to sidebar
      
      * add moderation review icon to the saved question header button
      
      * hide moderation section when is not a moderator
      
      * add UI for ModerationReviewBanner
      
      * Backend for moderation-review
      
      - create table moderation_review. Same as before but also has a
        "most_recent" boolean flag for the most recent moderation for easy
        lookup
      - POST /moderation-review/ . Status can be "verified" or nil
      - must be an admin to post
      - No PUT or edit route yet. Not sure if this is even
        necessary. _MAYBE_ to edit the text, but certainly not for the
        status, ids, etc. If there's to be history, let's build some history
      - Ensure we never have more than 10 reviews. Adding a new review will
        delete the older ones, mark all old ones as not `most_recent`, and
        add the newest one as `most_recent true`
      - Ensure the card actually exists before creating the mod review
      - Since admin only at this time, don't need to check moderate
        permission or view permission
      - When hydrating ensure reviews are ordered by id desc. Should mimic
        the created_at desc
      
      * fix moderation review banner tooltip offset
      
      * disable verification button when already verified
      
      * rmv iconOnly prop because it seems to do nothing
      
      * update getLatestModerationReview to rely on most_recent boolean
      
      * Return 400 on invalid status to post /moderation-review
      
      the schema was using keywords on the left hand side rather than the
      symbols. Required a change to the docstring generator, when it made a
      docstring for enums, it would call (sort (:vs enum)) and need to
      string em.
      
      * Add ModerationReview model to models.clj and copy infra
      
      * hydrate moderation reviews on cards
      
      * clean up + wire up to BE + ensure mod buttons don't show for normal users
      
      * rmv unused moderation redux logic from QuestionDetailsSidebarPanel
      
      * finish writing unit tests for FE
      
      * ensure getIconForReview returns an object
      
      * enable/disable verify button tooltip when unverified/verified
      
      * add e2e tests
      
      * fix tests
      
      * styling tweaks
      
      * more styling on moderationReviewBanner
      
      * add function for abbreviated timestamp
      
      * increase fontsize of timestamp back to 12
      
      * fix tooltip offset
      
      * ensure custom locale is separate from 'en' and not used for other languages
      
      * Deletion moderation reviews when deleting cards
      
      i had actually thought this was a much larger problem. But it turns
      out we almost never delete cards (thanks comment!). And so we won't
      really generate a lot of garbage.
      
      I was worried that since we aren't using actual foreign keys but just
      `moderated_item_type "card"` and `moderated_item_id 2` we would have
      deleted cards with these moderation reviews but that is not the case
      as the cards aren't deleted.
      
      * hide verify disabled button when a question is verified
      
      * update test to use queryByTestId
      
      * Hydrate moderation reviews on cards on ordered cards
      
      * Handle mysql's lack of offset functionality
      
      mysql cannot handle just a `offset` clause, it also needs a limit
      
      clause grammar from
      https://dev.mysql.com/doc/refman/8.0/en/select.html:
      
      [LIMIT {[offset,] row_count | row_count OFFSET offset}]
      
      select id, name from metabase_field offset 5;         -- errors
      select id, name from metabase_field limit 2 offset 5; -- works
      
      Since our numbers are so small here there is no worry and just do the
      offset in memory rather than jump through hoops for different dbs.
      
      * Batch hydrate moderation reviews
      
      * Don't let /api/user/:userId failure conceal moderation banner
      
      * fix moderation cy tests
      
      * work around possible bug in toucan hydration
      
      dashboards hydrate ordered cards
      (hydrate [:ordered_cards [:card :moderation_reviews] :series])
      
      Ordered_cards are dashboard_cards which have an optional card_id. But
      toucan hydration doesn't filter out the nils as they go down. It seems
      toucan returns a nil card, and then when hydrating the
      moderation_review, passes the collection of all "cards" including the
      nil ones into the hydration function for moderation_reviews
      
      This feels like a bug to me
      
      * Cleanup moderation warnings
      
      * Docstring in moderation review
      
      * include hoisted moderated_status on cards in collections api
      
      * Expect unverified in test :wrench:
      
      
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Co-authored-by: default avatarMaz Ameli <maz@metabase.com>
      Co-authored-by: default avataralxnddr <alxnddr@gmail.com>
      Unverified
      b7fa2f34
  2. Jul 28, 2021
    • Anton Kulyk's avatar
      Allow only admins to edit collection types, hide form field for personal collections (#17170) · a728bafe
      Anton Kulyk authored
      * Rename collection's plugin `formFields`
      
      * Add tests for collection type field visibility
      
      * Limit collection types visibility
      
      * Fix cypress tests
      a728bafe
    • Anton Kulyk's avatar
      Add ability to make all children collections official or regular (#17168) · d7e0838c
      Anton Kulyk authored
      * Add `update_collection_tree_authority_level` field
      
      * Add authority level tree update
      
      * Test authority level children bulk update
      d7e0838c
    • Anton Kulyk's avatar
      Display official badge throughout the application (#17125) · 32a88aa4
      Anton Kulyk authored
      * Add getCollectionIcon function
      
      * Add isRegularCollection function
      
      * Display official badge in collections sidebar
      
      * Don't dim official badge icon in collections sidebar
      
      * Show root collection icon
      
      * Use `CollectionsList.Icon` for "All personal collections"
      
      * Fix CollectionBadge icon color
      
      * Display official collection badge in search results
      
      * Test official badge displayed correctly in sidebar
      
      * Test official badge is shown throughout the app
      
      * Show official badge icon in SavedQuestionPicker
      
      * Use existing isPersonalCollection utility
      
      * Show official badge icon in QuestionPicker
      
      * Show official badge icon in CollectionPicker
      
      * Minor CollectionIcon refactoring
      
      * Use function declaration for isRegularCollection
      
      * Add editCollection test helper
      
      * Add changeCollectionTypeTo helper
      
      * Remove duplicated assertions
      
      * Add helper to create official collection
      
      * Add testOfficialBadgeInSearch helper
      32a88aa4
    • Anton Kulyk's avatar
      Bootstrap collections plugin, add collection types form (#17071) · 0a687782
      Anton Kulyk authored
      * Add badge icon
      
      * Add empty PLUGIN_FORM_WIDGETS
      
      * Add empty PLUGIN_COLLECTIONS
      
      * Extract `getWidgetComponent` from FormWidget
      
      * Allow adding EE-only form widgets
      
      * Add `authority_level` field to collections
      
      * Fix SegmentedControl's `value` prop-type
      
      * Specify icon sizes for SegmentedControl's options
      
      * Add FormCollectionAuthorityLevel form widget
      
      * Add `PLUGIN_COLLECTION_COMPONENTS`
      
      * Add CollectionAuthorityLevelIcon
      
      * Move ToggleMobileSidebarIcon out of PageHeading
      
      * Display official badge on collection page
      
      * Add authority level to collections plugin
      
      * Rename `AUTHORITY_LEVELS` to `EE_AUTHORITY_LEVELS`
      
      * Patch collections plugin with EE authority levels
      
      * Fix authority level value for new collection form
      
      * Add `cy.createCollection` command
      
      * Add `describeWithoutToken` Cypress helper
      
      * Test user can manage collection authority level
      
      * Test collection types available only in EE
      
      * Run prettier
      
      * Keep regular collection opts in AUTHORITY_LEVEL
      
      * Fix test comment
      
      * Translate collection type names
      
      * Avoid aliasing regular authority level
      0a687782
  3. Jul 22, 2021
  4. Jul 08, 2021
  5. Jun 17, 2021
  6. Jun 11, 2021
  7. Jun 09, 2021
  8. Jun 07, 2021
  9. Jun 03, 2021
  10. May 05, 2021
  11. May 03, 2021
    • Nemanja Glumac's avatar
      Merge e2e CI improvements from the `release-x.39.x` branch (#15907) · d83cd8f0
      Nemanja Glumac authored
      * Improve Cypress runner command line config (#15854)
      
      * Rename Cypress CI groups to `e2e-tests` (#15877)
      
      * Remove the `node` parameter from Cypress CI job matrix (#15878)
      
      * Merge EE Cypress tests with the OSS ones (#15887)
      
      * Reorganize test folder: Move e2e support files into a separate folder (#15899)
      
      * Refine CI checksum calculation - extract e2e files (#15900)
      Unverified
      d83cd8f0
  12. May 01, 2021
    • Nemanja Glumac's avatar
      Merge EE Cypress tests with the OSS ones (#15887) · 9c0db5e0
      Nemanja Glumac authored
      * Merge all enterprise specs together with the OSS ones
      
      * Move whitelabel under `/admin/settings`
      
      * Move specs under `/admin/audit` folder
      
      * Merge `admin/database/add` specs
      
      * Group snippets
      
      * Merge OSS and EE sso specs
      
      * Move sandboxes under `admin/permissions`
      
      * Delete custom drill-throughs spec
      
      * Return boolean value
      
      * Use `Cypress.env` instead of global vars
      
      * Delete empty spec
      
      * Update paths for `eslint` script
      Unverified
      9c0db5e0
  13. Apr 30, 2021
    • Howon Lee's avatar
      Admin people pagination backend (#15687) · b5a427b4
      Howon Lee authored
      
      * limit and offset work upon hand exercise
      
      * limit added
      
      * add the test
      
      * docstring is wrong make it not wrong
      
      * fix namespace decl
      
      * they were test bugs only
      
      * stick that limit and offset in there
      
      * Permissions imports
      
      * make it work in dbs that are not just h2
      
      * add limit test get
      
      * needs integer
      
      * juice the coverity lol
      
      * just stick querying in the overall dealie
      
      * tests pass
      
      * add counter
      
      * rip out the clauses
      
      * not just if limited
      
      * docstring misplaced
      
      * more linting
      
      * cool tests
      
      * tests pass but lacking test lol
      
      * group id works
      
      * test works
      
      * fix jeff nits
      
      * break that api
      
      * add test for count
      
      * cypress works for some reason lol
      
      * fix capitalizations
      
      * admin people pagination frontend (#15821)
      
      * admin people pagination frontend
      
      * admin people pagination and search specs
      
      * address review comments
      
      * fix rebase
      
      * address review comments
      
      Co-authored-by: default avatarAlexander Lesnenko <alxnddr@users.noreply.github.com>
      Unverified
      b5a427b4
  14. Apr 26, 2021
  15. Apr 23, 2021
  16. Apr 21, 2021
  17. Apr 12, 2021
    • Jeff Evans's avatar
      Various improvements to version update checks (#15517) · 9392ddd7
      Jeff Evans authored
      * Various improvements to version update checks
      
      ***************************
      * Release project changes *
      ***************************
      
      Updating version_info.clj code to build version-info-ee.json file for Enterprise Edition build
      
      Adding test for both oss and ee version info file generation logic
      
      Decoupling GitHub milestone from version and setting it to be the OSS value for :ee release build
      
      Adding nREPL alias for release deps.edn project and usage note
      
      ************************
      * Core product changes *
      ************************
      
      Adding new :ee version of :mb-version-info-url (:mb-version-info-ee-url) with default value to match the file name generated by the release code
      
      Making enterprise-edition? public from core.clj, since it's now needed from the upgrade check code to switch between the URLs
      
      Adding new setting to store when updates were last checked (since it's on a 12-hour interval)
      
      Changing update check code to both set this new timestamp setting (always) to the current time, and set version-info itself to nil if the update check fails (so that users won't see "latest and greatest" if the update check succeeded at some point in the past, but then started failing
      
      Frontend changes:
      
      Showing the "last checked" timestamp (in user's browser timezone) when we show the "Sorry" text because of being unable to check for updates, so they know when the last check was made
      
      Removing custom implementation of MetabaseSettings.versionInfo from EE frontend code since it's no longer needed (and never worked), because the EE backend will now be hitting a different URL with the version info specifically for EE releases
      
      Linking to https://www.metabase.com/docs/<newVersion>/operations-guide/upgrading-metabase.html URL instead of simply /start
      Unverified
      9392ddd7
  18. Apr 08, 2021
    • Nemanja Glumac's avatar
      Merge Cypress fixes into `master` (#15527) · 11a6994d
      Nemanja Glumac authored
      * Quarantine flaky test in `auditing.cy.spec.js` (#15501)
      
      * Quarantine possible offenders behind CI timeouts (#15504)
      
      * Quarantine possible offenders behind CI timeouts
      
      * Fix brush date filter test (#15505)
      
      * Fix flakiness in `scatter` visualization tests (#15520)
      
      - Fixes a flake in scatter.cy.spec.js that started appearing after throttle was introduced to the ExplicitSize component in #15235
      - Also fixes a flake with brush filter that apparently wasn't fully fixed in the previous attempt
      
      ## Additional Info:
      - Stress testing this fix in isolation with GitHub actions shows 20/20 runs passing :white_check_mark:
      - Stress testing "brush date filter" revealed that it still fails approximately 4-5x out of 20!
      
      - The reason seems to be that `mouseup` event doesn't always happen at the same time so the resulting filter doesn't have the same ending month every time (for example I've seen: "Created At between May, 2016 September, 2016", "Created At between May, 2016 July, 2016" and even "Created At between May, 2016 May, 2016")
      - It is more than enough that we assert that this filter exists in the first place so I changed the assertion to: `cy.contains(/^Created At between May, 2016/);` since the beginning of this string is the only thing we care about
      Unverified
      11a6994d
  19. Apr 06, 2021
    • Tim Macdonald's avatar
      Dashboard Subscription Filtering (#15404) · ce41deaf
      Tim Macdonald authored
      
      * Backend for dashboard sub filters, including EE implementation
      
      * Fix pulse/update-notification! to respect parameters
      
      * Add some tests
      
      * add FE EE parameter section to dashboard subscriptions
      
      * fix improper filter counting for label
      
      * hide parameters section when dashboard has none
      
      * fix thrown errorin pulses list sidebar
      
      * fix linting error
      
      * add cypress tests
      
      * rmv describe.only from test
      
      * refactor FE code a little
      
      * Merge pulse/dashboard parameters correctly for dashboard subs
      
      * fix issues with getting list of active pulse parameters
      
      * update formatting of multi value parameters
      
      * fix cypress test
      
      * tweak pulse details styling
      
      * move ParametersSection to enterprise tree
      
      Co-authored-by: default avatarDalton Johnson <daltojohnso@users.noreply.github.com>
      Unverified
      ce41deaf
    • Nemanja Glumac's avatar
  20. Apr 02, 2021
  21. Mar 29, 2021
  22. Mar 18, 2021
  23. Mar 13, 2021
  24. Mar 12, 2021
  25. Mar 10, 2021
    • Nemanja Glumac's avatar
      Consolidate users in Cypress tests (#15058) · ef824613
      Nemanja Glumac authored
      
      * Move user groups above users
      
      * Use `email` in a user object instead of `username`
      
      * Add `createUser` function
      
      - Get rid of `makeUserObject` and store users' group membership directly within the user object
      
      * Improve `createUser` function
      
      * Add sandboxed user to the main `USERS` object
      
      * Use newly constructed `sandboxed` user in tests
      
      * Export `signInAsSandboxedUser()`
      
      * Fix function name
      
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      
      * Fix linter errors
      
      * Simplify `createUser()` function
      
      * Use user attributes directly in tests
      
      * Fix broken tests
      
      * Destructure users in tests
      
      * Use double quotes
      
      * Extract Cypress user data (#15103)
      
      * Extract user data in a separate file
      
      * Convert `createUser` function to a Cypress custom command
      
      * Convert `signIn` function to a Cypress custom command
      
      * Convert `signInAsAdmin` function to a Cypress custom command
      
      * Convert `signInAsNormalUser` function to a Cypress custom command
      
      * Convert `signInAsSandboxedUser` function to a Cypress custom command
      
      * Convert `signOut` function to a Cypress custom command
      
      * Guard against user groups data falling out of sync
      
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      Unverified
      ef824613
  26. Mar 08, 2021
  27. Mar 04, 2021
    • Ariya Hidayat's avatar
      Remove type-checking with Flow (#14236) · f4d90f68
      Ariya Hidayat authored
      * yarn remove flow-bin eslint-plugin-flowtype
      
      * CI: remove fe-linter-flow
      
      * Remove Flow from ESLint config
      
      * Remove Flow type annotations and directives
      
      * Simplify Flow types for React elements and components
      
      * Import missing Flow types
      
      * Remove lint-flow from package.json
      Unverified
      f4d90f68
  28. Mar 03, 2021
  29. Mar 02, 2021
  30. Mar 01, 2021
Loading