Skip to content

feat: enhance alert log search with start and end time filters - #13489

Merged
wanghe-fit2cloud merged 1 commit into
dev-v2from
pr@dev-v2@feat_ops
Aug 5, 2026
Merged

feat: enhance alert log search with start and end time filters#13489
wanghe-fit2cloud merged 1 commit into
dev-v2from
pr@dev-v2@feat_ops

Conversation

@lan-yonghui

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 5, 2026 11:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR primarily adds start/end time filtering to the agent-side alert log search, while also including several cross-cutting updates in the frontend auth flow, core local-agent proxy helper, and setting-related typings/validation keys.

Changes:

  • Add startTime / endTime fields to alert log search DTO and apply created_at time-range filtering in alert log pagination.
  • Update frontend 403/forbidden handling to clear auth info and set login status via globalStore actions.
  • Refactor core’s local Unix-socket proxy helper to route requests through a new client wrapper; remove OpsReport-related setting fields/keys; add CronjobID to cronjob record DTO.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/utils/auth-response.ts Clears auth info and sets login status via globalStore before redirecting to entrance.
frontend/src/api/helper/check-status.ts Aligns 403 handling with the updated auth-clearing behavior.
frontend/src/api/interface/setting.ts Removes OpsReport-related fields from the SettingInfo typing.
core/utils/req_helper/proxy_local/req_to_local.go Introduces a client wrapper for Unix-socket requests and routes NewLocalClient through it.
core/init/validator/validator.go Removes OpsReport-related keys from the core setting key allowlist.
agent/app/dto/alert.go Extends AlertLogSearch with startTime/endTime as time.Time.
agent/app/service/alert.go Applies time-range filtering to alert log pagination when start/end times are provided.
agent/app/dto/cronjob.go Adds CronjobID to the Record DTO payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 21 to 25
export const redirectToEntrance = () => {
const { entrance, isLogin } = useGlobalStore();
isLogin.value = false;
const { entrance, globalStore } = useGlobalStore();
globalStore.setLogStatus(false);
globalStore.clearAuthInfo();
router.push({
Comment on lines 21 to +25
func NewLocalClient(reqUrl, reqMethod string, body io.Reader, ctx *gin.Context) (interface{}, error) {
sockPath := "/etc/1panel/agent.sock"
if _, err := os.Stat(sockPath); err != nil {
return nil, fmt.Errorf("no such agent.sock find in localhost, err: %v", err)
}
client := NewReusableClient()
defer client.CloseIdleConnections()
return client.Request(reqUrl, reqMethod, body, ctx)
}
@wanghe-fit2cloud
wanghe-fit2cloud merged commit 122a474 into dev-v2 Aug 5, 2026
4 checks passed
@wanghe-fit2cloud
wanghe-fit2cloud deleted the pr@dev-v2@feat_ops branch August 5, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants