Commit c5b84ec
[INLONG-11997][Manager] Add comprehensive audit alert rule management API (#11978)
* [INLONG-11923][Manager] Add audit alert rule management API
- Add AuditAlertRule POJO class with validation annotations
- Add AuditAlertRuleEntity for database mapping
- Add AuditAlertRuleEntityMapper with CRUD operations
- Add MyBatis XML mapping file
- Implement audit alert rule management in AuditServiceImpl
- Add REST API endpoints in AuditController
- Add comprehensive unit tests
- Add API test scripts for validation
* [INLONG-11923][Manager] Add comprehensive audit alert rule management API
Fixes #11923
### Motivation
Currently, Apache InLong lacks a comprehensive audit alert rule management system to monitor data quality, detect anomalies, and provide real-time alerting capabilities. Users need the ability to create, manage, and monitor audit alert rules to ensure data pipeline reliability and quality.
This enhancement adds a complete audit alert rule management API that allows users to:
- Configure alert rules for data count, delay, and quality metrics
- Set up notification channels (EMAIL, SMS, etc.)
- Manage alert rule lifecycle (create, update, delete, enable/disable)
- Query and filter alert rules by group and stream
### Modifications
**1. Data Model Layer**
- Added [AuditAlertRule](file://e:\inlong\inlong-manager\manager-pojo\src\main\java\org\apache\inlong\manager\pojo\audit\AuditAlertRule.java#L25-L63) POJO class in `manager-pojo` module with comprehensive validation annotations
- Added [AuditAlertRuleEntity](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\entity\AuditAlertRuleEntity.java#L23-L39) database entity in `manager-dao` module for MyBatis mapping
- Added [AuditAlertRuleEntityMapper](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\mapper\AuditAlertRuleEntityMapper.java#L24-L32) interface with full CRUD operations
- Added MyBatis XML mapping file [AuditAlertRuleEntityMapper.xml](file://e:\inlong\inlong-manager\manager-dao\src\main\resources\mappers\AuditAlertRuleEntityMapper.xml) with optimized SQL queries
**2. Service Layer**
- Extended [AuditService](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L31-L103) interface with audit alert rule management methods
- Implemented audit alert rule management in [AuditServiceImpl](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\impl\AuditServiceImpl.java#L78-L446) class:
- [createAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L87-L87) - Create new alert rules with validation
- [getAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L92-L92) - Retrieve alert rule by ID
- [updateAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L97-L97) - Update existing alert rules
- [deleteAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L102-L102) - Delete alert rules
- [listAlertRules()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L82-L82) - Query alert rules with filtering support
**3. Web Layer**
- Added REST API endpoints in [AuditController](file://e:\inlong\inlong-manager\manager-web\src\main\java\org\apache\inlong\manager\web\controller\AuditController.java#L51-L137):
- `POST /api/audit/alert/rule` - Create alert rule
- `GET /api/audit/alert/rule/{id}` - Get alert rule by ID
- `PUT /api/audit/alert/rule` - Update alert rule
- `DELETE /api/audit/alert/rule/{id}` - Delete alert rule
- `GET /api/audit/alert/rule/list` - List alert rules with filtering
- `GET /api/audit/alert/rule/enabled` - Get all enabled alert rules
**4. Database Schema**
- Database table `audit_alert_rule` with optimized indexes
- Support for MySQL with proper charset and collation
**5. Testing**
- Comprehensive unit tests in [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class
- API integration test scripts for manual validation
- Database initialization SQL scripts
**6. Configuration**
- MyBatis configuration for audit alert rule mapping
- Spring Boot auto-configuration support
### Verifying this change
- [x] This change added tests and can be verified as follows:
**Unit Tests:**
- Added [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class with comprehensive test coverage:
- Test alert rule creation with validation
- Test alert rule retrieval and updates
- Test alert rule deletion and lifecycle management
- Test query operations with filtering
- Test error handling and edge cases
**Integration Tests:**
- Added API test scripts ([test-audit-alert-api.sh](file://e:\inlong\inlong-manager\test-audit-alert-api.sh) and [test-audit-alert-api.ps1](file://e:\inlong\inlong-manager\test-audit-alert-api.ps1))
- Added database initialization script ([init-audit-alert-test-data.sql](file://e:\inlong\inlong-manager\init-audit-alert-test-data.sql))
- Manual testing workflow documented
**Test Coverage:**
- Service layer: Full CRUD operations testing
- Controller layer: HTTP endpoint testing with various scenarios
- Data layer: MyBatis mapping and SQL query validation
- Error handling: Input validation and exception scenarios
* [INLONG-11923][Manager] Add comprehensive audit alert rule management API
Fixes #11923
### Motivation
Currently, Apache InLong lacks a comprehensive audit alert rule management system to monitor data quality, detect anomalies, and provide real-time alerting capabilities. Users need the ability to create, manage, and monitor audit alert rules to ensure data pipeline reliability and quality.
This enhancement adds a complete audit alert rule management API that allows users to:
- Configure alert rules for data count, delay, and quality metrics
- Set up notification channels (EMAIL, SMS, etc.)
- Manage alert rule lifecycle (create, update, delete, enable/disable)
- Query and filter alert rules by group and stream
### Modifications
**1. Data Model Layer**
- Added [AuditAlertRule](file://e:\inlong\inlong-manager\manager-pojo\src\main\java\org\apache\inlong\manager\pojo\audit\AuditAlertRule.java#L25-L63) POJO class in `manager-pojo` module with comprehensive validation annotations
- Added [AuditAlertRuleEntity](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\entity\AuditAlertRuleEntity.java#L23-L39) database entity in `manager-dao` module for MyBatis mapping
- Added [AuditAlertRuleEntityMapper](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\mapper\AuditAlertRuleEntityMapper.java#L24-L32) interface with full CRUD operations
- Added MyBatis XML mapping file [AuditAlertRuleEntityMapper.xml](file://e:\inlong\inlong-manager\manager-dao\src\main\resources\mappers\AuditAlertRuleEntityMapper.xml) with optimized SQL queries
**2. Service Layer**
- Extended [AuditService](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L31-L103) interface with audit alert rule management methods
- Implemented audit alert rule management in [AuditServiceImpl](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\impl\AuditServiceImpl.java#L78-L446) class:
- [createAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L87-L87) - Create new alert rules with validation
- [getAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L92-L92) - Retrieve alert rule by ID
- [updateAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L97-L97) - Update existing alert rules
- [deleteAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L102-L102) - Delete alert rules
- [listAlertRules()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L82-L82) - Query alert rules with filtering support
**3. Web Layer**
- Added REST API endpoints in [AuditController](file://e:\inlong\inlong-manager\manager-web\src\main\java\org\apache\inlong\manager\web\controller\AuditController.java#L51-L137):
- `POST /api/audit/alert/rule` - Create alert rule
- `GET /api/audit/alert/rule/{id}` - Get alert rule by ID
- `PUT /api/audit/alert/rule` - Update alert rule
- `DELETE /api/audit/alert/rule/{id}` - Delete alert rule
- `GET /api/audit/alert/rule/list` - List alert rules with filtering
- `GET /api/audit/alert/rule/enabled` - Get all enabled alert rules
**4. Database Schema**
- Database table `audit_alert_rule` with optimized indexes
- Support for MySQL with proper charset and collation
**5. Testing**
- Comprehensive unit tests in [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class
- API integration test scripts for manual validation
- Database initialization SQL scripts
**6. Configuration**
- MyBatis configuration for audit alert rule mapping
- Spring Boot auto-configuration support
### Verifying this change
- [x] This change added tests and can be verified as follows:
**Unit Tests:**
- Added [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class with comprehensive test coverage:
- Test alert rule creation with validation
- Test alert rule retrieval and updates
- Test alert rule deletion and lifecycle management
- Test query operations with filtering
- Test error handling and edge cases
**Integration Tests:**
- Added API test scripts ([test-audit-alert-api.sh](file://e:\inlong\inlong-manager\test-audit-alert-api.sh) and [test-audit-alert-api.ps1](file://e:\inlong\inlong-manager\test-audit-alert-api.ps1))
- Added database initialization script ([init-audit-alert-test-data.sql](file://e:\inlong\inlong-manager\init-audit-alert-test-data.sql))
- Manual testing workflow documented
**Test Coverage:**
- Service layer: Full CRUD operations testing
- Controller layer: HTTP endpoint testing with various scenarios
- Data layer: MyBatis mapping and SQL query validation
- Error handling: Input validation and exception scenarios
* [INLONG-11923][Manager] Add comprehensive audit alert rule management API
Fixes #11923
Motivation
Currently, Apache InLong lacks a comprehensive audit alert rule management system to monitor data quality, detect anomalies, and provide real-time alerting capabilities. Users need the ability to create, manage, and monitor audit alert rules to ensure data pipeline reliability and quality.
This enhancement adds a complete audit alert rule management API that allows users to:
Configure alert rules for data count, delay, and quality metrics
Set up notification channels (EMAIL, SMS, etc.)
Manage alert rule lifecycle (create, update, delete, enable/disable)
Query and filter alert rules by group and stream
Modifications
1. Data Model Layer
Added AuditAlertRule POJO class in manager-pojo module with comprehensive validation annotations
Added AuditAlertRuleEntity database entity in manager-dao module for MyBatis mapping
Added AuditAlertRuleEntityMapper interface with full CRUD operations
Added MyBatis XML mapping file AuditAlertRuleEntityMapper.xml with optimized SQL queries
2. Service Layer
Extended AuditService interface with audit alert rule management methods
Implemented audit alert rule management in AuditServiceImpl class:
createAlertRule() - Create new alert rules with validation
getAlertRule() - Retrieve alert rule by ID
updateAlertRule() - Update existing alert rules
deleteAlertRule() - Delete alert rules
listAlertRules() - Query alert rules with filtering support
3. Web Layer
Added REST API endpoints in AuditController:
POST /api/audit/alert/rule - Create alert rule
GET /api/audit/alert/rule/{id} - Get alert rule by ID
PUT /api/audit/alert/rule - Update alert rule
DELETE /api/audit/alert/rule/{id} - Delete alert rule
GET /api/audit/alert/rule/list - List alert rules with filtering
GET /api/audit/alert/rule/enabled - Get all enabled alert rules
4. Database Schema
Database table audit_alert_rule with optimized indexes
Support for MySQL with proper charset and collation
5. Testing
Comprehensive unit tests in AuditAlertRuleTest class
API integration test scripts for manual validation
Database initialization SQL scripts
6. Configuration
MyBatis configuration for audit alert rule mapping
Spring Boot auto-configuration support
Verifying this change
This change added tests and can be verified as follows:
Unit Tests:
Added AuditAlertRuleTest class with comprehensive test coverage:
Test alert rule creation with validation
Test alert rule retrieval and updates
Test alert rule deletion and lifecycle management
Test query operations with filtering
Test error handling and edge cases
Integration Tests:
Added API test scripts (test-audit-alert-api.sh and test-audit-alert-api.ps1)
Added database initialization script (init-audit-alert-test-data.sql)
Manual testing workflow documented
Test Coverage:
Service layer: Full CRUD operations testing
Controller layer: HTTP endpoint testing with various scenarios
Data layer: MyBatis mapping and SQL query validation
Error handling: Input validation and exception scenarios
* [INLONG-11923][Manager] Add comprehensive audit alert rule management API
Fixes #11923
### Motivation
Currently, Apache InLong lacks a comprehensive audit alert rule management system to monitor data quality, detect anomalies, and provide real-time alerting capabilities. Users need the ability to create, manage, and monitor audit alert rules to ensure data pipeline reliability and quality.
This enhancement adds a complete audit alert rule management API that allows users to:
- Configure alert rules for data count, delay, and quality metrics
- Set up notification channels (EMAIL, SMS, etc.)
- Manage alert rule lifecycle (create, update, delete, enable/disable)
- Query and filter alert rules by group and stream
### Modifications
**1. Data Model Layer**
- Added [AuditAlertRule](file://e:\inlong\inlong-manager\manager-pojo\src\main\java\org\apache\inlong\manager\pojo\audit\AuditAlertRule.java#L25-L63) POJO class in `manager-pojo` module with comprehensive validation annotations
- Added [AuditAlertRuleEntity](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\entity\AuditAlertRuleEntity.java#L23-L39) database entity in `manager-dao` module for MyBatis mapping
- Added [AuditAlertRuleEntityMapper](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\mapper\AuditAlertRuleEntityMapper.java#L24-L32) interface with full CRUD operations
- Added MyBatis XML mapping file [AuditAlertRuleEntityMapper.xml](file://e:\inlong\inlong-manager\manager-dao\src\main\resources\mappers\AuditAlertRuleEntityMapper.xml) with optimized SQL queries
**2. Service Layer**
- Extended [AuditService](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L31-L103) interface with audit alert rule management methods
- Implemented audit alert rule management in [AuditServiceImpl](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\impl\AuditServiceImpl.java#L78-L446) class:
- [createAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L87-L87) - Create new alert rules with validation
- [getAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L92-L92) - Retrieve alert rule by ID
- [updateAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L97-L97) - Update existing alert rules
- [deleteAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L102-L102) - Delete alert rules
- [listAlertRules()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L82-L82) - Query alert rules with filtering support
**3. Web Layer**
- Added REST API endpoints in [AuditController](file://e:\inlong\inlong-manager\manager-web\src\main\java\org\apache\inlong\manager\web\controller\AuditController.java#L51-L137):
- `POST /api/audit/alert/rule` - Create alert rule
- `GET /api/audit/alert/rule/{id}` - Get alert rule by ID
- `PUT /api/audit/alert/rule` - Update alert rule
- `DELETE /api/audit/alert/rule/{id}` - Delete alert rule
- `GET /api/audit/alert/rule/list` - List alert rules with filtering
- `GET /api/audit/alert/rule/enabled` - Get all enabled alert rules
**4. Database Schema**
- Database table `audit_alert_rule` with optimized indexes
- Support for MySQL with proper charset and collation
**5. Testing**
- Comprehensive unit tests in [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class
- API integration test scripts for manual validation
- Database initialization SQL scripts
**6. Configuration**
- MyBatis configuration for audit alert rule mapping
- Spring Boot auto-configuration support
### Verifying this change
- [x] This change added tests and can be verified as follows:
**Unit Tests:**
- Added [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class with comprehensive test coverage:
- Test alert rule creation with validation
- Test alert rule retrieval and updates
- Test alert rule deletion and lifecycle management
- Test query operations with filtering
- Test error handling and edge cases
**Integration Tests:**
- Added API test scripts ([test-audit-alert-api.sh](file://e:\inlong\inlong-manager\test-audit-alert-api.sh) and [test-audit-alert-api.ps1](file://e:\inlong\inlong-manager\test-audit-alert-api.ps1))
- Added database initialization script ([init-audit-alert-test-data.sql](file://e:\inlong\inlong-manager\init-audit-alert-test-data.sql))
- Manual testing workflow documented
**Test Coverage:**
- Service layer: Full CRUD operations testing
- Controller layer: HTTP endpoint testing with various scenarios
- Data layer: MyBatis mapping and SQL query validation
- Error handling: Input validation and exception scenarios
* refactor: 拆分审计告警规则控制器
- 将 AuditController 中的审计告警规则相关方法拆分到新的 AuditAlertRuleController
- 保持原有 API 路径不变,确保向后兼容
- 修复 AuditController 中缺失的导入语句
- 更新相关测试文件引用
* [INLONG-11923][Manager] Add comprehensive audit alert rule management API
Fixes #11923
### Motivation
Currently, Apache InLong lacks a comprehensive audit alert rule management system to monitor data quality, detect anomalies, and provide real-time alerting capabilities. Users need the ability to create, manage, and monitor audit alert rules to ensure data pipeline reliability and quality.
This enhancement adds a complete audit alert rule management API that allows users to:
- Configure alert rules for data count, delay, and quality metrics
- Set up notification channels (EMAIL, SMS, etc.)
- Manage alert rule lifecycle (create, update, delete, enable/disable)
- Query and filter alert rules by group and stream
### Modifications
**1. Data Model Layer**
- Added [AuditAlertRule](file://e:\inlong\inlong-manager\manager-pojo\src\main\java\org\apache\inlong\manager\pojo\audit\AuditAlertRule.java#L25-L63) POJO class in `manager-pojo` module with comprehensive validation annotations
- Added [AuditAlertRuleEntity](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\entity\AuditAlertRuleEntity.java#L23-L39) database entity in `manager-dao` module for MyBatis mapping
- Added [AuditAlertRuleEntityMapper](file://e:\inlong\inlong-manager\manager-dao\src\main\java\org\apache\inlong\manager\dao\mapper\AuditAlertRuleEntityMapper.java#L24-L32) interface with full CRUD operations
- Added MyBatis XML mapping file [AuditAlertRuleEntityMapper.xml](file://e:\inlong\inlong-manager\manager-dao\src\main\resources\mappers\AuditAlertRuleEntityMapper.xml) with optimized SQL queries
**2. Service Layer**
- Extended [AuditService](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L31-L103) interface with audit alert rule management methods
- Implemented audit alert rule management in [AuditServiceImpl](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\impl\AuditServiceImpl.java#L78-L446) class:
- [createAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L87-L87) - Create new alert rules with validation
- [getAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L92-L92) - Retrieve alert rule by ID
- [updateAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L97-L97) - Update existing alert rules
- [deleteAlertRule()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L102-L102) - Delete alert rules
- [listAlertRules()](file://e:\inlong\inlong-manager\manager-service\src\main\java\org\apache\inlong\manager\service\core\AuditService.java#L82-L82) - Query alert rules with filtering support
**3. Web Layer**
- Added REST API endpoints in [AuditController](file://e:\inlong\inlong-manager\manager-web\src\main\java\org\apache\inlong\manager\web\controller\AuditController.java#L51-L137):
- `POST /api/audit/alert/rule` - Create alert rule
- `GET /api/audit/alert/rule/{id}` - Get alert rule by ID
- `PUT /api/audit/alert/rule` - Update alert rule
- `DELETE /api/audit/alert/rule/{id}` - Delete alert rule
- `GET /api/audit/alert/rule/list` - List alert rules with filtering
- `GET /api/audit/alert/rule/enabled` - Get all enabled alert rules
**4. Database Schema**
- Database table `audit_alert_rule` with optimized indexes
- Support for MySQL with proper charset and collation
**5. Testing**
- Comprehensive unit tests in [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class
- API integration test scripts for manual validation
- Database initialization SQL scripts
**6. Configuration**
- MyBatis configuration for audit alert rule mapping
- Spring Boot auto-configuration support
### Verifying this change
- [x] This change added tests and can be verified as follows:
**Unit Tests:**
- Added [AuditAlertRuleTest](file://e:\inlong\inlong-manager\manager-service\src\test\java\org\apache\inlong\manager\service\core\AuditAlertRuleTest.java#L34-L152) class with comprehensive test coverage:
- Test alert rule creation with validation
- Test alert rule retrieval and updates
- Test alert rule deletion and lifecycle management
- Test query operations with filtering
- Test error handling and edge cases
**Integration Tests:**
- Added API test scripts ([test-audit-alert-api.sh](file://e:\inlong\inlong-manager\test-audit-alert-api.sh) and [test-audit-alert-api.ps1](file://e:\inlong\inlong-manager\test-audit-alert-api.ps1))
- Added database initialization script ([init-audit-alert-test-data.sql](file://e:\inlong\inlong-manager\init-audit-alert-test-data.sql))
- Manual testing workflow documented
**Test Coverage:**
- Service layer: Full CRUD operations testing
- Controller layer: HTTP endpoint testing with various scenarios
- Data layer: MyBatis mapping and SQL query validation
- Error handling: Input validation and exception scenarios
* Refactor (audit): Simplify the audit alert rule code and remove deprecated components
- Delete the AuditAlertRuleUpdateRequest class and related references, and uniformly use AuditAlertRuleRequest as the request parameter.
- Modify the Mapper XML to adjust the increment logic of the optimistic lock version field.
- Adjust the AuditAlertRuleRequest, add id and version fields, and add support for validation groups.
- Delete the old interfaces and implementations related to the alert rules in AuditService, and switch to using the AuditAlertRuleService interface.
- Simplify AuditServiceImpl, remove the implementations related to the alert rules, and optimize some log information and code structure.
- Adjust the AuditAlertRuleController, switch to injecting AuditAlertRuleService, and update the interface calls.
- Modify the test code, update the use of the old AuditAlertRuleUpdateRequest to AuditAlertRuleRequest.
- Code cleaning: Delete unused imports and test classes, and simplify useless comments and constructors.
- Optimize the log output level to improve the clarity and accuracy of runtime logs.
* improve
* Fix the path issue
* Improve code format
* improve path
* improve path
* Fix AuditControllerTest.testUpdateAlertRule
* improve
* MyBatis
* final
* make it concise
* add selectbycondition
* Improve manager-client-test
* Improve manager-client-test
* imporve
* Improve webtest
* improve page logic
* import
* update
* improve
* update
* notifytype enum
* delete chinese
* improve
* update
* improve
* update
* fix
* update notifytype
* improve
* update
* update
* update
* update
* final
* improve
* update
* update
* improve
* improve
* improve
* update
* improve
* improve
* improve
* improve
* improve
* improve
* improve
* improve
---------
Co-authored-by: shuideyimei <13124552057@163.com>1 parent c96830d commit c5b84ec
File tree
28 files changed
+2928
-6
lines changed- inlong-manager
- manager-client/src
- main/java/org/apache/inlong/manager/client/api
- inner/client
- service
- test/java/org/apache/inlong/manager/client/api/inner
- manager-common/src/main/java/org/apache/inlong/manager/common
- enums
- util
- manager-dao/src
- main
- java/org/apache/inlong/manager/dao
- entity
- mapper
- resources/mappers
- test/java/org/apache/inlong/manager/dao/mapper
- manager-pojo/src
- main/java/org/apache/inlong/manager/pojo/audit
- test/java/org/apache/inlong/manager/pojo/audit
- manager-service/src
- main/java/org/apache/inlong/manager/service/core
- impl
- test/java/org/apache/inlong/manager/service/core/impl
- manager-test/src/main/resources/h2
- manager-web
- sql
- src
- main/java/org/apache/inlong/manager/web/controller
- openapi
- test/java/org/apache/inlong/manager/web/controller
28 files changed
+2928
-6
lines changedLines changed: 115 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
79 | 81 | | |
80 | | - | |
| 82 | + | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
Lines changed: 184 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
0 commit comments