Browse Source

feat(gui-v2): testWebhook

pull/2838/head
Wing-Kam Wong 2 years ago
parent
commit
e1a2b289ba
  1. 11
      packages/nc-gui-v2/components/webhook/Editor.vue

11
packages/nc-gui-v2/components/webhook/Editor.vue

@ -57,6 +57,8 @@ const urlTabKey = ref('body')
const apps: Record<string, any> = ref() const apps: Record<string, any> = ref()
const webhookTestRef = ref()
const slackChannels = ref() const slackChannels = ref()
const teamsChannels = ref() const teamsChannels = ref()
@ -326,6 +328,10 @@ async function saveHooks() {
}) })
} }
async function testWebhook() {
await webhookTestRef.value.testWebhook()
}
onMounted(() => { onMounted(() => {
loadPluginList() loadPluginList()
}) })
@ -340,7 +346,7 @@ onMounted(() => {
</div> </div>
</div> </div>
<div class="float-right mb-5"> <div class="float-right mb-5">
<a-button class="mr-3" type="primary" size="large" @click="emit('editOrAdd')"> <a-button class="mr-3" type="primary" size="large" @click="testWebhook">
<div class="flex items-center"> <div class="flex items-center">
<MdiGestureDoubleTapIcon class="mr-2" /> <MdiGestureDoubleTapIcon class="mr-2" />
<!-- TODO: i18n --> <!-- TODO: i18n -->
@ -542,6 +548,7 @@ onMounted(() => {
</div> </div>
</div> </div>
<WebhookTest <WebhookTest
ref="webhookTestRef"
:hook="{ :hook="{
...hook, ...hook,
filters, filters,
@ -555,4 +562,4 @@ onMounted(() => {
</a-row> </a-row>
</a-form-item> </a-form-item>
</a-form> </a-form>
</template> </template>

Loading…
Cancel
Save