Skip to content

Commit

Permalink
Merge pull request #26 from nais/lastTransitionTime
Browse files Browse the repository at this point in the history
add(sqlinstances):  lastTransitionTime
  • Loading branch information
ybelMekk authored Apr 15, 2024
2 parents 0a5cd99 + 19d739a commit 311f8b2
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 12 deletions.
68 changes: 64 additions & 4 deletions internal/graph/gengql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/graph/graphqls/storage.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ type SqlInstanceCondition {
reason: String!
status: String!
type: String!
lastTransitionTime: String!
}

extend enum OrderByField {
Expand Down
9 changes: 5 additions & 4 deletions internal/graph/model/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions internal/graph/model/sqlinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ func ToSqlInstance(u *unstructured.Unstructured, env string) (*SQLInstance, erro
ret := make([]*SQLInstanceCondition, 0)
for _, condition := range sqlInstance.Status.Conditions {
ret = append(ret, &SQLInstanceCondition{
Type: condition.Type,
Status: string(condition.Status),
Reason: condition.Reason,
Message: condition.Message,
Type: condition.Type,
Status: string(condition.Status),
Reason: condition.Reason,
Message: condition.Message,
LastTransitionTime: condition.LastTransitionTime,
})
}
return ret
Expand Down

0 comments on commit 311f8b2

Please sign in to comment.