-
Notifications
You must be signed in to change notification settings - Fork 25
Switch to projected sapsystems list #538
Switch to projected sapsystems list #538
Conversation
60868fa
to
52a69a7
Compare
c8dbef0
to
fe5b467
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing to say, I like it
err := s.db. | ||
Model(&entities.SAPSystemInstance{}). | ||
Group("type"). | ||
Having("type = ?", models.SAPSystemTypeApplication). | ||
Count(&count). | ||
Error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOOOOH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You rock 💪
@@ -164,7 +164,8 @@ func (s *clustersService) GetAllTags() ([]string, error) { | |||
var tags []string | |||
|
|||
err := s.db. | |||
Model(&models.Tag{ResourceType: models.TagClusterResourceType}). | |||
Model(&models.Tag{}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me to understand: is the behaviour the same as before with
Model(&models.Tag{ResourceType: models.TagClusterResourceType})
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something slipped in the various refactors, this is not working since Model
only infers the type from the passed struct and ignores conditions. Fixes: #544
Switches to projected sapsystems list and fixes some quirks in the tags methods of clusters and hosts handlers (#
The tag api will use the new service in a follow up PR
Fixes #544, #545