mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 01:36:37 +08:00
feat: enhance configuration management with main and route configs
- Added `main_config` and `route_config` fields to ActiveConfigResponse and AgentConfigResponse for better configuration handling. - Updated NginxManager interface to accept separate main and route configurations. - Modified sync service to apply main and route configurations correctly. - Enhanced tests to validate new configuration fields and their application. - Updated ConfigVersion model to include main configuration. - Improved rendering logic for main and route configurations in the service layer. - Added UI components to display main configuration changes and OpenResty parameter changes.
This commit is contained in:
@@ -44,6 +44,8 @@ type ApplyLogPayload struct {
|
||||
type AgentConfigResponse struct {
|
||||
Version string `json:"version"`
|
||||
Checksum string `json:"checksum"`
|
||||
MainConfig string `json:"main_config"`
|
||||
RouteConfig string `json:"route_config"`
|
||||
RenderedConfig string `json:"rendered_config"`
|
||||
SupportFiles []SupportFile `json:"support_files"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
@@ -145,6 +147,8 @@ func GetActiveConfigForAgent() (*AgentConfigResponse, error) {
|
||||
return &AgentConfigResponse{
|
||||
Version: version.Version,
|
||||
Checksum: version.Checksum,
|
||||
MainConfig: version.MainConfig,
|
||||
RouteConfig: version.RenderedConfig,
|
||||
RenderedConfig: version.RenderedConfig,
|
||||
SupportFiles: supportFiles,
|
||||
CreatedAt: version.CreatedAt,
|
||||
|
||||
Reference in New Issue
Block a user