Skip to content

Commit

Permalink
Merge pull request #21 from Somefive/fix/create-dashboard-wo-id
Browse files Browse the repository at this point in the history
Fix: delete id for dashboard request
  • Loading branch information
Somefive committed Jul 26, 2022
2 parents 6268967 + 245a784 commit c3c6d99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apis/o11y/grafana/v1alpha1/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var (
{Name: "Name", Type: "string", Format: "name", Description: "the name of the Grafana"},
{Name: "Endpoint", Type: "string", Description: "the endpoint"},
{Name: "Credential_Type", Type: "string", Description: "the credential type"},
{Name: "Labels", Type: "string", Description: "the labels of the Grafana"},
{Name: "Labels", Type: "string", Description: "the labels of the Grafana", Priority: 10},
{Name: "Creation_Timestamp", Type: "dateTime", Description: "the creation timestamp of the Grafana", Priority: 10},
}
)
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/o11y/grafanadashboard/v1alpha1/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (in *GrafanaDashboard) ToRequestBody() ([]byte, error) {
return nil, err
}
dashboard["uid"] = subresource.NewCompoundName(in.GetName()).SubResourceName
delete(dashboard, "id")
data := map[string]interface{}{"dashboard": dashboard}
if labels := in.GetLabels(); labels != nil {
if raw := labels[grafanaDashboardFolderIdLabelKey]; raw != "" {
Expand Down

0 comments on commit c3c6d99

Please sign in to comment.