This commit is contained in:
61
src/views/polling-management/carrier-queues/index.vue
Normal file
61
src/views/polling-management/carrier-queues/index.vue
Normal file
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<ArtTableFullScreen
|
||||
><div id="table-full-screen"
|
||||
><ElCard shadow="never" class="art-table-card"
|
||||
><p v-if="data"
|
||||
>调度模式:{{ data.scheduler_mode }};新结构初始化状态:{{
|
||||
data.init_state || '未初始化'
|
||||
}}。</p
|
||||
><ElAlert
|
||||
title="待确认停复机指令数按队列前 500 条统计;QPS 为上一分钟实际调用。刷新不会修改调度。"
|
||||
type="info"
|
||||
:closable="false" /><ElAlert
|
||||
v-if="error"
|
||||
:title="error"
|
||||
type="error"
|
||||
:closable="false" /><SchedulerTable
|
||||
:data="data?.items || []"
|
||||
:definitions="fields"
|
||||
:loading="loading"
|
||||
row-key="carrier_id"
|
||||
@refresh="load" /></ElCard></div
|
||||
></ArtTableFullScreen>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import { PollingSchedulerService as Service } from '@/api/modules/pollingScheduler'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { useSchedulerRequest } from '@/composables/useSchedulerRequest'
|
||||
import { SCHEDULER_PERMISSIONS } from '@/config/constants/pollingScheduler'
|
||||
import { gatewayData } from '@/utils/business/gateway'
|
||||
import SchedulerTable from '@/components/business/polling/SchedulerTable.vue'
|
||||
defineOptions({ name: 'PollingCarrierQueues' })
|
||||
const { hasAuth } = useAuth(),
|
||||
{ data, loading, error, load } = useSchedulerRequest(
|
||||
async () => gatewayData(await Service.getQueues()),
|
||||
() => hasAuth(SCHEDULER_PERMISSIONS.queues.page)
|
||||
)
|
||||
const fields = [
|
||||
['carrier_name', '运营商账户'],
|
||||
['queue_length', '普通队列'],
|
||||
['priority_length', '优先队列'],
|
||||
['due_count', '已到期卡数'],
|
||||
['running', '执行中卡任务'],
|
||||
['inflight_limit', '执行上限'],
|
||||
['qps_last_minute', '上一分钟 QPS'],
|
||||
['rate_limit_waits', '限流等待'],
|
||||
['rate_limited', '限流拒绝/超时'],
|
||||
['expired_claims_1h', '1小时标记到期'],
|
||||
['open_alerts', '未处理卡告警'],
|
||||
['open_alerts_by_category', '按类别告警'],
|
||||
['stop_resume_queue_length', '停复机队列'],
|
||||
['stop_resume_due', '到期指令'],
|
||||
['stop_resume_running', '执行中指令'],
|
||||
['stop_resume_pending', '待确认(前500条)'],
|
||||
['stop_resume_success_1h', '1小时成功'],
|
||||
['stop_resume_failed_1h', '1小时失败'],
|
||||
['stop_resume_retry_1h', '1小时推后重试'],
|
||||
['stop_resume_unknown_1h', '1小时未知']
|
||||
].map(([prop, label]) => ({ prop, label }))
|
||||
onMounted(load)
|
||||
</script>
|
||||
Reference in New Issue
Block a user