mirror of
https://github.com/directus/directus.git
synced 2026-01-24 10:28:01 -05:00
Add correct form layout to webhooks
This commit is contained in:
@@ -1836,7 +1836,85 @@ rows:
|
||||
hidden: true
|
||||
locked: true
|
||||
|
||||
# directus_webhooks TBD
|
||||
- collection: directus_webhooks
|
||||
field: id
|
||||
hidden: true
|
||||
locked: true
|
||||
- collection: directus_webhooks
|
||||
field: name
|
||||
interface: text-input
|
||||
locked: true
|
||||
sort: 1
|
||||
width: full
|
||||
- collection: directus_webhooks
|
||||
field: method
|
||||
interface: dropdown
|
||||
locked: true
|
||||
options:
|
||||
choices:
|
||||
- GET
|
||||
- POST
|
||||
sort: 2
|
||||
width: half
|
||||
- collection: directus_webhooks
|
||||
field: url
|
||||
interface: text-input
|
||||
locked: true
|
||||
options:
|
||||
iconRight: link
|
||||
sort: 3
|
||||
width: half
|
||||
- collection: directus_webhooks
|
||||
field: status
|
||||
interface: dropdown
|
||||
locked: true
|
||||
options:
|
||||
choices:
|
||||
- text: Active
|
||||
value: active
|
||||
- text: Inactive
|
||||
value: inactive
|
||||
sort: 4
|
||||
width: half
|
||||
- collection: directus_webhooks
|
||||
field: data
|
||||
interface: toggle
|
||||
locked: true
|
||||
options:
|
||||
choices:
|
||||
label: Include item data in request
|
||||
sort: 5
|
||||
width: half
|
||||
- collection: directus_webhooks
|
||||
field: triggers_divider
|
||||
interface: divider
|
||||
options:
|
||||
icon: api
|
||||
title: Triggers
|
||||
color: '#2F80ED'
|
||||
special: alias
|
||||
sort: 6
|
||||
width: full
|
||||
- collection: directus_webhooks
|
||||
field: actions
|
||||
interface: checkboxes
|
||||
options:
|
||||
choices:
|
||||
- text: Create
|
||||
value: create
|
||||
- text: Update
|
||||
value: update
|
||||
- text: Delete
|
||||
value: delete
|
||||
special: csv
|
||||
sort: 7
|
||||
width: full
|
||||
- collection: directus_webhooks
|
||||
field: collections
|
||||
interface: collections
|
||||
special: csv
|
||||
sort: 8
|
||||
width: full
|
||||
|
||||
- collection: directus_activity
|
||||
field: action
|
||||
|
||||
@@ -175,6 +175,7 @@ export default class ItemsService implements AbstractService {
|
||||
}
|
||||
|
||||
const records = await runAST(ast);
|
||||
|
||||
return records;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineInterface } from '@/interfaces/define';
|
||||
import InterfaceCollection from './collection.vue';
|
||||
|
||||
export default defineInterface(({ i18n }) => ({
|
||||
id: 'collections',
|
||||
id: 'collection',
|
||||
name: i18n.t('interfaces.collection.collection'),
|
||||
description: i18n.t('interfaces.collection.description'),
|
||||
icon: 'featured_play_list',
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<interface-checkboxes :choices="items" @input="$listeners.input" :value="value" :disabled="disabled" />
|
||||
<v-notice v-if="items.length === 0">
|
||||
{{ $t('no_collections') }}
|
||||
</v-notice>
|
||||
<interface-checkboxes v-else :choices="items" @input="$listeners.input" :value="value" :disabled="disabled" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"create_preset": "Create Preset",
|
||||
"create_role": "Create Role",
|
||||
"create_user": "Create User",
|
||||
"create_webhook": "Create Webhook",
|
||||
|
||||
"rename_folder": "Rename Folder",
|
||||
"delete_folder": "Delete Folder",
|
||||
|
||||
@@ -75,11 +75,11 @@
|
||||
</template>
|
||||
|
||||
<template #no-items>
|
||||
<v-info :title="$tc('webhooks_count', 0)" icon="people_alt" center>
|
||||
<v-info :title="$tc('webhooks_count', 0)" icon="anchor" center>
|
||||
{{ $t('no_webhooks_copy') }}
|
||||
|
||||
<template #append>
|
||||
<v-button :to="{ path: '/settings/webhooks/+', query: queryFilters }">{{ $t('create_webhook') }}</v-button>
|
||||
<v-button :to="{ path: '/settings/webhooks/+' }">{{ $t('create_webhook') }}</v-button>
|
||||
</template>
|
||||
</v-info>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user