Commit Graph

2183 Commits

Author SHA1 Message Date
Brainslug
49aab29eb7 prevent parseJSON converting strings to numbers (#14057) 2022-06-28 18:08:25 -04:00
Rijk van Zanten
f971eb4f1d Add emitEvents flag to item reads in service (#14164)
* Add emitEvents flag to ItemsService.read*

* Add emitEvents flag to item-read flow operation
2022-06-28 17:32:01 -04:00
Jay Cammarano
2607037ffe Fixes: No notification being created when sendmail fails. (#14131)
* notifications still being made when email fails

* moved try/catch into sendmail

* double checked it works this time

* Add newline for consistency

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-06-28 17:01:31 -04:00
rijkvanzanten
fd55233b11 v9.13.0 2022-06-28 15:52:31 -04:00
Rijk van Zanten
23de088037 Prevent webhooks from registering twice (#14163)
Fixes #13933
2022-06-28 15:40:59 -04:00
Clayton Gulick
43f27b0943 Make path argument optional for snapshot command (#14074)
* make path argument optional for snapshot command

* Cleanup branching paths a tad

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-06-27 19:50:33 +00:00
Rijk van Zanten
32dd709778 Insights 2.0 (#14096)
* query function added to list

* dashboard reading query, adding to object

* typecasting of filter vals needed still

* numbers accepting strings too

* json-to-graphql-query => devD

* fixed unneeded return in list index.ts

* stitching and calling but not actually calling

* calls on panel change

* query object += new panel before dashboard save

* uuid generated in app not api

* fixed panel ids in query

* fixed the tests I just wrote

* passing the query data down!

* list showing data

* objDiff test moved to test

* metric bug fixes + data

* dashboard logic

* time series conversion started

* timeseries GQL query almost there

* query querying

* chart loading

* aggregate handling improved

* error handling for aggregate+filter errors

* removed query on empty queryObj

* maybe more error handling

* more error handling working

* improvements to erorr handling

* stitchGQL() error return type corrected

* added string fields to COUNT

* pushing up but needs work

* not an endless recursion

* its not pretty but it works.

* throws an error

* system collections supported

* refactor to solve some errors

* loading correct

* metric function fixed

* data loading but not blocking rendering

* removed redundant code.

* relational fields

* deep nesting relations

* options.precision has a default

* relational fields fix. (thanks azri)

* the limit

* limit and time series

* range has a default

* datat to workspace

* v-if

* panels loading

* workspaces dont get data anymore

* package.json

* requested changes

* loading

* get groups util

* timeseries => script setup

* list => script setup

* metric => script setup

* label => script setup

* declare optional props

* loadingPanels: only loading spinner on loading panels

* remove unneeded parseDate!!

* applyDataToPanels tests

* -.only

* remove unneeded steps

* processQuery tests

* tests

* removed unused var

* jest.config and some queryCaller tests

* one more test

* query tests

* typo

* clean up

* fix some but not all bugs

* bugs from merge fixed

* Start cleaning up 🧹

* Refactor custom input type

* Small tweaks in list index

* Cleanup imports

* Require Query object to be returned from query prop

* Tweak return statement

* Fix imports

* Cleanup metric watch effect

* Tweaks tweaks tweaks

* Don't rely on options, simplify fetch logic

* Add paths to validation errors

* [WIP] Start handling things in the store

* Rework query fetching logic into store

* Clean up data passing

* Use composition setup for insights store

* Remove outdated

* Fix missing return

* Allow batch updating in REST API

Allows sending an array of partial items to the endpoints, updating all to their own values

* Add batch update to graphql

* Start integrating edits

* Readd clear

* Add deletion

* Add duplication

* Finish create flow

* Resolve cache refresh on panel config

* Prevent warnings about component name

* Improve loading state

* Finalize dashboard overhaul

* Add auto-refresh sidebar detail

* Add efficient panel reloading

* Set/remove errors on succeeded requests

* Move options rendering to shared

* Fix wrong imports, render options in app

* Selectively reload panels with changed variables

* Ensure newly added panels don't lose data

* Only refresh panel if data query changed

* Never use empty filter object in metric query

* Add default value support to variable panel

* Centralize no-data state

* Only reload data on var change when query is altered

* Fix build

* Fix time series order

* Remove unused utils

* Remove no-longer-used logic

* Mark batch update result as non-nullable in GraphQL schema

* Interim flows fix

* Skip parsing undefined keys

* Refresh insights dashboard when discarding changes

* Don't submit primary key when updating batch

* Handle null prop field better

* Tweak panel padding

Co-authored-by: jaycammarano <jay.cammarano@gmail.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
2022-06-27 15:26:42 -04:00
ian
32006bb1fd Mark list result as non-nullable in GraphQL schema (#14094) 2022-06-24 14:49:02 -04:00
Azri Kahar
d57e6bb875 Improve IDs field interaction for Flows item read/update/delete operations when empty (#14090)
* Prevent empty key array in item operations

* tweak visual on app side
2022-06-24 10:43:01 -04:00
Azri Kahar
ea3bf3a597 Fix undefined values in filters for GraphQL (#14080)
* fix undefined values in filters for GraphQL

* add test for not passing variable in filter
2022-06-24 09:36:05 -04:00
José Varela
4a75a2bcbc Return more error messages (#14066) 2022-06-23 14:18:18 -04:00
Azri Kahar
dd00dfbbfd Allow admin to import into system collections (#14065)
* allow admin to import into system collections

* add refresh event after import to relevant pages

* make sure it's limited to admin users
2022-06-23 15:15:38 +00:00
Azri Kahar
817a6c1891 fix action event Flows for related tables (#14034) 2022-06-22 09:30:32 -04:00
Jay Cammarano
8a461b2ef7 add comment (#14029) 2022-06-21 17:06:57 -04:00
Eron Donevan Powell
3fa81b6b9c Docs config refactor (#13945)
* moved config-options.md to self-hosted

* added non-docs files that link to config-options

* moved SSO and fixed links

* moved upgrades-migrations into self-hosted

* moved filter-rules into reference docs and fixed broken links
2022-06-17 11:51:38 -04:00
Azri Kahar
4beb8722fb add Emit Events option to item update/delete operations in Flows (#13921)
* add `Emit Events` option to item update/delete

* update operations docs
2022-06-16 10:11:06 -04:00
José Varela
0f438ef3d0 API: Add env var to opt-out mailer setup verification (#13924)
* Add env var to opt-out mailer setup verification

* Add documentation
2022-06-16 09:15:23 -04:00
Nitwel
37762358fc Add tfa enforce flow (#7805)
* add tfa enforce flow

* add 'tfa-secret' to recommended permissions

* fix if theme if user has dark mode

* oas: rename 'enable-2fa' to 'enable-tfa'

* Add required user fields

* Uniformize styling

* Fix direct and invalid routing

* Add required permission docs

* Fix typescript warnings

* Fix typescript warnings 2

* Allow auto theme

* Nest duplicate condition check

* Fix routing for users without role

* Follow page redirects

* Reduce the use of redirect query

* Improve error UX

* Allow admins to disable 2FA

* Improve autofocus UX

* Override update permission for 'tfa_secret' when role enforces TFA

* Remove permission requirements from docs

Co-authored-by: Jose Varela <joselcvarela@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
2022-06-16 01:27:59 +08:00
Rijk van Zanten
3b2245918d Allow setting a custom filename in the /assets endpoint for SEO (#13907)
* Allow an optional custom filename in the assets route

* Document optional assets endpoint route

* Update docs/reference/files.md
2022-06-15 12:32:36 -04:00
ian
443d3f6734 Add depth limit to filtering (#11845)
* Add depth limit to filtering

* Add depth limit to GraphQL

* Add docs

* Rename environment variable

* Add simple deep filter depth calculation

* Update error message

* Shift fields depth check to base function

* Remove unused var

* Implement GraphQL filter depth

* Add check for _and & _or filters in GraphQL

* Add check for _and & _or filters in REST

* Remove commented code

* Add check for REST filter query

* Add REST tests

* Setup m2m using directus fields

* Add GraphQL tests

* Fix linter error

* Cleanup calculateDepth + add docs/tests

* Remove validator in GraphQL

* Add depth checking for nested sort

* Enable source map to display correct error lines

* Set max relational depth to be at least 2

* Update tests

* Add unit test for deep _sort

* Add minimum value in docs

* Refactor depth validation to be in validateQuery

* Add boolean parameter for calculation of _sort in deep query

* Use array of keys to parse dot notation

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-06-15 11:52:54 -04:00
José Varela
08166c89fb Add missing color field (#13906) 2022-06-15 11:28:43 -04:00
José Varela
895100898c Ignore returning not supported messages (#13897) 2022-06-15 10:36:56 -04:00
Azri Kahar
7cefbc9430 sanitize query in item read/update/delete (#13900) 2022-06-15 08:13:22 -04:00
ian
e80f78fa8f Fix date filter with null value on SQLite (#13891) 2022-06-14 10:37:52 -04:00
ian
f8b73ce236 Fix aliased DB table names in filter query (#13575)
* Fix aliased DB table names in filter query

* Rename to originalCollectionName for clarity

* Update api/src/utils/apply-query.ts

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-06-14 09:14:45 -04:00
Azri Kahar
f17a1d8988 Add migration to rename hook triggers to event (#13879) 2022-06-14 09:07:52 -04:00
Rijk van Zanten
558672a78f Prevent unknown knex methods from being used (#13877)
* Prevent unknown knex methods from being used

* Fix tests
2022-06-13 17:20:27 -04:00
rijkvanzanten
ac694ea64c Another merge to empty object 2022-06-13 16:39:40 -04:00
rijkvanzanten
3549084019 Merge to new object in gql 2022-06-13 16:32:11 -04:00
Rijk van Zanten
89fa6fd36c Upgrade busboy (#13875) 2022-06-13 16:22:41 -04:00
Aiden Foxx
e2cedccea9 Added correct null parsing to Directus schemas (#13873)
* Added correct null parsing to Directus schemas

* Bump knex-schema-inspector

To make sure we don't upset MariaDB folks

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-06-13 18:59:47 +00:00
rijkvanzanten
2ecaf0360c Don't check bytesize for empty payloads 2022-06-13 13:04:21 -04:00
Rijk van Zanten
8cee483a1d Add optional cache max value size limit configuration (#13871)
Resolves #13708
2022-06-13 13:03:41 -04:00
ian
416b795b85 Fix linting for api/src/utils/get-local-type.ts (#13849) 2022-06-11 19:01:07 -04:00
Rijk van Zanten
6955c538a3 Upgrade API & Schema dependencies (#13845)
Fixes #13837
2022-06-10 15:59:52 -04:00
rijkvanzanten
bce19abf6f v9.12.2 2022-06-09 17:12:27 -04:00
Nicola Krumschmidt
80d0b9cd47 Use JobQueue when reloading extensions (#13796) 2022-06-09 08:06:24 -04:00
Nicola Krumschmidt
2efff9fd16 Fix flow triggers being registered multiple times (#13783)
Fixes #13739
2022-06-08 10:27:00 -04:00
ian
8f131b5156 Fix range to be based on current time (#13701)
* Fix range to be based on current time

* Parse using localtime for fields without timezone data on SQLite

* Add tests

* Parse test response to int

* Refactor to options object

* Read timestamps as UTC for Oracle

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-06-08 13:12:42 +02:00
Yuriy Belenko
4d21d8d2a3 Enable activity tracking at password reset (#12044)
* Enable activity tracking at password reset

* Override admin prop only

Suggestion from Rijk

* Add required accountability role

* Fix missing concealed field in revisions drawer

* Fix typings

* Display updated message for concealed fields

* Update message

* Refactor CSS to increase selector specificity

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
2022-06-08 03:19:40 +08:00
Rijk van Zanten
c3e0cf99b8 Flush caches after applying schema snapshot (#13762) 2022-06-06 17:26:52 -04:00
Rijk van Zanten
d1b7d3e666 Fix formatting of headers in request operation (#13759)
Fixes #13737
2022-06-06 16:02:47 -04:00
Azri Kahar
38238a37c3 Fix description field in directus_flows (#13751)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-06-06 12:20:07 -04:00
Rijk van Zanten
28b2519012 Serve robots.txt from root (#13754)
Fixes #13734
2022-06-06 11:09:24 -04:00
rijkvanzanten
cd58611aa7 v9.12.1 2022-06-03 17:52:57 -04:00
ian
6c1b95367f Fix export offset (#13694)
* Use offset for export query

* Reduce loop count

* Add a line break for subsequent batches
2022-06-03 17:12:00 -04:00
Rijk van Zanten
2e6551590b Fix installer missing package (#13719)
Fixes #13718
2022-06-03 16:52:21 -04:00
Nicola Krumschmidt
2f8c9aca42 Fix endpoint extensions being registered under wrong route (#13709)
Fixes #13704
2022-06-03 16:10:21 -04:00
Jay Cammarano
6e87d8a55b Added a check for variables in the GraphQL service's parseArgs so that variables in arrays would be added (#13671)
* added a check for vars in ListValue of parseArgs

* formatting
2022-06-03 17:11:53 +02:00
rijkvanzanten
85af808f70 v9.12.0 2022-06-02 18:26:52 -04:00