Commit Graph

143 Commits

Author SHA1 Message Date
Pascal Jufer
443f4591d7 Mention TELEMETRY environment variable in docs (#7317)
* Mention TELEMETRY environment variable in docs

* Add clarification

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-08-10 16:41:06 +02:00
Rijk van Zanten
ee9b7d916b Remove advanced example (#7174)
Fixes #7112
2021-08-04 01:18:35 +02:00
Rijk van Zanten
945d5d94e0 Add new /utils/cache/clear endpoint (#7014) 2021-07-27 23:32:25 +02:00
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Nicola Krumschmidt
7d8aa9fced Replace DIRECTUS_DEV env var with NODE_ENV and SERVE_APP (#6929) 2021-07-22 23:47:56 +02:00
Adrian Dimitrov
efe7b076a3 Add default-folder option (#3209)
* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Update after rebase

* Add storage_default_folder setting, use folder when deploy file

* Fix files options; Add default label option for folder interface.

* Fix set folder for file

* UX

* Add migration for column, undo seed change

* Update nomanclature

* Make sure file library always submits folder, cleanup setting retrieval

* Use indexName on down migrate

* Fix import default folder, rename customPresets->folderPreset

* Rename interface import

* Use undefined as default folder

* Remove deprecated lang file

* Fix display of folder interface, treat null as value

* Move shared composable

* Remove unused ref

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 17:29:21 -04:00
Tim
2c9ff3bca6 Allow custom transformations of assets (#6593)
* Allow custom transformations of assets

This exposes one query parameter `transforms`, which is a JSON array of
shard transformation operations.

It also updates the asset presets. The UX for this still needs some work

* Rename options to arguments for presets

More explicit

* options -> arguments in setting spec

* Better errors for invalid JSON in asset presets

* Add limit to transforms query parameter

* Use flattened option for extra transforms

* Fix placeholder color of code input

* Allow "simple mode" aliases

* Add documentation

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 15:57:47 -04:00
j3n57h0m45
79c91ed50d enable custom name for refresh token (#6890) 2021-07-20 15:29:11 +02:00
Rijk van Zanten
d68df58347 Fix update/delete relation docs (#6878)
Fixes #6872
2021-07-19 15:23:09 +02:00
Rijk van Zanten
11479313c9 Use / as default value for public_url (#6860) 2021-07-16 17:45:39 +02:00
Nicola Krumschmidt
e44e485939 Correctly document the default value of PUBLIC_URL (#6846) 2021-07-15 18:18:35 -04:00
Rijk van Zanten
f360a2d445 Fixed issue that would cause the wrong field to be extracted when using "detailed" updates in o2m with non-"id" primary keys (#6841)
Fixes #6817
2021-07-15 23:40:04 +02:00
Dieter Luypaert
99184a2fd7 Fix session memcache variable name (#6830) 2021-07-15 17:21:53 -04:00
Rijk van Zanten
262e8cdbb8 Show warning when PUBLIC_URL isn't correctly configured (#6840)
Closes #6539
2021-07-15 23:20:35 +02:00
Rijk van Zanten
5f7dce54e2 Use stricter Vue eslint setting (#6833) 2021-07-15 13:49:59 -04:00
Rijk van Zanten
1713f0cbf2 Allow setting a custom mailgun host (#6804)
Fixes #6787
2021-07-15 01:28:50 +02:00
Pascal Jufer
0b55035588 Clarify definition of environment variables (#6785) 2021-07-14 10:51:09 -04:00
Tommaso Bartolucci
0cca732f2f Add skip admin init flag (#6576)
* adds skipAdminInit flag to bootstrap

* checks for skipAdminInit flag

* update docs for skipAdminInit
2021-06-30 09:31:59 -04:00
WoLfulus
043ae13e40 Adds request and response interceptors on Axios transport (#6538) 2021-06-28 18:44:38 +00:00
Nicola Krumschmidt
051df415df Fix extensions (#6377)
* Add support for npm extensions

* Allow extensions to import vue from the main app

* Bundle app extensions on server startup

* Fix return type of useLayoutState

* Add shared package

* Add extension-sdk package

* Add type declaration files to allow deep import of shared package

* Add extension loading to shared

* Refactor extension loading to use shared package

* Remove app bundle newline replacement

* Fix extension loading in development

* Rename extension entrypoints

* Update extension build instructions

* Remove vite auto-replacement workaround

* Update package-lock.json

* Remove newline from generated extension entrypoint

* Update package-lock.json

* Build shared package as cjs and esm

* Move useLayoutState composable to shared

* Reverse vite base env check

* Share useLayoutState composable through extension-sdk

* Update layout docs

* Update package versions

* Small cleanup

* Fix layout docs

* Fix imports

* Add nickrum to codeowners

* Fix typo

* Add 'em to vite config too

* Fix email

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-23 12:43:06 -04:00
Anton Strandman
c6698a3f2d Import a File link in Assets tip broken (#6467)
Fixed the link
2021-06-23 10:36:15 -04:00
Rijk van Zanten
44082c60e1 Add schema caching (#6456)
* Rework cache handler to be function export

* Add default schema caching

* Add schema cache

* Auto purge schema cache on schema change from api

* Only set last_access value on login

* Add note on schema cache setting
2021-06-22 20:50:20 -04:00
Rijk van Zanten
1cb9181052 Add support for starts/ends with filters (#6437) 2021-06-22 14:28:11 -04:00
Martin Emmert
fb715cc66a docs: update sdk doc with note on using multiple instances (#6311) 2021-06-16 10:34:40 -04:00
Rijk van Zanten
d56f02697a Allow overriding the s-maxage cache header (#6294)
* Allow overriding the s-maxage cache header

* Only load expiry / set headers when cache exists
2021-06-15 17:11:29 -04:00
Rijk van Zanten
8e92c6beaa Add date adjustment to NOW variable (#6221) 2021-06-11 20:59:50 -04:00
nichols-green
055cd331d9 Added support for nodemailer ignoreTLS option (#6216)
* added support for nodemailer ignoreTLS option

* update doc to show no default value
2021-06-11 12:48:22 -04:00
Rijk van Zanten
7373b43042 Add note on file env vars (#6209) 2021-06-11 10:07:07 -04:00
Rijk van Zanten
4cb8d1f814 Add additional check to Two-Factor Authentication (by @masterwendu) (#6187)
* 6113 add tfa generate endpoint

* 6113 implement tfa otp check in user settings

* 6113 add autfocus for otp field on login form

* update package-lock

* improve TFA uri with user email

* fix vue 3 compatibility

* reduce code duplication for enableTFA

* Remove unnecessary parameters

* Use project name in otp url when available

* Update docs/reference/api/system/users.md

Co-authored-by: Wendelin Peleska <wendu@pm.me>
2021-06-10 15:36:34 -04:00
Nicola Krumschmidt
f55a2072e1 Refactor bookmark query navigation (#6170)
* Revert back to using query params for bookmarks

Aka "this hurts so much"

* Fix collection navigation active state

* Add active and query props to v-button

Also unify active and activated state.

* Remove not needed exact prop from collections navigation
2021-06-10 15:11:01 -04:00
Nicola Krumschmidt
1961dc188b Port the app to Vue 3 (#5339)
* Fix linting errors

* Fix remaining catch all routes

* Fix directive registration regression

* Replace $router global with composition function

* Fix v-bind overwrite order in nested-draggable

* Migrate vuedraggable

* Fix building with empty translation files

* Add comment regarding array equality check

* Fix markdown-it plugins import

* Fix newly introduced wrong store usage

* Fix v-button-group model

* Fix v-fancy-select model

* Fix v-field-template model

* Fix v-input model

* Fix v-item-group model

* Fix v-menu model

* Fix v-select model

* Fix v-tabs model

* Fix v-tabs-items model

* Fix v-textarea model

* Fix v-checkbox model

* Fix v-dialog model

* Fix v-drawer model

* Fix v-form model

* Fix v-list model

* Fix v-table model

* Fix v-detail model

* Fix v-radio model

* Fix v-switch model

* Fix files-navigation model

* Fix replace-file model

* Fix bookmark-add model

* Fix bookmark-edit model

* Fix drawer-batch model

* Fix drawer-item model

* Fix file-lightbox model

* Fix image-editor model

* Fix notifications-preview model

* Fix users-invite model

* Lowercase editor component name

* Fix collections-filter model

* Fix filter-input model

* Fix filter-sidebar-detail model

* Fix folder-picker model

* Fix interface-checkboxes model

* Fix interface-code model

* Fix interface-icon model

* Fix interface-repeater model

* Fix refresh-sidebar-detail model

* Fix search-input model

* Fix interface/display component option v-model usage

* Replace calling listener through $attrs with $emit and add emits option

* Add comment regarding useCustomSelection emits

* Fix context menu activation

* Fix collectionsStore access

* Fix popperjs

* Hotfix useGroupable

* Fix notifications-preview old prop name

* Fix module bar tooltip translation

* Fix useSync type signature

* Fix update:layoutOptions emit name

* Fix usePermissions missing imports regression

* Revert changes to docs vuepress instance

* Fix module-relative-resolve vite plugin when serving

* Fix docs

* Fix refresh on first load

* Fix creating new collection

* Fix loading of collection route

* Fix v-dialog/v-menu appear transition

* Access props directly

* Fix v-table clickable

* Fix v-drawer cancelable

* Fix v-icon clickable

* Fix v-input clickable

* Fix v-list-group clickable

* Fix v-list-item clickable

* Fix v-overlay clickable

* Fix header-bar primary button

* Fix v-table item.* slot

* Fix vue warning regarding exposed variables starting with _ or $

* Fix usePermissions

* Add package-lock.json

* Fix v-form unset regression

* Fix vue shims

* Fix useCustomSelection emit

* Make extensions arrays shallow

* Move teleport targets out of the vue app

* Fix v-field-select model

* Fix v-slider model

* Fix v-pagination model

* Fix card model

* Fix v-select item-value prop usage

* Fix layout-sidebar-detail model

* Fix form-field model

* Fix form-field-menu model

* Fix form-field-interface model

* Fix v-form model

* Use kebab-case for modelValue

* Update package-lock.json

* Add missing dependency

* Replace $t with i18n composable

* Replace remaining usages of $t

* Replace $te with i18n composable

* Replace $n with i18n composable

* Disable global injection in vue-i18n

* Replace i18n.global.t usage where composable is already imported

* Replace remaining i18n.global.t usage with composable

* Replace remaining i18n.global usages with composable

* Fix uploadFile emitter regression

* Remove inheritAttrs: false from file-info-sidebar-detail

* Hotfix v-input

* Update .eslintrc.js

* Fix use-preview

* Fix eslint issues

* Remove unused imports

* Fix extension getter type

* Refactor layout structure and fix tabular layout

* Fix build

* Fix cards layout

* Hotfix vuedraggable

* Dev is true again

* Register export-sidebar-detail globally

* Deconstruct layout state

* Fix calendar layout

* Fix cards/calendar layouts

* Fix layout options when switching layout

* Replace marked usage with md util

* Use useLayout everywhere

* Fix type issue

* Fix codemirror dynamic imports

* Fix data-fns dynamic import

* Fix useLayout selection

* Fix v-avatar scoped styling

* Remove unused v-button-group component

* Remove v-deep from v-card-actions

* Replace v-deep in v-dialog

* Use correct pseudoclasses for vue3

* Fix v-deep in v-field-template

* Replace v-deep in v-list-item-content

* Replace v-deep in v-list-item

* v-deep in v-list

* v-deep in v-notice

* Replace breakpoint mixin

* Replace v-deep in v-button

* Enforce empty line before block

* v-deep in v-pagination

* No white lines on the inner brackets of a block please

* Replace v-deep in v-select

* Fix stylelint rule

* Replace v-deep in v-table

* Replace v-deep in v-tabs

* Replace v-deep in rich text input

* Replace v-deep

* Replace v-deep elsewhere

* Needs more stylelint tweaks, but v-deep is done

* Fix translations interface

* Fix date layout

* Fix npm install

* Fix router catch all routes

* Fix layout options

* Remove call to next in router guards

* Remove vue router in-component guards

* Refactor module route registration

* Fix collections module navigation

* Fix settings module navigation

* Fix router-passthrough in devtools

* Refactor docs export and docs route registration

* Import docs routes using exported function

* Remove moduleRelativeResolve vite hack

* Re-add dev scripts

* Fix deprecated hljs usage

* Use activateContextMenu without parens

* Re-add readme/license/editorconfig

* Fix groupable

* Fix initial docs navigation

* Move global app css to app component

* Fix collection navigation icon color

* Fix field setup style

* Fix divider icon style

* Fix optional v-input slots

* Use $slots direct property access

* Fix docs font style

* Fix docs v-deep

* Fix docs add missing styles

* Remove docs style margin

* Fix save options color

* Fix nested v-slotted usage

* Fix v-button exact prop

* Fix v-list-item exact prop

* Fix package-lock.json

* Improve useSync type

* Fix route type error

* Fix bookmark router links

* Add redirect to route with bookmark

* Fix files module folder route

* Fix users module role route

* Add redirect routes to files and roles sub-routes

* Fix users module role active state

* Replace routerPassthrough function with object

* Nest file routes

* Improve module bar hidden check

* Remove slash from module router link

* Fix files and folder navigation

* Revert users route nesting

* Fix buttons in list

* Don't make nav item mandatory in left sidebar

* Fix infinite loop in box open

* Fix interactivity in v-list items

* Fix docs menu jumps

* Fix right click positioning

* Fix missing translations

* Fix close/open alignment of color interface

* Fix code editor interfaces

* Fix relation access in cards layout

* Remove template ref from collection-or-item

* Revert jest-environment-jsdom package update

* Fix package-lock.json

* Resolve vue3 TODO comments

* Fix layout presets

* Remove reactivity fix

* Remove Todo3 comment

* Fix icon color override

* Add error message to useLayoutState

* Add composable to properly transition dialog routes

* Fix new collection transition

* Fix add new role transition

* Fix add new file transition

* Fix activity item transition

* Fix error type in useItems

* Fix collection error dialog transition

* Fix field detail transition

* Fix permissions detail transition

* Fix store getters types

* Update package-lock

* Fix preview icon color

* Fix reference to selections

* Fix linter warnings

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-08 15:59:55 -04:00
Oreille
22f2e4662f Add support for adding a collection accent color (#5818)
* Added icon_color to directus_collections
Added migrations
Added color property to select-icon
Fixed select-icon placeholder

* Use icon color in collection header bar.

* Set `collection` and `note` fields to hald witdh

* Rename icon_color->color

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-03 13:04:19 -04:00
Cosmin Epureanu
7f5e59b117 Update links at security env variables (#5936) 2021-05-28 11:40:16 -04:00
Mirko
5f4a24d456 Add reference to relational data section to create item API docs (#5932)
This commit adds a reference for easier retrieval of the requirements for sending successful
requests containing relational data.
2021-05-28 09:57:06 -04:00
Rijk van Zanten
8d3102fbad Add max concurrency and max image transform size support (#5795)
* Add assets concurrency and max size controls

* Render no-thumbnail images nicer in app

* Document new asset environment variables

* Update package-lock
2021-05-20 18:18:10 -04:00
Rijk van Zanten
9335372400 Foreign Key Constraints (#5615)
* Bump knex-schema-inspector

* Fix cli role name attr

* Update relation type

* Restructure relations

* Restructure relations table

* Update api type for relation record

* Fetch relations in new structure

* Update schema-inspector

* Use new relations schema structure in api

* Update relations GETters

* Add default value to one deselect

* Add create relationship on existing field

* Add updating existing relationship

* Add delete relations

* Add relations query resolver

* Add graphql mutations for relations

* Fix reading from wrong name

* Fix wrong method name

* No idea why this flip flops every install

* Update relation type

* Accept null in use-collection composable

* Use new relations structure in translations

* Use new relations structure in new-collection

* Start updating field detail store

* Renames for new relations structure

* Silently ignore passed collection/field in relation update

* Fix setting pk field in m2o relational setup

* Small tweaks in o2m setup

* Fix m2m setup

* Tweak m2o setup

* Fix m2a setup

* Allow null for related collection (m2a)

* Fix languages code name

* Fix migration default value

* Fix relational cleanup in collections/fields

* Fix transaction problem in field delete

* Fix inserting relational o2m items

* Don't execute updateByQuery on empty item set

Fixes #5710, fixes #5070

* Show referential action input on m2o

* Finish language for m2o

* Show triggers config on o2m

* Delete items on one_deselect_item delete

* Fix naming, show relational trigger config on m2m

* Tweak language, add setup to m2a

* Fix linter warnings

* Add trigger setup for translations

* fix Edit non-schema relationship issue

* Sync existing on_delete triggers in o2m setup

* Add migration to setup foreign key constraints

* Update illegal FK values before setting constraint

* Fix MySQL unsigned vs not-unsigned in FK creation

* Use pretty names for labels in relational triggers

* Prefix auto-junction when system table

Fixes #5493

* Add system foreign key triggers

Fixes #5749

* Update docs
2021-05-19 12:29:16 -04:00
mcarlson
c0446cb379 Add support for mailgun transport (#5613)
* Add support for mailgun transport

* eslint fix

* Add nodemailer-mailgun-transport as optional dependency

* Add docs, rename APIKEY -> API_KEY

Co-authored-by: Max Carlson <>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-05-14 12:20:18 -04:00
rijkvanzanten
55efb688ed Fix docs example 2021-05-14 11:56:53 -04:00
Rijk van Zanten
9ac9a8d44b Add JSON/CSV Import (#5660)
* Add async/destroy packages

* Target node 12+

* Return payload data in json export

* Import JSON from Stream

* Add CSV import support

* Add CSV Import

* Add docs

* Add missing types
2021-05-14 11:03:12 -04:00
WoLfulus
d8caf221ed CLI 2.0 (#5376)
* merge components

merge args, parser, docs, formatter, help and handlers

* change directus command and add auto debug

* output format fixes

* adds back some reformatted and documented commands

* better help output format

* refactor all output flow

* export cli types

* more formatting fixes and param rework

* fix table spacing

* add yaml formatting and fix string colors

* finished formatting docs

* remove log

* remove package-lock

* update dependency versions

* fix command description

* workaround typescript loading

* module loading fixes
added command error
rename human to table
fix disconnect usage

* add typescript loader

redirect execution to local package if installed locally
added command alias `directus-ctl`

* fix module load directories

* reimplement stdin pipe to work on linux

* fix sdk server info type

* info command

* Fix stdin bug
Disable community extensions to discourage use for now
Added template to config files
Added password stdin to connect to instances
Fixed typescript command load

* Added command suggestions and QOL features

* Linter fixes

* Add command hints

* Separate positional options

* Add back delete many, fix delete one location

* Change score logic

* Add whoami util command

* Add short online docs

* Fix typo

* Fix typo

* Update commands

* Param consistency fix and docs update

* Create commands

* Update package.json version

* Update package-lock

* Fixed several linting problems

* Update dependencies

* Update lock

* Remove locked dependencies

* Stop conflicts when in home directory

* Package lock update and npm audit fix

* Fix formatting errors

* Comment out extending cli section until we figure out cli ext

* Update readme

* Tweak dev/build/prebuild script naming

* Use up to date deps

* Fix dependency version in lock (fix build)

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-05-12 20:38:30 +00:00
rijkvanzanten
d912f070f3 Clarify /graphql vs /graphql/system 2021-05-05 15:05:00 -04:00
rijkvanzanten
010eabad27 Format remaining md files 2021-05-04 18:52:08 -04:00
João
b20a394f51 Update SDK docs and code to match API (#5437) 2021-05-03 14:46:05 -04:00
Pyll Gomez
09b19b9191 Session store knex (#5432)
* Rotate JPG image on upload #4206

* fixes #3949 width/height generated for gif and tif

* API hooks for event added for auth.login #4079

* updated doc for api hooks for new auth.login event

* Style tweaks

* Update docs

* Tweak docs some more

* Spelling error

* Allow non-required flags and pass to hook

* SDK - Persistent login refresh fixes #4113

* Fixed #4145 SDK, Token Expired error

* Spell check

* Docs Spell check

* Docs Spell check

* Docs Spell check

* update docs for sdk-js

* To delete all expired session from db on login

* corrected the condition for the delete

* changed the from Date.now to new date .

* Move it inline

* Added Knex option for Session store

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-05-03 11:46:42 -04:00
Pascal Jufer
b312ab84f5 Small fixes and addition in docs (#5417) 2021-05-02 08:42:01 -04:00
Rijk van Zanten
a3898fa321 Add SESSION_STORE options (#5403)
* Allow configuring the session storage driver

Fixes #3814

* Document SESSION_STORE env var

* Add missing dependency

* Docs tweak
2021-04-30 18:18:39 -04:00
Pascal Jufer
f19cf1070c Fix some points in SDK documentation (#5273)
* Change confusing statement about storage adapter

Mainly used to store auth token / expiration
Refresh tokens only in JSON mode

* Remove 'time' option in 1st example since described in 2nd example

* Add infos about options.refresh on Auth
2021-04-27 09:57:49 -04:00
João
1973969265 Update query.md 2021-04-27 10:51:46 -03:00
João
63c45a6ae4 Fix SDK docs example 2021-04-26 11:37:25 -03:00
rijkvanzanten
5d338083da Fix tags in docs
Fixes #5140
2021-04-23 17:54:48 -04:00