refactor: unify kubernetes_ table prefix, merge CI/CD models, LLM session support
- Rename container_clusters → kubernetes_clusters, container_topology_layouts → kubernetes_topology_layouts - LLM: add session_id to chat history for multi-turn conversation support - CI/CD: add pipeline_id, deploy_type, artifact_url, k8s_cluster_id to AppRelease - Cleanup: remove deprecated playbook handler, simplify automation models - Database: optimize auto-migrate model list - Frontend: AIOps assistant improvements, api.ts updates
This commit is contained in:
1 parent
9365c1e9db
commit
732974d152
14 files changed
+121
-474
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
@@ -65,14 +66,28 @@ func (h *PipelineHandler) CreateRelease(c *gin.Context) {
|
||||
}
|
||||
|
||||
release := models.AppRelease{
|
||||
AppName: req.AppName,
|
||||
Version: req.Version,
|
||||
Environment: req.Environment,
|
||||
Status: "pending",
|
||||
CommitID: req.CommitID,
|
||||
CommitMsg: req.CommitMsg,
|
||||
Servers: "[]",
|
||||
Description: req.Description,
|
||||
PipelineID: req.PipelineID,
|
||||
PipelineRunID: req.PipelineRunID,
|
||||
AppName: req.AppName,
|
||||
Version: req.Version,
|
||||
Environment: req.Environment,
|
||||
DeployType: req.DeployType,
|
||||
Status: "pending",
|
||||
CommitID: req.CommitID,
|
||||
CommitMsg: req.CommitMsg,
|
||||
ImageTag: req.ImageTag,
|
||||
K8sClusterID: req.K8sClusterID,
|
||||
K8sNamespace: req.K8sNamespace,
|
||||
Servers: "[]",
|
||||
Description: req.Description,
|
||||
}
|
||||
|
||||
if req.DeployType == "" {
|
||||
release.DeployType = "server"
|
||||
}
|
||||
if len(req.Servers) > 0 {
|
||||
data, _ := json.Marshal(req.Servers)
|
||||
release.Servers = string(data)
|
||||
}
|
||||
|
||||
if err := h.db.Create(&release).Error; err != nil {
|
||||
|
||||
Reference in new issue
Block a user