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