fix: 移除告警客户端身份字段
This commit is contained in:
@@ -28,8 +28,6 @@ export const fetchAlertRecordDetail = (id: number) => request.get(`/Alert/v1/rec
|
||||
export const createAlertProcess = (data: {
|
||||
alert_record_id: number
|
||||
action: string // ack / resolve / silence / comment / assign / escalate / close
|
||||
operator: string
|
||||
operator_id?: string
|
||||
comment?: string
|
||||
assign_to?: string
|
||||
assign_to_id?: string
|
||||
|
||||
@@ -48,5 +48,5 @@ export const fetchIncidentAlerts = (id: number) => request.get(`/Alert/v1/incide
|
||||
|
||||
export const fetchIncidentTimeline = (id: number) => request.get(`/Alert/v1/incidents/${id}/timeline`)
|
||||
|
||||
export const transitionIncident = (id: number, data: { status: string; comment?: string; operator?: string }) =>
|
||||
export const transitionIncident = (id: number, data: { status: string; comment?: string }) =>
|
||||
request.post(`/Alert/v1/incidents/${id}/transition`, data)
|
||||
|
||||
@@ -59,7 +59,6 @@ const handleOk = async () => {
|
||||
await createAlertProcess({
|
||||
alert_record_id: props.alertRecordId,
|
||||
action: 'ack',
|
||||
operator: getCurrentUser(),
|
||||
comment: form.value.comment,
|
||||
metadata: '{}',
|
||||
})
|
||||
@@ -77,9 +76,4 @@ const handleOk = async () => {
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false)
|
||||
}
|
||||
|
||||
function getCurrentUser() {
|
||||
// TODO: 从全局状态获取当前用户
|
||||
return 'admin'
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -64,7 +64,6 @@ const handleOk = async () => {
|
||||
await createAlertProcess({
|
||||
alert_record_id: props.alertRecordId,
|
||||
action: 'comment',
|
||||
operator: getCurrentUser(),
|
||||
comment: form.value.comment,
|
||||
metadata: '{}',
|
||||
})
|
||||
@@ -82,9 +81,4 @@ const handleOk = async () => {
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false)
|
||||
}
|
||||
|
||||
function getCurrentUser() {
|
||||
// TODO: 从全局状态获取当前用户
|
||||
return 'admin'
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -69,7 +69,6 @@ const handleOk = async () => {
|
||||
await createAlertProcess({
|
||||
alert_record_id: props.alertRecordId,
|
||||
action: 'resolve',
|
||||
operator: getCurrentUser(),
|
||||
comment: form.value.comment,
|
||||
root_cause: form.value.root_cause,
|
||||
solution: form.value.solution,
|
||||
@@ -89,9 +88,4 @@ const handleOk = async () => {
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false)
|
||||
}
|
||||
|
||||
function getCurrentUser() {
|
||||
// TODO: 从全局状态获取当前用户
|
||||
return 'admin'
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -84,7 +84,6 @@ const handleOk = async () => {
|
||||
await createAlertProcess({
|
||||
alert_record_id: props.alertRecordId,
|
||||
action: 'silence',
|
||||
operator: getCurrentUser(),
|
||||
silence_until: silenceUntil,
|
||||
silence_reason: form.value.silence_reason,
|
||||
comment: form.value.comment,
|
||||
@@ -104,9 +103,4 @@ const handleOk = async () => {
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false)
|
||||
}
|
||||
|
||||
function getCurrentUser() {
|
||||
// TODO: 从全局状态获取当前用户
|
||||
return 'admin'
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user