Skip to content

Commit

Permalink
Merge pull request #1139 from flanksource/status-reason-str-change
Browse files Browse the repository at this point in the history
fix: change statusReason to status_reason for consistency
  • Loading branch information
moshloop authored Jul 12, 2023
2 parents 338aab0 + 1bc4de2 commit 9922bf6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/system_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ type Component struct {
Icon string `json:"icon,omitempty"`
Owner string `json:"owner,omitempty"`
Status ComponentStatus `json:"status,omitempty"`
StatusReason string `json:"statusReason,omitempty"`
StatusReason string `json:"status_reason,omitempty"`
Path string `json:"path,omitempty"`
Order int `json:"order,omitempty" gorm:"-"`
// The type of component, e.g. service, API, website, library, database, etc.
Expand Down
2 changes: 1 addition & 1 deletion sdk/model_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Component struct {
Properties []Property `json:"properties,omitempty"`
Schedule string `json:"schedule,omitempty"`
Status string `json:"status,omitempty"`
StatusReason string `json:"statusReason,omitempty"`
StatusReason string `json:"status_reason,omitempty"`
Summary *Summary `json:"summary,omitempty"`
// nolint
TopologyID string `json:"topology_id,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions templating/js/k8s.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ k8s = {
_pod.status = "healthy"
} else {
_pod.status = "unhealthy"
_pod.statusReason = k8s.conditions.getMessage(pod)
_pod.status_reason = k8s.conditions.getMessage(pod)
}

pods.push(_pod)
Expand Down Expand Up @@ -353,7 +353,7 @@ k8s = {
_node.status = "healthy"
} else {
_node.status = "unhealthy"
_node.statusReason = k8s.conditions.getMessage(node)
_node.status_reason = k8s.conditions.getMessage(node)
}

nodes.push(_node)
Expand Down

0 comments on commit 9922bf6

Please sign in to comment.