Browse Source

fix: resend webhook

pull/551/head
cKey 4 years ago
parent
commit
c7d08f0b10
  1. 6
      apps/vue/src/views/webhooks/send-attempts/components/SendAttemptModal.vue
  2. 18
      apps/vue/src/views/webhooks/send-attempts/components/SendAttemptTable.vue
  3. 5
      apps/vue/src/views/webhooks/subscriptions/components/SubscriptionModal.vue

6
apps/vue/src/views/webhooks/send-attempts/components/SendAttemptModal.vue

@ -9,8 +9,8 @@
<Form
ref="formElRef"
:colon="true"
label-align="left"
:label-col="{ span: 6 }"
label-align="right"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 18 }"
:model="modelRef"
>
@ -43,7 +43,7 @@
</TabPane>
<TabPane v-if="subscriptionRef.id" key="subscription" :tab="L('Subscriptions')">
<FormItem :label="L('DisplayName:SubscriptionId')">
<FormItem :label="L('DisplayName:WebhookSubscriptionId')">
<Input readonly :value="modelRef.webhookSubscriptionId" />
</FormItem>
<FormItem :label="L('DisplayName:IsActive')">

18
apps/vue/src/views/webhooks/send-attempts/components/SendAttemptTable.vue

@ -26,8 +26,7 @@
{
auth: 'AbpWebhooks.SendAttempts.Resend',
label: L('Resend'),
ifShow: [JobStatus.Running, JobStatus.FailedRetry].includes(record.status),
onClick: handlePause.bind(null, record),
onClick: handleResend.bind(null, record),
},
]"
/>
@ -38,7 +37,7 @@
</template>
<script lang="ts" setup>
import { Switch, Tag } from 'ant-design-vue';
import { Tag } from 'ant-design-vue';
import { useMessage } from '/@/hooks/web/useMessage';
import { useLocalization } from '/@/hooks/abp/useLocalization';
import { useModal } from '/@/components/Modal';
@ -47,11 +46,11 @@
import { getDataColumns } from '../datas/TableData';
import { getSearchFormSchemas } from '../datas/ModalData';
import { httpStatusCodeMap, getHttpStatusColor } from '../../typing';
import { getList } from '/@/api/webhooks/send-attempts';
import { getList, deleteById, resend } from '/@/api/webhooks/send-attempts';
import SendAttemptModal from './SendAttemptModal.vue';
const { createConfirm } = useMessage();
const { L } = useLocalization('WebhooksManagement');
const { createConfirm, createMessage } = useMessage();
const { L } = useLocalization('WebhooksManagement', 'AbpUi');
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload }] = useTable({
rowKey: 'id',
@ -90,8 +89,15 @@
onOk: () => {
deleteById(record.id).then(() => {
reload();
createMessage.success(L('Successful'));
});
},
});
}
function handleResend(record) {
resend(record.id).then(() => {
createMessage.success(L('Successful'));
});
}
</script>

5
apps/vue/src/views/webhooks/subscriptions/components/SubscriptionModal.vue

@ -9,9 +9,10 @@
>
<Form
ref="formElRef"
label-align="left"
:colon="true"
label-align="right"
layout="horizontal"
:label-col="{ span: 6 }"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 18 }"
:model="modelRef"
:rules="modelRules"

Loading…
Cancel
Save