Commit Graph

854 Commits

Author SHA1 Message Date
Nitwel
3e1fce8968 Relational Interfaces Rework 🐰🕳️ (#12082)
* add basic util function for later use

* sketch up useRelationMultiple implementation

* update relation util and start reworking relational interfaces

* support filter in m2o

* start working on useRelationMultiple

* continue working on relational foundation

* finish basic use-relation-multiple composable

* get o2m pretty close to being finished

* finish up list-o2m

* replace old interfaces

* copy existing interface

* rewrite vue file

* highlight deleted items

* use Search instead of Get

* support selection on m2m

* finish up m2m

* replace old files

* update files interface

* fix permission checks

* fix styling

* add sketches to explain relations

* rewrite m2a interface

* add usage hint to use-relation-multiple

* update file interface to use new composable

* update file-image interface

* fix image not being shown

* revert names

* fix selection of existing items

* fix loading selected items

* in between commit

* update translations interface

* try using composable recursive

* try linear approach on value modeling

* finish rewriting list-o2m-tree-view interface

* revert api changes

* fix sorting for list-o2m-tree-view

* fix selected items in created array

* Add direct download option to files interface

* Fix linter warnings

* Weird that it's being difficult, but ok

* Cast existingItemCount to number at all times

* fix page gets set below 1

* align pagination to the right

* highlight deselecting row

* show min 1 skeleton loader

* only filter selected when item exists

* fix working on new items

* Fix linter warning

* fix deselecting selected items

* show different icon depending if icon is local

* add changes from #12611

* Add _some vs _none support to o2m

* finish filtering out selected items

* Use get instead of search request

* fix save and stay

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* fix adding items to m2o

* Fix linter warning

* Handle no-type better

* Clean up axios usage

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-04-14 22:57:17 +02:00
keesvanbemmel
d11c59462f Adds x-directus-cache response header with HIT value (#12732)
* Adds x-directus-cache response header with HIT value

* Added ENV var for cache header and MISS, UNCACHEABLE

* Rename CACHE_HEADER_KEY -> CACHE_STATUS_HEADER

Tad opinionated, but I feel like it describes the functionality slightly better

* Return miss consistently

Uncacheable doesn't quite describe what's happening. The user actively requests the cache to be skipped, which should result in an expected miss. The value isn't un-cacheable, the cache is skipped on purpose

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-14 13:42:10 -04:00
Aiden Foxx
fd668647c1 Added default role support to LDAP and allow optional role syncing (#12767)
* Added default role support to LDAP and allow optional role syncing

* Add minimal docs

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-14 11:27:17 -04:00
Rijk van Zanten
80e986aa8a Fix bullet spacing 2022-04-14 09:17:42 -04:00
Nick Olszanski
360d5b64f5 add Last-Modified header to /assets/* responses (#12231)
* add `Last-Modified` header to `/assets/*` responses

only affects assets with a valid `modified_on` DB field

* update docs about `Last-Modified`

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-13 16:46:34 -04:00
Eron Donevan Powell
d2a311b20e Docs: Add Cloud Section (#11827)
* .gitignored package-lock.json that was created in the docs subfolder

* added cloud section structure

* set initial article outlines

* drafter accts-teams and shifted cloud docs in navbar

* added overview and projects draft

* added tiers and billing outline and basics

* added image to drafts and polished text. needs one more pass. added css for dngr on icons

* Added photos to overview

* minor tweak on images

* imrpoved copy and expanded CSS for inline icons

* expnaded CSS and, added images and finished copy on  acct-n-team

* more copy touchups

* Add divider between cloud and regular docs

* Fix capitalization of Github -> GitHub

* fixed overview images and tweaked copy

* recructured pages. Added writing tasks on appropriate pages

* added accts, options, and teams pages

* Overview intro (re)written)

* overview initial copy

* Overview first draft complete, links not added, media not added

* accounts initial draft complete, no media

* teams redrafted, projects and options partial refactoring

* projects redrafted

* finalized 5th page as glossay and reformatted

* refactored glossary structure

* glossary terms p1

* glossary copy 80% complete

* more glossary copy

* cloud glossary basic copy probably 100% done

* checked hyperlinks

* initial proofread on overview

* initial accounts proofread

* re-edited billing sections

* re-editec projects section and glossary

* re-edited teams

* small edits

* edited accounts, teams, projects

* re-edited glossary

* added screenshot-based media, still need graphic illustrations

* small, tiny edits

* fixed GitHub capitalization and other small type error

* applied ben's edit suggestions on overview, accounts, and 1/2 of projects

* applied the rest of Ben's edits

* added missing screenshots

* proof-read

* Fixed Team proejcts title

* tweaked copy after my ~10 questions to ben

* reworked 'projects > create a project' sections and 'glossary > data-processing' section

* final copy touchup, link check, still missing Rijk's review

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.local>
Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.hitronhub.home>
2022-04-13 14:15:00 -04:00
Lukas Breitstadt
09d9b4b323 Await when token is refreshing & reinstate msRefreshBeforeExpires flag (#12649) 2022-04-12 07:52:33 -04:00
rijkvanzanten
029a66ef31 Add note on SDK requestOptions usage
Fixes #12628
2022-04-11 12:31:34 -04:00
rijkvanzanten
7c36fa42a6 Add missing reference for user object
Fixes #12669
2022-04-11 09:36:52 -04:00
ian
68066eccb7 Remove UTC conversion from date, time and datetime fields (#10956)
* Remove UTC conversion from date, time and datetime fields

* Fix mysql / maria timestamps when not in UTC timezone

* Add sequential tests with node timezone change

* Increase connection attempt check

* Add error catching in tests flow setup

* Check for server connectivity

* Fix promises

* Fix timestamp inconsistencies

* Revert to previously used parseISO

* Ensure database and directus connection

* Add another timezone to test positive and negative GMT

* Set local server hostname to localhost

* Add tests for SQLite

* Use notNullable primary key

* Revert connection testing sleep duration

* Fix nested transactions on SQLite

* Increase MSSQL request timeout

* Add type override flag for SQLite

* Remove commented code

* Add type override flags for Oracle

* Updated test file path

* Increase test servers launch timeout

* Increase test servers launch timeout

* Update format of tests

* Fix typo

* Increase test timeout for CockroachDB

* Add type overrides when creating fields through collections service

* Remove time field type conversion for Oracle

* Update collections list in test

* Remove check for time field in Oracle

* Add missing continue...

* Remove database override

* Add note for SQLite

* Rename flags and extract shared util

* Abstract remaining DB specific checks

* Revert flags renaming except renaming of test files

* Use date helper to add field flag

* Move field date typecasting upstream

* Use timestamp helper for date-created and date-updated

* Fix tests

* Remove unused vars

* Add tests for date-created

* Increase connection attempt count

* Fix test for mariadb

* Increase allowable difference to account for delays

* Add tests for date-updated

* Fix tests again for mariadb

* Add date helpers post merge

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-06 16:15:22 -04:00
Nayan Patel
49d65124f5 Adds one click deploy with koyeb. (#12558) 2022-04-05 11:44:49 -04:00
Azri Kahar
d023b36838 Add import file method to SDK (#12575) 2022-04-05 10:39:29 -04:00
Azri Kahar
67c37ae11c Add count function in docs (#12576)
* Add `count` function in docs

* Rename relational to array functions

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-05 09:43:51 -04:00
Wryn (yage) Wagner
0930c2df97 Safe Metadata Upload (#12511)
* [Related to #11292] Safe Metadata Upload
- Created FILE_METADATA_ALLOWLIST
- Added test library for `FilesService`

* Rename ALLOWLIST->ALLOW_LIST to be consistent with other env vars

* Make sure it still works for files without Exif

* Prevent breaking changes in metadata formatting

* Allow * for all

* Fix md sup

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-04 20:43:56 -04:00
Eron Donevan Powell
3d9e325048 Docs: Data Sharing (#11579)
* .gitignored package-lock.json that was created in the docs subfolder

* Initial Data Shares Draft

* Finished copy of first, unedited draft

* added static images

* more copy polish and videos

* polished, awaiting comments

* added Ben's awesome edits

* added new media content and copy tweaks

* fixed broken link

* Update docs/app/data-sharing.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* Update docs/app/data-sharing.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* Update docs/app/data-sharing.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* Update docs/app/data-sharing.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-04 10:30:47 -04:00
Azri Kahar
d0b0818cca Return 401 status code for expired tokens (#12281)
* Refresh token when it's expired & retry request

* move refresh token interceptor in autoRefresh flag

* add TOKEN_EXPIRED exception

* update interceptor condition & fix autoRefreshJob

* update docs

* revert auth drivers changes

* remove unused imports

* undo sdk auth refresh changes
2022-04-04 09:23:28 -04:00
rijkvanzanten
2a6db01c42 v9.8.0 2022-04-01 14:41:08 -04:00
Rijk van Zanten
3307bed5fd Improve cache reliability in DDL operations (#12400)
* Add TTL to schema cache

* Clear caches on unexpected errors in DDL

* Consistent return value use

* Don't set a default value for schema ttl
2022-04-01 13:24:20 -04:00
Jake Cattrall
d24dacd075 Use date (epoch) compare workflow instead of timer to refresh token in SDK (#12399)
* use date compare workflow instead of timer

* convert milliseconds to seconds

* add missing references to auth_expired_at key

* correct calculation and presume getTime returns milliseconds

* resolve issue with static tokens

* prevents token refresh before everything else is initialized

* remove timer based authentication tests

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-04-01 09:31:11 -04:00
Ben Haynes
f7f3075330 docs homepage clarifications and tweaks (#12410) 2022-03-26 18:33:30 -04:00
Ben Haynes
69aa7fe283 Docs dark mode (#12362)
* docs dark mode color to match app

* not sure if needed

* Revert "not sure if needed"

This reverts commit f8a71198d5.

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-24 14:07:35 -04:00
Alexandre Lotte
eeff5e747f Docs: Slightly better scrollbars in dark mode (#12341) 2022-03-23 23:25:07 -04:00
rijkvanzanten
7b15947276 v9.7.1 2022-03-23 14:50:51 -04:00
rijkvanzanten
c1da41d671 v9.7.0 2022-03-18 16:34:35 -04:00
Rijk van Zanten
1c3e94d830 Add new export experience (#12201)
* Use script setup

* Start on export dialog

* Use new system field interface, replace limit with numeric input

* Set placeholder

* Add sort config

* Use folder picker, correct layoutQuery use

* Add local download button

* Allow writing exports to file

* Add notification after export

* Fix sort config, use new export endpoint

* Setup notification hints

* Add information notice

* Fix local limit, cancel button

* Add (basic) docs for export functionality

* Fix json export file format

* Implement xml batch stitching

* Resolve review points
2022-03-17 15:43:45 -04:00
Eron Donevan Powell
29cf8e1519 Docs: File Library (#11950)
* restructured file-library outline

* completed 3 sections, added action btn to CSS

* finished upload file and replace file sections

* completed full documentation refactor. media and proofreading remain

* updated media, except rename and delete folder vids

* copy ready. Links tested

* last second tweaks to copy and media

* stated multiple files can be uploaded

* Rijk's suggestions added and one final pass on copy edits

Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.local>
Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.hitronhub.home>
2022-03-14 16:07:56 -04:00
rijkvanzanten
02747d9afc Fixed typo 2022-03-11 10:23:59 -05:00
Dominic Marcelino
625c89f74c Update hooks.md - add system collection "files", fix payload parameter (#12094)
* Update hooks.md

* Delete event does not contains the whole payload but the payload keys
* files filter and hooks exist except for create/update

* Update docs/extensions/hooks.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-03-11 09:50:25 -05:00
Azri Kahar
3445114296 Remove outline prop from v-icons (#12092)
* remove unused outline prop from icons

* update docs
2022-03-11 09:48:42 -05:00
Eron Donevan Powell
a76e6b2120 Docs: User Directory (#11728)
* .gitignored package-lock.json that was created in the docs subfolder

* First User Directory Rough Draft Complete

* added footer

* restructured outline

* 2nd Rough Draft Complete, no pics and not proofread

* added photos

* added all media and polished copy

* Finished admin options section

* Applied Rijk's copy suggestions

* fixed date in information bar media issue

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.local>
2022-03-10 09:58:37 -05:00
Eron Donevan Powell
e66452ac6f Docs: Settings (#12038)
* initial pass on copy

* Finished Settings

* rijk's suggestions

* real final tweak

Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.local>
2022-03-10 09:56:09 -05:00
Eron Donevan Powell
6006b1215b Docs: Filters (#11330)
* added package-lock.json into gitignore

* added filters.md draft doc

* added header intro and section headers

* full outline and 60% of copy

* more fitlers doc copy

* copy 95% complete

* Filters doc as good as done

* small copy tweaks

* Decrease size of dividers in nav, add section with filters

* fixed dynamic var vid

* fixed filter-rules type-o

Co-authored-by: Eron Powell <eronpowell@Erons-MBP-2.local>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-07 19:22:46 -05:00
Rijk van Zanten
6da3f1ed50 Add support for import ip deny list (#12025)
* Add support for import ip deny list

* Fix typo
2022-03-07 18:09:08 -05:00
Rijk van Zanten
826404bcbe Default CORS to disabled (#12022)
* Default CORS to disabled

* Update docs to match
2022-03-07 21:05:02 +00:00
Rijk van Zanten
a8df6d9653 Allow configuring /assets endpoint CSP separately (#12020)
* Allow configuring CSP for /assets seperately

* Document assets-csp config

* Remove double header
2022-03-07 15:41:13 -05:00
Spencer Jones
469f6400b7 add --dry-run flag to schema apply CLI command (#12006)
Co-authored-by: Spencer Jones <sjones@morningconsult.com>
2022-03-07 17:52:02 +00:00
rijkvanzanten
eba2576227 v9.6.0 2022-03-04 20:25:43 -05:00
Rijk van Zanten
eec21d8d9a Add "items.sort" event (#11954)
* Adds the 'sort_updated' event emit after items are sorted

Signed-off-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>

* Updates the event name to 'sort_update'. Docs.

Signed-off-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>

* Updates the event name to `sort`

* Add item/to to hook, fix docs

Co-authored-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>
2022-03-04 19:58:47 -05:00
Rijk van Zanten
6a3eb823c3 Update base theme of the App (#11952)
* Add migration to remove default value from project_color

* Upgrade the default theme

* Do a pass over the header buttons

* Do another pass over --warning uses

* Little things

* Tweak smoke

* Use updated map

* Use dark system elements in dark mode

* Remove outdated files, update toasts

* Use correct delete button style for role

* Use primary for created point

* Tweak spacing in revisions section

* Use primary for sidebar sections

* Various color tweaks and changes

* Update base color palette

* Update "css reset" code

* Remove splashscreens, add default favicon

* Add primary highlight to datamodel page

* dark mode color update

* fix sign out hover color

* Does this help?!

* This fixes some loading issues

Fixes https://github.com/directus/directus/issues/10707

* Calculate default pretty background?

* Fix public view with logo

* Fix responsiveness of login page

* adjust notification group width to be equal

* Do an absolute pointless task that doesn't do anything

It was suggested that it could fix the stylelint error in tests, but alas

* Remove stylelint

Doesn't seem to play nice with script setup and other changes

Co-authored-by: Ben Haynes <ben@rngr.org>
2022-03-04 18:53:39 -05:00
Rijk van Zanten
eea9f45624 Add authenticate hook to implement custom auth checks against current request (#11942)
* Add "authenticate" filter hook that allows custom auth check

* Start on test

* Update Jest, restructure API tests, start implementing authenticate test

* Move access token verify to util function

* Ensure jest can show inline warnings on correct lines

* Update is-directus-jwt to use jsonwebtoken decode + add tests

* Remove unused package

* Tweak and finish + test authenticate

* Tweak test

* Add authenticate filter to docs

* Don't scan tests for codeql

* No seriously, ignore tests
2022-03-03 16:29:13 -05:00
Rijk van Zanten
962af79dbc Replace union query approach with updated table scan (#11246)
* Start by stripping out the previous Union attempt

* Then set limit to -1, causing massive memory issues on big data sets

* Now fix the memory problem by batching the responses

* Use env var for max relational batch size

* Rename env var, add to docs
2022-03-01 18:20:00 -05:00
Michael Lopez
c561826572 Support listen parameter (#11465)
* Support listen option for allowing server to listen on wanted IP address or host

* Change default listen value from localhost to 0.0.0.0

* Update LISTEN variable to HOST

* fix formatting

* Update docs/configuration/config-options.md

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-02-28 21:09:27 +00:00
José Varela
d4be6e0437 Add support to extend server properties (#11869) 2022-02-26 12:11:24 -05:00
Azri Kahar
0bad2744b3 Clarify default role ID format for SSO (#11855)
* clarify default role ID format for SSO

* tweak
2022-02-25 11:28:29 +00:00
Dominic Marcelino
45344284bf Update plesk docs: Create / apply snapshots (#11819)
* Update plesk docs: Create / apply snapshots

Add a script wrapper to support snapshots on plesk servers. 

Not sure if the example script should stay here or be added next to the other wrapper on the cli-page.

* Update docs/getting-started/installation/plesk.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-02-23 16:32:41 -05:00
schlagmichdoch
dacce8e472 Fix anonymous binding ldap (#11750)
* fix anonymous binding ldap by correcting condition for throwing InvalidConfigException

* add anonymous bind option to docs

Co-authored-by: Dominik Tils <d.tils@studentec.de>
2022-02-23 15:47:59 -05:00
Chris Bartley
bd89fe2a4c Fixed readByQuery's sort parameter in custom API endpoint example (#11662) 2022-02-22 14:36:30 +08:00
Azri Kahar
97fcefc268 Docs dark mode fix v2 (#11782)
* fix docs dark mode

* tweak code token color

* dynamic color for homepage elements

* swap primary/secondary for dark mode

* add dark variant of header background
2022-02-22 05:22:06 +00:00
Azri Kahar
f4358cd04b Fix dark mode for docs (#11781)
* fix docs dark mode

* tweak code token color
2022-02-21 23:58:59 -05:00
Eron Donevan Powell
1bc7da6967 Docs: update CSS and pics (#11634)
* .gitignored package-lock.json that was created in the docs subfolder

* tweaked color names, except the ones in in vue files

* converted terminal screencaps into markdown

* updated images in 'Content'

* updated user-directory images

* updated media in file-library

* moved picsto cloud in reference>files

* updated images in config > datamodels > relationships

* updated primary colors in app-overview.svg

* updated insights images

* swapped quickstart-guide media and touched up copy

* Update last colors, remove linting from docs temporarily

* Fix theme color

* Update homepage header image

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-02-21 15:32:09 -05:00