Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
e0cccf6e
Commit
e0cccf6e
authored
Jan 12, 2026
by
IanShaw027
Browse files
fix(ops): 修复Go代码格式问题
parent
89c1a413
Changes
3
Hide whitespace changes
Inline
Side-by-side
backend/internal/handler/admin/ops_settings_handler.go
View file @
e0cccf6e
...
@@ -192,4 +192,3 @@ func (h *OpsHandler) UpdateMetricThresholds(c *gin.Context) {
...
@@ -192,4 +192,3 @@ func (h *OpsHandler) UpdateMetricThresholds(c *gin.Context) {
}
}
response
.
Success
(
c
,
updated
)
response
.
Success
(
c
,
updated
)
}
}
backend/internal/service/ops_settings.go
View file @
e0cccf6e
...
@@ -553,4 +553,3 @@ func (s *OpsService) UpdateMetricThresholds(ctx context.Context, cfg *OpsMetricT
...
@@ -553,4 +553,3 @@ func (s *OpsService) UpdateMetricThresholds(ctx context.Context, cfg *OpsMetricT
_
=
json
.
Unmarshal
(
raw
,
updated
)
_
=
json
.
Unmarshal
(
raw
,
updated
)
return
updated
,
nil
return
updated
,
nil
}
}
backend/internal/service/ops_settings_models.go
View file @
e0cccf6e
...
@@ -62,10 +62,10 @@ type OpsAlertSilencingSettings struct {
...
@@ -62,10 +62,10 @@ type OpsAlertSilencingSettings struct {
}
}
type
OpsMetricThresholds
struct
{
type
OpsMetricThresholds
struct
{
SLAPercentMin
*
float64
`json:"sla_percent_min,omitempty"`
// SLA低于此值变红
SLAPercentMin
*
float64
`json:"sla_percent_min,omitempty"`
// SLA低于此值变红
LatencyP99MsMax
*
float64
`json:"latency_p99_ms_max,omitempty"`
// 延迟P99高于此值变红
LatencyP99MsMax
*
float64
`json:"latency_p99_ms_max,omitempty"`
// 延迟P99高于此值变红
TTFTp99MsMax
*
float64
`json:"ttft_p99_ms_max,omitempty"`
// TTFT P99高于此值变红
TTFTp99MsMax
*
float64
`json:"ttft_p99_ms_max,omitempty"`
// TTFT P99高于此值变红
RequestErrorRatePercentMax
*
float64
`json:"request_error_rate_percent_max,omitempty"`
// 请求错误率高于此值变红
RequestErrorRatePercentMax
*
float64
`json:"request_error_rate_percent_max,omitempty"`
// 请求错误率高于此值变红
UpstreamErrorRatePercentMax
*
float64
`json:"upstream_error_rate_percent_max,omitempty"`
// 上游错误率高于此值变红
UpstreamErrorRatePercentMax
*
float64
`json:"upstream_error_rate_percent_max,omitempty"`
// 上游错误率高于此值变红
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment