feat: queue force promote (#10370)

* feat: queue force promote

* Update CHANGELOG.md

* small fix
This commit is contained in:
CyberRex
2023-03-22 08:58:23 +09:00
committed by GitHub
parent 75888a55c3
commit 7331de0bce
6 changed files with 77 additions and 0 deletions

View File

@@ -4,6 +4,8 @@
<MkSpacer :content-max="800">
<XQueue v-if="tab === 'deliver'" domain="deliver"/>
<XQueue v-else-if="tab === 'inbox'" domain="inbox"/>
<br>
<MkButton @click="promoteAllQueues"><i class="ti ti-reload"></i> {{ i18n.ts.retryAllQueuesNow }}</MkButton>
</MkSpacer>
</MkStickyContainer>
</template>
@@ -15,6 +17,7 @@ import * as os from '@/os';
import * as config from '@/config';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import MkButton from '@/components/MkButton.vue';
let tab = $ref('deliver');
@@ -30,6 +33,18 @@ function clear() {
});
}
function promoteAllQueues() {
os.confirm({
type: 'warning',
title: i18n.ts.retryAllQueuesConfirmTitle,
text: i18n.ts.retryAllQueuesConfirmText,
}).then(({ canceled }) => {
if (canceled) return;
os.apiWithDialog('admin/queue/promote', { type: tab });
});
}
const headerActions = $computed(() => [{
asFullButton: true,
icon: 'ti ti-external-link',