Skip to content

Commit

Permalink
chore: some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-k-singh committed Feb 6, 2025
1 parent 02518f7 commit 8e0a7af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/query-service/app/cloudintegrations/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ func (c *Controller) AvailableDashboardsForCloudProvider(
}

for svcId, config := range configsBySvcId {
if config.Metrics.Enabled {
if config.Metrics != nil && config.Metrics.Enabled {
servicesWithAvailableMetrics[svcId] = &ar.CreatedAt
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/query-service/app/integrations/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func readFileIfUri(fs embed.FS, maybeFileUri string, basedir string) (interface{
dataUri := fmt.Sprintf("data:image/jpeg;base64,%s", base64Contents)
return dataUri, nil

} else if strings.HasSuffix(maybeFileUri, ".png") || strings.HasSuffix(maybeFileUri, ".jpg") {
} else if strings.HasSuffix(maybeFileUri, ".png") {
base64Contents := base64.StdEncoding.EncodeToString(fileContents)
dataUri := fmt.Sprintf("data:image/png;base64,%s", base64Contents)
return dataUri, nil
Expand Down

0 comments on commit 8e0a7af

Please sign in to comment.