Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pkg/cluster/ClusterService.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type ClusterBean struct {
AgentInstallationStage int `json:"agentInstallationStage,notnull"` // -1=external, 0=not triggered, 1=progressing, 2=success, 3=fails
K8sVersion string `json:"k8sVersion"`
HasConfigOrUrlChanged bool `json:"-"`
ErrorInConnecting string `json:"-"`
ErrorInConnecting string `json:"errorInConnecting,omitempty"`
}

type PrometheusAuth struct {
Expand Down Expand Up @@ -462,8 +462,9 @@ func (impl *ClusterServiceImpl) FindAllForAutoComplete() ([]ClusterBean, error)
var beans []ClusterBean
for _, m := range model {
beans = append(beans, ClusterBean{
Id: m.Id,
ClusterName: m.ClusterName,
Id: m.Id,
ClusterName: m.ClusterName,
ErrorInConnecting: m.ErrorInConnecting,
})
}
return beans, nil
Expand Down Expand Up @@ -640,8 +641,9 @@ func (impl *ClusterServiceImpl) FindAllForClusterByUserId(userId int32, isAction
for _, model := range models {
if _, ok := allowedClustersMap[model.ClusterName]; ok {
beans = append(beans, ClusterBean{
Id: model.Id,
ClusterName: model.ClusterName,
Id: model.Id,
ClusterName: model.ClusterName,
ErrorInConnecting: model.ErrorInConnecting,
})
}
}
Expand Down
3 changes: 3 additions & 0 deletions specs/cluster_api_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ components:
clusterName:
type: string
description: cluster name
errorInConnecting:
type: string
description: error message if cluster failed to connect

ErrorResponse:
required:
Expand Down