From b16f34fb938cd910a1866796229771250293152c Mon Sep 17 00:00:00 2001 From: Collin Fingar Date: Wed, 21 May 2025 15:11:21 -0400 Subject: [PATCH] QueryLibrary: Added IsLocked field (#105634) * QueryLibrary: Added IsLocked field * Updated openapi * Update backend field description --- pkg/apis/query/v0alpha1/template/types.go | 4 ++++ pkg/apis/query/v0alpha1/zz_generated.openapi.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/pkg/apis/query/v0alpha1/template/types.go b/pkg/apis/query/v0alpha1/template/types.go index 4ab0170fa89..c9ac8c6c849 100644 --- a/pkg/apis/query/v0alpha1/template/types.go +++ b/pkg/apis/query/v0alpha1/template/types.go @@ -17,6 +17,10 @@ type QueryTemplate struct { // Toggle for visible/hidden queries IsVisible bool `json:"isVisible,omitempty"` + // Whether the query is locked and cannot be edited + // Note: This is purely for UI display purposes and not for security + IsLocked bool `json:"isLocked,omitempty"` + // The variables that can be used to render // +listType=map // +listMapKey=key diff --git a/pkg/apis/query/v0alpha1/zz_generated.openapi.go b/pkg/apis/query/v0alpha1/zz_generated.openapi.go index f14d2375277..95d8c2eb16e 100644 --- a/pkg/apis/query/v0alpha1/zz_generated.openapi.go +++ b/pkg/apis/query/v0alpha1/zz_generated.openapi.go @@ -409,6 +409,13 @@ func schema_apis_query_v0alpha1_template_QueryTemplate(ref common.ReferenceCallb Format: "", }, }, + "isLocked": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the query is locked and cannot be edited Note: This is purely for UI display purposes and not for security", + Type: []string{"boolean"}, + Format: "", + }, + }, "vars": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{