feat: sync account priorities after rate changes
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<el-option label="服务异常" value="upstream_unhealthy" />
|
||||
<el-option label="服务恢复" value="upstream_recovered" />
|
||||
<el-option label="余额不足" value="upstream_balance_low" />
|
||||
<el-option label="账号优先级变更" value="account_priority_changed" />
|
||||
<el-option label="测试" value="test" />
|
||||
</el-select>
|
||||
<el-button size="small" text @click="loadList" :loading="tableLoading">刷新</el-button>
|
||||
@@ -119,11 +120,12 @@ const EVENT_LABELS: Record<string, string> = {
|
||||
upstream_unhealthy: '服务异常',
|
||||
upstream_recovered: '服务恢复',
|
||||
upstream_balance_low: '余额不足',
|
||||
account_priority_changed: '账号优先级变更',
|
||||
test: '测试通知',
|
||||
}
|
||||
const eventLabel = (e: string) => EVENT_LABELS[e] || e
|
||||
const eventTagType = (e: string) =>
|
||||
({ upstream_rate_changed: 'primary', website_rate_changed: 'warning', upstream_unhealthy: 'danger', upstream_recovered: 'success', upstream_balance_low: 'warning', test: 'info' }[e] || '')
|
||||
({ upstream_rate_changed: 'primary', website_rate_changed: 'warning', upstream_unhealthy: 'danger', upstream_recovered: 'success', upstream_balance_low: 'warning', account_priority_changed: 'primary', test: 'info' }[e] || '')
|
||||
const toUTC = (t: string) => /[Z+\-]\d*$/.test(t.trim()) ? t : t + 'Z'
|
||||
const fmtTime = (t: string) => dayjs(toUTC(t)).format('MM-DD HH:mm:ss')
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
<el-checkbox label="upstream_unhealthy">服务异常</el-checkbox>
|
||||
<el-checkbox label="upstream_recovered">服务恢复</el-checkbox>
|
||||
<el-checkbox label="upstream_balance_low">余额不足</el-checkbox>
|
||||
<el-checkbox label="account_priority_changed">账号优先级变更</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用">
|
||||
@@ -121,10 +122,11 @@ const EVENT_LABELS: Record<string, string> = {
|
||||
upstream_unhealthy: '服务异常',
|
||||
upstream_recovered: '服务恢复',
|
||||
upstream_balance_low: '余额不足',
|
||||
account_priority_changed: '账号优先级变更',
|
||||
}
|
||||
const eventLabel = (e: string) => EVENT_LABELS[e] || e
|
||||
const eventTagType = (e: string) =>
|
||||
({ upstream_rate_changed: 'primary', website_rate_changed: 'warning', upstream_unhealthy: 'danger', upstream_recovered: 'success', upstream_balance_low: 'warning' }[e] || '')
|
||||
({ upstream_rate_changed: 'primary', website_rate_changed: 'warning', upstream_unhealthy: 'danger', upstream_recovered: 'success', upstream_balance_low: 'warning', account_priority_changed: 'primary' }[e] || '')
|
||||
|
||||
const toUTC = (t: string) => /[Z+\-]\d*$/.test(t.trim()) ? t : t + 'Z'
|
||||
const fmtTime = (t: string) => dayjs(toUTC(t)).format('MM-DD HH:mm')
|
||||
|
||||
Reference in New Issue
Block a user