Compare commits

..

10 Commits

Author SHA1 Message Date
Paul Marbach ec42bbaba9 BigValue: Make height, width optional; remove graphMode 2026-01-09 13:07:41 -05:00
Galen Kistler 9cd811b9e6 LogsDrilldownDefaultColumns: Upgrade API from alpha to beta (#116035)
* chore: release logsdrilldown default columns v1beta1
2026-01-09 14:28:29 +01:00
Matheus Macabu 52cd096d92 Secrets: Propagate ctx cancel and label it on decryptions (#116058) 2026-01-09 14:25:29 +01:00
Misi 98453fbcff IAM: Use the new way to authorize resources (#116061)
* Use name for authz for User, SA, Team

* Use VerbList
2026-01-09 14:21:20 +01:00
Renato Costa ccdafc3fb2 unified-storage: fix event persistence when sqlkv is enabled (#116033) 2026-01-09 07:58:58 -05:00
Paul Marbach 12abbd5a15 Sparkline: Hide axes for real (#116040) 2026-01-09 07:57:56 -05:00
Rafael Bortolon Paulovic 1c5caeb987 fix(unified): err on timeout to open index (#115953)
* fix(unified): default index path to ephemeral storage mount path

Signed-off-by: Rafael Paulovic <rafael.paulovic@grafana.com>

* Revert "fix: use memory index if index file already open (#115720)"

This reverts commit dc4c106e91.

* fix(unified): set index_path for tests

* chore(unified): re-add bolt open timeout and test for error handling

* chore(unified): return err on timeout

* chore(unified): revert changes to default, use DataPath if index_path not set

* chore(unified): add defaults.ini entry for unified_storage

This is needed to override using env. vars

* chore: revert unrelated diff

* chore: address code review comments

- reduce bolt timeout to 1s
- remove errIndexLocked err type
- add more information about index_path in defaults.ini

---------

Signed-off-by: Rafael Paulovic <rafael.paulovic@grafana.com>
2026-01-09 13:48:54 +01:00
Ashley Harrison 71a65e1f80 Custom branding: Correctly override bouncing loader (#115871)
use the custom branding logo for the bouncing loader
2026-01-09 11:56:55 +00:00
Ashley Harrison ec12176220 Chore: Bump storybook to fix CVE (#115927)
* bump storybook to fix CVE

* reapply patch
2026-01-09 11:56:29 +00:00
Stephanie Hingtgen 0cf4f7c4de Library Elements: Deprecate folderFilter query param; update docs for folderFilterUIDs (#116048) 2026-01-09 04:24:18 -07:00
96 changed files with 3518 additions and 3136 deletions
@@ -1,8 +1,8 @@
diff --git a/dist/builder-manager/index.js b/dist/builder-manager/index.js
index 3d7f9b213dae1801bda62b31db31b9113e382ccd..212501c63d20146c29db63fb0f6300c6779eecb5 100644
index ac8ac6a5f6a3b7852c4064e93dc9acd3201289e6..34a0a5a5c38dd7fe525c9ebd382a10a451d4d4f3 100644
--- a/dist/builder-manager/index.js
+++ b/dist/builder-manager/index.js
@@ -1970,7 +1970,7 @@ var pa = /^\/($|\?)/, G, C, xt = /* @__PURE__ */ o(async (e) => {
@@ -1974,7 +1974,7 @@ var pa = /^\/($|\?)/, G, C, xt = /* @__PURE__ */ o(async (e) => {
bundle: !0,
minify: !0,
sourcemap: !1,
@@ -1,43 +0,0 @@
package v0alpha1
import (
"fmt"
"github.com/grafana/grafana/pkg/apimachinery/utils"
)
func (u User) AuthID() string {
meta, err := utils.MetaAccessor(&u)
if err != nil {
return ""
}
// TODO: Workaround until we move all definitions
// After having all resource definitions here in the app, we can remove this
// and we need to change the List authorization to use the MetaAccessor and the GetDeprecatedInternalID method
//nolint:staticcheck
return fmt.Sprintf("%d", meta.GetDeprecatedInternalID())
}
func (s ServiceAccount) AuthID() string {
meta, err := utils.MetaAccessor(&s)
if err != nil {
return ""
}
// TODO: Workaround until we move all definitions
// After having all resource definitions here in the app, we can remove this
// and we need to change the List authorization to use the MetaAccessor and the GetDeprecatedInternalID method
//nolint:staticcheck
return fmt.Sprintf("%d", meta.GetDeprecatedInternalID())
}
func (t Team) AuthID() string {
meta, err := utils.MetaAccessor(&t)
if err != nil {
return ""
}
// TODO: Workaround until we move all definitions
// After having all resource definitions here in the app, we can remove this
// and we need to change the List authorization to use the MetaAccessor and the GetDeprecatedInternalID method
//nolint:staticcheck
return fmt.Sprintf("%d", meta.GetDeprecatedInternalID())
}
@@ -191,7 +191,13 @@
}
},
"conversion": false
},
}
]
},
{
"name": "v1beta1",
"served": true,
"kinds": [
{
"kind": "LogsDrilldownDefaultColumns",
"plural": "LogsDrilldownDefaultColumns",
@@ -314,6 +320,6 @@
]
}
],
"preferredVersion": "v1alpha1"
"preferredVersion": "v1beta1"
}
}
@@ -8,7 +8,7 @@
"group": "logsdrilldown.grafana.app",
"versions": [
{
"name": "v1alpha1",
"name": "v1beta1",
"served": true,
"storage": true,
"schema": {
+4 -4
View File
@@ -1,7 +1,7 @@
package kinds
import (
"github.com/grafana/grafana/apps/logsdrilldown/kinds/v0alpha1"
"github.com/grafana/grafana/apps/logsdrilldown/kinds/v1beta1",
)
LogsDrilldownSpecv1alpha1: {
@@ -26,11 +26,11 @@ logsdrilldownDefaultsv1alpha1: {
}
}
// Default columns API
logsdrilldownDefaultColumnsv0alpha1: {
// Default columns API (beta)
logsdrilldownDefaultColumnsv1beta1: {
kind: "LogsDrilldownDefaultColumns"
pluralName: "LogsDrilldownDefaultColumns"
schema: {
spec: v0alpha1.LogsDefaultColumns
spec: v1beta1.LogsDefaultColumns
}
}
+35 -1
View File
@@ -15,6 +15,7 @@ manifest: {
// If your app needs access to kinds managed by another app, use permissions.accessKinds to allow your app access.
versions: {
"v1alpha1": v1alpha1
"v1beta1" : v1beta1
}
// extraPermissions contains any additional permissions your app may require to function.
// Your app will always have all permissions for each kind it manages (the items defined in 'kinds').
@@ -35,7 +36,40 @@ manifest: {
// It includes kinds which the v1alpha1 API serves, and (future) custom routes served globally from the v1alpha1 version.
v1alpha1: {
// kinds is the list of kinds served by this version
kinds: [logsdrilldownv1alpha1, logsdrilldownDefaultsv1alpha1, logsdrilldownDefaultColumnsv0alpha1]
kinds: [logsdrilldownv1alpha1, logsdrilldownDefaultsv1alpha1]
// [OPTIONAL]
// served indicates whether this particular version is served by the API server.
// served should be set to false before a version is removed from the manifest entirely.
// served defaults to true if not present.
served: true
// [OPTIONAL]
// Codegen is a trait that tells the grafana-app-sdk, or other code generation tooling, how to process this kind.
// If not present, default values within the codegen trait are used.
// If you wish to specify codegen per-version, put this section in the version's object
// (for example, <no value>v1alpha1) instead.
codegen: {
// [OPTIONAL]
// ts contains TypeScript code generation properties for the kind
ts: {
// [OPTIONAL]
// enabled indicates whether the CLI should generate front-end TypeScript code for the kind.
// Defaults to true if not present.
enabled: true
}
// [OPTIONAL]
// go contains go code generation properties for the kind
go: {
// [OPTIONAL]
// enabled indicates whether the CLI should generate back-end go code for the kind.
// Defaults to true if not present.
enabled: true
}
}
}
v1beta1: {
// kinds is the list of kinds served by this version
kinds: [logsdrilldownDefaultColumnsv1beta1]
// [OPTIONAL]
// served indicates whether this particular version is served by the API server.
// served should be set to false before a version is removed from the manifest entirely.
@@ -0,0 +1,19 @@
package v1beta1
#LogsDefaultColumnsLabel: {
key: string
value: string
}
#LogsDefaultColumnsLabels: [...#LogsDefaultColumnsLabel]
#LogsDefaultColumnsRecord: {
columns: [...string]
labels: #LogsDefaultColumnsLabels
}
#LogsDefaultColumnsRecords: [...#LogsDefaultColumnsRecord]
LogsDefaultColumns: {
records: #LogsDefaultColumnsRecords
}
@@ -1,4 +1,4 @@
package v1alpha1
package v1beta1
import "k8s.io/apimachinery/pkg/runtime/schema"
@@ -6,7 +6,7 @@ const (
// APIGroup is the API group used by all kinds in this package
APIGroup = "logsdrilldown.grafana.app"
// APIVersion is the API version used by all kinds in this package
APIVersion = "v1alpha1"
APIVersion = "v1beta1"
)
var (
@@ -2,7 +2,7 @@
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
package v1beta1
import (
"encoding/json"
@@ -1,6 +1,6 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
time "time"
@@ -2,7 +2,7 @@
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
package v1beta1
import (
"fmt"
@@ -2,7 +2,7 @@
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
package v1beta1
import (
"github.com/grafana/grafana-app-sdk/resource"
@@ -10,7 +10,7 @@ import (
// schema is unexported to prevent accidental overwrites
var (
schemaLogsDrilldownDefaultColumns = resource.NewSimpleSchema("logsdrilldown.grafana.app", "v1alpha1", NewLogsDrilldownDefaultColumns(), &LogsDrilldownDefaultColumnsList{}, resource.WithKind("LogsDrilldownDefaultColumns"),
schemaLogsDrilldownDefaultColumns = resource.NewSimpleSchema("logsdrilldown.grafana.app", "v1beta1", NewLogsDrilldownDefaultColumns(), &LogsDrilldownDefaultColumnsList{}, resource.WithKind("LogsDrilldownDefaultColumns"),
resource.WithPlural("logsdrilldowndefaultcolumns"), resource.WithScope(resource.NamespacedScope))
kindLogsDrilldownDefaultColumns = resource.Kind{
Schema: schemaLogsDrilldownDefaultColumns,
@@ -1,6 +1,6 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
package v1beta1
// +k8s:openapi-gen=true
type LogsDrilldownDefaultColumnsLogsDefaultColumnsRecords []LogsDrilldownDefaultColumnsLogsDefaultColumnsRecord
@@ -1,6 +1,6 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
package v1beta1
// +k8s:openapi-gen=true
type LogsDrilldownDefaultColumnsstatusOperatorState struct {
+26 -14
View File
@@ -17,24 +17,25 @@ import (
"k8s.io/kube-openapi/pkg/validation/spec"
v1alpha1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/apis/logsdrilldown/v1alpha1"
v1beta1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/apis/logsdrilldown/v1beta1"
)
var (
rawSchemaLogsDrilldownv1alpha1 = []byte(`{"LogsDrilldown":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"defaultFields":{"items":{"type":"string"},"type":"array"},"interceptDismissed":{"type":"boolean"},"prettifyJSON":{"type":"boolean"},"wrapLogMessage":{"type":"boolean"}},"required":["defaultFields","prettifyJSON","wrapLogMessage","interceptDismissed"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownv1alpha1, &versionSchemaLogsDrilldownv1alpha1)
rawSchemaLogsDrilldownDefaultsv1alpha1 = []byte(`{"LogsDrilldownDefaults":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"defaultFields":{"items":{"type":"string"},"type":"array"},"interceptDismissed":{"type":"boolean"},"prettifyJSON":{"type":"boolean"},"wrapLogMessage":{"type":"boolean"}},"required":["defaultFields","prettifyJSON","wrapLogMessage","interceptDismissed"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownDefaultsv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownDefaultsv1alpha1, &versionSchemaLogsDrilldownDefaultsv1alpha1)
rawSchemaLogsDrilldownDefaultColumnsv1alpha1 = []byte(`{"LogsDefaultColumnsLabel":{"additionalProperties":false,"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"LogsDefaultColumnsLabels":{"items":{"$ref":"#/components/schemas/LogsDefaultColumnsLabel"},"type":"array"},"LogsDefaultColumnsRecord":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"labels":{"$ref":"#/components/schemas/LogsDefaultColumnsLabels"}},"required":["columns","labels"],"type":"object"},"LogsDefaultColumnsRecords":{"items":{"$ref":"#/components/schemas/LogsDefaultColumnsRecord"},"type":"array"},"LogsDrilldownDefaultColumns":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"records":{"$ref":"#/components/schemas/LogsDefaultColumnsRecords"}},"required":["records"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownDefaultColumnsv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownDefaultColumnsv1alpha1, &versionSchemaLogsDrilldownDefaultColumnsv1alpha1)
rawSchemaLogsDrilldownv1alpha1 = []byte(`{"LogsDrilldown":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"defaultFields":{"items":{"type":"string"},"type":"array"},"interceptDismissed":{"type":"boolean"},"prettifyJSON":{"type":"boolean"},"wrapLogMessage":{"type":"boolean"}},"required":["defaultFields","prettifyJSON","wrapLogMessage","interceptDismissed"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownv1alpha1, &versionSchemaLogsDrilldownv1alpha1)
rawSchemaLogsDrilldownDefaultsv1alpha1 = []byte(`{"LogsDrilldownDefaults":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"defaultFields":{"items":{"type":"string"},"type":"array"},"interceptDismissed":{"type":"boolean"},"prettifyJSON":{"type":"boolean"},"wrapLogMessage":{"type":"boolean"}},"required":["defaultFields","prettifyJSON","wrapLogMessage","interceptDismissed"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownDefaultsv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownDefaultsv1alpha1, &versionSchemaLogsDrilldownDefaultsv1alpha1)
rawSchemaLogsDrilldownDefaultColumnsv1beta1 = []byte(`{"LogsDefaultColumnsLabel":{"additionalProperties":false,"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"LogsDefaultColumnsLabels":{"items":{"$ref":"#/components/schemas/LogsDefaultColumnsLabel"},"type":"array"},"LogsDefaultColumnsRecord":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"labels":{"$ref":"#/components/schemas/LogsDefaultColumnsLabels"}},"required":["columns","labels"],"type":"object"},"LogsDefaultColumnsRecords":{"items":{"$ref":"#/components/schemas/LogsDefaultColumnsRecord"},"type":"array"},"LogsDrilldownDefaultColumns":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"records":{"$ref":"#/components/schemas/LogsDefaultColumnsRecords"}},"required":["records"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownDefaultColumnsv1beta1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownDefaultColumnsv1beta1, &versionSchemaLogsDrilldownDefaultColumnsv1beta1)
)
var appManifestData = app.ManifestData{
AppName: "logsdrilldown",
Group: "logsdrilldown.grafana.app",
PreferredVersion: "v1alpha1",
PreferredVersion: "v1beta1",
Versions: []app.ManifestVersion{
{
Name: "v1alpha1",
@@ -55,13 +56,24 @@ var appManifestData = app.ManifestData{
Conversion: false,
Schema: &versionSchemaLogsDrilldownDefaultsv1alpha1,
},
},
Routes: app.ManifestVersionRoutes{
Namespaced: map[string]spec3.PathProps{},
Cluster: map[string]spec3.PathProps{},
Schemas: map[string]spec.Schema{},
},
},
{
Name: "v1beta1",
Served: true,
Kinds: []app.ManifestVersionKind{
{
Kind: "LogsDrilldownDefaultColumns",
Plural: "LogsDrilldownDefaultColumns",
Scope: "Namespaced",
Conversion: false,
Schema: &versionSchemaLogsDrilldownDefaultColumnsv1alpha1,
Schema: &versionSchemaLogsDrilldownDefaultColumnsv1beta1,
},
},
Routes: app.ManifestVersionRoutes{
@@ -82,9 +94,9 @@ func RemoteManifest() app.Manifest {
}
var kindVersionToGoType = map[string]resource.Kind{
"LogsDrilldown/v1alpha1": v1alpha1.LogsDrilldownKind(),
"LogsDrilldownDefaults/v1alpha1": v1alpha1.LogsDrilldownDefaultsKind(),
"LogsDrilldownDefaultColumns/v1alpha1": v1alpha1.LogsDrilldownDefaultColumnsKind(),
"LogsDrilldown/v1alpha1": v1alpha1.LogsDrilldownKind(),
"LogsDrilldownDefaults/v1alpha1": v1alpha1.LogsDrilldownDefaultsKind(),
"LogsDrilldownDefaultColumns/v1beta1": v1beta1.LogsDrilldownDefaultColumnsKind(),
}
// ManifestGoTypeAssociator returns the associated resource.Kind instance for a given Kind and Version, if one exists.
+2 -1
View File
@@ -11,6 +11,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
logsdrilldownv1alpha1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/apis/logsdrilldown/v1alpha1"
logsdrilldownv1beta1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/apis/logsdrilldown/v1beta1"
)
func New(cfg app.Config) (app.App, error) {
@@ -32,7 +33,7 @@ func New(cfg app.Config) (app.App, error) {
Kind: logsdrilldownv1alpha1.LogsDrilldownDefaultsKind(),
},
{
Kind: logsdrilldownv1alpha1.LogsDrilldownDefaultColumnsKind(),
Kind: logsdrilldownv1beta1.LogsDrilldownDefaultColumnsKind(),
},
},
}
@@ -1,99 +0,0 @@
package v1alpha1
import (
"context"
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type LogsDrilldownClient struct {
client *resource.TypedClient[*LogsDrilldown, *LogsDrilldownList]
}
func NewLogsDrilldownClient(client resource.Client) *LogsDrilldownClient {
return &LogsDrilldownClient{
client: resource.NewTypedClient[*LogsDrilldown, *LogsDrilldownList](client, Kind()),
}
}
func NewLogsDrilldownClientFromGenerator(generator resource.ClientGenerator) (*LogsDrilldownClient, error) {
c, err := generator.ClientFor(Kind())
if err != nil {
return nil, err
}
return NewLogsDrilldownClient(c), nil
}
func (c *LogsDrilldownClient) Get(ctx context.Context, identifier resource.Identifier) (*LogsDrilldown, error) {
return c.client.Get(ctx, identifier)
}
func (c *LogsDrilldownClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*LogsDrilldownList, error) {
return c.client.List(ctx, namespace, opts)
}
func (c *LogsDrilldownClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*LogsDrilldownList, error) {
resp, err := c.client.List(ctx, namespace, resource.ListOptions{
ResourceVersion: opts.ResourceVersion,
Limit: opts.Limit,
LabelFilters: opts.LabelFilters,
FieldSelectors: opts.FieldSelectors,
})
if err != nil {
return nil, err
}
for resp.GetContinue() != "" {
page, err := c.client.List(ctx, namespace, resource.ListOptions{
Continue: resp.GetContinue(),
ResourceVersion: opts.ResourceVersion,
Limit: opts.Limit,
LabelFilters: opts.LabelFilters,
FieldSelectors: opts.FieldSelectors,
})
if err != nil {
return nil, err
}
resp.SetContinue(page.GetContinue())
resp.SetResourceVersion(page.GetResourceVersion())
resp.SetItems(append(resp.GetItems(), page.GetItems()...))
}
return resp, nil
}
func (c *LogsDrilldownClient) Create(ctx context.Context, obj *LogsDrilldown, opts resource.CreateOptions) (*LogsDrilldown, error) {
// Make sure apiVersion and kind are set
obj.APIVersion = GroupVersion.Identifier()
obj.Kind = Kind().Kind()
return c.client.Create(ctx, obj, opts)
}
func (c *LogsDrilldownClient) Update(ctx context.Context, obj *LogsDrilldown, opts resource.UpdateOptions) (*LogsDrilldown, error) {
return c.client.Update(ctx, obj, opts)
}
func (c *LogsDrilldownClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*LogsDrilldown, error) {
return c.client.Patch(ctx, identifier, req, opts)
}
func (c *LogsDrilldownClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus Status, opts resource.UpdateOptions) (*LogsDrilldown, error) {
return c.client.Update(ctx, &LogsDrilldown{
TypeMeta: metav1.TypeMeta{
Kind: Kind().Kind(),
APIVersion: GroupVersion.Identifier(),
},
ObjectMeta: metav1.ObjectMeta{
ResourceVersion: opts.ResourceVersion,
Namespace: identifier.Namespace,
Name: identifier.Name,
},
Status: newStatus,
}, resource.UpdateOptions{
Subresource: "status",
ResourceVersion: opts.ResourceVersion,
})
}
func (c *LogsDrilldownClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
return c.client.Delete(ctx, identifier, opts)
}
@@ -1,28 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"encoding/json"
"io"
"github.com/grafana/grafana-app-sdk/resource"
)
// JSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
type JSONCodec struct{}
// Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`
func (*JSONCodec) Read(reader io.Reader, into resource.Object) error {
return json.NewDecoder(reader).Decode(into)
}
// Write writes JSON-encoded bytes into `writer` marshaled from `from`
func (*JSONCodec) Write(writer io.Writer, from resource.Object) error {
return json.NewEncoder(writer).Encode(from)
}
// Interface compliance checks
var _ resource.Codec = &JSONCodec{}
@@ -1,31 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
import (
time "time"
)
// metadata contains embedded CommonMetadata and can be extended with custom string fields
// TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
// without external reference as using the CommonMetadata reference breaks thema codegen.
type Metadata struct {
UpdateTimestamp time.Time `json:"updateTimestamp"`
CreatedBy string `json:"createdBy"`
Uid string `json:"uid"`
CreationTimestamp time.Time `json:"creationTimestamp"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers"`
ResourceVersion string `json:"resourceVersion"`
Generation int64 `json:"generation"`
UpdatedBy string `json:"updatedBy"`
Labels map[string]string `json:"labels"`
}
// NewMetadata creates a new Metadata object.
func NewMetadata() *Metadata {
return &Metadata{
Finalizers: []string{},
Labels: map[string]string{},
}
}
@@ -1,319 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"fmt"
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"time"
)
// +k8s:openapi-gen=true
type LogsDrilldown struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
// Spec is the spec of the LogsDrilldown
Spec Spec `json:"spec" yaml:"spec"`
Status Status `json:"status" yaml:"status"`
}
func (o *LogsDrilldown) GetSpec() any {
return o.Spec
}
func (o *LogsDrilldown) SetSpec(spec any) error {
cast, ok := spec.(Spec)
if !ok {
return fmt.Errorf("cannot set spec type %#v, not of type Spec", spec)
}
o.Spec = cast
return nil
}
func (o *LogsDrilldown) GetSubresources() map[string]any {
return map[string]any{
"status": o.Status,
}
}
func (o *LogsDrilldown) GetSubresource(name string) (any, bool) {
switch name {
case "status":
return o.Status, true
default:
return nil, false
}
}
func (o *LogsDrilldown) SetSubresource(name string, value any) error {
switch name {
case "status":
cast, ok := value.(Status)
if !ok {
return fmt.Errorf("cannot set status type %#v, not of type Status", value)
}
o.Status = cast
return nil
default:
return fmt.Errorf("subresource '%s' does not exist", name)
}
}
func (o *LogsDrilldown) GetStaticMetadata() resource.StaticMetadata {
gvk := o.GroupVersionKind()
return resource.StaticMetadata{
Name: o.ObjectMeta.Name,
Namespace: o.ObjectMeta.Namespace,
Group: gvk.Group,
Version: gvk.Version,
Kind: gvk.Kind,
}
}
func (o *LogsDrilldown) SetStaticMetadata(metadata resource.StaticMetadata) {
o.Name = metadata.Name
o.Namespace = metadata.Namespace
o.SetGroupVersionKind(schema.GroupVersionKind{
Group: metadata.Group,
Version: metadata.Version,
Kind: metadata.Kind,
})
}
func (o *LogsDrilldown) GetCommonMetadata() resource.CommonMetadata {
dt := o.DeletionTimestamp
var deletionTimestamp *time.Time
if dt != nil {
deletionTimestamp = &dt.Time
}
// Legacy ExtraFields support
extraFields := make(map[string]any)
if o.Annotations != nil {
extraFields["annotations"] = o.Annotations
}
if o.ManagedFields != nil {
extraFields["managedFields"] = o.ManagedFields
}
if o.OwnerReferences != nil {
extraFields["ownerReferences"] = o.OwnerReferences
}
return resource.CommonMetadata{
UID: string(o.UID),
ResourceVersion: o.ResourceVersion,
Generation: o.Generation,
Labels: o.Labels,
CreationTimestamp: o.CreationTimestamp.Time,
DeletionTimestamp: deletionTimestamp,
Finalizers: o.Finalizers,
UpdateTimestamp: o.GetUpdateTimestamp(),
CreatedBy: o.GetCreatedBy(),
UpdatedBy: o.GetUpdatedBy(),
ExtraFields: extraFields,
}
}
func (o *LogsDrilldown) SetCommonMetadata(metadata resource.CommonMetadata) {
o.UID = types.UID(metadata.UID)
o.ResourceVersion = metadata.ResourceVersion
o.Generation = metadata.Generation
o.Labels = metadata.Labels
o.CreationTimestamp = metav1.NewTime(metadata.CreationTimestamp)
if metadata.DeletionTimestamp != nil {
dt := metav1.NewTime(*metadata.DeletionTimestamp)
o.DeletionTimestamp = &dt
} else {
o.DeletionTimestamp = nil
}
o.Finalizers = metadata.Finalizers
if o.Annotations == nil {
o.Annotations = make(map[string]string)
}
if !metadata.UpdateTimestamp.IsZero() {
o.SetUpdateTimestamp(metadata.UpdateTimestamp)
}
if metadata.CreatedBy != "" {
o.SetCreatedBy(metadata.CreatedBy)
}
if metadata.UpdatedBy != "" {
o.SetUpdatedBy(metadata.UpdatedBy)
}
// Legacy support for setting Annotations, ManagedFields, and OwnerReferences via ExtraFields
if metadata.ExtraFields != nil {
if annotations, ok := metadata.ExtraFields["annotations"]; ok {
if cast, ok := annotations.(map[string]string); ok {
o.Annotations = cast
}
}
if managedFields, ok := metadata.ExtraFields["managedFields"]; ok {
if cast, ok := managedFields.([]metav1.ManagedFieldsEntry); ok {
o.ManagedFields = cast
}
}
if ownerReferences, ok := metadata.ExtraFields["ownerReferences"]; ok {
if cast, ok := ownerReferences.([]metav1.OwnerReference); ok {
o.OwnerReferences = cast
}
}
}
}
func (o *LogsDrilldown) GetCreatedBy() string {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
return o.ObjectMeta.Annotations["grafana.com/createdBy"]
}
func (o *LogsDrilldown) SetCreatedBy(createdBy string) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/createdBy"] = createdBy
}
func (o *LogsDrilldown) GetUpdateTimestamp() time.Time {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
parsed, _ := time.Parse(time.RFC3339, o.ObjectMeta.Annotations["grafana.com/updateTimestamp"])
return parsed
}
func (o *LogsDrilldown) SetUpdateTimestamp(updateTimestamp time.Time) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/updateTimestamp"] = updateTimestamp.Format(time.RFC3339)
}
func (o *LogsDrilldown) GetUpdatedBy() string {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
return o.ObjectMeta.Annotations["grafana.com/updatedBy"]
}
func (o *LogsDrilldown) SetUpdatedBy(updatedBy string) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/updatedBy"] = updatedBy
}
func (o *LogsDrilldown) Copy() resource.Object {
return resource.CopyObject(o)
}
func (o *LogsDrilldown) DeepCopyObject() runtime.Object {
return o.Copy()
}
func (o *LogsDrilldown) DeepCopy() *LogsDrilldown {
cpy := &LogsDrilldown{}
o.DeepCopyInto(cpy)
return cpy
}
func (o *LogsDrilldown) DeepCopyInto(dst *LogsDrilldown) {
dst.TypeMeta.APIVersion = o.TypeMeta.APIVersion
dst.TypeMeta.Kind = o.TypeMeta.Kind
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
o.Spec.DeepCopyInto(&dst.Spec)
o.Status.DeepCopyInto(&dst.Status)
}
// Interface compliance compile-time check
var _ resource.Object = &LogsDrilldown{}
// +k8s:openapi-gen=true
type LogsDrilldownList struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ListMeta `json:"metadata" yaml:"metadata"`
Items []LogsDrilldown `json:"items" yaml:"items"`
}
func (o *LogsDrilldownList) DeepCopyObject() runtime.Object {
return o.Copy()
}
func (o *LogsDrilldownList) Copy() resource.ListObject {
cpy := &LogsDrilldownList{
TypeMeta: o.TypeMeta,
Items: make([]LogsDrilldown, len(o.Items)),
}
o.ListMeta.DeepCopyInto(&cpy.ListMeta)
for i := 0; i < len(o.Items); i++ {
if item, ok := o.Items[i].Copy().(*LogsDrilldown); ok {
cpy.Items[i] = *item
}
}
return cpy
}
func (o *LogsDrilldownList) GetItems() []resource.Object {
items := make([]resource.Object, len(o.Items))
for i := 0; i < len(o.Items); i++ {
items[i] = &o.Items[i]
}
return items
}
func (o *LogsDrilldownList) SetItems(items []resource.Object) {
o.Items = make([]LogsDrilldown, len(items))
for i := 0; i < len(items); i++ {
o.Items[i] = *items[i].(*LogsDrilldown)
}
}
func (o *LogsDrilldownList) DeepCopy() *LogsDrilldownList {
cpy := &LogsDrilldownList{}
o.DeepCopyInto(cpy)
return cpy
}
func (o *LogsDrilldownList) DeepCopyInto(dst *LogsDrilldownList) {
resource.CopyObjectInto(dst, o)
}
// Interface compliance compile-time check
var _ resource.ListObject = &LogsDrilldownList{}
// Copy methods for all subresource types
// DeepCopy creates a full deep copy of Spec
func (s *Spec) DeepCopy() *Spec {
cpy := &Spec{}
s.DeepCopyInto(cpy)
return cpy
}
// DeepCopyInto deep copies Spec into another Spec object
func (s *Spec) DeepCopyInto(dst *Spec) {
resource.CopyObjectInto(dst, s)
}
// DeepCopy creates a full deep copy of Status
func (s *Status) DeepCopy() *Status {
cpy := &Status{}
s.DeepCopyInto(cpy)
return cpy
}
// DeepCopyInto deep copies Status into another Status object
func (s *Status) DeepCopyInto(dst *Status) {
resource.CopyObjectInto(dst, s)
}
@@ -1,34 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"github.com/grafana/grafana-app-sdk/resource"
)
// schema is unexported to prevent accidental overwrites
var (
schemaLogsDrilldown = resource.NewSimpleSchema("logsdrilldown.grafana.app", "v1alpha1", &LogsDrilldown{}, &LogsDrilldownList{}, resource.WithKind("LogsDrilldown"),
resource.WithPlural("logsdrilldowns"), resource.WithScope(resource.NamespacedScope))
kindLogsDrilldown = resource.Kind{
Schema: schemaLogsDrilldown,
Codecs: map[resource.KindEncoding]resource.Codec{
resource.KindEncodingJSON: &JSONCodec{},
},
}
)
// Kind returns a resource.Kind for this Schema with a JSON codec
func Kind() resource.Kind {
return kindLogsDrilldown
}
// Schema returns a resource.SimpleSchema representation of LogsDrilldown
func Schema() *resource.SimpleSchema {
return schemaLogsDrilldown
}
// Interface compliance checks
var _ resource.Schema = kindLogsDrilldown
@@ -1,18 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
// +k8s:openapi-gen=true
type Spec struct {
DefaultFields []string `json:"defaultFields"`
PrettifyJSON bool `json:"prettifyJSON"`
WrapLogMessage bool `json:"wrapLogMessage"`
InterceptDismissed bool `json:"interceptDismissed"`
}
// NewSpec creates a new Spec object.
func NewSpec() *Spec {
return &Spec{
DefaultFields: []string{},
}
}
@@ -1,44 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
// +k8s:openapi-gen=true
type StatusOperatorState struct {
// lastEvaluation is the ResourceVersion last evaluated
LastEvaluation string `json:"lastEvaluation"`
// state describes the state of the lastEvaluation.
// It is limited to three possible states for machine evaluation.
State StatusOperatorStateState `json:"state"`
// descriptiveState is an optional more descriptive state field which has no requirements on format
DescriptiveState *string `json:"descriptiveState,omitempty"`
// details contains any extra information that is operator-specific
Details map[string]interface{} `json:"details,omitempty"`
}
// NewStatusOperatorState creates a new StatusOperatorState object.
func NewStatusOperatorState() *StatusOperatorState {
return &StatusOperatorState{}
}
// +k8s:openapi-gen=true
type Status struct {
// operatorStates is a map of operator ID to operator state evaluations.
// Any operator which consumes this kind SHOULD add its state evaluation information to this field.
OperatorStates map[string]StatusOperatorState `json:"operatorStates,omitempty"`
// additionalFields is reserved for future use
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
}
// NewStatus creates a new Status object.
func NewStatus() *Status {
return &Status{}
}
// +k8s:openapi-gen=true
type StatusOperatorStateState string
const (
StatusOperatorStateStateSuccess StatusOperatorStateState = "success"
StatusOperatorStateStateInProgress StatusOperatorStateState = "in_progress"
StatusOperatorStateStateFailed StatusOperatorStateState = "failed"
)
@@ -1,18 +0,0 @@
package v1alpha1
import "k8s.io/apimachinery/pkg/runtime/schema"
const (
// APIGroup is the API group used by all kinds in this package
APIGroup = "logsdrilldown.grafana.app"
// APIVersion is the API version used by all kinds in this package
APIVersion = "v1alpha1"
)
var (
// GroupVersion is a schema.GroupVersion consisting of the Group and Version constants for this package
GroupVersion = schema.GroupVersion{
Group: APIGroup,
Version: APIVersion,
}
)
@@ -1,99 +0,0 @@
package v1alpha1
import (
"context"
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type LogsDrilldownDefaultColumnsClient struct {
client *resource.TypedClient[*LogsDrilldownDefaultColumns, *LogsDrilldownDefaultColumnsList]
}
func NewLogsDrilldownDefaultColumnsClient(client resource.Client) *LogsDrilldownDefaultColumnsClient {
return &LogsDrilldownDefaultColumnsClient{
client: resource.NewTypedClient[*LogsDrilldownDefaultColumns, *LogsDrilldownDefaultColumnsList](client, Kind()),
}
}
func NewLogsDrilldownDefaultColumnsClientFromGenerator(generator resource.ClientGenerator) (*LogsDrilldownDefaultColumnsClient, error) {
c, err := generator.ClientFor(Kind())
if err != nil {
return nil, err
}
return NewLogsDrilldownDefaultColumnsClient(c), nil
}
func (c *LogsDrilldownDefaultColumnsClient) Get(ctx context.Context, identifier resource.Identifier) (*LogsDrilldownDefaultColumns, error) {
return c.client.Get(ctx, identifier)
}
func (c *LogsDrilldownDefaultColumnsClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*LogsDrilldownDefaultColumnsList, error) {
return c.client.List(ctx, namespace, opts)
}
func (c *LogsDrilldownDefaultColumnsClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*LogsDrilldownDefaultColumnsList, error) {
resp, err := c.client.List(ctx, namespace, resource.ListOptions{
ResourceVersion: opts.ResourceVersion,
Limit: opts.Limit,
LabelFilters: opts.LabelFilters,
FieldSelectors: opts.FieldSelectors,
})
if err != nil {
return nil, err
}
for resp.GetContinue() != "" {
page, err := c.client.List(ctx, namespace, resource.ListOptions{
Continue: resp.GetContinue(),
ResourceVersion: opts.ResourceVersion,
Limit: opts.Limit,
LabelFilters: opts.LabelFilters,
FieldSelectors: opts.FieldSelectors,
})
if err != nil {
return nil, err
}
resp.SetContinue(page.GetContinue())
resp.SetResourceVersion(page.GetResourceVersion())
resp.SetItems(append(resp.GetItems(), page.GetItems()...))
}
return resp, nil
}
func (c *LogsDrilldownDefaultColumnsClient) Create(ctx context.Context, obj *LogsDrilldownDefaultColumns, opts resource.CreateOptions) (*LogsDrilldownDefaultColumns, error) {
// Make sure apiVersion and kind are set
obj.APIVersion = GroupVersion.Identifier()
obj.Kind = Kind().Kind()
return c.client.Create(ctx, obj, opts)
}
func (c *LogsDrilldownDefaultColumnsClient) Update(ctx context.Context, obj *LogsDrilldownDefaultColumns, opts resource.UpdateOptions) (*LogsDrilldownDefaultColumns, error) {
return c.client.Update(ctx, obj, opts)
}
func (c *LogsDrilldownDefaultColumnsClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*LogsDrilldownDefaultColumns, error) {
return c.client.Patch(ctx, identifier, req, opts)
}
func (c *LogsDrilldownDefaultColumnsClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus Status, opts resource.UpdateOptions) (*LogsDrilldownDefaultColumns, error) {
return c.client.Update(ctx, &LogsDrilldownDefaultColumns{
TypeMeta: metav1.TypeMeta{
Kind: Kind().Kind(),
APIVersion: GroupVersion.Identifier(),
},
ObjectMeta: metav1.ObjectMeta{
ResourceVersion: opts.ResourceVersion,
Namespace: identifier.Namespace,
Name: identifier.Name,
},
Status: newStatus,
}, resource.UpdateOptions{
Subresource: "status",
ResourceVersion: opts.ResourceVersion,
})
}
func (c *LogsDrilldownDefaultColumnsClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
return c.client.Delete(ctx, identifier, opts)
}
@@ -1,28 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"encoding/json"
"io"
"github.com/grafana/grafana-app-sdk/resource"
)
// JSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
type JSONCodec struct{}
// Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`
func (*JSONCodec) Read(reader io.Reader, into resource.Object) error {
return json.NewDecoder(reader).Decode(into)
}
// Write writes JSON-encoded bytes into `writer` marshaled from `from`
func (*JSONCodec) Write(writer io.Writer, from resource.Object) error {
return json.NewEncoder(writer).Encode(from)
}
// Interface compliance checks
var _ resource.Codec = &JSONCodec{}
@@ -1,31 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
import (
time "time"
)
// metadata contains embedded CommonMetadata and can be extended with custom string fields
// TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
// without external reference as using the CommonMetadata reference breaks thema codegen.
type Metadata struct {
UpdateTimestamp time.Time `json:"updateTimestamp"`
CreatedBy string `json:"createdBy"`
Uid string `json:"uid"`
CreationTimestamp time.Time `json:"creationTimestamp"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers"`
ResourceVersion string `json:"resourceVersion"`
Generation int64 `json:"generation"`
UpdatedBy string `json:"updatedBy"`
Labels map[string]string `json:"labels"`
}
// NewMetadata creates a new Metadata object.
func NewMetadata() *Metadata {
return &Metadata{
Finalizers: []string{},
Labels: map[string]string{},
}
}
@@ -1,319 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"fmt"
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"time"
)
// +k8s:openapi-gen=true
type LogsDrilldownDefaultColumns struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
// Spec is the spec of the LogsDrilldownDefaultColumns
Spec Spec `json:"spec" yaml:"spec"`
Status Status `json:"status" yaml:"status"`
}
func (o *LogsDrilldownDefaultColumns) GetSpec() any {
return o.Spec
}
func (o *LogsDrilldownDefaultColumns) SetSpec(spec any) error {
cast, ok := spec.(Spec)
if !ok {
return fmt.Errorf("cannot set spec type %#v, not of type Spec", spec)
}
o.Spec = cast
return nil
}
func (o *LogsDrilldownDefaultColumns) GetSubresources() map[string]any {
return map[string]any{
"status": o.Status,
}
}
func (o *LogsDrilldownDefaultColumns) GetSubresource(name string) (any, bool) {
switch name {
case "status":
return o.Status, true
default:
return nil, false
}
}
func (o *LogsDrilldownDefaultColumns) SetSubresource(name string, value any) error {
switch name {
case "status":
cast, ok := value.(Status)
if !ok {
return fmt.Errorf("cannot set status type %#v, not of type Status", value)
}
o.Status = cast
return nil
default:
return fmt.Errorf("subresource '%s' does not exist", name)
}
}
func (o *LogsDrilldownDefaultColumns) GetStaticMetadata() resource.StaticMetadata {
gvk := o.GroupVersionKind()
return resource.StaticMetadata{
Name: o.ObjectMeta.Name,
Namespace: o.ObjectMeta.Namespace,
Group: gvk.Group,
Version: gvk.Version,
Kind: gvk.Kind,
}
}
func (o *LogsDrilldownDefaultColumns) SetStaticMetadata(metadata resource.StaticMetadata) {
o.Name = metadata.Name
o.Namespace = metadata.Namespace
o.SetGroupVersionKind(schema.GroupVersionKind{
Group: metadata.Group,
Version: metadata.Version,
Kind: metadata.Kind,
})
}
func (o *LogsDrilldownDefaultColumns) GetCommonMetadata() resource.CommonMetadata {
dt := o.DeletionTimestamp
var deletionTimestamp *time.Time
if dt != nil {
deletionTimestamp = &dt.Time
}
// Legacy ExtraFields support
extraFields := make(map[string]any)
if o.Annotations != nil {
extraFields["annotations"] = o.Annotations
}
if o.ManagedFields != nil {
extraFields["managedFields"] = o.ManagedFields
}
if o.OwnerReferences != nil {
extraFields["ownerReferences"] = o.OwnerReferences
}
return resource.CommonMetadata{
UID: string(o.UID),
ResourceVersion: o.ResourceVersion,
Generation: o.Generation,
Labels: o.Labels,
CreationTimestamp: o.CreationTimestamp.Time,
DeletionTimestamp: deletionTimestamp,
Finalizers: o.Finalizers,
UpdateTimestamp: o.GetUpdateTimestamp(),
CreatedBy: o.GetCreatedBy(),
UpdatedBy: o.GetUpdatedBy(),
ExtraFields: extraFields,
}
}
func (o *LogsDrilldownDefaultColumns) SetCommonMetadata(metadata resource.CommonMetadata) {
o.UID = types.UID(metadata.UID)
o.ResourceVersion = metadata.ResourceVersion
o.Generation = metadata.Generation
o.Labels = metadata.Labels
o.CreationTimestamp = metav1.NewTime(metadata.CreationTimestamp)
if metadata.DeletionTimestamp != nil {
dt := metav1.NewTime(*metadata.DeletionTimestamp)
o.DeletionTimestamp = &dt
} else {
o.DeletionTimestamp = nil
}
o.Finalizers = metadata.Finalizers
if o.Annotations == nil {
o.Annotations = make(map[string]string)
}
if !metadata.UpdateTimestamp.IsZero() {
o.SetUpdateTimestamp(metadata.UpdateTimestamp)
}
if metadata.CreatedBy != "" {
o.SetCreatedBy(metadata.CreatedBy)
}
if metadata.UpdatedBy != "" {
o.SetUpdatedBy(metadata.UpdatedBy)
}
// Legacy support for setting Annotations, ManagedFields, and OwnerReferences via ExtraFields
if metadata.ExtraFields != nil {
if annotations, ok := metadata.ExtraFields["annotations"]; ok {
if cast, ok := annotations.(map[string]string); ok {
o.Annotations = cast
}
}
if managedFields, ok := metadata.ExtraFields["managedFields"]; ok {
if cast, ok := managedFields.([]metav1.ManagedFieldsEntry); ok {
o.ManagedFields = cast
}
}
if ownerReferences, ok := metadata.ExtraFields["ownerReferences"]; ok {
if cast, ok := ownerReferences.([]metav1.OwnerReference); ok {
o.OwnerReferences = cast
}
}
}
}
func (o *LogsDrilldownDefaultColumns) GetCreatedBy() string {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
return o.ObjectMeta.Annotations["grafana.com/createdBy"]
}
func (o *LogsDrilldownDefaultColumns) SetCreatedBy(createdBy string) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/createdBy"] = createdBy
}
func (o *LogsDrilldownDefaultColumns) GetUpdateTimestamp() time.Time {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
parsed, _ := time.Parse(time.RFC3339, o.ObjectMeta.Annotations["grafana.com/updateTimestamp"])
return parsed
}
func (o *LogsDrilldownDefaultColumns) SetUpdateTimestamp(updateTimestamp time.Time) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/updateTimestamp"] = updateTimestamp.Format(time.RFC3339)
}
func (o *LogsDrilldownDefaultColumns) GetUpdatedBy() string {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
return o.ObjectMeta.Annotations["grafana.com/updatedBy"]
}
func (o *LogsDrilldownDefaultColumns) SetUpdatedBy(updatedBy string) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/updatedBy"] = updatedBy
}
func (o *LogsDrilldownDefaultColumns) Copy() resource.Object {
return resource.CopyObject(o)
}
func (o *LogsDrilldownDefaultColumns) DeepCopyObject() runtime.Object {
return o.Copy()
}
func (o *LogsDrilldownDefaultColumns) DeepCopy() *LogsDrilldownDefaultColumns {
cpy := &LogsDrilldownDefaultColumns{}
o.DeepCopyInto(cpy)
return cpy
}
func (o *LogsDrilldownDefaultColumns) DeepCopyInto(dst *LogsDrilldownDefaultColumns) {
dst.TypeMeta.APIVersion = o.TypeMeta.APIVersion
dst.TypeMeta.Kind = o.TypeMeta.Kind
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
o.Spec.DeepCopyInto(&dst.Spec)
o.Status.DeepCopyInto(&dst.Status)
}
// Interface compliance compile-time check
var _ resource.Object = &LogsDrilldownDefaultColumns{}
// +k8s:openapi-gen=true
type LogsDrilldownDefaultColumnsList struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ListMeta `json:"metadata" yaml:"metadata"`
Items []LogsDrilldownDefaultColumns `json:"items" yaml:"items"`
}
func (o *LogsDrilldownDefaultColumnsList) DeepCopyObject() runtime.Object {
return o.Copy()
}
func (o *LogsDrilldownDefaultColumnsList) Copy() resource.ListObject {
cpy := &LogsDrilldownDefaultColumnsList{
TypeMeta: o.TypeMeta,
Items: make([]LogsDrilldownDefaultColumns, len(o.Items)),
}
o.ListMeta.DeepCopyInto(&cpy.ListMeta)
for i := 0; i < len(o.Items); i++ {
if item, ok := o.Items[i].Copy().(*LogsDrilldownDefaultColumns); ok {
cpy.Items[i] = *item
}
}
return cpy
}
func (o *LogsDrilldownDefaultColumnsList) GetItems() []resource.Object {
items := make([]resource.Object, len(o.Items))
for i := 0; i < len(o.Items); i++ {
items[i] = &o.Items[i]
}
return items
}
func (o *LogsDrilldownDefaultColumnsList) SetItems(items []resource.Object) {
o.Items = make([]LogsDrilldownDefaultColumns, len(items))
for i := 0; i < len(items); i++ {
o.Items[i] = *items[i].(*LogsDrilldownDefaultColumns)
}
}
func (o *LogsDrilldownDefaultColumnsList) DeepCopy() *LogsDrilldownDefaultColumnsList {
cpy := &LogsDrilldownDefaultColumnsList{}
o.DeepCopyInto(cpy)
return cpy
}
func (o *LogsDrilldownDefaultColumnsList) DeepCopyInto(dst *LogsDrilldownDefaultColumnsList) {
resource.CopyObjectInto(dst, o)
}
// Interface compliance compile-time check
var _ resource.ListObject = &LogsDrilldownDefaultColumnsList{}
// Copy methods for all subresource types
// DeepCopy creates a full deep copy of Spec
func (s *Spec) DeepCopy() *Spec {
cpy := &Spec{}
s.DeepCopyInto(cpy)
return cpy
}
// DeepCopyInto deep copies Spec into another Spec object
func (s *Spec) DeepCopyInto(dst *Spec) {
resource.CopyObjectInto(dst, s)
}
// DeepCopy creates a full deep copy of Status
func (s *Status) DeepCopy() *Status {
cpy := &Status{}
s.DeepCopyInto(cpy)
return cpy
}
// DeepCopyInto deep copies Status into another Status object
func (s *Status) DeepCopyInto(dst *Status) {
resource.CopyObjectInto(dst, s)
}
@@ -1,34 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"github.com/grafana/grafana-app-sdk/resource"
)
// schema is unexported to prevent accidental overwrites
var (
schemaLogsDrilldownDefaultColumns = resource.NewSimpleSchema("logsdrilldown.grafana.app", "v1alpha1", &LogsDrilldownDefaultColumns{}, &LogsDrilldownDefaultColumnsList{}, resource.WithKind("LogsDrilldownDefaultColumns"),
resource.WithPlural("logsdrilldowndefaultcolumns"), resource.WithScope(resource.NamespacedScope))
kindLogsDrilldownDefaultColumns = resource.Kind{
Schema: schemaLogsDrilldownDefaultColumns,
Codecs: map[resource.KindEncoding]resource.Codec{
resource.KindEncodingJSON: &JSONCodec{},
},
}
)
// Kind returns a resource.Kind for this Schema with a JSON codec
func Kind() resource.Kind {
return kindLogsDrilldownDefaultColumns
}
// Schema returns a resource.SimpleSchema representation of LogsDrilldownDefaultColumns
func Schema() *resource.SimpleSchema {
return schemaLogsDrilldownDefaultColumns
}
// Interface compliance checks
var _ resource.Schema = kindLogsDrilldownDefaultColumns
@@ -1,43 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
// +k8s:openapi-gen=true
type LogsDefaultColumnsRecords []LogsDefaultColumnsRecord
// +k8s:openapi-gen=true
type LogsDefaultColumnsRecord struct {
Columns []string `json:"columns"`
Labels LogsDefaultColumnsLabels `json:"labels"`
}
// NewLogsDefaultColumnsRecord creates a new LogsDefaultColumnsRecord object.
func NewLogsDefaultColumnsRecord() *LogsDefaultColumnsRecord {
return &LogsDefaultColumnsRecord{
Columns: []string{},
}
}
// +k8s:openapi-gen=true
type LogsDefaultColumnsLabels []LogsDefaultColumnsLabel
// +k8s:openapi-gen=true
type LogsDefaultColumnsLabel struct {
Key string `json:"key"`
Value string `json:"value"`
}
// NewLogsDefaultColumnsLabel creates a new LogsDefaultColumnsLabel object.
func NewLogsDefaultColumnsLabel() *LogsDefaultColumnsLabel {
return &LogsDefaultColumnsLabel{}
}
// +k8s:openapi-gen=true
type Spec struct {
Records LogsDefaultColumnsRecords `json:"records"`
}
// NewSpec creates a new Spec object.
func NewSpec() *Spec {
return &Spec{}
}
@@ -1,44 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
// +k8s:openapi-gen=true
type StatusOperatorState struct {
// lastEvaluation is the ResourceVersion last evaluated
LastEvaluation string `json:"lastEvaluation"`
// state describes the state of the lastEvaluation.
// It is limited to three possible states for machine evaluation.
State StatusOperatorStateState `json:"state"`
// descriptiveState is an optional more descriptive state field which has no requirements on format
DescriptiveState *string `json:"descriptiveState,omitempty"`
// details contains any extra information that is operator-specific
Details map[string]interface{} `json:"details,omitempty"`
}
// NewStatusOperatorState creates a new StatusOperatorState object.
func NewStatusOperatorState() *StatusOperatorState {
return &StatusOperatorState{}
}
// +k8s:openapi-gen=true
type Status struct {
// operatorStates is a map of operator ID to operator state evaluations.
// Any operator which consumes this kind SHOULD add its state evaluation information to this field.
OperatorStates map[string]StatusOperatorState `json:"operatorStates,omitempty"`
// additionalFields is reserved for future use
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
}
// NewStatus creates a new Status object.
func NewStatus() *Status {
return &Status{}
}
// +k8s:openapi-gen=true
type StatusOperatorStateState string
const (
StatusOperatorStateStateSuccess StatusOperatorStateState = "success"
StatusOperatorStateStateInProgress StatusOperatorStateState = "in_progress"
StatusOperatorStateStateFailed StatusOperatorStateState = "failed"
)
@@ -1,18 +0,0 @@
package v1alpha1
import "k8s.io/apimachinery/pkg/runtime/schema"
const (
// APIGroup is the API group used by all kinds in this package
APIGroup = "logsdrilldown.grafana.app"
// APIVersion is the API version used by all kinds in this package
APIVersion = "v1alpha1"
)
var (
// GroupVersion is a schema.GroupVersion consisting of the Group and Version constants for this package
GroupVersion = schema.GroupVersion{
Group: APIGroup,
Version: APIVersion,
}
)
@@ -1,99 +0,0 @@
package v1alpha1
import (
"context"
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type LogsDrilldownDefaultsClient struct {
client *resource.TypedClient[*LogsDrilldownDefaults, *LogsDrilldownDefaultsList]
}
func NewLogsDrilldownDefaultsClient(client resource.Client) *LogsDrilldownDefaultsClient {
return &LogsDrilldownDefaultsClient{
client: resource.NewTypedClient[*LogsDrilldownDefaults, *LogsDrilldownDefaultsList](client, Kind()),
}
}
func NewLogsDrilldownDefaultsClientFromGenerator(generator resource.ClientGenerator) (*LogsDrilldownDefaultsClient, error) {
c, err := generator.ClientFor(Kind())
if err != nil {
return nil, err
}
return NewLogsDrilldownDefaultsClient(c), nil
}
func (c *LogsDrilldownDefaultsClient) Get(ctx context.Context, identifier resource.Identifier) (*LogsDrilldownDefaults, error) {
return c.client.Get(ctx, identifier)
}
func (c *LogsDrilldownDefaultsClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*LogsDrilldownDefaultsList, error) {
return c.client.List(ctx, namespace, opts)
}
func (c *LogsDrilldownDefaultsClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*LogsDrilldownDefaultsList, error) {
resp, err := c.client.List(ctx, namespace, resource.ListOptions{
ResourceVersion: opts.ResourceVersion,
Limit: opts.Limit,
LabelFilters: opts.LabelFilters,
FieldSelectors: opts.FieldSelectors,
})
if err != nil {
return nil, err
}
for resp.GetContinue() != "" {
page, err := c.client.List(ctx, namespace, resource.ListOptions{
Continue: resp.GetContinue(),
ResourceVersion: opts.ResourceVersion,
Limit: opts.Limit,
LabelFilters: opts.LabelFilters,
FieldSelectors: opts.FieldSelectors,
})
if err != nil {
return nil, err
}
resp.SetContinue(page.GetContinue())
resp.SetResourceVersion(page.GetResourceVersion())
resp.SetItems(append(resp.GetItems(), page.GetItems()...))
}
return resp, nil
}
func (c *LogsDrilldownDefaultsClient) Create(ctx context.Context, obj *LogsDrilldownDefaults, opts resource.CreateOptions) (*LogsDrilldownDefaults, error) {
// Make sure apiVersion and kind are set
obj.APIVersion = GroupVersion.Identifier()
obj.Kind = Kind().Kind()
return c.client.Create(ctx, obj, opts)
}
func (c *LogsDrilldownDefaultsClient) Update(ctx context.Context, obj *LogsDrilldownDefaults, opts resource.UpdateOptions) (*LogsDrilldownDefaults, error) {
return c.client.Update(ctx, obj, opts)
}
func (c *LogsDrilldownDefaultsClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*LogsDrilldownDefaults, error) {
return c.client.Patch(ctx, identifier, req, opts)
}
func (c *LogsDrilldownDefaultsClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus Status, opts resource.UpdateOptions) (*LogsDrilldownDefaults, error) {
return c.client.Update(ctx, &LogsDrilldownDefaults{
TypeMeta: metav1.TypeMeta{
Kind: Kind().Kind(),
APIVersion: GroupVersion.Identifier(),
},
ObjectMeta: metav1.ObjectMeta{
ResourceVersion: opts.ResourceVersion,
Namespace: identifier.Namespace,
Name: identifier.Name,
},
Status: newStatus,
}, resource.UpdateOptions{
Subresource: "status",
ResourceVersion: opts.ResourceVersion,
})
}
func (c *LogsDrilldownDefaultsClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
return c.client.Delete(ctx, identifier, opts)
}
@@ -1,28 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"encoding/json"
"io"
"github.com/grafana/grafana-app-sdk/resource"
)
// JSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
type JSONCodec struct{}
// Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`
func (*JSONCodec) Read(reader io.Reader, into resource.Object) error {
return json.NewDecoder(reader).Decode(into)
}
// Write writes JSON-encoded bytes into `writer` marshaled from `from`
func (*JSONCodec) Write(writer io.Writer, from resource.Object) error {
return json.NewEncoder(writer).Encode(from)
}
// Interface compliance checks
var _ resource.Codec = &JSONCodec{}
@@ -1,31 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
import (
time "time"
)
// metadata contains embedded CommonMetadata and can be extended with custom string fields
// TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
// without external reference as using the CommonMetadata reference breaks thema codegen.
type Metadata struct {
UpdateTimestamp time.Time `json:"updateTimestamp"`
CreatedBy string `json:"createdBy"`
Uid string `json:"uid"`
CreationTimestamp time.Time `json:"creationTimestamp"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers"`
ResourceVersion string `json:"resourceVersion"`
Generation int64 `json:"generation"`
UpdatedBy string `json:"updatedBy"`
Labels map[string]string `json:"labels"`
}
// NewMetadata creates a new Metadata object.
func NewMetadata() *Metadata {
return &Metadata{
Finalizers: []string{},
Labels: map[string]string{},
}
}
@@ -1,319 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"fmt"
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"time"
)
// +k8s:openapi-gen=true
type LogsDrilldownDefaults struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
// Spec is the spec of the LogsDrilldownDefaults
Spec Spec `json:"spec" yaml:"spec"`
Status Status `json:"status" yaml:"status"`
}
func (o *LogsDrilldownDefaults) GetSpec() any {
return o.Spec
}
func (o *LogsDrilldownDefaults) SetSpec(spec any) error {
cast, ok := spec.(Spec)
if !ok {
return fmt.Errorf("cannot set spec type %#v, not of type Spec", spec)
}
o.Spec = cast
return nil
}
func (o *LogsDrilldownDefaults) GetSubresources() map[string]any {
return map[string]any{
"status": o.Status,
}
}
func (o *LogsDrilldownDefaults) GetSubresource(name string) (any, bool) {
switch name {
case "status":
return o.Status, true
default:
return nil, false
}
}
func (o *LogsDrilldownDefaults) SetSubresource(name string, value any) error {
switch name {
case "status":
cast, ok := value.(Status)
if !ok {
return fmt.Errorf("cannot set status type %#v, not of type Status", value)
}
o.Status = cast
return nil
default:
return fmt.Errorf("subresource '%s' does not exist", name)
}
}
func (o *LogsDrilldownDefaults) GetStaticMetadata() resource.StaticMetadata {
gvk := o.GroupVersionKind()
return resource.StaticMetadata{
Name: o.ObjectMeta.Name,
Namespace: o.ObjectMeta.Namespace,
Group: gvk.Group,
Version: gvk.Version,
Kind: gvk.Kind,
}
}
func (o *LogsDrilldownDefaults) SetStaticMetadata(metadata resource.StaticMetadata) {
o.Name = metadata.Name
o.Namespace = metadata.Namespace
o.SetGroupVersionKind(schema.GroupVersionKind{
Group: metadata.Group,
Version: metadata.Version,
Kind: metadata.Kind,
})
}
func (o *LogsDrilldownDefaults) GetCommonMetadata() resource.CommonMetadata {
dt := o.DeletionTimestamp
var deletionTimestamp *time.Time
if dt != nil {
deletionTimestamp = &dt.Time
}
// Legacy ExtraFields support
extraFields := make(map[string]any)
if o.Annotations != nil {
extraFields["annotations"] = o.Annotations
}
if o.ManagedFields != nil {
extraFields["managedFields"] = o.ManagedFields
}
if o.OwnerReferences != nil {
extraFields["ownerReferences"] = o.OwnerReferences
}
return resource.CommonMetadata{
UID: string(o.UID),
ResourceVersion: o.ResourceVersion,
Generation: o.Generation,
Labels: o.Labels,
CreationTimestamp: o.CreationTimestamp.Time,
DeletionTimestamp: deletionTimestamp,
Finalizers: o.Finalizers,
UpdateTimestamp: o.GetUpdateTimestamp(),
CreatedBy: o.GetCreatedBy(),
UpdatedBy: o.GetUpdatedBy(),
ExtraFields: extraFields,
}
}
func (o *LogsDrilldownDefaults) SetCommonMetadata(metadata resource.CommonMetadata) {
o.UID = types.UID(metadata.UID)
o.ResourceVersion = metadata.ResourceVersion
o.Generation = metadata.Generation
o.Labels = metadata.Labels
o.CreationTimestamp = metav1.NewTime(metadata.CreationTimestamp)
if metadata.DeletionTimestamp != nil {
dt := metav1.NewTime(*metadata.DeletionTimestamp)
o.DeletionTimestamp = &dt
} else {
o.DeletionTimestamp = nil
}
o.Finalizers = metadata.Finalizers
if o.Annotations == nil {
o.Annotations = make(map[string]string)
}
if !metadata.UpdateTimestamp.IsZero() {
o.SetUpdateTimestamp(metadata.UpdateTimestamp)
}
if metadata.CreatedBy != "" {
o.SetCreatedBy(metadata.CreatedBy)
}
if metadata.UpdatedBy != "" {
o.SetUpdatedBy(metadata.UpdatedBy)
}
// Legacy support for setting Annotations, ManagedFields, and OwnerReferences via ExtraFields
if metadata.ExtraFields != nil {
if annotations, ok := metadata.ExtraFields["annotations"]; ok {
if cast, ok := annotations.(map[string]string); ok {
o.Annotations = cast
}
}
if managedFields, ok := metadata.ExtraFields["managedFields"]; ok {
if cast, ok := managedFields.([]metav1.ManagedFieldsEntry); ok {
o.ManagedFields = cast
}
}
if ownerReferences, ok := metadata.ExtraFields["ownerReferences"]; ok {
if cast, ok := ownerReferences.([]metav1.OwnerReference); ok {
o.OwnerReferences = cast
}
}
}
}
func (o *LogsDrilldownDefaults) GetCreatedBy() string {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
return o.ObjectMeta.Annotations["grafana.com/createdBy"]
}
func (o *LogsDrilldownDefaults) SetCreatedBy(createdBy string) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/createdBy"] = createdBy
}
func (o *LogsDrilldownDefaults) GetUpdateTimestamp() time.Time {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
parsed, _ := time.Parse(time.RFC3339, o.ObjectMeta.Annotations["grafana.com/updateTimestamp"])
return parsed
}
func (o *LogsDrilldownDefaults) SetUpdateTimestamp(updateTimestamp time.Time) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/updateTimestamp"] = updateTimestamp.Format(time.RFC3339)
}
func (o *LogsDrilldownDefaults) GetUpdatedBy() string {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
return o.ObjectMeta.Annotations["grafana.com/updatedBy"]
}
func (o *LogsDrilldownDefaults) SetUpdatedBy(updatedBy string) {
if o.ObjectMeta.Annotations == nil {
o.ObjectMeta.Annotations = make(map[string]string)
}
o.ObjectMeta.Annotations["grafana.com/updatedBy"] = updatedBy
}
func (o *LogsDrilldownDefaults) Copy() resource.Object {
return resource.CopyObject(o)
}
func (o *LogsDrilldownDefaults) DeepCopyObject() runtime.Object {
return o.Copy()
}
func (o *LogsDrilldownDefaults) DeepCopy() *LogsDrilldownDefaults {
cpy := &LogsDrilldownDefaults{}
o.DeepCopyInto(cpy)
return cpy
}
func (o *LogsDrilldownDefaults) DeepCopyInto(dst *LogsDrilldownDefaults) {
dst.TypeMeta.APIVersion = o.TypeMeta.APIVersion
dst.TypeMeta.Kind = o.TypeMeta.Kind
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
o.Spec.DeepCopyInto(&dst.Spec)
o.Status.DeepCopyInto(&dst.Status)
}
// Interface compliance compile-time check
var _ resource.Object = &LogsDrilldownDefaults{}
// +k8s:openapi-gen=true
type LogsDrilldownDefaultsList struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ListMeta `json:"metadata" yaml:"metadata"`
Items []LogsDrilldownDefaults `json:"items" yaml:"items"`
}
func (o *LogsDrilldownDefaultsList) DeepCopyObject() runtime.Object {
return o.Copy()
}
func (o *LogsDrilldownDefaultsList) Copy() resource.ListObject {
cpy := &LogsDrilldownDefaultsList{
TypeMeta: o.TypeMeta,
Items: make([]LogsDrilldownDefaults, len(o.Items)),
}
o.ListMeta.DeepCopyInto(&cpy.ListMeta)
for i := 0; i < len(o.Items); i++ {
if item, ok := o.Items[i].Copy().(*LogsDrilldownDefaults); ok {
cpy.Items[i] = *item
}
}
return cpy
}
func (o *LogsDrilldownDefaultsList) GetItems() []resource.Object {
items := make([]resource.Object, len(o.Items))
for i := 0; i < len(o.Items); i++ {
items[i] = &o.Items[i]
}
return items
}
func (o *LogsDrilldownDefaultsList) SetItems(items []resource.Object) {
o.Items = make([]LogsDrilldownDefaults, len(items))
for i := 0; i < len(items); i++ {
o.Items[i] = *items[i].(*LogsDrilldownDefaults)
}
}
func (o *LogsDrilldownDefaultsList) DeepCopy() *LogsDrilldownDefaultsList {
cpy := &LogsDrilldownDefaultsList{}
o.DeepCopyInto(cpy)
return cpy
}
func (o *LogsDrilldownDefaultsList) DeepCopyInto(dst *LogsDrilldownDefaultsList) {
resource.CopyObjectInto(dst, o)
}
// Interface compliance compile-time check
var _ resource.ListObject = &LogsDrilldownDefaultsList{}
// Copy methods for all subresource types
// DeepCopy creates a full deep copy of Spec
func (s *Spec) DeepCopy() *Spec {
cpy := &Spec{}
s.DeepCopyInto(cpy)
return cpy
}
// DeepCopyInto deep copies Spec into another Spec object
func (s *Spec) DeepCopyInto(dst *Spec) {
resource.CopyObjectInto(dst, s)
}
// DeepCopy creates a full deep copy of Status
func (s *Status) DeepCopy() *Status {
cpy := &Status{}
s.DeepCopyInto(cpy)
return cpy
}
// DeepCopyInto deep copies Status into another Status object
func (s *Status) DeepCopyInto(dst *Status) {
resource.CopyObjectInto(dst, s)
}
@@ -1,34 +0,0 @@
//
// Code generated by grafana-app-sdk. DO NOT EDIT.
//
package v1alpha1
import (
"github.com/grafana/grafana-app-sdk/resource"
)
// schema is unexported to prevent accidental overwrites
var (
schemaLogsDrilldownDefaults = resource.NewSimpleSchema("logsdrilldown.grafana.app", "v1alpha1", &LogsDrilldownDefaults{}, &LogsDrilldownDefaultsList{}, resource.WithKind("LogsDrilldownDefaults"),
resource.WithPlural("logsdrilldowndefaults"), resource.WithScope(resource.NamespacedScope))
kindLogsDrilldownDefaults = resource.Kind{
Schema: schemaLogsDrilldownDefaults,
Codecs: map[resource.KindEncoding]resource.Codec{
resource.KindEncodingJSON: &JSONCodec{},
},
}
)
// Kind returns a resource.Kind for this Schema with a JSON codec
func Kind() resource.Kind {
return kindLogsDrilldownDefaults
}
// Schema returns a resource.SimpleSchema representation of LogsDrilldownDefaults
func Schema() *resource.SimpleSchema {
return schemaLogsDrilldownDefaults
}
// Interface compliance checks
var _ resource.Schema = kindLogsDrilldownDefaults
@@ -1,18 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
// +k8s:openapi-gen=true
type Spec struct {
DefaultFields []string `json:"defaultFields"`
PrettifyJSON bool `json:"prettifyJSON"`
WrapLogMessage bool `json:"wrapLogMessage"`
InterceptDismissed bool `json:"interceptDismissed"`
}
// NewSpec creates a new Spec object.
func NewSpec() *Spec {
return &Spec{
DefaultFields: []string{},
}
}
@@ -1,44 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
// +k8s:openapi-gen=true
type StatusOperatorState struct {
// lastEvaluation is the ResourceVersion last evaluated
LastEvaluation string `json:"lastEvaluation"`
// state describes the state of the lastEvaluation.
// It is limited to three possible states for machine evaluation.
State StatusOperatorStateState `json:"state"`
// descriptiveState is an optional more descriptive state field which has no requirements on format
DescriptiveState *string `json:"descriptiveState,omitempty"`
// details contains any extra information that is operator-specific
Details map[string]interface{} `json:"details,omitempty"`
}
// NewStatusOperatorState creates a new StatusOperatorState object.
func NewStatusOperatorState() *StatusOperatorState {
return &StatusOperatorState{}
}
// +k8s:openapi-gen=true
type Status struct {
// operatorStates is a map of operator ID to operator state evaluations.
// Any operator which consumes this kind SHOULD add its state evaluation information to this field.
OperatorStates map[string]StatusOperatorState `json:"operatorStates,omitempty"`
// additionalFields is reserved for future use
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
}
// NewStatus creates a new Status object.
func NewStatus() *Status {
return &Status{}
}
// +k8s:openapi-gen=true
type StatusOperatorStateState string
const (
StatusOperatorStateStateSuccess StatusOperatorStateState = "success"
StatusOperatorStateStateInProgress StatusOperatorStateState = "in_progress"
StatusOperatorStateStateFailed StatusOperatorStateState = "failed"
)
@@ -1,150 +0,0 @@
//
// This file is generated by grafana-app-sdk
// DO NOT EDIT
//
package manifestdata
import (
"encoding/json"
"fmt"
"strings"
"github.com/grafana/grafana-app-sdk/app"
"github.com/grafana/grafana-app-sdk/resource"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kube-openapi/pkg/spec3"
"k8s.io/kube-openapi/pkg/validation/spec"
logsdrilldownv1alpha1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/generated/logsdrilldown/v1alpha1"
logsdrilldowndefaultcolumnsv1alpha1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/generated/logsdrilldowndefaultcolumns/v1alpha1"
logsdrilldowndefaultsv1alpha1 "github.com/grafana/grafana/apps/logsdrilldown/pkg/generated/logsdrilldowndefaults/v1alpha1"
)
var (
rawSchemaLogsDrilldownv1alpha1 = []byte(`{"LogsDrilldown":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"defaultFields":{"items":{"type":"string"},"type":"array"},"interceptDismissed":{"type":"boolean"},"prettifyJSON":{"type":"boolean"},"wrapLogMessage":{"type":"boolean"}},"required":["defaultFields","prettifyJSON","wrapLogMessage","interceptDismissed"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownv1alpha1, &versionSchemaLogsDrilldownv1alpha1)
rawSchemaLogsDrilldownDefaultsv1alpha1 = []byte(`{"LogsDrilldownDefaults":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"defaultFields":{"items":{"type":"string"},"type":"array"},"interceptDismissed":{"type":"boolean"},"prettifyJSON":{"type":"boolean"},"wrapLogMessage":{"type":"boolean"}},"required":["defaultFields","prettifyJSON","wrapLogMessage","interceptDismissed"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownDefaultsv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownDefaultsv1alpha1, &versionSchemaLogsDrilldownDefaultsv1alpha1)
rawSchemaLogsDrilldownDefaultColumnsv1alpha1 = []byte(`{"LogsDefaultColumnsLabel":{"additionalProperties":false,"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"LogsDefaultColumnsLabels":{"items":{"$ref":"#/components/schemas/LogsDefaultColumnsLabel"},"type":"array"},"LogsDefaultColumnsRecord":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"labels":{"$ref":"#/components/schemas/LogsDefaultColumnsLabels"}},"required":["columns","labels"],"type":"object"},"LogsDefaultColumnsRecords":{"items":{"$ref":"#/components/schemas/LogsDefaultColumnsRecord"},"type":"array"},"LogsDrilldownDefaultColumns":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"records":{"$ref":"#/components/schemas/LogsDefaultColumnsRecords"}},"required":["records"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
versionSchemaLogsDrilldownDefaultColumnsv1alpha1 app.VersionSchema
_ = json.Unmarshal(rawSchemaLogsDrilldownDefaultColumnsv1alpha1, &versionSchemaLogsDrilldownDefaultColumnsv1alpha1)
)
var appManifestData = app.ManifestData{
AppName: "logsdrilldown",
Group: "logsdrilldown.grafana.app",
PreferredVersion: "v1alpha1",
Versions: []app.ManifestVersion{
{
Name: "v1alpha1",
Served: true,
Kinds: []app.ManifestVersionKind{
{
Kind: "LogsDrilldown",
Plural: "LogsDrilldowns",
Scope: "Namespaced",
Conversion: false,
Schema: &versionSchemaLogsDrilldownv1alpha1,
},
{
Kind: "LogsDrilldownDefaults",
Plural: "LogsDrilldownDefaults",
Scope: "Namespaced",
Conversion: false,
Schema: &versionSchemaLogsDrilldownDefaultsv1alpha1,
},
{
Kind: "LogsDrilldownDefaultColumns",
Plural: "LogsDrilldownDefaultColumns",
Scope: "Namespaced",
Conversion: false,
Schema: &versionSchemaLogsDrilldownDefaultColumnsv1alpha1,
},
},
Routes: app.ManifestVersionRoutes{
Namespaced: map[string]spec3.PathProps{},
Cluster: map[string]spec3.PathProps{},
Schemas: map[string]spec.Schema{},
},
},
},
}
func LocalManifest() app.Manifest {
return app.NewEmbeddedManifest(appManifestData)
}
func RemoteManifest() app.Manifest {
return app.NewAPIServerManifest("logsdrilldown")
}
var kindVersionToGoType = map[string]resource.Kind{
"LogsDrilldown/v1alpha1": logsdrilldownv1alpha1.Kind(),
"LogsDrilldownDefaults/v1alpha1": logsdrilldowndefaultsv1alpha1.Kind(),
"LogsDrilldownDefaultColumns/v1alpha1": logsdrilldowndefaultcolumnsv1alpha1.Kind(),
}
// ManifestGoTypeAssociator returns the associated resource.Kind instance for a given Kind and Version, if one exists.
// If there is no association for the provided Kind and Version, exists will return false.
func ManifestGoTypeAssociator(kind, version string) (goType resource.Kind, exists bool) {
goType, exists = kindVersionToGoType[fmt.Sprintf("%s/%s", kind, version)]
return goType, exists
}
var customRouteToGoResponseType = map[string]any{}
// ManifestCustomRouteResponsesAssociator returns the associated response go type for a given kind, version, custom route path, and method, if one exists.
// kind may be empty for custom routes which are not kind subroutes. Leading slashes are removed from subroute paths.
// If there is no association for the provided kind, version, custom route path, and method, exists will return false.
// Resource routes (those without a kind) should prefix their route with "<namespace>/" if the route is namespaced (otherwise the route is assumed to be cluster-scope)
func ManifestCustomRouteResponsesAssociator(kind, version, path, verb string) (goType any, exists bool) {
if len(path) > 0 && path[0] == '/' {
path = path[1:]
}
goType, exists = customRouteToGoResponseType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
return goType, exists
}
var customRouteToGoParamsType = map[string]runtime.Object{}
func ManifestCustomRouteQueryAssociator(kind, version, path, verb string) (goType runtime.Object, exists bool) {
if len(path) > 0 && path[0] == '/' {
path = path[1:]
}
goType, exists = customRouteToGoParamsType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
return goType, exists
}
var customRouteToGoRequestBodyType = map[string]any{}
func ManifestCustomRouteRequestBodyAssociator(kind, version, path, verb string) (goType any, exists bool) {
if len(path) > 0 && path[0] == '/' {
path = path[1:]
}
goType, exists = customRouteToGoRequestBodyType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
return goType, exists
}
type GoTypeAssociator struct{}
func NewGoTypeAssociator() *GoTypeAssociator {
return &GoTypeAssociator{}
}
func (g *GoTypeAssociator) KindToGoType(kind, version string) (goType resource.Kind, exists bool) {
return ManifestGoTypeAssociator(kind, version)
}
func (g *GoTypeAssociator) CustomRouteReturnGoType(kind, version, path, verb string) (goType any, exists bool) {
return ManifestCustomRouteResponsesAssociator(kind, version, path, verb)
}
func (g *GoTypeAssociator) CustomRouteQueryGoType(kind, version, path, verb string) (goType runtime.Object, exists bool) {
return ManifestCustomRouteQueryAssociator(kind, version, path, verb)
}
func (g *GoTypeAssociator) CustomRouteRequestBodyGoType(kind, version, path, verb string) (goType any, exists bool) {
return ManifestCustomRouteRequestBodyAssociator(kind, version, path, verb)
}
@@ -0,0 +1,49 @@
/*
* This file was generated by grafana-app-sdk. DO NOT EDIT.
*/
import { Spec } from './types.spec.gen';
import { Status } from './types.status.gen';
export interface Metadata {
name: string;
namespace: string;
generateName?: string;
selfLink?: string;
uid?: string;
resourceVersion?: string;
generation?: number;
creationTimestamp?: string;
deletionTimestamp?: string;
deletionGracePeriodSeconds?: number;
labels?: Record<string, string>;
annotations?: Record<string, string>;
ownerReferences?: OwnerReference[];
finalizers?: string[];
managedFields?: ManagedFieldsEntry[];
}
export interface OwnerReference {
apiVersion: string;
kind: string;
name: string;
uid: string;
controller?: boolean;
blockOwnerDeletion?: boolean;
}
export interface ManagedFieldsEntry {
manager?: string;
operation?: string;
apiVersion?: string;
time?: string;
fieldsType?: string;
subresource?: string;
}
export interface LogsDrilldownDefaultColumns {
kind: string;
apiVersion: string;
metadata: Metadata;
spec: Spec;
status: Status;
}
@@ -0,0 +1,30 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
// metadata contains embedded CommonMetadata and can be extended with custom string fields
// TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
// without external reference as using the CommonMetadata reference breaks thema codegen.
export interface Metadata {
updateTimestamp: string;
createdBy: string;
uid: string;
creationTimestamp: string;
deletionTimestamp?: string;
finalizers: string[];
resourceVersion: string;
generation: number;
updatedBy: string;
labels: Record<string, string>;
}
export const defaultMetadata = (): Metadata => ({
updateTimestamp: "",
createdBy: "",
uid: "",
creationTimestamp: "",
finalizers: [],
resourceVersion: "",
generation: 0,
updatedBy: "",
labels: {},
});
@@ -0,0 +1,38 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
export type LogsDefaultColumnsRecords = LogsDefaultColumnsRecord[];
export const defaultLogsDefaultColumnsRecords = (): LogsDefaultColumnsRecords => ([]);
export interface LogsDefaultColumnsRecord {
columns: string[];
labels: LogsDefaultColumnsLabels;
}
export const defaultLogsDefaultColumnsRecord = (): LogsDefaultColumnsRecord => ({
columns: [],
labels: defaultLogsDefaultColumnsLabels(),
});
export type LogsDefaultColumnsLabels = LogsDefaultColumnsLabel[];
export const defaultLogsDefaultColumnsLabels = (): LogsDefaultColumnsLabels => ([]);
export interface LogsDefaultColumnsLabel {
key: string;
value: string;
}
export const defaultLogsDefaultColumnsLabel = (): LogsDefaultColumnsLabel => ({
key: "",
value: "",
});
export interface Spec {
records: LogsDefaultColumnsRecords;
}
export const defaultSpec = (): Spec => ({
records: defaultLogsDefaultColumnsRecords(),
});
@@ -0,0 +1,30 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
export interface OperatorState {
// lastEvaluation is the ResourceVersion last evaluated
lastEvaluation: string;
// state describes the state of the lastEvaluation.
// It is limited to three possible states for machine evaluation.
state: "success" | "in_progress" | "failed";
// descriptiveState is an optional more descriptive state field which has no requirements on format
descriptiveState?: string;
// details contains any extra information that is operator-specific
details?: Record<string, any>;
}
export const defaultOperatorState = (): OperatorState => ({
lastEvaluation: "",
state: "success",
});
export interface Status {
// operatorStates is a map of operator ID to operator state evaluations.
// Any operator which consumes this kind SHOULD add its state evaluation information to this field.
operatorStates?: Record<string, OperatorState>;
// additionalFields is reserved for future use
additionalFields?: Record<string, any>;
}
export const defaultStatus = (): Status => ({
});
+7
View File
@@ -2281,3 +2281,10 @@ allow_image_rendering = true
# will check if there has been any changes to the repository not propagated by a webhook.
# The minimum value is 10 seconds.
min_sync_interval = 10s
#################################### Unified Storage ####################################
[unified_storage]
# index_path is the path where unified storage can store its index files for search.
# If empty, defaults to "<data_dir>/unified-search/bleve" (see [paths] section).
# Please note that sharing the same index_path between multiple running Grafana instances is not supported.
index_path =
@@ -41,7 +41,8 @@ Query parameters:
- `sortDirection`: Sort order of elements. Use `alpha-asc` for ascending and `alpha-desc` for descending sort order.
- `typeFilter`: A comma separated list of types to filter the elements by.
- `excludeUid`: Element UID to exclude from search results.
- `folderFilter`: A comma separated list of folder IDs to filter the elements by.
- `folderFilter`: **Deprecated.** A comma separated list of folder IDs to filter the elements by. Use `folderFilterUIDs` instead.
- `folderFilterUIDs`: A comma separated list of folder UIDs to filter the elements by.
- `perPage`: The number of results per page; default is 100.
- `page`: The page for a set of records, given that only `perPage` records are returned at a time. Numbering starts at `1`.
+1 -3
View File
@@ -6,7 +6,6 @@
"version": "12.4.0-pre",
"repository": "github:grafana/grafana",
"scripts": {
"analytics-report": "node --experimental-strip-types ./scripts/cli/analytics/main.mts",
"check-frontend-dev": "./scripts/check-frontend-dev.sh",
"build": "NODE_ENV=production nx exec --verbose -- webpack --config scripts/webpack/webpack.prod.js",
"build:nominify": "yarn run build -- --env noMinify=1",
@@ -431,7 +430,6 @@
"swagger-ui-react": "5.30.3",
"symbol-observable": "4.0.0",
"systemjs": "6.15.1",
"ts-morph": "^27.0.2",
"tslib": "2.8.1",
"tween-functions": "^1.2.0",
"type-fest": "^4.18.2",
@@ -464,7 +462,7 @@
"js-yaml@npm:4.1.0": "^4.1.0",
"js-yaml@npm:=4.1.0": "^4.1.0",
"nodemailer": "7.0.11",
"@storybook/core@npm:8.6.2": "patch:@storybook/core@npm%3A8.6.2#~/.yarn/patches/@storybook-core-npm-8.6.2-8c752112c0.patch"
"@storybook/core@npm:8.6.15": "patch:@storybook/core@npm%3A8.6.15#~/.yarn/patches/@storybook-core-npm-8.6.15-a468a35170.patch"
},
"workspaces": {
"packages": [
@@ -139,6 +139,12 @@
"types": "./dist/types/clients/rtkq/logsdrilldown/v1alpha1/index.d.ts",
"import": "./dist/esm/clients/rtkq/logsdrilldown/v1alpha1/index.mjs",
"require": "./dist/cjs/clients/rtkq/logsdrilldown/v1alpha1/index.cjs"
},
"./rtkq/logsdrilldown/v1beta1": {
"@grafana-app/source": "./src/clients/rtkq/logsdrilldown/v1beta1/index.ts",
"types": "./dist/types/clients/rtkq/logsdrilldown/v1beta1/index.d.ts",
"import": "./dist/esm/clients/rtkq/logsdrilldown/v1beta1/index.mjs",
"require": "./dist/cjs/clients/rtkq/logsdrilldown/v1beta1/index.cjs"
}
},
"publishConfig": {
@@ -9,6 +9,7 @@ import { generatedAPI as folderAPIv1beta1 } from './folder/v1beta1';
import { generatedAPI as historianAlertingAPIv0alpha1 } from './historian.alerting/v0alpha1';
import { generatedAPI as iamAPIv0alpha1 } from './iam/v0alpha1';
import { generatedAPI as logsdrilldownAPIv1alpha1 } from './logsdrilldown/v1alpha1';
import { generatedAPI as logsdrilldownAPIv1beta1 } from './logsdrilldown/v1beta1';
import { generatedAPI as migrateToCloudAPI } from './migrate-to-cloud';
import { generatedAPI as notificationsAlertingAPIv0alpha1 } from './notifications.alerting/v0alpha1';
import { generatedAPI as playlistAPIv0alpha1 } from './playlist/v0alpha1';
@@ -38,6 +39,7 @@ export const allMiddleware = [
notificationsAlertingAPIv0alpha1.middleware,
rulesAlertingAPIv0alpha1.middleware,
historianAlertingAPIv0alpha1.middleware,
logsdrilldownAPIv1beta1.middleware,
logsdrilldownAPIv1alpha1.middleware,
// PLOP_INJECT_MIDDLEWARE
] as const;
@@ -61,6 +63,7 @@ export const allReducers = {
[rulesAlertingAPIv0alpha1.reducerPath]: rulesAlertingAPIv0alpha1.reducer,
[historianAlertingAPIv0alpha1.reducerPath]: historianAlertingAPIv0alpha1.reducer,
[logsdrilldownAPIv1alpha1.reducerPath]: logsdrilldownAPIv1alpha1.reducer,
[logsdrilldownAPIv1beta1.reducerPath]: logsdrilldownAPIv1beta1.reducer,
// PLOP_INJECT_REDUCER
};
@@ -1021,6 +1021,7 @@ const injectedRtkApi = api
typeFilter: queryArg.typeFilter,
excludeUid: queryArg.excludeUid,
folderFilter: queryArg.folderFilter,
folderFilterUIDs: queryArg.folderFilterUiDs,
perPage: queryArg.perPage,
page: queryArg.page,
},
@@ -2915,8 +2916,11 @@ export type GetLibraryElementsApiArg = {
typeFilter?: string;
/** Element UID to exclude from search results. */
excludeUid?: string;
/** A comma separated list of folder ID(s) to filter the elements by. */
/** A comma separated list of folder ID(s) to filter the elements by.
Deprecated: Use FolderFilterUIDs instead. */
folderFilter?: string;
/** A comma separated list of folder UID(s) to filter the elements by. */
folderFilterUiDs?: string;
/** The number of results per page. */
perPage?: number;
/** The page for a set of records, given that only perPage records are returned at a time. Numbering starts at 1. */
@@ -0,0 +1,16 @@
import { createApi } from '@reduxjs/toolkit/query/react';
import { getAPIBaseURL } from '../../../../utils/utils';
import { createBaseQuery } from '../../createBaseQuery';
export const API_GROUP = 'logsdrilldown.grafana.app' as const;
export const API_VERSION = 'v1beta1' as const;
export const BASE_URL = getAPIBaseURL(API_GROUP, API_VERSION);
export const api = createApi({
reducerPath: 'logsdrilldownAPIv1beta1',
baseQuery: createBaseQuery({
baseURL: BASE_URL,
}),
endpoints: () => ({}),
});
@@ -0,0 +1,652 @@
import { api } from './baseAPI';
export const addTagTypes = ['API Discovery', 'LogsDrilldownDefaultColumns'] as const;
const injectedRtkApi = api
.enhanceEndpoints({
addTagTypes,
})
.injectEndpoints({
endpoints: (build) => ({
getApiResources: build.query<GetApiResourcesApiResponse, GetApiResourcesApiArg>({
query: () => ({ url: `/` }),
providesTags: ['API Discovery'],
}),
listLogsDrilldownDefaultColumns: build.query<
ListLogsDrilldownDefaultColumnsApiResponse,
ListLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns`,
params: {
pretty: queryArg.pretty,
allowWatchBookmarks: queryArg.allowWatchBookmarks,
continue: queryArg['continue'],
fieldSelector: queryArg.fieldSelector,
labelSelector: queryArg.labelSelector,
limit: queryArg.limit,
resourceVersion: queryArg.resourceVersion,
resourceVersionMatch: queryArg.resourceVersionMatch,
sendInitialEvents: queryArg.sendInitialEvents,
timeoutSeconds: queryArg.timeoutSeconds,
watch: queryArg.watch,
},
}),
providesTags: ['LogsDrilldownDefaultColumns'],
}),
createLogsDrilldownDefaultColumns: build.mutation<
CreateLogsDrilldownDefaultColumnsApiResponse,
CreateLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns`,
method: 'POST',
body: queryArg.logsDrilldownDefaultColumns,
params: {
pretty: queryArg.pretty,
dryRun: queryArg.dryRun,
fieldManager: queryArg.fieldManager,
fieldValidation: queryArg.fieldValidation,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
deletecollectionLogsDrilldownDefaultColumns: build.mutation<
DeletecollectionLogsDrilldownDefaultColumnsApiResponse,
DeletecollectionLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns`,
method: 'DELETE',
params: {
pretty: queryArg.pretty,
continue: queryArg['continue'],
dryRun: queryArg.dryRun,
fieldSelector: queryArg.fieldSelector,
gracePeriodSeconds: queryArg.gracePeriodSeconds,
ignoreStoreReadErrorWithClusterBreakingPotential: queryArg.ignoreStoreReadErrorWithClusterBreakingPotential,
labelSelector: queryArg.labelSelector,
limit: queryArg.limit,
orphanDependents: queryArg.orphanDependents,
propagationPolicy: queryArg.propagationPolicy,
resourceVersion: queryArg.resourceVersion,
resourceVersionMatch: queryArg.resourceVersionMatch,
sendInitialEvents: queryArg.sendInitialEvents,
timeoutSeconds: queryArg.timeoutSeconds,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
getLogsDrilldownDefaultColumns: build.query<
GetLogsDrilldownDefaultColumnsApiResponse,
GetLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}`,
params: {
pretty: queryArg.pretty,
},
}),
providesTags: ['LogsDrilldownDefaultColumns'],
}),
replaceLogsDrilldownDefaultColumns: build.mutation<
ReplaceLogsDrilldownDefaultColumnsApiResponse,
ReplaceLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}`,
method: 'PUT',
body: queryArg.logsDrilldownDefaultColumns,
params: {
pretty: queryArg.pretty,
dryRun: queryArg.dryRun,
fieldManager: queryArg.fieldManager,
fieldValidation: queryArg.fieldValidation,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
deleteLogsDrilldownDefaultColumns: build.mutation<
DeleteLogsDrilldownDefaultColumnsApiResponse,
DeleteLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}`,
method: 'DELETE',
params: {
pretty: queryArg.pretty,
dryRun: queryArg.dryRun,
gracePeriodSeconds: queryArg.gracePeriodSeconds,
ignoreStoreReadErrorWithClusterBreakingPotential: queryArg.ignoreStoreReadErrorWithClusterBreakingPotential,
orphanDependents: queryArg.orphanDependents,
propagationPolicy: queryArg.propagationPolicy,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
updateLogsDrilldownDefaultColumns: build.mutation<
UpdateLogsDrilldownDefaultColumnsApiResponse,
UpdateLogsDrilldownDefaultColumnsApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}`,
method: 'PATCH',
body: queryArg.patch,
params: {
pretty: queryArg.pretty,
dryRun: queryArg.dryRun,
fieldManager: queryArg.fieldManager,
fieldValidation: queryArg.fieldValidation,
force: queryArg.force,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
getLogsDrilldownDefaultColumnsStatus: build.query<
GetLogsDrilldownDefaultColumnsStatusApiResponse,
GetLogsDrilldownDefaultColumnsStatusApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}/status`,
params: {
pretty: queryArg.pretty,
},
}),
providesTags: ['LogsDrilldownDefaultColumns'],
}),
replaceLogsDrilldownDefaultColumnsStatus: build.mutation<
ReplaceLogsDrilldownDefaultColumnsStatusApiResponse,
ReplaceLogsDrilldownDefaultColumnsStatusApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}/status`,
method: 'PUT',
body: queryArg.logsDrilldownDefaultColumns,
params: {
pretty: queryArg.pretty,
dryRun: queryArg.dryRun,
fieldManager: queryArg.fieldManager,
fieldValidation: queryArg.fieldValidation,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
updateLogsDrilldownDefaultColumnsStatus: build.mutation<
UpdateLogsDrilldownDefaultColumnsStatusApiResponse,
UpdateLogsDrilldownDefaultColumnsStatusApiArg
>({
query: (queryArg) => ({
url: `/logsdrilldowndefaultcolumns/${queryArg.name}/status`,
method: 'PATCH',
body: queryArg.patch,
params: {
pretty: queryArg.pretty,
dryRun: queryArg.dryRun,
fieldManager: queryArg.fieldManager,
fieldValidation: queryArg.fieldValidation,
force: queryArg.force,
},
}),
invalidatesTags: ['LogsDrilldownDefaultColumns'],
}),
}),
overrideExisting: false,
});
export { injectedRtkApi as generatedAPI };
export type GetApiResourcesApiResponse = /** status 200 OK */ ApiResourceList;
export type GetApiResourcesApiArg = void;
export type ListLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */ LogsDrilldownDefaultColumnsList;
export type ListLogsDrilldownDefaultColumnsApiArg = {
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. */
allowWatchBookmarks?: boolean;
/** The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. */
continue?: string;
/** A selector to restrict the list of returned objects by their fields. Defaults to everything. */
fieldSelector?: string;
/** A selector to restrict the list of returned objects by their labels. Defaults to everything. */
labelSelector?: string;
/** limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. */
limit?: number;
/** resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.
Defaults to unset */
resourceVersion?: string;
/** resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.
Defaults to unset */
resourceVersionMatch?: string;
/** `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.
When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan
is interpreted as "data at least as new as the provided `resourceVersion`"
and the bookmark event is send when the state is synced
to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
If `resourceVersion` is unset, this is interpreted as "consistent read" and the
bookmark event is send when the state is synced at least to the moment
when request started being processed.
- `resourceVersionMatch` set to any other value or unset
Invalid error is returned.
Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. */
sendInitialEvents?: boolean;
/** Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. */
timeoutSeconds?: number;
/** Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */
watch?: boolean;
};
export type CreateLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */
| LogsDrilldownDefaultColumns
| /** status 201 Created */ LogsDrilldownDefaultColumns
| /** status 202 Accepted */ LogsDrilldownDefaultColumns;
export type CreateLogsDrilldownDefaultColumnsApiArg = {
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. */
fieldManager?: string;
/** fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */
fieldValidation?: string;
logsDrilldownDefaultColumns: LogsDrilldownDefaultColumns;
};
export type DeletecollectionLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */ Status;
export type DeletecollectionLogsDrilldownDefaultColumnsApiArg = {
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. */
continue?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** A selector to restrict the list of returned objects by their fields. Defaults to everything. */
fieldSelector?: string;
/** The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. */
gracePeriodSeconds?: number;
/** if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it */
ignoreStoreReadErrorWithClusterBreakingPotential?: boolean;
/** A selector to restrict the list of returned objects by their labels. Defaults to everything. */
labelSelector?: string;
/** limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. */
limit?: number;
/** Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. */
orphanDependents?: boolean;
/** Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. */
propagationPolicy?: string;
/** resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.
Defaults to unset */
resourceVersion?: string;
/** resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.
Defaults to unset */
resourceVersionMatch?: string;
/** `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.
When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan
is interpreted as "data at least as new as the provided `resourceVersion`"
and the bookmark event is send when the state is synced
to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
If `resourceVersion` is unset, this is interpreted as "consistent read" and the
bookmark event is send when the state is synced at least to the moment
when request started being processed.
- `resourceVersionMatch` set to any other value or unset
Invalid error is returned.
Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. */
sendInitialEvents?: boolean;
/** Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. */
timeoutSeconds?: number;
};
export type GetLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */ LogsDrilldownDefaultColumns;
export type GetLogsDrilldownDefaultColumnsApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
};
export type ReplaceLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */
| LogsDrilldownDefaultColumns
| /** status 201 Created */ LogsDrilldownDefaultColumns;
export type ReplaceLogsDrilldownDefaultColumnsApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. */
fieldManager?: string;
/** fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */
fieldValidation?: string;
logsDrilldownDefaultColumns: LogsDrilldownDefaultColumns;
};
export type DeleteLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */
| Status
| /** status 202 Accepted */ Status;
export type DeleteLogsDrilldownDefaultColumnsApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. */
gracePeriodSeconds?: number;
/** if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it */
ignoreStoreReadErrorWithClusterBreakingPotential?: boolean;
/** Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. */
orphanDependents?: boolean;
/** Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. */
propagationPolicy?: string;
};
export type UpdateLogsDrilldownDefaultColumnsApiResponse = /** status 200 OK */
| LogsDrilldownDefaultColumns
| /** status 201 Created */ LogsDrilldownDefaultColumns;
export type UpdateLogsDrilldownDefaultColumnsApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). */
fieldManager?: string;
/** fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */
fieldValidation?: string;
/** Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */
force?: boolean;
patch: Patch;
};
export type GetLogsDrilldownDefaultColumnsStatusApiResponse = /** status 200 OK */ LogsDrilldownDefaultColumns;
export type GetLogsDrilldownDefaultColumnsStatusApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
};
export type ReplaceLogsDrilldownDefaultColumnsStatusApiResponse = /** status 200 OK */
| LogsDrilldownDefaultColumns
| /** status 201 Created */ LogsDrilldownDefaultColumns;
export type ReplaceLogsDrilldownDefaultColumnsStatusApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. */
fieldManager?: string;
/** fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */
fieldValidation?: string;
logsDrilldownDefaultColumns: LogsDrilldownDefaultColumns;
};
export type UpdateLogsDrilldownDefaultColumnsStatusApiResponse = /** status 200 OK */
| LogsDrilldownDefaultColumns
| /** status 201 Created */ LogsDrilldownDefaultColumns;
export type UpdateLogsDrilldownDefaultColumnsStatusApiArg = {
/** name of the LogsDrilldownDefaultColumns */
name: string;
/** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */
pretty?: string;
/** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */
dryRun?: string;
/** fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). */
fieldManager?: string;
/** fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */
fieldValidation?: string;
/** Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */
force?: boolean;
patch: Patch;
};
export type ApiResource = {
/** categories is a list of the grouped resources this resource belongs to (e.g. 'all') */
categories?: string[];
/** group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". */
group?: string;
/** kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') */
kind: string;
/** name is the plural name of the resource. */
name: string;
/** namespaced indicates if a resource is namespaced or not. */
namespaced: boolean;
/** shortNames is a list of suggested short names of the resource. */
shortNames?: string[];
/** singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. */
singularName: string;
/** The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates. */
storageVersionHash?: string;
/** verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) */
verbs: string[];
/** version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". */
version?: string;
};
export type ApiResourceList = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion?: string;
/** groupVersion is the group and version this APIResourceList is for. */
groupVersion: string;
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind?: string;
/** resources contains the name of the resources and if they are namespaced. */
resources: ApiResource[];
};
export type Time = string;
export type FieldsV1 = object;
export type ManagedFieldsEntry = {
/** APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. */
apiVersion?: string;
/** FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" */
fieldsType?: string;
/** FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. */
fieldsV1?: FieldsV1;
/** Manager is an identifier of the workflow managing these fields. */
manager?: string;
/** Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. */
operation?: string;
/** Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. */
subresource?: string;
/** Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over. */
time?: Time;
};
export type OwnerReference = {
/** API version of the referent. */
apiVersion: string;
/** If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. */
blockOwnerDeletion?: boolean;
/** If true, this reference points to the managing controller. */
controller?: boolean;
/** Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind: string;
/** Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names */
name: string;
/** UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids */
uid: string;
};
export type ObjectMeta = {
/** Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations */
annotations?: {
[key: string]: string;
};
/** CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata */
creationTimestamp?: Time;
/** Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. */
deletionGracePeriodSeconds?: number;
/** DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.
Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata */
deletionTimestamp?: Time;
/** Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. */
finalizers?: string[];
/** GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will return a 409.
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency */
generateName?: string;
/** A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. */
generation?: number;
/** Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels */
labels?: {
[key: string]: string;
};
/** ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. */
managedFields?: ManagedFieldsEntry[];
/** Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names */
name?: string;
/** Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces */
namespace?: string;
/** List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. */
ownerReferences?: OwnerReference[];
/** An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency */
resourceVersion?: string;
/** Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. */
selfLink?: string;
/** UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids */
uid?: string;
};
export type LogsDrilldownDefaultColumnsLogsDefaultColumnsLabel = {
key: string;
value: string;
};
export type LogsDrilldownDefaultColumnsLogsDefaultColumnsLabels = LogsDrilldownDefaultColumnsLogsDefaultColumnsLabel[];
export type LogsDrilldownDefaultColumnsLogsDefaultColumnsRecord = {
columns: string[];
labels: LogsDrilldownDefaultColumnsLogsDefaultColumnsLabels;
};
export type LogsDrilldownDefaultColumnsLogsDefaultColumnsRecords =
LogsDrilldownDefaultColumnsLogsDefaultColumnsRecord[];
export type LogsDrilldownDefaultColumnsSpec = {
records: LogsDrilldownDefaultColumnsLogsDefaultColumnsRecords;
};
export type LogsDrilldownDefaultColumnsOperatorState = {
/** descriptiveState is an optional more descriptive state field which has no requirements on format */
descriptiveState?: string;
/** details contains any extra information that is operator-specific */
details?: {
[key: string]: {
[key: string]: any;
};
};
/** lastEvaluation is the ResourceVersion last evaluated */
lastEvaluation: string;
/** state describes the state of the lastEvaluation.
It is limited to three possible states for machine evaluation. */
state: 'success' | 'in_progress' | 'failed';
};
export type LogsDrilldownDefaultColumnsStatus = {
/** additionalFields is reserved for future use */
additionalFields?: {
[key: string]: {
[key: string]: any;
};
};
/** operatorStates is a map of operator ID to operator state evaluations.
Any operator which consumes this kind SHOULD add its state evaluation information to this field. */
operatorStates?: {
[key: string]: LogsDrilldownDefaultColumnsOperatorState;
};
};
export type LogsDrilldownDefaultColumns = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion: string;
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind: string;
metadata: ObjectMeta;
spec: LogsDrilldownDefaultColumnsSpec;
status?: LogsDrilldownDefaultColumnsStatus;
};
export type ListMeta = {
/** continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. */
continue?: string;
/** remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. */
remainingItemCount?: number;
/** String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency */
resourceVersion?: string;
/** Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. */
selfLink?: string;
};
export type LogsDrilldownDefaultColumnsList = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion?: string;
items: LogsDrilldownDefaultColumns[];
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind?: string;
metadata: ListMeta;
};
export type StatusCause = {
/** The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
Examples:
"name" - the field "name" on the current resource
"items[0].name" - the field "name" on the first array entry in "items" */
field?: string;
/** A human-readable description of the cause of the error. This field may be presented as-is to a reader. */
message?: string;
/** A machine-readable description of the cause of the error. If this value is empty there is no information available. */
reason?: string;
};
export type StatusDetails = {
/** The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. */
causes?: StatusCause[];
/** The group attribute of the resource associated with the status StatusReason. */
group?: string;
/** The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind?: string;
/** The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). */
name?: string;
/** If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action. */
retryAfterSeconds?: number;
/** UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids */
uid?: string;
};
export type Status = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion?: string;
/** Suggested HTTP return code for this status, 0 if not set. */
code?: number;
/** Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. */
details?: StatusDetails;
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind?: string;
/** A human-readable description of the status of this operation. */
message?: string;
/** Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
metadata?: ListMeta;
/** A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. */
reason?: string;
/** Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status */
status?: string;
};
export type Patch = object;
export const {
useGetApiResourcesQuery,
useLazyGetApiResourcesQuery,
useListLogsDrilldownDefaultColumnsQuery,
useLazyListLogsDrilldownDefaultColumnsQuery,
useCreateLogsDrilldownDefaultColumnsMutation,
useDeletecollectionLogsDrilldownDefaultColumnsMutation,
useGetLogsDrilldownDefaultColumnsQuery,
useLazyGetLogsDrilldownDefaultColumnsQuery,
useReplaceLogsDrilldownDefaultColumnsMutation,
useDeleteLogsDrilldownDefaultColumnsMutation,
useUpdateLogsDrilldownDefaultColumnsMutation,
useGetLogsDrilldownDefaultColumnsStatusQuery,
useLazyGetLogsDrilldownDefaultColumnsStatusQuery,
useReplaceLogsDrilldownDefaultColumnsStatusMutation,
useUpdateLogsDrilldownDefaultColumnsStatusMutation,
} = injectedRtkApi;
@@ -0,0 +1,5 @@
export { BASE_URL, API_GROUP, API_VERSION } from './baseAPI';
import { generatedAPI as rawAPI } from './endpoints.gen';
export * from './endpoints.gen';
export const generatedAPI = rawAPI.enhanceEndpoints({});
@@ -111,6 +111,7 @@ const config: ConfigFile = {
...createAPIConfig('notifications.alerting', 'v0alpha1'),
...createAPIConfig('rules.alerting', 'v0alpha1'),
...createAPIConfig('historian.alerting', 'v0alpha1'),
...createAPIConfig('logsdrilldown', 'v1beta1'),
...createAPIConfig('logsdrilldown', 'v1alpha1'),
// PLOP_INJECT_API_CLIENT - Used by the API client generator
},
-21
View File
@@ -181,24 +181,3 @@ When a violation is detected, the rule reports:
```
Import '../status-history/utils' reaches outside the 'histogram' plugin directory. Plugins should only import from external dependencies or relative paths within their own directory.
```
### `tracking-event-creation`
Checks that the process to create a tracking event is followed in the right way.
#### `eventFactoryLiterals`
Check if the values passed to `createEventFactory` are literals.
```tsx
// Bad ❌
const repo = 'grafana';
const createUnifiedHistoryEvent = createEventFactory(repo, 'unified_history');
// Bad ❌
const history = 'history';
const createUnifiedHistoryEvent = createEventFactory('grafana', `unified_${history}`);
// Good ✅
const createUnifiedHistoryEvent = createEventFactory('grafana', 'unified_history');
```
-2
View File
@@ -5,7 +5,6 @@ const themeTokenUsage = require('./rules/theme-token-usage.cjs');
const noRestrictedImgSrcs = require('./rules/no-restricted-img-srcs.cjs');
const consistentStoryTitles = require('./rules/consistent-story-titles.cjs');
const noPluginExternalImportPaths = require('./rules/no-plugin-external-import-paths.cjs');
const trackingEventCreation = require('./rules/tracking-event-creation.cjs');
module.exports = {
rules: {
@@ -16,6 +15,5 @@ module.exports = {
'no-restricted-img-srcs': noRestrictedImgSrcs,
'consistent-story-titles': consistentStoryTitles,
'no-plugin-external-import-paths': noPluginExternalImportPaths,
'tracking-event-creation': trackingEventCreation,
},
};
@@ -1,158 +0,0 @@
// @ts-check
const { ESLintUtils, AST_NODE_TYPES } = require('@typescript-eslint/utils');
const createRule = ESLintUtils.RuleCreator(
(name) => `https://github.com/grafana/grafana/blob/main/packages/grafana-eslint-rules/README.md#${name}`
);
const trackingEventCreation = createRule({
create(context) {
// Track what name createEventFactory is imported as
let createEventFactoryName = 'createEventFactory';
// Track if createEventFactory is imported
let isCreateEventFactoryImported = false;
// Track variables that store createEventFactory calls
const eventFactoryVariables = new Set();
return {
ImportSpecifier(node) {
if (node.imported.type === AST_NODE_TYPES.Identifier && node.imported.name === 'createEventFactory') {
// Remember what name it was imported as (handles aliased imports)
createEventFactoryName = node.local.name;
isCreateEventFactoryImported = true;
}
},
VariableDeclarator(node) {
if (!isCreateEventFactoryImported) {
return;
}
// Track variables initialized with createEventFactory calls
if (
node.init?.type === AST_NODE_TYPES.CallExpression &&
node.init.callee.type === AST_NODE_TYPES.Identifier &&
node.init.callee.name === createEventFactoryName
) {
const variableName = node.id.type === AST_NODE_TYPES.Identifier && node.id.name;
if (variableName) {
eventFactoryVariables.add(variableName);
}
// Check if arguments are literals
const args = node.init.arguments;
const argsAreNotLiterals = args.some((arg) => arg.type !== AST_NODE_TYPES.Literal);
if (argsAreNotLiterals) {
return context.report({
node: node.init,
messageId: 'eventFactoryLiterals',
});
}
}
},
ExportNamedDeclaration(node) {
if (!isCreateEventFactoryImported) {
return;
}
if (
node.declaration?.type === AST_NODE_TYPES.VariableDeclaration &&
node.declaration.declarations[0].init?.type === AST_NODE_TYPES.CallExpression
) {
const callee = node.declaration.declarations[0].init.callee;
if (callee.type === AST_NODE_TYPES.Identifier && eventFactoryVariables.has(callee.name)) {
// Check for comments
// Check for comments
const comments = context.sourceCode.getCommentsBefore(node);
if (!comments || comments.length === 0) {
return context.report({
node,
messageId: 'missingFunctionComment',
});
}
const jsDocComment = comments.find((comment) => comment.value.slice(0, 1) === '*');
if (!jsDocComment) {
return context.report({
node,
messageId: 'missingJsDocComment',
});
}
}
}
},
TSInterfaceDeclaration(node) {
if (!isCreateEventFactoryImported) {
return;
}
// Check if interface extends TrackingEvent
let extendsTrackingEvent = false;
if (node.extends && node.extends.length > 0) {
const interfaceExtends = node.extends;
extendsTrackingEvent = interfaceExtends.some((extend) => {
return (
extend.expression.type === AST_NODE_TYPES.Identifier && extend.expression.name === 'TrackingEventProps'
);
});
}
if (!node.extends || !extendsTrackingEvent) {
return context.report({
node,
messageId: 'interfaceMustExtend',
});
}
//Check if the interface properties has comments
if (node.body.type === AST_NODE_TYPES.TSInterfaceBody) {
const properties = node.body.body;
properties.forEach((property) => {
const comments = context.sourceCode.getCommentsBefore(property);
if (!comments || comments.length === 0) {
return context.report({
node: property,
messageId: 'missingPropertyComment',
});
}
const jsDocComment = comments.find((comment) => comment.value.slice(0, 1) === '*');
if (!jsDocComment) {
return context.report({
node: property,
messageId: 'missingJsDocComment',
});
}
});
}
},
TSTypeAliasDeclaration(node) {
if (!isCreateEventFactoryImported) {
return;
}
// Check if types has comments
const comments = context.sourceCode.getCommentsBefore(node);
if (!comments || comments.length === 0) {
return context.report({
node,
messageId: 'missingPropertyComment',
});
}
},
};
},
name: 'tracking-event-creation',
meta: {
type: 'problem',
docs: {
description: 'Check that the tracking event is created in the right way',
},
messages: {
eventFactoryLiterals: 'Params passed to `createEventFactory` must be literals',
missingFunctionComment: 'Event function needs to have a description of its purpose',
missingPropertyComment: 'Event property needs to have a description of its purpose',
interfaceMustExtend: 'Interface must extend `TrackingEvent`',
missingJsDocComment: 'Comment needs to be a jsDoc comment (begin comment with `*`)',
},
schema: [],
},
defaultOptions: [],
});
module.exports = trackingEventCreation;
+14 -14
View File
@@ -137,23 +137,23 @@
"@babel/core": "7.28.0",
"@faker-js/faker": "^9.0.0",
"@rollup/plugin-node-resolve": "16.0.1",
"@storybook/addon-a11y": "^8.6.2",
"@storybook/addon-actions": "^8.6.2",
"@storybook/addon-docs": "^8.6.2",
"@storybook/addon-essentials": "^8.6.2",
"@storybook/addon-storysource": "^8.6.2",
"@storybook/addon-a11y": "^8.6.15",
"@storybook/addon-actions": "^8.6.15",
"@storybook/addon-docs": "^8.6.15",
"@storybook/addon-essentials": "^8.6.15",
"@storybook/addon-storysource": "^8.6.15",
"@storybook/addon-webpack5-compiler-swc": "^2.1.0",
"@storybook/blocks": "^8.6.2",
"@storybook/components": "^8.6.2",
"@storybook/core-events": "^8.6.2",
"@storybook/manager-api": "^8.6.2",
"@storybook/blocks": "^8.6.15",
"@storybook/components": "^8.6.15",
"@storybook/core-events": "^8.6.15",
"@storybook/manager-api": "^8.6.15",
"@storybook/mdx2-csf": "1.1.0",
"@storybook/preset-scss": "1.0.3",
"@storybook/preview-api": "^8.6.2",
"@storybook/react": "^8.6.2",
"@storybook/react-webpack5": "^8.6.2",
"@storybook/preview-api": "^8.6.15",
"@storybook/react": "^8.6.15",
"@storybook/react-webpack5": "^8.6.15",
"@storybook/test-runner": "^0.23.0",
"@storybook/theming": "^8.6.2",
"@storybook/theming": "^8.6.15",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "6.6.4",
"@testing-library/react": "16.3.0",
@@ -200,7 +200,7 @@
"rollup-plugin-node-externals": "^8.0.0",
"rollup-plugin-svg-import": "3.0.0",
"sass-loader": "16.0.5",
"storybook": "^8.6.2",
"storybook": "^8.6.15",
"style-loader": "4.0.0",
"typescript": "5.9.2",
"webpack": "5.101.0"
@@ -42,14 +42,7 @@ An example usage is in the [Stat panel](https://grafana.com/docs/grafana/latest/
```tsx
import { DisplayValue } from '@grafana/data';
import {
BigValue,
BigValueColorMode,
BigValueGraphMode,
BigValueJustifyMode,
BigValueTextMode,
useTheme,
} from '@grafana/ui';
import { BigValue, BigValueColorMode, BigValueJustifyMode, BigValueTextMode, useTheme } from '@grafana/ui';
const bigValue: DisplayValue = {
color: 'red',
@@ -62,7 +55,6 @@ return (
<BigValue
theme={useTheme()}
justifyMode={BigValueJustifyMode.Auto}
graphMode={BigValueGraphMode.Area}
colorMode={BigValueColorMode.Value}
textMode={BigValueTextMode.Auto}
value={bigValue}
@@ -10,7 +10,7 @@ import {
BigValueGraphMode,
BigValueJustifyMode,
BigValueTextMode,
Props,
BigValueProps,
} from './BigValue';
import mdx from './BigValue.mdx';
@@ -58,7 +58,7 @@ const meta: Meta = {
},
};
interface StoryProps extends Props {
interface StoryProps extends BigValueProps {
numeric: number;
title: string;
color: string;
@@ -95,7 +95,6 @@ export const ApplyNoValue: StoryFn<StoryProps> = ({
width={width}
height={height}
colorMode={colorMode}
graphMode={graphMode}
textMode={textMode}
justifyMode={justifyMode}
value={{
@@ -109,6 +108,18 @@ export const ApplyNoValue: StoryFn<StoryProps> = ({
);
};
ApplyNoValue.args = {
valueText: '$5022',
title: 'Total Earnings',
colorMode: BigValueColorMode.Value,
graphMode: BigValueGraphMode.Area,
justifyMode: BigValueJustifyMode.Auto,
width: 400,
height: 300,
color: 'red',
textMode: BigValueTextMode.Auto,
};
export const Basic: StoryFn<StoryProps> = ({
valueText,
title,
@@ -137,7 +148,6 @@ export const Basic: StoryFn<StoryProps> = ({
width={width}
height={height}
colorMode={colorMode}
graphMode={graphMode}
textMode={textMode}
justifyMode={justifyMode}
value={{
@@ -163,14 +173,53 @@ Basic.args = {
textMode: BigValueTextMode.Auto,
};
ApplyNoValue.args = {
export const Flexible: StoryFn<StoryProps> = ({
valueText,
title,
colorMode,
graphMode,
height,
width,
color,
textMode,
justifyMode,
}) => {
const theme = useTheme2();
const sparkline: FieldSparkline = {
y: {
name: '',
values: [1, 2, 3, 4, 3],
type: FieldType.number,
state: { range: { min: 1, max: 4, delta: 3 } },
config: {},
},
};
return (
<BigValue
theme={theme}
colorMode={colorMode}
textMode={textMode}
justifyMode={justifyMode}
height={NaN}
width={NaN}
value={{
text: valueText,
numeric: 5022,
color: color,
title,
}}
sparkline={graphMode === BigValueGraphMode.None ? undefined : sparkline}
/>
);
};
Flexible.args = {
valueText: '$5022',
title: 'Total Earnings',
colorMode: BigValueColorMode.Value,
graphMode: BigValueGraphMode.Area,
justifyMode: BigValueJustifyMode.Auto,
width: 400,
height: 300,
color: 'red',
textMode: BigValueTextMode.Auto,
};
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
import { createTheme } from '@grafana/data';
import { BigValue, BigValueColorMode, BigValueGraphMode, Props } from './BigValue';
import { BigValue, BigValueColorMode, BigValueProps } from './BigValue';
const valueObject = {
text: '25',
@@ -10,10 +10,9 @@ const valueObject = {
color: 'red',
};
function getProps(propOverrides?: Partial<Props>): Props {
const props: Props = {
function getProps(propOverrides?: Partial<BigValueProps>): BigValueProps {
const props: BigValueProps = {
colorMode: BigValueColorMode.Background,
graphMode: BigValueGraphMode.Line,
height: 300,
width: 300,
value: valueObject,
@@ -1,5 +1,6 @@
import { cx } from '@emotion/css';
import { memo, type MouseEventHandler } from 'react';
import { useMeasure } from 'react-use';
import { DisplayValue, DisplayValueAlignmentFactors, FieldSparkline } from '@grafana/data';
import { PercentChangeColorMode, VizTextDisplayOptions } from '@grafana/schema';
@@ -18,6 +19,7 @@ export enum BigValueColorMode {
Value = 'value',
}
/** @deprecated use `sparkline` to configure the graph */
export enum BigValueGraphMode {
None = 'none',
Line = 'line',
@@ -40,11 +42,11 @@ export enum BigValueTextMode {
None = 'none',
}
export interface Props extends Themeable2 {
export interface BigValueProps extends Themeable2 {
/** Height of the component */
height: number;
height?: number;
/** Width of the component */
width: number;
width?: number;
/** Value displayed as Big Value */
value: DisplayValue;
/** Sparkline values for showing a graph under/behind the value */
@@ -55,8 +57,6 @@ export interface Props extends Themeable2 {
className?: string;
/** Color mode for coloring the value or the background */
colorMode: BigValueColorMode;
/** Show a graph behind/under the value */
graphMode: BigValueGraphMode;
/** Auto justify value and text or center it */
justifyMode?: BigValueJustifyMode;
/** Factors that should influence the positioning of the text */
@@ -80,6 +80,9 @@ export interface Props extends Themeable2 {
* Disable the wide layout for the BigValue
*/
disableWideLayout?: boolean;
/** @deprecated use `sparkline` to configure the graph */
graphMode?: BigValueGraphMode;
}
/**
@@ -87,10 +90,22 @@ export interface Props extends Themeable2 {
*
* https://developers.grafana.com/ui/latest/index.html?path=/docs/plugins-bigvalue--docs
*/
export const BigValue = memo<Props>((props) => {
const { onClick, className, hasLinks, theme, justifyMode = BigValueJustifyMode.Auto } = props;
export const BigValue = memo<BigValueProps>((props) => {
const {
onClick,
className,
hasLinks,
theme,
justifyMode = BigValueJustifyMode.Auto,
height: propsHeight,
width: propsWidth,
} = props;
const [wrapperRef, { width: calcWidth, height: calcHeight }] = useMeasure<HTMLDivElement>();
const layout = buildLayout({ ...props, justifyMode });
const height = propsHeight ?? calcHeight;
const width = propsWidth ?? calcWidth;
const layout = buildLayout({ ...props, justifyMode, height, width });
const panelStyles = layout.getPanelStyles();
const valueAndTitleContainerStyles = layout.getValueAndTitleContainerStyles();
const valueStyles = layout.getValueStyles();
@@ -105,7 +120,7 @@ export const BigValue = memo<Props>((props) => {
if (!onClick) {
return (
<div className={className} style={panelStyles} title={tooltip}>
<div ref={wrapperRef} className={className} style={panelStyles} title={tooltip}>
<div style={valueAndTitleContainerStyles}>
{textValues.title && <div style={titleStyles}>{textValues.title}</div>}
<FormattedValueDisplay value={textValues} style={valueStyles} />
@@ -129,7 +144,7 @@ export const BigValue = memo<Props>((props) => {
onClick={onClick}
title={tooltip}
>
<div style={valueAndTitleContainerStyles}>
<div ref={wrapperRef} style={valueAndTitleContainerStyles}>
{textValues.title && <div style={titleStyles}>{textValues.title}</div>}
<FormattedValueDisplay value={textValues} style={valueStyles} />
</div>
@@ -3,19 +3,19 @@ import { CSSProperties } from 'react';
import { createTheme, FieldType } from '@grafana/data';
import { PercentChangeColorMode } from '@grafana/schema';
import { Props, BigValueColorMode, BigValueGraphMode, BigValueTextMode } from './BigValue';
import { BigValueProps, BigValueColorMode, BigValueTextMode } from './BigValue';
import {
buildLayout,
getPercentChangeColor,
StackedWithChartLayout,
StackedWithNoChartLayout,
WideWithChartLayout,
BigValuePropsWithHeightAndWidth,
} from './BigValueLayout';
function getProps(propOverrides?: Partial<Props>): Props {
const props: Props = {
function getProps(propOverrides?: Partial<BigValuePropsWithHeightAndWidth>): BigValuePropsWithHeightAndWidth {
const props: BigValuePropsWithHeightAndWidth = {
colorMode: BigValueColorMode.Background,
graphMode: BigValueGraphMode.Area,
height: 300,
width: 300,
value: {
@@ -105,7 +105,7 @@ describe('BigValueLayout', () => {
['wide layout', {}],
['non-wide layout', { disableWideLayout: true }],
])('should shrink the value if percent change is shown for %s', (_, propsOverride) => {
const baseProps: Partial<Props> = {
const baseProps: Partial<BigValueProps> = {
width: 300,
height: 100,
sparkline: undefined,
@@ -9,13 +9,15 @@ import { getTextColorForAlphaBackground } from '../../utils/colors';
import { calculateFontSize } from '../../utils/measureText';
import { Sparkline } from '../Sparkline/Sparkline';
import { BigValueColorMode, Props, BigValueJustifyMode, BigValueTextMode } from './BigValue';
import { BigValueColorMode, BigValueProps, BigValueJustifyMode, BigValueTextMode } from './BigValue';
import { percentChangeString } from './PercentChange';
const LINE_HEIGHT = 1.2;
const MAX_TITLE_SIZE = 30;
const VALUE_FONT_WEIGHT = 500;
export type BigValuePropsWithHeightAndWidth = BigValueProps & Required<Pick<BigValueProps, 'width' | 'height'>>;
export abstract class BigValueLayout {
titleFontSize: number;
valueFontSize: number;
@@ -31,7 +33,7 @@ export abstract class BigValueLayout {
maxTextHeight: number;
textValues: BigValueTextValues;
constructor(private props: Props) {
constructor(private props: BigValuePropsWithHeightAndWidth) {
const { width, height, value, text } = props;
this.valueColor = value.color ?? 'gray';
@@ -288,7 +290,7 @@ export abstract class BigValueLayout {
}
export class WideNoChartLayout extends BigValueLayout {
constructor(props: Props) {
constructor(props: BigValuePropsWithHeightAndWidth) {
super(props);
const valueWidthPercent = this.titleToAlignTo?.length ? 0.3 : 1.0;
@@ -350,7 +352,7 @@ export class WideNoChartLayout extends BigValueLayout {
}
export class WideWithChartLayout extends BigValueLayout {
constructor(props: Props) {
constructor(props: BigValuePropsWithHeightAndWidth) {
super(props);
const { width, height } = props;
@@ -406,7 +408,7 @@ export class WideWithChartLayout extends BigValueLayout {
}
export class StackedWithChartLayout extends BigValueLayout {
constructor(props: Props) {
constructor(props: BigValuePropsWithHeightAndWidth) {
super(props);
const { width, height } = props;
@@ -464,7 +466,7 @@ export class StackedWithChartLayout extends BigValueLayout {
}
export class StackedWithNoChartLayout extends BigValueLayout {
constructor(props: Props) {
constructor(props: BigValuePropsWithHeightAndWidth) {
super(props);
const { height } = props;
@@ -523,7 +525,7 @@ export class StackedWithNoChartLayout extends BigValueLayout {
}
}
export function buildLayout(props: Props): BigValueLayout {
export function buildLayout(props: BigValuePropsWithHeightAndWidth): BigValueLayout {
const { width, height, sparkline } = props;
const useWideLayout = width / height > 2.5 && !props.disableWideLayout;
@@ -557,7 +559,7 @@ export interface BigValueTextValues extends DisplayValue {
tooltip?: string;
}
function getTextValues(props: Props): BigValueTextValues {
function getTextValues(props: BigValuePropsWithHeightAndWidth): BigValueTextValues {
const { value, alignmentFactors, count } = props;
let { textMode } = props;
@@ -120,7 +120,7 @@ const defaultConfig: GraphFieldConfig = {
drawStyle: GraphDrawStyle.Line,
showPoints: VisibilityMode.Auto,
axisPlacement: AxisPlacement.Hidden,
pointSize: 2,
pointSize: 0,
};
export const prepareSeries = (
@@ -204,6 +204,7 @@ export const prepareConfig = (
scaleKey: 'x',
theme,
placement: AxisPlacement.Hidden,
show: false,
});
for (let i = 0; i < dataFrame.fields.length; i++) {
@@ -230,6 +231,7 @@ export const prepareConfig = (
scaleKey,
theme,
placement: AxisPlacement.Hidden,
show: false,
});
const colorMode = getFieldColorModeForField(field);
-3
View File
@@ -11,9 +11,6 @@ import (
_ "github.com/Azure/azure-sdk-for-go/services/keyvault/v7.1/keyvault"
_ "github.com/Azure/go-autorest/autorest"
_ "github.com/Azure/go-autorest/autorest/adal"
_ "github.com/aws/aws-sdk-go-v2/credentials"
_ "github.com/aws/aws-sdk-go-v2/service/secretsmanager"
_ "github.com/aws/aws-sdk-go-v2/service/sts"
_ "github.com/beevik/etree"
_ "github.com/blugelabs/bluge"
_ "github.com/blugelabs/bluge_segment_api"
+7 -12
View File
@@ -12,6 +12,7 @@ import (
legacyiamv0 "github.com/grafana/grafana/pkg/apis/iam/v0alpha1"
"github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
"github.com/grafana/grafana/pkg/services/team"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// OptonalFormatInt formats num as a string. If num is less or equal than 0
@@ -39,23 +40,17 @@ func MapUserTeamPermission(p team.PermissionType) legacyiamv0.TeamPermission {
}
}
// Resource is required to be implemented for list return types so we can
// perform authorization.
type Resource interface {
AuthID() string
}
type ListResponse[T Resource] struct {
type ListResponse[T metav1.Object] struct {
Items []T
RV int64
Continue int64
}
type ListFunc[T Resource] func(ctx context.Context, ns authlib.NamespaceInfo, p Pagination) (*ListResponse[T], error)
type ListFunc[T metav1.Object] func(ctx context.Context, ns authlib.NamespaceInfo, p Pagination) (*ListResponse[T], error)
// List is a helper function that will perform access check on resources if
// prvovided with a authlib.AccessClient.
func List[T Resource](
func List[T metav1.Object](
ctx context.Context,
resource utils.ResourceInfo,
ac authlib.AccessClient,
@@ -78,7 +73,7 @@ func List[T Resource](
check, _, err = ac.Compile(ctx, ident, authlib.ListRequest{
Resource: resource.GroupResource().Resource,
Group: resource.GroupResource().Group,
Verb: "list",
Verb: utils.VerbList,
Namespace: ns.Value,
})
@@ -95,7 +90,7 @@ func List[T Resource](
}
for _, item := range first.Items {
if !check(item.AuthID(), "") {
if !check(item.GetName(), "") {
continue
}
res.Items = append(res.Items, item)
@@ -118,7 +113,7 @@ outer:
break outer
}
if !check(item.AuthID(), "") {
if !check(item.GetName(), "") {
continue
}
+159 -10
View File
@@ -5,6 +5,8 @@ import (
"testing"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apiserver/pkg/endpoints/request"
authlib "github.com/grafana/authlib/types"
@@ -15,14 +17,6 @@ import (
"github.com/grafana/grafana/pkg/services/featuremgmt"
)
type item struct {
id string
}
func (i item) AuthID() string {
return i.id
}
func TestList(t *testing.T) {
ac := acimpl.ProvideAccessControl(featuremgmt.WithFeatures())
@@ -83,8 +77,8 @@ func TestList(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, res.Items, 2)
assert.Equal(t, "1", res.Items[0].AuthID())
assert.Equal(t, "3", res.Items[1].AuthID())
assert.Equal(t, "1", res.Items[0].GetName())
assert.Equal(t, "3", res.Items[1].GetName())
})
}
@@ -103,3 +97,158 @@ func newIdent(permissions ...accesscontrol.Permission) *identity.StaticRequester
Permissions: map[int64]map[string][]string{1: pmap},
}
}
var _ metav1.Object = (*item)(nil)
type item struct {
id string
}
// GetAnnotations implements v1.Object.
func (i item) GetAnnotations() map[string]string {
panic("unimplemented")
}
// GetCreationTimestamp implements v1.Object.
func (i item) GetCreationTimestamp() metav1.Time {
panic("unimplemented")
}
// GetDeletionGracePeriodSeconds implements v1.Object.
func (i item) GetDeletionGracePeriodSeconds() *int64 {
panic("unimplemented")
}
// GetDeletionTimestamp implements v1.Object.
func (i item) GetDeletionTimestamp() *metav1.Time {
panic("unimplemented")
}
// GetFinalizers implements v1.Object.
func (i item) GetFinalizers() []string {
panic("unimplemented")
}
// GetGenerateName implements v1.Object.
func (i item) GetGenerateName() string {
panic("unimplemented")
}
// GetGeneration implements v1.Object.
func (i item) GetGeneration() int64 {
panic("unimplemented")
}
// GetLabels implements v1.Object.
func (i item) GetLabels() map[string]string {
panic("unimplemented")
}
// GetManagedFields implements v1.Object.
func (i item) GetManagedFields() []metav1.ManagedFieldsEntry {
panic("unimplemented")
}
// GetNamespace implements v1.Object.
func (i item) GetNamespace() string {
panic("unimplemented")
}
// GetOwnerReferences implements v1.Object.
func (i item) GetOwnerReferences() []metav1.OwnerReference {
panic("unimplemented")
}
// GetResourceVersion implements v1.Object.
func (i item) GetResourceVersion() string {
panic("unimplemented")
}
// GetSelfLink implements v1.Object.
func (i item) GetSelfLink() string {
panic("unimplemented")
}
// GetUID implements v1.Object.
func (i item) GetUID() types.UID {
panic("unimplemented")
}
// SetAnnotations implements v1.Object.
func (i item) SetAnnotations(annotations map[string]string) {
panic("unimplemented")
}
// SetCreationTimestamp implements v1.Object.
func (i item) SetCreationTimestamp(timestamp metav1.Time) {
panic("unimplemented")
}
// SetDeletionGracePeriodSeconds implements v1.Object.
func (i item) SetDeletionGracePeriodSeconds(*int64) {
panic("unimplemented")
}
// SetDeletionTimestamp implements v1.Object.
func (i item) SetDeletionTimestamp(timestamp *metav1.Time) {
panic("unimplemented")
}
// SetFinalizers implements v1.Object.
func (i item) SetFinalizers(finalizers []string) {
panic("unimplemented")
}
// SetGenerateName implements v1.Object.
func (i item) SetGenerateName(name string) {
panic("unimplemented")
}
// SetGeneration implements v1.Object.
func (i item) SetGeneration(generation int64) {
panic("unimplemented")
}
// SetLabels implements v1.Object.
func (i item) SetLabels(labels map[string]string) {
panic("unimplemented")
}
// SetManagedFields implements v1.Object.
func (i item) SetManagedFields(managedFields []metav1.ManagedFieldsEntry) {
panic("unimplemented")
}
// SetName implements v1.Object.
func (i item) SetName(name string) {
panic("unimplemented")
}
// SetNamespace implements v1.Object.
func (i item) SetNamespace(namespace string) {
panic("unimplemented")
}
// SetOwnerReferences implements v1.Object.
func (i item) SetOwnerReferences([]metav1.OwnerReference) {
panic("unimplemented")
}
// SetResourceVersion implements v1.Object.
func (i item) SetResourceVersion(version string) {
panic("unimplemented")
}
// SetSelfLink implements v1.Object.
func (i item) SetSelfLink(selfLink string) {
panic("unimplemented")
}
// SetUID implements v1.Object.
func (i item) SetUID(uid types.UID) {
panic("unimplemented")
}
func (i item) GetName() string {
return i.id
}
+2 -2
View File
@@ -102,7 +102,7 @@ func RegisterAPIService(
store: store,
userLegacyStore: user.NewLegacyStore(store, accessClient, enableAuthnMutation, tracing),
saLegacyStore: serviceaccount.NewLegacyStore(store, accessClient, enableAuthnMutation, tracing),
legacyTeamStore: team.NewLegacyStore(store, legacyAccessClient, enableAuthnMutation, tracing),
legacyTeamStore: team.NewLegacyStore(store, accessClient, enableAuthnMutation, tracing),
teamBindingLegacyStore: teambinding.NewLegacyBindingStore(store, enableAuthnMutation, tracing),
ssoLegacyStore: sso.NewLegacyStore(ssoService, tracing),
coreRolesStorage: coreRolesStorage,
@@ -327,7 +327,7 @@ func (b *IdentityAccessManagementAPIBuilder) UpdateTeamsAPIGroup(opts builder.AP
storage[teamResource.StoragePath()] = dw
}
storage[teamResource.StoragePath("members")] = team.NewLegacyTeamMemberREST(b.store)
storage[teamResource.StoragePath("members")] = team.NewLegacyTeamMemberREST(b.store, b.accessClient)
if b.teamGroupsHandler != nil {
storage[teamResource.StoragePath("groups")] = b.teamGroupsHandler
}
+11 -5
View File
@@ -178,7 +178,7 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
res, err := common.List(
ctx, resource, s.ac, common.PaginationFromListOptions(options),
func(ctx context.Context, ns claims.NamespaceInfo, p common.Pagination) (*common.ListResponse[iamv0alpha1.ServiceAccount], error) {
func(ctx context.Context, ns claims.NamespaceInfo, p common.Pagination) (*common.ListResponse[*iamv0alpha1.ServiceAccount], error) {
found, err := s.store.ListServiceAccounts(ctx, ns, legacy.ListServiceAccountsQuery{
Pagination: p,
})
@@ -187,12 +187,13 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
return nil, err
}
items := make([]iamv0alpha1.ServiceAccount, 0, len(found.Items))
items := make([]*iamv0alpha1.ServiceAccount, 0, len(found.Items))
for _, sa := range found.Items {
items = append(items, s.toSAItem(sa, ns.Value))
saItem := s.toSAItem(sa, ns.Value)
items = append(items, &saItem)
}
return &common.ListResponse[iamv0alpha1.ServiceAccount]{
return &common.ListResponse[*iamv0alpha1.ServiceAccount]{
Items: items,
RV: found.RV,
Continue: found.Continue,
@@ -204,7 +205,12 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
return nil, err
}
obj := &iamv0alpha1.ServiceAccountList{Items: res.Items}
items := make([]iamv0alpha1.ServiceAccount, len(res.Items))
for i, sa := range res.Items {
items[i] = *sa
}
obj := &iamv0alpha1.ServiceAccountList{Items: items}
obj.Continue = common.OptionalFormatInt(res.Continue)
obj.ResourceVersion = common.OptionalFormatInt(res.RV)
return obj, nil
+33 -2
View File
@@ -2,14 +2,20 @@ package team
import (
"context"
"fmt"
"net/http"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apiserver/pkg/registry/rest"
claims "github.com/grafana/authlib/types"
iamv0alpha1 "github.com/grafana/grafana/apps/iam/pkg/apis/iam/v0alpha1"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/apimachinery/utils"
iamv0 "github.com/grafana/grafana/pkg/apis/iam/v0alpha1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"github.com/grafana/grafana/pkg/registry/apis/iam/common"
"github.com/grafana/grafana/pkg/registry/apis/iam/legacy"
"github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
@@ -23,12 +29,13 @@ var (
_ rest.Connecter = (*LegacyTeamMemberREST)(nil)
)
func NewLegacyTeamMemberREST(store legacy.LegacyIdentityStore) *LegacyTeamMemberREST {
return &LegacyTeamMemberREST{store}
func NewLegacyTeamMemberREST(store legacy.LegacyIdentityStore, ac claims.AccessClient) *LegacyTeamMemberREST {
return &LegacyTeamMemberREST{store: store, ac: ac}
}
type LegacyTeamMemberREST struct {
store legacy.LegacyIdentityStore
ac claims.AccessClient
}
// New implements rest.Storage.
@@ -62,6 +69,30 @@ func (s *LegacyTeamMemberREST) Connect(ctx context.Context, name string, options
}
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ident, err := identity.GetRequester(ctx)
if err != nil {
responder.Error(err)
return
}
checkResp, err := s.ac.Check(ctx, ident, claims.CheckRequest{
Group: iamv0alpha1.TeamResourceInfo.GroupResource().Group,
Resource: iamv0alpha1.TeamResourceInfo.GroupResource().Resource,
Name: name,
Namespace: ns.Value,
Verb: utils.VerbGetPermissions,
}, "")
if err != nil {
responder.Error(err)
return
}
if !checkResp.Allowed {
responder.Error(apierrors.NewForbidden(iamv0alpha1.TeamResourceInfo.GroupResource(), name, fmt.Errorf("permission denied")))
return
}
res, err := s.store.ListTeamMembers(ctx, ns, legacy.ListTeamMembersQuery{
UID: name,
Pagination: common.PaginationFromListQuery(r.URL.Query()),
+11 -5
View File
@@ -174,7 +174,7 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
res, err := common.List(
ctx, resource, s.ac, common.PaginationFromListOptions(options),
func(ctx context.Context, ns claims.NamespaceInfo, p common.Pagination) (*common.ListResponse[iamv0alpha1.Team], error) {
func(ctx context.Context, ns claims.NamespaceInfo, p common.Pagination) (*common.ListResponse[*iamv0alpha1.Team], error) {
found, err := s.store.ListTeams(ctx, ns, legacy.ListTeamQuery{
Pagination: p,
})
@@ -183,12 +183,13 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
return nil, err
}
teams := make([]iamv0alpha1.Team, 0, len(found.Teams))
teams := make([]*iamv0alpha1.Team, 0, len(found.Teams))
for _, t := range found.Teams {
teams = append(teams, toTeamObject(t, ns))
team := toTeamObject(t, ns)
teams = append(teams, &team)
}
return &common.ListResponse[iamv0alpha1.Team]{
return &common.ListResponse[*iamv0alpha1.Team]{
Items: teams,
RV: found.RV,
Continue: found.Continue,
@@ -200,7 +201,12 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
return nil, fmt.Errorf("failed to list teams: %w", err)
}
list := &iamv0alpha1.TeamList{Items: res.Items}
items := make([]iamv0alpha1.Team, len(res.Items))
for i, t := range res.Items {
items[i] = *t
}
list := &iamv0alpha1.TeamList{Items: items}
list.Continue = common.OptionalFormatInt(res.Continue)
list.ResourceVersion = common.OptionalFormatInt(res.RV)
+11 -5
View File
@@ -183,7 +183,7 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
res, err := common.List(
ctx, userResource, s.ac, common.PaginationFromListOptions(options),
func(ctx context.Context, ns claims.NamespaceInfo, p common.Pagination) (*common.ListResponse[iamv0alpha1.User], error) {
func(ctx context.Context, ns claims.NamespaceInfo, p common.Pagination) (*common.ListResponse[*iamv0alpha1.User], error) {
found, err := s.store.ListUsers(ctx, ns, legacy.ListUserQuery{
Pagination: p,
})
@@ -192,12 +192,13 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
return nil, err
}
users := make([]iamv0alpha1.User, 0, len(found.Items))
users := make([]*iamv0alpha1.User, 0, len(found.Items))
for _, u := range found.Items {
users = append(users, toUserItem(&u, ns.Value))
user := toUserItem(&u, ns.Value)
users = append(users, &user)
}
return &common.ListResponse[iamv0alpha1.User]{
return &common.ListResponse[*iamv0alpha1.User]{
Items: users,
RV: found.RV,
Continue: found.Continue,
@@ -209,7 +210,12 @@ func (s *LegacyStore) List(ctx context.Context, options *internalversion.ListOpt
return nil, err
}
obj := &iamv0alpha1.UserList{Items: res.Items}
items := make([]iamv0alpha1.User, len(res.Items))
for i, u := range res.Items {
items[i] = *u
}
obj := &iamv0alpha1.UserList{Items: items}
obj.Continue = common.OptionalFormatInt(res.Continue)
obj.ResourceVersion = common.OptionalFormatInt(res.RV)
return obj, nil
+6
View File
@@ -501,9 +501,15 @@ type GetLibraryElementsParams struct {
// required:false
ExcludeUID string `json:"excludeUid"`
// A comma separated list of folder ID(s) to filter the elements by.
// Deprecated: Use FolderFilterUIDs instead.
// in:query
// required:false
// deprecated:true
FolderFilter string `json:"folderFilter"`
// A comma separated list of folder UID(s) to filter the elements by.
// in:query
// required:false
FolderFilterUIDs string `json:"folderFilterUIDs"`
// The number of results per page.
// in:query
// required:false
+4 -2
View File
@@ -588,8 +588,10 @@ type Cfg struct {
// Unified Storage
UnifiedStorage map[string]UnifiedStorageConfig
// DisableDataMigrations will disable resources data migration to unified storage at startup
DisableDataMigrations bool
MaxPageSizeBytes int
DisableDataMigrations bool
MaxPageSizeBytes int
// IndexPath the directory where index files are stored.
// Note: Bleve locks index files, so mounts cannot be shared between multiple instances.
IndexPath string
IndexWorkers int
IndexRebuildWorkers int
@@ -127,6 +127,10 @@ func (s *decryptStorage) Decrypt(ctx context.Context, namespace xkube.Namespace,
// function call happens after this.
sv, err := s.secureValueMetadataStorage.Read(ctx, namespace, name, contracts.ReadOpts{})
if err != nil {
if errors.Is(err, context.Canceled) {
return "", fmt.Errorf("operation canceled while reading secure value metadata storage: %v (%w)", err, context.Canceled)
}
return "", fmt.Errorf("failed to read secure value metadata storage: %v (%w)", err, contracts.ErrDecryptNotFound)
}
@@ -137,6 +141,10 @@ func (s *decryptStorage) Decrypt(ctx context.Context, namespace xkube.Namespace,
keeperConfig, err := s.keeperMetadataStorage.GetKeeperConfig(ctx, namespace.String(), sv.Status.Keeper, contracts.ReadOpts{})
if err != nil {
if errors.Is(err, context.Canceled) {
return "", fmt.Errorf("operation canceled while reading keeper config metadata storage: %v (%w)", err, context.Canceled)
}
return "", fmt.Errorf("failed to read keeper config metadata storage: %v (%w)", err, contracts.ErrDecryptFailed)
}
@@ -148,13 +156,22 @@ func (s *decryptStorage) Decrypt(ctx context.Context, namespace xkube.Namespace,
if sv.Spec.Ref != nil {
exposedValue, err := keeper.RetrieveReference(ctx, keeperConfig, *sv.Spec.Ref)
if err != nil {
if errors.Is(err, context.Canceled) {
return "", fmt.Errorf("operation canceled while exposing secret using reference: %v (%w)", err, context.Canceled)
}
return "", fmt.Errorf("failed to expose secret using reference: %v (%w)", err, contracts.ErrDecryptFailed)
}
return exposedValue, nil
}
exposedValue, err := keeper.Expose(ctx, keeperConfig, namespace, name, sv.Status.Version)
if err != nil {
if errors.Is(err, context.Canceled) {
return "", fmt.Errorf("operation canceled while exposing secret: %v (%w)", err, context.Canceled)
}
return "", fmt.Errorf("failed to expose secret: %v (%w)", err, contracts.ErrDecryptFailed)
}
@@ -68,6 +68,40 @@ func TestIntegrationDecrypt(t *testing.T) {
}
})
t.Run("when the context is cancelled, it returns an error", func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
svcIdentity := "svc"
// Create auth context with proper permissions that match the decrypters
authCtx := createAuthContext(ctx, "default", []string{"secret.grafana.app/securevalues:decrypt"}, svcIdentity, types.TypeUser)
// Setup service
sut := testutils.Setup(t)
// Create a secure value
spec := secretv1beta1.SecureValueSpec{
Description: "description",
Decrypters: []string{svcIdentity},
Value: ptr.To(secretv1beta1.NewExposedSecureValue("value")),
}
sv := &secretv1beta1.SecureValue{Spec: spec}
sv.Name = "sv-test"
sv.Namespace = "default"
_, err := sut.CreateSv(authCtx, testutils.CreateSvWithSv(sv))
require.NoError(t, err)
// Cancel immediately!
cancel()
exposed, err := sut.DecryptStorage.Decrypt(authCtx, "default", "sv-test")
require.ErrorIs(t, err, context.Canceled)
require.Empty(t, exposed)
})
t.Run("when happy path with valid auth and permissions, it returns decrypted value", func(t *testing.T) {
t.Parallel()
@@ -1,6 +1,7 @@
package metrics
import (
"context"
"errors"
"sync"
@@ -185,6 +186,8 @@ func DecryptResultLabel(err error) string {
return "error_not_found"
} else if errors.Is(err, contracts.ErrDecryptNotAuthorized) {
return "error_unauthorized"
} else if errors.Is(err, context.Canceled) {
return "error_context_canceled"
}
return "error_generic_failure"
+1 -1
View File
@@ -437,7 +437,7 @@ func (w *sqlWriteCloser) Close() error {
_, err = dbutil.Exec(w.ctx, tx, sqlKVInsertLegacyResourceHistory, sqlKVSaveRequest{
SQLTemplate: sqltemplate.New(w.kv.dialect),
sqlKVSectionKey: w.sectionKey,
sqlKVSectionKey: w.sectionKey, // unused: key_path is set by rvmanager
Value: value,
GUID: dataKey.GUID,
Group: dataKey.Group,
@@ -346,7 +346,7 @@ func (k *kvStorageBackend) WriteEvent(ctx context.Context, event WriteEvent) (in
return 0, fmt.Errorf("failed to write data: %w", err)
}
dataKey.ResourceVersion = rv
dataKey.ResourceVersion = rvmanager.SnowflakeFromRv(rv)
} else {
err := k.dataStore.Save(ctx, dataKey, bytes.NewReader(event.Value))
if err != nil {
@@ -372,22 +372,14 @@ func (k *kvStorageBackend) WriteEvent(ctx context.Context, event WriteEvent) (in
}
// Check if the RV we just wrote is the latest. If not, a concurrent write with higher RV happened
if !rvmanager.IsRvEqual(latestKey.ResourceVersion, rv) {
if latestKey.ResourceVersion != dataKey.ResourceVersion {
// Delete the data we just wrote since it's not the latest
// if we're running with rvManager, convert the ResourceVersion back to snowflake to delete
if k.rvManager != nil {
dataKey.ResourceVersion = rvmanager.SnowflakeFromRv(dataKey.ResourceVersion)
}
_ = k.dataStore.Delete(ctx, dataKey)
return 0, fmt.Errorf("optimistic locking failed: concurrent modification detected")
}
if !rvmanager.IsRvEqual(prevKey.ResourceVersion, event.PreviousRV) {
// Another concurrent write happened between our read and write
// if we're running with rvManager, convert the ResourceVersion back to snowflake to delete
if k.rvManager != nil {
dataKey.ResourceVersion = rvmanager.SnowflakeFromRv(dataKey.ResourceVersion)
}
_ = k.dataStore.Delete(ctx, dataKey)
return 0, fmt.Errorf("optimistic locking failed: resource was modified concurrently (expected previous RV %d, found %d)", event.PreviousRV, prevKey.ResourceVersion)
}
@@ -406,12 +398,8 @@ func (k *kvStorageBackend) WriteEvent(ctx context.Context, event WriteEvent) (in
}
// Check if the RV we just wrote is the latest. If not, a concurrent create with higher RV happened
if !rvmanager.IsRvEqual(latestKey.ResourceVersion, rv) {
if latestKey.ResourceVersion != dataKey.ResourceVersion {
// Delete the data we just wrote since it's not the latest
// if we're running with rvManager, convert the ResourceVersion back to snowflake to delete
if k.rvManager != nil {
dataKey.ResourceVersion = rvmanager.SnowflakeFromRv(dataKey.ResourceVersion)
}
_ = k.dataStore.Delete(ctx, dataKey)
return 0, fmt.Errorf("optimistic locking failed: concurrent create detected")
}
@@ -419,10 +407,6 @@ func (k *kvStorageBackend) WriteEvent(ctx context.Context, event WriteEvent) (in
// Verify that the immediate predecessor is not a create
if prevKey.Action == DataActionCreated {
// Another concurrent create happened - delete our write and return error
// if we're running with rvManager, convert the ResourceVersion back to snowflake to delete
if k.rvManager != nil {
dataKey.ResourceVersion = rvmanager.SnowflakeFromRv(dataKey.ResourceVersion)
}
_ = k.dataStore.Delete(ctx, dataKey)
return 0, fmt.Errorf("optimistic locking failed: concurrent create detected")
}
@@ -434,7 +418,7 @@ func (k *kvStorageBackend) WriteEvent(ctx context.Context, event WriteEvent) (in
Group: event.Key.Group,
Resource: event.Key.Resource,
Name: event.Key.Name,
ResourceVersion: rv,
ResourceVersion: dataKey.ResourceVersion,
Action: action,
Folder: obj.GetFolder(),
PreviousRV: event.PreviousRV,
+26 -45
View File
@@ -45,7 +45,7 @@ import (
const (
indexStorageMemory = "memory"
indexStorageFile = "file"
boltTimeout = "500ms"
boltTimeout = "1s"
)
// Keys used to store internal data in index.
@@ -417,25 +417,18 @@ func (b *bleveBackend) BuildIndex(
// This happens on startup, or when memory-based index has expired. (We don't expire file-based indexes)
// If we do have an unexpired cached index already, we always build a new index from scratch.
if cachedIndex == nil && !rebuild {
result := b.findPreviousFileBasedIndex(resourceDir)
if result != nil && result.IsOpen {
// Index file exists but is opened by another process, fallback to memory.
// Keep the name so we can skip cleanup of that directory.
newIndexType = indexStorageMemory
fileIndexName = result.Name
} else if result != nil && result.Index != nil {
// Found and opened existing index successfully
index = result.Index
fileIndexName = result.Name
indexRV = result.RV
var findErr error
index, fileIndexName, indexRV, findErr = b.findPreviousFileBasedIndex(resourceDir)
if findErr != nil {
return nil, findErr
}
}
if newIndexType == indexStorageFile && index != nil {
if index != nil {
build = false
logWithDetails.Debug("Existing index found on filesystem", "indexRV", indexRV, "directory", filepath.Join(resourceDir, fileIndexName))
defer closeIndexOnExit(index, "") // Close index, but don't delete directory.
} else if newIndexType == indexStorageFile {
} else {
// Building index from scratch. Index name has a time component in it to be unique, but if
// we happen to create non-unique name, we bump the time and try again.
@@ -462,9 +455,7 @@ func (b *bleveBackend) BuildIndex(
logWithDetails.Info("Building index using filesystem", "directory", indexDir)
defer closeIndexOnExit(index, indexDir) // Close index, and delete new index directory.
}
}
if newIndexType == indexStorageMemory {
} else {
index, err = newBleveIndex("", mapper, time.Now(), b.opts.BuildVersion)
if err != nil {
return nil, fmt.Errorf("error creating new in-memory bleve index: %w", err)
@@ -567,7 +558,7 @@ func cleanFileSegment(input string) string {
return input
}
// cleanOldIndexes deletes all subdirectories inside resourceDir, skipping directory with "skipName".
// cleanOldIndexes deletes all subdirectories inside dir, skipping directory with "skipName".
// "skipName" can be empty.
func (b *bleveBackend) cleanOldIndexes(resourceDir string, skipName string) {
entries, err := os.ReadDir(resourceDir)
@@ -578,19 +569,19 @@ func (b *bleveBackend) cleanOldIndexes(resourceDir string, skipName string) {
b.log.Warn("error cleaning folders from", "directory", resourceDir, "error", err)
return
}
for _, ent := range entries {
if ent.IsDir() && ent.Name() != skipName {
indexDir := filepath.Join(resourceDir, ent.Name())
if !isPathWithinRoot(indexDir, b.opts.Root) {
b.log.Warn("Skipping cleanup of directory", "directory", indexDir)
for _, entry := range entries {
if entry.IsDir() && entry.Name() != skipName {
entryDir := filepath.Join(resourceDir, entry.Name())
if !isPathWithinRoot(entryDir, b.opts.Root) {
b.log.Warn("Skipping cleanup of directory", "directory", entryDir)
continue
}
err = os.RemoveAll(indexDir)
err = os.RemoveAll(entryDir)
if err != nil {
b.log.Error("Unable to remove old index folder", "directory", indexDir, "error", err)
b.log.Error("Unable to remove old index folder", "directory", entryDir, "error", err)
} else {
b.log.Info("Removed old index folder", "directory", indexDir)
b.log.Info("Removed old index folder", "directory", entryDir)
}
}
}
@@ -637,17 +628,10 @@ func formatIndexName(now time.Time) string {
return now.Format("20060102-150405")
}
type fileIndex struct {
Index bleve.Index
Name string
RV int64
IsOpen bool
}
func (b *bleveBackend) findPreviousFileBasedIndex(resourceDir string) *fileIndex {
func (b *bleveBackend) findPreviousFileBasedIndex(resourceDir string) (bleve.Index, string, int64, error) {
entries, err := os.ReadDir(resourceDir)
if err != nil {
return nil
return nil, "", 0, nil
}
for _, ent := range entries {
@@ -657,14 +641,15 @@ func (b *bleveBackend) findPreviousFileBasedIndex(resourceDir string) *fileIndex
indexName := ent.Name()
indexDir := filepath.Join(resourceDir, indexName)
idx, err := bleve.OpenUsing(indexDir, map[string]interface{}{"bolt_timeout": boltTimeout})
if err != nil {
// On timeout, the file probably is locked by another process.
// This indicates a setup issue that should be fixed rather than worked around by creating a new index file.
if errors.Is(err, bolterrors.ErrTimeout) {
b.log.Debug("Index is opened by another process (timeout), skipping", "indexDir", indexDir)
return &fileIndex{Name: indexName, IsOpen: true}
b.log.Error("index is locked by another process", "indexDir", indexDir, "err", err)
return nil, "", 0, fmt.Errorf("index is locked by another process: indexDir=%s, err=%w", indexDir, err)
}
b.log.Debug("error opening index", "indexDir", indexDir, "err", err)
b.log.Error("error opening index", "indexDir", indexDir, "err", err)
continue
}
@@ -675,14 +660,10 @@ func (b *bleveBackend) findPreviousFileBasedIndex(resourceDir string) *fileIndex
continue
}
return &fileIndex{
Index: idx,
Name: indexName,
RV: indexRV,
}
return idx, indexName, indexRV, nil
}
return nil
return nil, "", 0, nil
}
// Stop closes all indexes and stops background tasks.
+10 -43
View File
@@ -18,6 +18,7 @@ import (
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
bolterrors "go.etcd.io/bbolt/errors"
"go.uber.org/atomic"
"go.uber.org/goleak"
@@ -1584,7 +1585,7 @@ func docCount(t *testing.T, idx resource.ResourceIndex) int {
return int(cnt)
}
func TestBleveBackendFallsBackToMemory(t *testing.T) {
func TestBuildIndexReturnsErrorWhenIndexLocked(t *testing.T) {
ns := resource.NamespacedResource{
Namespace: "test",
Group: "group",
@@ -1605,53 +1606,19 @@ func TestBleveBackendFallsBackToMemory(t *testing.T) {
require.Equal(t, indexStorageFile, bleveIdx1.indexStorage)
checkOpenIndexes(t, reg1, 0, 1)
// Now create a second backend using the same directory
// This simulates another instance trying to open the same index
backend2, reg2 := setupBleveBackend(t, withRootDir(tmpDir))
// BuildIndex should detect the file is locked and fallback to memory
index2, err := backend2.BuildIndex(context.Background(), ns, 100 /* file based */, nil, "test", indexTestDocs(ns, 10, 100), nil, false)
require.NoError(t, err)
require.NotNil(t, index2)
// Verify second index fell back to in-memory despite size being above file threshold
bleveIdx2, ok := index2.(*bleveIndex)
require.True(t, ok)
require.Equal(t, indexStorageMemory, bleveIdx2.indexStorage)
// Verify metrics show 1 memory index and 0 file indexes for backend2
checkOpenIndexes(t, reg2, 1, 0)
// Verify the in-memory index works correctly
require.Equal(t, 10, docCount(t, index2))
// Clean up: close first backend to release the file lock
backend1.Stop()
}
func TestBleveSkipCleanOldIndexesOnMemoryFallback(t *testing.T) {
ns := resource.NamespacedResource{
Namespace: "test",
Group: "group",
Resource: "resource",
}
tmpDir := t.TempDir()
backend1, _ := setupBleveBackend(t, withRootDir(tmpDir))
_, err := backend1.BuildIndex(context.Background(), ns, 100 /* file based */, nil, "test", indexTestDocs(ns, 10, 100), nil, false)
require.NoError(t, err)
// Now create a second backend using the same directory
// This simulates another instance trying to open the same index
backend2, _ := setupBleveBackend(t, withRootDir(tmpDir))
// BuildIndex should detect the file is locked and fallback to memory
_, err = backend2.BuildIndex(context.Background(), ns, 100 /* file based */, nil, "test", indexTestDocs(ns, 10, 100), nil, false)
// BuildIndex should detect the file is locked and return an error after timeout
now := time.Now()
timeout, err := time.ParseDuration(boltTimeout)
require.NoError(t, err)
// Verify that the index directory still exists (i.e., cleanOldIndexes was skipped)
verifyDirEntriesCount(t, backend2.getResourceDir(ns), 1)
index2, err := backend2.BuildIndex(context.Background(), ns, 100 /* file based */, nil, "test", indexTestDocs(ns, 10, 100), nil, false)
require.Error(t, err)
require.ErrorIs(t, err, bolterrors.ErrTimeout)
require.Nil(t, index2)
require.GreaterOrEqual(t, time.Since(now).Milliseconds(), timeout.Milliseconds()-500, "BuildIndex should have waited for approximately boltTimeout duration")
// Clean up: close first backend to release the file lock
backend1.Stop()
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -128,7 +128,7 @@ func TestIntegrationOpenAPIs(t *testing.T) {
Version: "v0alpha1",
}, {
Group: "logsdrilldown.grafana.app",
Version: "v1alpha1",
Version: "v1beta1",
}}
for _, gv := range groups {
VerifyOpenAPISnapshots(t, dir, gv, h)
+7 -1
View File
@@ -6167,10 +6167,16 @@
},
{
"type": "string",
"description": "A comma separated list of folder ID(s) to filter the elements by.",
"description": "A comma separated list of folder ID(s) to filter the elements by.\nDeprecated: Use FolderFilterUIDs instead.",
"name": "folderFilter",
"in": "query"
},
{
"type": "string",
"description": "A comma separated list of folder UID(s) to filter the elements by.",
"name": "folderFilterUIDs",
"in": "query"
},
{
"type": "integer",
"format": "int64",
@@ -3,7 +3,8 @@ import { css, keyframes } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
import { t } from '@grafana/i18n';
import { useStyles2 } from '@grafana/ui';
import grafanaIconSvg from 'img/grafana_icon.svg';
import { Branding } from '../Branding/Branding';
export function BouncingLoader() {
const styles = useStyles2(getStyles);
@@ -16,7 +17,7 @@ export function BouncingLoader() {
aria-label={t('bouncing-loader.label', 'Loading')}
>
<div className={styles.bounce}>
<img alt="" src={grafanaIconSvg} className={styles.logo} />
<Branding.LoginLogo className={styles.logo} />
</div>
</div>
);
+1 -13
View File
@@ -1,4 +1,4 @@
import { EchoBackend, EchoMeta, EchoEvent, EchoSrv, reportInteraction } from '@grafana/runtime';
import { EchoBackend, EchoMeta, EchoEvent, EchoSrv } from '@grafana/runtime';
import { contextSrv } from '../context_srv';
@@ -90,15 +90,3 @@ export class Echo implements EchoSrv {
};
};
}
/** Analytics framework:
* Foundational types and functions for the new tracking event process
*/
export type TrackingEventProps = {
[key: string]: boolean | string | number | undefined;
};
export const createEventFactory = (product: string, featureName: string) => {
return <P extends TrackingEventProps | undefined = undefined>(eventName: string) =>
(props: P extends undefined ? void : P) =>
reportInteraction(`${product}_${featureName}_${eventName}`, props ?? undefined);
};
+9 -1
View File
@@ -20721,13 +20721,21 @@
}
},
{
"description": "A comma separated list of folder ID(s) to filter the elements by.",
"description": "A comma separated list of folder ID(s) to filter the elements by.\nDeprecated: Use FolderFilterUIDs instead.",
"in": "query",
"name": "folderFilter",
"schema": {
"type": "string"
}
},
{
"description": "A comma separated list of folder UID(s) to filter the elements by.",
"in": "query",
"name": "folderFilterUIDs",
"schema": {
"type": "string"
}
},
{
"description": "The number of results per page.",
"in": "query",
-135
View File
@@ -1,135 +0,0 @@
import { Node, type SourceFile, type ts, type Type, type VariableStatement } from 'ts-morph';
import type { Event, EventNamespace, EventProperty } from './types.mts';
import { resolveType, getMetadataFromJSDocs } from './utils/typeResolution.mts';
/**
* Finds all events - calls to the function returned by createEventFactory - declared in a file
*
* An event feature namespace is defined by:
* const createNavEvent = createEventFactory('grafana', 'navigation');
*
* Which will be used to define multiple events like:
* interface ClickProperties {
* linkText: string;
* }
* const trackClick = createNavEvent<ClickProperties>('click');
*/
export function parseEvents(file: SourceFile, eventNamespaces: Map<string, EventNamespace>): Event[] {
const events: Event[] = [];
const variableDecls = file.getVariableDeclarations();
for (const variableDecl of variableDecls) {
// Get the initializer (right hand side of `=`) of the variable declaration
// and make sure it's a function call
const initializer = variableDecl.getInitializer();
if (!initializer || !Node.isCallExpression(initializer)) {
continue;
}
// Only interested in calls to functions returned by createEventFactory
const initializerFnName = initializer.getExpression().getText();
const eventNamespace = eventNamespaces.get(initializerFnName);
if (!eventNamespace) {
continue;
}
// Events should be defined with a single string literal argument (e.g. createNavEvent('click'))
const [arg, ...restArgs] = initializer.getArguments();
if (!arg || !Node.isStringLiteral(arg) || restArgs.length > 0) {
throw new Error(`Expected ${initializerFnName} to be called with only 1 string literal argument`);
}
// We're currently using the variable declaration (foo = blah), but we need the variable
// statement (const foo = blah) to get the JSDoc nodes
const parent = getParentVariableStatement(variableDecl);
if (!parent) {
throw new Error(`Parent not found for ${variableDecl.getText()}`);
}
const docs = parent.getJsDocs();
const { description, owner } = getMetadataFromJSDocs(docs); // TODO: default owner to codeowner if not found
if (!description) {
throw new Error(`Description not found for ${variableDecl.getText()}`);
}
const eventName = arg.getLiteralText();
const event: Event = {
fullEventName: `${eventNamespace.eventPrefixProject}_${eventNamespace.eventPrefixFeature}_${eventName}`,
eventProject: eventNamespace.eventPrefixProject,
eventFeature: eventNamespace.eventPrefixFeature,
eventName,
description,
owner,
};
// Get the type of the declared variable and assert it's a function
const typeAnnotation = variableDecl.getType();
const [callSignature, ...restCallSignatures] = typeAnnotation.getCallSignatures();
if (callSignature === undefined || restCallSignatures.length > 0) {
const typeAsText = typeAnnotation.getText();
throw new Error(`Expected type to be a function with one call signature, got ${typeAsText}`);
}
// The function always only have one parameter type.
// Events that have no properties will have a void parameter type.
const [parameter, ...restParameters] = callSignature.getParameters();
if (parameter === undefined || restParameters.length > 0) {
throw new Error('Expected function to have one parameter');
}
// Find where the parameter type was declared and get it's type
const parameterType = parameter.getTypeAtLocation(parameter.getDeclarations()[0]);
// Then describe the schema for the parameters the event function is called with
if (parameterType.isObject()) {
event.properties = describeObjectParameters(parameterType);
} else if (!parameterType.isVoid()) {
throw new Error(`Expected parameter type to be an object or void, got ${parameterType.getText()}`);
}
events.push(event);
}
return events;
}
function getParentVariableStatement(node: Node): VariableStatement | undefined {
let parent: Node | undefined = node.getParent();
while (parent && !Node.isVariableStatement(parent)) {
parent = parent.getParent();
}
if (parent && Node.isVariableStatement(parent)) {
return parent;
}
return undefined;
}
function describeObjectParameters(objectType: Type<ts.ObjectType>): EventProperty[] {
const properties = objectType.getProperties().map((property) => {
const declarations = property.getDeclarations();
if (declarations.length !== 1) {
throw new Error(`Expected property to have one declaration, got ${declarations.length}`);
}
const declaration = declarations[0];
const propertyType = property.getTypeAtLocation(declaration);
const resolvedType = resolveType(propertyType);
if (!Node.isPropertySignature(declaration)) {
throw new Error(`Expected property to be a property signature, got ${declaration.getKindName()}`);
}
const { description } = getMetadataFromJSDocs(declaration.getJsDocs());
return {
name: property.getName(),
type: resolvedType,
description,
};
});
return properties;
}
-104
View File
@@ -1,104 +0,0 @@
import type { Event, EventNamespace } from './types.mts';
import { parseEvents } from './eventParser.mts';
import { type SourceFile, Node } from 'ts-morph';
/**
* Finds all events - calls to the function returned by createEventFactory - declared in files
*
* An event feature namespace is defined by:
* const createNavEvent = createEventFactory('grafana', 'navigation');
*
* Which will be used to define multiple events like:
* interface ClickProperties {
* linkText: string;
* }
* const trackClick = createNavEvent<ClickProperties>('click');
* const trackExpand = createNavEvent('expand');
*/
export function findAnalyticsEvents(files: SourceFile[], createEventFactoryPath: string): Event[] {
const allEvents: Event[] = files.flatMap((file) => {
// Get the local imported name of createEventFactory
const createEventFactoryImportedName = getEventFactoryFunctionName(file, createEventFactoryPath);
if (!createEventFactoryImportedName) return [];
// Find all calls to createEventFactory and the namespaces they create
const eventNamespaces = findEventNamespaces(file, createEventFactoryImportedName);
// Find all events defined in the file
const events = parseEvents(file, eventNamespaces);
return events;
});
return allEvents;
}
/**
* Finds the local name of the createEventFactory function imported from the given path
*
* @param file - The file to search for the import
* @param createEventFactoryPath - The path to the createEventFactory function
*/
function getEventFactoryFunctionName(file: SourceFile, createEventFactoryPath: string): string | undefined {
const imports = file.getImportDeclarations();
for (const importDeclaration of imports) {
const namedImports = importDeclaration.getNamedImports();
for (const namedImport of namedImports) {
const importName = namedImport.getName();
if (importName === 'createEventFactory') {
const moduleSpecifier = importDeclaration.getModuleSpecifierSourceFile();
if (!moduleSpecifier) continue;
if (moduleSpecifier.getFilePath() === createEventFactoryPath) {
return namedImport.getAliasNode()?.getText() || importName;
}
}
}
}
return undefined;
}
function findEventNamespaces(file: SourceFile, createEventFactoryImportedName: string): Map<string, EventNamespace> {
const variableDecls = file.getVariableDeclarations();
const eventNamespaces = new Map<string, EventNamespace>();
for (const variableDecl of variableDecls) {
const eventFactoryName = variableDecl.getName();
const initializer = variableDecl.getInitializer();
if (!initializer) continue;
if (!Node.isCallExpression(initializer)) continue;
const initializerFnName = initializer.getExpression().getText();
if (initializerFnName !== createEventFactoryImportedName) continue;
const args = initializer.getArguments();
if (args.length !== 2) {
throw new Error(`Expected ${createEventFactoryImportedName} to have 2 arguments`);
}
const [argA, argB] = args;
if (!Node.isStringLiteral(argA) || !Node.isStringLiteral(argB)) {
throw new Error(`Expected ${createEventFactoryImportedName} to have 2 string arguments`);
}
const eventPrefixRepo = argA.getLiteralText();
const eventPrefixFeature = argB.getLiteralText();
console.log(
`found where ${createEventFactoryImportedName} is called, ${eventFactoryName} = ${eventPrefixRepo}_${eventPrefixFeature}`
);
eventNamespaces.set(eventFactoryName, {
factoryName: eventFactoryName,
eventPrefixProject: eventPrefixRepo,
eventPrefixFeature: eventPrefixFeature,
});
}
return eventNamespaces;
}
-25
View File
@@ -1,25 +0,0 @@
import path from 'path';
import fs from 'fs/promises';
import { Project } from 'ts-morph';
import { findAnalyticsEvents } from './findAllEvents.mts';
import { formatEventsAsMarkdown } from './outputFormats/markdown.mts';
const CREATE_EVENT_FACTORY_PATH = path.resolve('public/app/core/services/echo/Echo.ts');
const SOURCE_FILE_PATTERNS = ['**/*.ts'];
const OUTPUT_FORMAT = 'markdown';
const project = new Project({
tsConfigFilePath: path.resolve('tsconfig.json'),
});
const files = project.getSourceFiles(SOURCE_FILE_PATTERNS);
const events = findAnalyticsEvents(files, CREATE_EVENT_FACTORY_PATH);
if (OUTPUT_FORMAT === 'markdown') {
const markdown = await formatEventsAsMarkdown(events);
console.log(markdown);
await fs.writeFile('analytics-report.md', markdown);
} else {
console.log(JSON.stringify(events, null, 2));
}
@@ -1,76 +0,0 @@
import type { Event } from '../types.mts';
import prettier from 'prettier';
function makeMarkdownTable(properties: Array<Record<string, string | undefined>>): string {
const keys = Object.keys(properties[0]);
const header = `| ${keys.join(' | ')} |`;
const border = `| ${keys.map((header) => '-'.padEnd(header.length, '-')).join(' | ')} |`;
const rows = properties.map((property) => {
const columns = keys.map((key) => {
const value = property[key] ?? '';
return String(value).replace(/\|/g, '\\|');
});
return '| ' + columns.join(' | ') + ' |';
});
return [header, border, ...rows].join('\n');
}
export function formatEventAsMarkdown(event: Event): string {
const preparedProperties =
event.properties?.map((property) => {
return {
name: property.name,
type: '`' + property.type + '`',
description: property.description,
};
}) ?? [];
const propertiesTable = event.properties ? makeMarkdownTable(preparedProperties) : '';
const markdownRows = [
`#### ${event.fullEventName}`,
event.description,
event.owner ? `**Owner:** ${event.owner}` : undefined,
...(event.properties ? [`##### Properties`, propertiesTable] : []),
].filter(Boolean);
return markdownRows.join('\n\n');
}
export async function formatEventsAsMarkdown(events: Event[]): Promise<string> {
const byFeature: Record<string, Event[]> = {};
for (const event of events) {
const feature = event.eventFeature;
byFeature[feature] = byFeature[feature] ?? [];
byFeature[feature].push(event);
}
const markdownPerFeature = Object.entries(byFeature)
.map(([feature, events]) => {
const markdownPerEvent = events.map(formatEventAsMarkdown).join('\n');
return `
### ${feature}
${markdownPerEvent}
`;
})
.join('\n');
const markdown = `
# Analytics report
This report contains all the analytics events that are defined in the project.
## Events
${markdownPerFeature}
`;
return prettier.format(markdown, { parser: 'markdown' });
}
-22
View File
@@ -1,22 +0,0 @@
export interface EventNamespace {
factoryName: string;
eventPrefixProject: string;
eventPrefixFeature: string;
}
export interface EventProperty {
name: string;
type: string;
description?: string;
}
export interface Event {
fullEventName: string;
eventProject: string;
eventFeature: string;
eventName: string;
description: string;
owner?: string;
properties?: EventProperty[];
}
@@ -1,98 +0,0 @@
import type { JSDoc, Type } from 'ts-morph';
/**
* Resolves a TypeScript type to a string representation. For example for:
* type Action = "click" | "hover"
* `Action` resolves to `"click" | "hover"`
*
* @param type Type to resolve
* @returns String representation of the type
*/
export function resolveType(type: Type): string {
// If the type is an alias (e.g., `Action`), resolve its declaration
const aliasSymbol = type.getAliasSymbol();
if (aliasSymbol) {
const aliasType = type.getSymbol()?.getDeclarations()?.[0]?.getType();
if (aliasType) {
return resolveType(aliasType);
}
}
// Step 2: If it's a union type, resolve each member recursively
if (type.isUnion()) {
return type
.getUnionTypes()
.map((t) => resolveType(t))
.join(' | ');
}
// Step 3: If it's a string literal type, return its literal value
if (type.isStringLiteral()) {
return `"${type.getLiteralValue()}"`;
}
// TODO: handle enums. Would want to represent an enum as a union of its values
// If the type is an enum, resolve it to a union of its values
if (type.isEnum()) {
const enumMembers = type.getSymbol()?.getDeclarations()?.[0]?.getChildren() || [];
const values = enumMembers
.filter((member) => member.getKindName() === 'SyntaxList' && member.getText() !== `export`)
.map((member) => {
const value = member.getText();
const stripQuotesAndBackticks = value.replace(/['"`]/g, '').replace(/`/g, '');
const splitOnCommaAndReturn = stripQuotesAndBackticks.split(',\n');
return splitOnCommaAndReturn
.map((v) => {
const trimmed = v.trim().replace(/,/g, '');
const splitOnEquals = trimmed.split('=');
return `"${splitOnEquals[1].trim()}"`;
})
.join(` | `);
});
return values.join(` | `);
}
return type.getText(); // Default to the type's text representation
}
export interface JSDocMetadata {
description?: string;
owner?: string;
}
/**
* Extracts description and owner from a JSDoc comment.
*
* @param docs JSDoc comment nodes to extract metadata from
* @returns Metadata extracted from the JSDoc comments
*/
export function getMetadataFromJSDocs(docs: JSDoc[]): JSDocMetadata {
let description: string | undefined;
let owner: string | undefined;
if (docs.length > 1) {
// TODO: Do we need to handle multiple JSDoc comments? Why would there be more than one?
throw new Error('Expected only one JSDoc comment');
}
for (const doc of docs) {
const desc = trimString(doc.getDescription());
if (desc) {
description = desc;
}
const tags = doc.getTags();
for (const tag of tags) {
if (tag.getTagName() === 'owner') {
const tagText = tag.getCommentText();
owner = tagText && trimString(tagText);
}
}
}
return { description, owner };
}
function trimString(str: string): string {
return str.trim().replace(/\n/g, ' ');
}
+194 -251
View File
@@ -3792,23 +3792,23 @@ __metadata:
"@react-aria/overlays": "npm:3.30.0"
"@react-aria/utils": "npm:3.31.0"
"@rollup/plugin-node-resolve": "npm:16.0.1"
"@storybook/addon-a11y": "npm:^8.6.2"
"@storybook/addon-actions": "npm:^8.6.2"
"@storybook/addon-docs": "npm:^8.6.2"
"@storybook/addon-essentials": "npm:^8.6.2"
"@storybook/addon-storysource": "npm:^8.6.2"
"@storybook/addon-a11y": "npm:^8.6.15"
"@storybook/addon-actions": "npm:^8.6.15"
"@storybook/addon-docs": "npm:^8.6.15"
"@storybook/addon-essentials": "npm:^8.6.15"
"@storybook/addon-storysource": "npm:^8.6.15"
"@storybook/addon-webpack5-compiler-swc": "npm:^2.1.0"
"@storybook/blocks": "npm:^8.6.2"
"@storybook/components": "npm:^8.6.2"
"@storybook/core-events": "npm:^8.6.2"
"@storybook/manager-api": "npm:^8.6.2"
"@storybook/blocks": "npm:^8.6.15"
"@storybook/components": "npm:^8.6.15"
"@storybook/core-events": "npm:^8.6.15"
"@storybook/manager-api": "npm:^8.6.15"
"@storybook/mdx2-csf": "npm:1.1.0"
"@storybook/preset-scss": "npm:1.0.3"
"@storybook/preview-api": "npm:^8.6.2"
"@storybook/react": "npm:^8.6.2"
"@storybook/react-webpack5": "npm:^8.6.2"
"@storybook/preview-api": "npm:^8.6.15"
"@storybook/react": "npm:^8.6.15"
"@storybook/react-webpack5": "npm:^8.6.15"
"@storybook/test-runner": "npm:^0.23.0"
"@storybook/theming": "npm:^8.6.2"
"@storybook/theming": "npm:^8.6.15"
"@tanstack/react-virtual": "npm:^3.5.1"
"@testing-library/dom": "npm:10.4.1"
"@testing-library/jest-dom": "npm:6.6.4"
@@ -3899,7 +3899,7 @@ __metadata:
slate: "npm:0.47.9"
slate-plain-serializer: "npm:0.7.13"
slate-react: "npm:0.22.10"
storybook: "npm:^8.6.2"
storybook: "npm:^8.6.15"
style-loader: "npm:4.0.0"
tinycolor2: "npm:1.6.0"
tslib: "npm:2.8.1"
@@ -7961,22 +7961,23 @@ __metadata:
languageName: node
linkType: hard
"@storybook/addon-a11y@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/addon-a11y@npm:8.6.2"
"@storybook/addon-a11y@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/addon-a11y@npm:8.6.15"
dependencies:
"@storybook/addon-highlight": "npm:8.6.2"
"@storybook/test": "npm:8.6.2"
"@storybook/addon-highlight": "npm:8.6.15"
"@storybook/global": "npm:^5.0.0"
"@storybook/test": "npm:8.6.15"
axe-core: "npm:^4.2.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/c7a161734c4d587bbc2b926fcf01103203b4f50112f5ea19bdbd4dad4c1c62bb358613e3c6e608335f064ef7b7627f5a1ffeb1f524ec008bb19e86e50b1dfb27
storybook: ^8.6.15
checksum: 10/558fcb105486112118bfc5f0068efcb5d4b66b508820f8e2a6d4041e7b06029b64d2d3a8b51a7a6049c836b900ead67c33fa9f89e0a1b550f0e5eedbab18e33c
languageName: node
linkType: hard
"@storybook/addon-actions@npm:8.6.2, @storybook/addon-actions@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/addon-actions@npm:8.6.2"
"@storybook/addon-actions@npm:8.6.15, @storybook/addon-actions@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/addon-actions@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
"@types/uuid": "npm:^9.0.1"
@@ -7984,139 +7985,139 @@ __metadata:
polished: "npm:^4.2.2"
uuid: "npm:^9.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/16127ee35f08fe98df98a688a8724c803274cbe1a81d3ae46727ad6b34bdae913dd905a3a124954805e4f2650e56e18f80de2f4cf7cb0fc0480c185cf342a8e5
storybook: ^8.6.15
checksum: 10/4d47e3ce9319d282e5abb44e7694748792c29f37c883afbcfc8939353be47bcc004ab41ce1f421c3d5bafbaa0366935f0b90272e5e6542a2229db55f63bef82c
languageName: node
linkType: hard
"@storybook/addon-backgrounds@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-backgrounds@npm:8.6.2"
"@storybook/addon-backgrounds@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-backgrounds@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
memoizerific: "npm:^1.11.3"
ts-dedent: "npm:^2.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/b303afb745fb34cb77565f595fdd5f1749927f3be6bc58702f3ed6b8931d89abc099b46940436a1f0509b4a6580f7c58100bf091ba6e5fe7f040704ac723118f
storybook: ^8.6.15
checksum: 10/c96107e892d39d5841e7f64f53a619527268636c61184770ca07684432fb3cee30c224a35b716ff30ba9bcdb4326649cd4e7873359d65a7fa8889b0fe7a15ad4
languageName: node
linkType: hard
"@storybook/addon-controls@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-controls@npm:8.6.2"
"@storybook/addon-controls@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-controls@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
dequal: "npm:^2.0.2"
ts-dedent: "npm:^2.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/4d54617c514b6e88d5708e2d3b067a01f3863e83dcf327bdec0b55df36bf8e6269ab1d9e5c5cb0edb27e9554c2d212ce087356b9d68779744854207febd26808
storybook: ^8.6.15
checksum: 10/ee7ea1e4d6cdb47c233ff3dd48196e649bea62bb88816261f65eb0ecd4f83e1593f09e657fc91ed8595b6279a04a1267c01d82020ef749d90c28d4f71b879224
languageName: node
linkType: hard
"@storybook/addon-docs@npm:8.6.2, @storybook/addon-docs@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/addon-docs@npm:8.6.2"
"@storybook/addon-docs@npm:8.6.15, @storybook/addon-docs@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/addon-docs@npm:8.6.15"
dependencies:
"@mdx-js/react": "npm:^3.0.0"
"@storybook/blocks": "npm:8.6.2"
"@storybook/csf-plugin": "npm:8.6.2"
"@storybook/react-dom-shim": "npm:8.6.2"
"@storybook/blocks": "npm:8.6.15"
"@storybook/csf-plugin": "npm:8.6.15"
"@storybook/react-dom-shim": "npm:8.6.15"
react: "npm:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
react-dom: "npm:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
ts-dedent: "npm:^2.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/d13752c4f31f01426724dbfdc70313948475dbbf6c43ed1cceca8d37d86424f79369c1b06c5e4daebe581e8702b02c9522ea77aff1864a7228662f4c8517fedf
storybook: ^8.6.15
checksum: 10/ec18d166ebab276258098ef86e9ad9bcaa163b357766bcef957a8f8c2260d4c128834497304cd0cde8fed1b0dfa02b9e79d82b88d61e21eab35437b2d17fa163
languageName: node
linkType: hard
"@storybook/addon-essentials@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/addon-essentials@npm:8.6.2"
"@storybook/addon-essentials@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/addon-essentials@npm:8.6.15"
dependencies:
"@storybook/addon-actions": "npm:8.6.2"
"@storybook/addon-backgrounds": "npm:8.6.2"
"@storybook/addon-controls": "npm:8.6.2"
"@storybook/addon-docs": "npm:8.6.2"
"@storybook/addon-highlight": "npm:8.6.2"
"@storybook/addon-measure": "npm:8.6.2"
"@storybook/addon-outline": "npm:8.6.2"
"@storybook/addon-toolbars": "npm:8.6.2"
"@storybook/addon-viewport": "npm:8.6.2"
"@storybook/addon-actions": "npm:8.6.15"
"@storybook/addon-backgrounds": "npm:8.6.15"
"@storybook/addon-controls": "npm:8.6.15"
"@storybook/addon-docs": "npm:8.6.15"
"@storybook/addon-highlight": "npm:8.6.15"
"@storybook/addon-measure": "npm:8.6.15"
"@storybook/addon-outline": "npm:8.6.15"
"@storybook/addon-toolbars": "npm:8.6.15"
"@storybook/addon-viewport": "npm:8.6.15"
ts-dedent: "npm:^2.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/2e8a9cb6fed038122230929f72dfc94116c7884d838f633b81f1b485bf169129cf8e91bc31cc9949cbfc39d31ada1d5ae4a8bc61c533b47c9b63ea7d5045c468
storybook: ^8.6.15
checksum: 10/0416693b5f0b7f727deaa2c575e1ad826b93852f41fbd0d905c7bad54c31cf312278575cacc28498db81b35b027373e98c5980b307876297e075e74f9267e7f8
languageName: node
linkType: hard
"@storybook/addon-highlight@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-highlight@npm:8.6.2"
"@storybook/addon-highlight@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-highlight@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/0bd8298612390daa6d455876c3485e8e60751f51d6a2e67c79d2bb37b27a5059b1fab3ed4117371f6b375a6294a5e038abe6bd65db9259723578e4c55b0abcd2
storybook: ^8.6.15
checksum: 10/51f0a7fbf6c81e78e74f71943f8cf2b5f7e9ec08712e9f186381ecaa15f011c4c7df9d8d99e1e3b44e37bd646ff4d162cf91024d6b6a8b881fe988ccab47f786
languageName: node
linkType: hard
"@storybook/addon-measure@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-measure@npm:8.6.2"
"@storybook/addon-measure@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-measure@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
tiny-invariant: "npm:^1.3.1"
peerDependencies:
storybook: ^8.6.2
checksum: 10/c81946d8459aa953f633503872f30ae13336cfb9c7e539c49dccbeae6f33e57e774ff35a197d3aea46d28a33c0a45a497a14eacd403817fa87572d377d5ad4d9
storybook: ^8.6.15
checksum: 10/62b899f873e0024ed21e081759d731ff978fe917e8739dab0de3ebc857bb43641c9c9074f4a562864b353550fafd17950ab8dbd17b20a97371501ebe5f188a05
languageName: node
linkType: hard
"@storybook/addon-outline@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-outline@npm:8.6.2"
"@storybook/addon-outline@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-outline@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
ts-dedent: "npm:^2.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/357a72cb76cd8d1d2e7ff5ab1fc152f17b1f8c4ab087d8b94e1f157554a641aa47d96ede8087d5045eda8b99dfc2d94c29c2bdc1dce8f8d7d0c0a0b660aae966
storybook: ^8.6.15
checksum: 10/9439e6ab319475df7fed652ea4265916699df45d4ba4a04ec6b576a604f4d0917b2b5c8f1a48cabfd174f7baf3b943d3789ba80efb9e299ecefb388f8bf22f79
languageName: node
linkType: hard
"@storybook/addon-storysource@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/addon-storysource@npm:8.6.2"
"@storybook/addon-storysource@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/addon-storysource@npm:8.6.15"
dependencies:
"@storybook/source-loader": "npm:8.6.2"
"@storybook/source-loader": "npm:8.6.15"
estraverse: "npm:^5.2.0"
tiny-invariant: "npm:^1.3.1"
peerDependencies:
storybook: ^8.6.2
checksum: 10/4c06dab42fd2ff88df632960bfc70144e7ab423bec373be7f1b318519a383f33515a296440e77c085345e220af5de77dd9c500a49fcc66e23db9612164d94d9f
storybook: ^8.6.15
checksum: 10/499555d1178795c8c046a0269a980006e586d3445a734e65d9789ab84b2b62d4c4193b3d0e241bfc3954aec9977b9777b5ec357d22a6929c9325b3f4427d399c
languageName: node
linkType: hard
"@storybook/addon-toolbars@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-toolbars@npm:8.6.2"
"@storybook/addon-toolbars@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-toolbars@npm:8.6.15"
peerDependencies:
storybook: ^8.6.2
checksum: 10/7c7863a1e9698128557cf38bdce81aab127958c4892aeaa2f9035042d0fd36edcabb296575cf02a69d8f19abe4b1b114223a6312f25c84dff827314f004303ee
storybook: ^8.6.15
checksum: 10/27cfba470fd0f85d8bd236a7929b77cc50c89948926a4463f3473bcd04f823cebbf08f8e240a4055d77aac9636d32cfaaee3ca912ff32ee5806e3250df53dff7
languageName: node
linkType: hard
"@storybook/addon-viewport@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/addon-viewport@npm:8.6.2"
"@storybook/addon-viewport@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/addon-viewport@npm:8.6.15"
dependencies:
memoizerific: "npm:^1.11.3"
peerDependencies:
storybook: ^8.6.2
checksum: 10/60e67fb0b2f21c889f416bbb7d1729bf3310f56efa23d016d9984f6a9fce39cccccc02422b6ece736a558fef0053c5ac39d46df1735aa2e560e580a3fae3337f
storybook: ^8.6.15
checksum: 10/2b3359ac92e9a131c7dc7c4b6bc9d131786c86bead9490d464e4b275278e309a579cd67756d4d9ea5764aae502e3e65104e98486933f7f57b583ab8a3757db8b
languageName: node
linkType: hard
@@ -8142,22 +8143,22 @@ __metadata:
languageName: node
linkType: hard
"@storybook/blocks@npm:8.6.2, @storybook/blocks@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/blocks@npm:8.6.2"
"@storybook/blocks@npm:8.6.15, @storybook/blocks@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/blocks@npm:8.6.15"
dependencies:
"@storybook/icons": "npm:^1.2.12"
ts-dedent: "npm:^2.0.0"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
storybook: ^8.6.2
storybook: ^8.6.15
peerDependenciesMeta:
react:
optional: true
react-dom:
optional: true
checksum: 10/8137b042e99572b7bdd6df3484c75d3b1cf78b15bb7d3a7ad09738e94ec21481d295acfe2b59fa547be9ee5a0b075bb485f88a1972948e4703aef6b174b60ead
checksum: 10/7598b9fe3c5dcabc02b22eee3780055ae7ca259bc51520c5bf12c34395d11dbac4b0b3f817c46492b407a16f67ff5ba36879fd30c91299ddb053e9f274664e21
languageName: node
linkType: hard
@@ -8189,11 +8190,11 @@ __metadata:
languageName: node
linkType: hard
"@storybook/builder-webpack5@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/builder-webpack5@npm:8.6.2"
"@storybook/builder-webpack5@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/builder-webpack5@npm:8.6.15"
dependencies:
"@storybook/core-webpack": "npm:8.6.2"
"@storybook/core-webpack": "npm:8.6.15"
"@types/semver": "npm:^7.3.4"
browser-assert: "npm:^1.2.1"
case-sensitive-paths-webpack-plugin: "npm:^2.4.0"
@@ -8218,29 +8219,29 @@ __metadata:
webpack-hot-middleware: "npm:^2.25.1"
webpack-virtual-modules: "npm:^0.6.0"
peerDependencies:
storybook: ^8.6.2
storybook: ^8.6.15
peerDependenciesMeta:
typescript:
optional: true
checksum: 10/909d74c281a41a43d17ff9f313231283ac21c9c97ef47d8f8f96753f0b639dbdaeb2d12d46a7cd4fd8001bffcc2d707e83d47ab62fe3757ab30093159a1eded1
checksum: 10/8e8e816dbfa83e2fd56401a65a1551ecbaa658db54b2270e90560710c024878a09df48e1a4e114eacc75ff5c924cb7a277f4e3501ae4744c6a2742ab55135afe
languageName: node
linkType: hard
"@storybook/components@npm:8.6.2, @storybook/components@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/components@npm:8.6.2"
"@storybook/components@npm:8.6.15, @storybook/components@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/components@npm:8.6.15"
peerDependencies:
storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
checksum: 10/d85bb39aedd03a05043194debf3d35965dbe84d386029f63f0aa20ac943f4cc635558f6b08cc8ec013a2cc7f2407ef3c8735a76d4805e41569aaabe8efe59fd4
checksum: 10/350075ffe67cfc307c0f8f9b6568c5f25e97a2ffb55d723b88c16a3f3ad6d687c312580c4b4d3cbf8ef245a30723797d89be20a44f6c500f79e7b173b0cb79d0
languageName: node
linkType: hard
"@storybook/core-events@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/core-events@npm:8.6.2"
"@storybook/core-events@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/core-events@npm:8.6.15"
peerDependencies:
storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
checksum: 10/d2f574be4bc4fd5be82be376954b795dca291dd834b62ef4545eb912bf0c879bd6b4e544613cc399bbe5161c05788d32ad9119811d05921f690417fd3f1448f4
checksum: 10/95dd9f683d502c8b83600d455c960afe9b18278177324bfbb3904a9ef7a6022939017924659088118bb7b272b6ad7e4912b6e6a222e3274a480ab61183b89616
languageName: node
linkType: hard
@@ -8255,22 +8256,22 @@ __metadata:
languageName: node
linkType: hard
"@storybook/core-webpack@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/core-webpack@npm:8.6.2"
"@storybook/core-webpack@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/core-webpack@npm:8.6.15"
dependencies:
ts-dedent: "npm:^2.0.0"
peerDependencies:
storybook: ^8.6.2
checksum: 10/666edcb895b034b74fa86bb6d6dc16d26078ffc3524d20917ca27c40b4f722706622f83c4f97a323f8fc441d655a5ab124c9fbea12a2fa2e25000cf1231a5e78
storybook: ^8.6.15
checksum: 10/494110266d622be00a61cd160a4e799ed4c4c447ab04699d497de7c3d95ee800f212680c31722b8938819577853e095af545f7853e7ce4cf751d2a9e9b4c7f12
languageName: node
linkType: hard
"@storybook/core@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/core@npm:8.6.2"
"@storybook/core@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/core@npm:8.6.15"
dependencies:
"@storybook/theming": "npm:8.6.2"
"@storybook/theming": "npm:8.6.15"
better-opn: "npm:^3.0.2"
browser-assert: "npm:^1.2.1"
esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0"
@@ -8286,15 +8287,15 @@ __metadata:
peerDependenciesMeta:
prettier:
optional: true
checksum: 10/57d8af6d822c4cbeab201aec813830d632165c2411bf8708481ad0daa2fa942ce6a912e0ef764e6acb9bd2053baf0614b7726e5827b071f3f845d459ac1f3d3a
checksum: 10/d268d6fa00c38b35e5c363ee33779c2e087ab8e4681e0e205baa2fdb2780ea9feda3c9f6db35d60092778878d2782b2093c744bdf1af173c5688c3e1e0e960ac
languageName: node
linkType: hard
"@storybook/core@patch:@storybook/core@npm%3A8.6.2#~/.yarn/patches/@storybook-core-npm-8.6.2-8c752112c0.patch":
version: 8.6.2
resolution: "@storybook/core@patch:@storybook/core@npm%3A8.6.2#~/.yarn/patches/@storybook-core-npm-8.6.2-8c752112c0.patch::version=8.6.2&hash=f4cc1f"
"@storybook/core@patch:@storybook/core@npm%3A8.6.15#~/.yarn/patches/@storybook-core-npm-8.6.15-a468a35170.patch":
version: 8.6.15
resolution: "@storybook/core@patch:@storybook/core@npm%3A8.6.15#~/.yarn/patches/@storybook-core-npm-8.6.15-a468a35170.patch::version=8.6.15&hash=c479fb"
dependencies:
"@storybook/theming": "npm:8.6.2"
"@storybook/theming": "npm:8.6.15"
better-opn: "npm:^3.0.2"
browser-assert: "npm:^1.2.1"
esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0"
@@ -8310,18 +8311,18 @@ __metadata:
peerDependenciesMeta:
prettier:
optional: true
checksum: 10/cd95a51437135dd3c4333b14acefd528d8064b2cea7789f859ba80783c115c92ed4be51d4a7bd6236888fdd5f46f488a379e0c71bc1a712ffe6dc1353fb4e648
checksum: 10/fd635098effe4ae87122ac706394dc89a26b3cae74d7d126897852a9da1960d617c76dc1be6d6d8a4c2d02c19e694c7222a3cfe7a6beb7daa605b30ffbf41644
languageName: node
linkType: hard
"@storybook/csf-plugin@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/csf-plugin@npm:8.6.2"
"@storybook/csf-plugin@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/csf-plugin@npm:8.6.15"
dependencies:
unplugin: "npm:^1.3.1"
peerDependencies:
storybook: ^8.6.2
checksum: 10/6d71101640975cbe08d5dc9bae30938337b0e999f5724c4802713cf3d8c34671b646158ffde659e9cbcd005153844223cd4f9a4af2aa0d6f5a15b3db8d31f85d
storybook: ^8.6.15
checksum: 10/c544089d7a675d19e226e331a791db6c2e2cede893a2955578959086e7c35e846319a9080d91968ec81a2115e2c396fe3d76d2f50d74baca098dd5b03ad939b0
languageName: node
linkType: hard
@@ -8342,24 +8343,24 @@ __metadata:
languageName: node
linkType: hard
"@storybook/instrumenter@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/instrumenter@npm:8.6.2"
"@storybook/instrumenter@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/instrumenter@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
"@vitest/utils": "npm:^2.1.1"
peerDependencies:
storybook: ^8.6.2
checksum: 10/40d028d6f8b5ab51eb112bb5b903f64438eaf818c501a78ef77a5e946676e13f15ad8f5188a85e40bf91f987c6ab15c6a33b4e8bef8b8f8e05011013dcda092a
storybook: ^8.6.15
checksum: 10/5f56da838ccd47b9a262e5aa54a5574985295994fb1b6fb165d4c3a66d96367588fa93c60fe55892ffa450ea3e41e0abcc313a12a873d5b4be7625a1c3b0d883
languageName: node
linkType: hard
"@storybook/manager-api@npm:8.6.2, @storybook/manager-api@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/manager-api@npm:8.6.2"
"@storybook/manager-api@npm:8.6.15, @storybook/manager-api@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/manager-api@npm:8.6.15"
peerDependencies:
storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
checksum: 10/d344c88c6cad0bcc54767a8ef1d269a9df868c76ae22927c31936e46aaeb47075783d84f8815b4d0c7812ed50b2d4616417429479e3a9ea36043c557eb141590
checksum: 10/0b378fc657830c48b7c304ea915883161e8271d76b8f90b90e86e4260f6e513ae9f0f87eee6cad057a6c38e8a9faf7bac0ba169e586aabce2b4e48d36a0d27c3
languageName: node
linkType: hard
@@ -8394,12 +8395,12 @@ __metadata:
languageName: node
linkType: hard
"@storybook/preset-react-webpack@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/preset-react-webpack@npm:8.6.2"
"@storybook/preset-react-webpack@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/preset-react-webpack@npm:8.6.15"
dependencies:
"@storybook/core-webpack": "npm:8.6.2"
"@storybook/react": "npm:8.6.2"
"@storybook/core-webpack": "npm:8.6.15"
"@storybook/react": "npm:8.6.15"
"@storybook/react-docgen-typescript-plugin": "npm:1.0.6--canary.9.0c3f3b7.0"
"@types/semver": "npm:^7.3.4"
find-up: "npm:^5.0.0"
@@ -8412,11 +8413,11 @@ __metadata:
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
storybook: ^8.6.2
storybook: ^8.6.15
peerDependenciesMeta:
typescript:
optional: true
checksum: 10/d903a14e6e65bdfb56568962f456a103ec3f64d339d4ed3d091befe66dddcff2e31d7a2acee1bbf52cf9a33d09564af2dc36483961f73c812eacb34d71f7a951
checksum: 10/e3c2bf792a3dc051f27f8723b1b2c9671ecda57f6f20950fe30d65c17ff3751c382ffcf606a2efd85d6b5266356e0b62b57e23560b44cc497d78335dd5ae6462
languageName: node
linkType: hard
@@ -8431,12 +8432,12 @@ __metadata:
languageName: node
linkType: hard
"@storybook/preview-api@npm:8.6.2, @storybook/preview-api@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/preview-api@npm:8.6.2"
"@storybook/preview-api@npm:8.6.15, @storybook/preview-api@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/preview-api@npm:8.6.15"
peerDependencies:
storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
checksum: 10/5d286ed8c266a8aa63361bbb0245163e6fe3fd85a5e60555a79a579535faf36c30a9ad07bff30b0d9d536d35ec8f5ee78484629b174ecc965cbe0726e749d6de
checksum: 10/70df6006ce7340371e207f7f077d52c8684743a64f172d54f3e99fb6d2e190f46a4321c40be7ea813b9bd407530f971372156b3dd6ba1f61681f7b3acc498010
languageName: node
linkType: hard
@@ -8469,14 +8470,14 @@ __metadata:
languageName: node
linkType: hard
"@storybook/react-dom-shim@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/react-dom-shim@npm:8.6.2"
"@storybook/react-dom-shim@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/react-dom-shim@npm:8.6.15"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
storybook: ^8.6.2
checksum: 10/f32718a49ccbd7c01233c83d738479eb60c41a3f8855066b85593fb7a07129b1b18a0c93fe64b01dce9c9105293b40c1e131410169d5aaaa2f8b7a7c00f836ee
storybook: ^8.6.15
checksum: 10/7625cfa2a385315851cd0aeb36f517e75679262c2942a5a53dd2909483b62602b9e5157ba51a8e464eb70112a4916278fba63b05178beef3d2ff493a464a2c64
languageName: node
linkType: hard
@@ -8499,22 +8500,22 @@ __metadata:
languageName: node
linkType: hard
"@storybook/react-webpack5@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/react-webpack5@npm:8.6.2"
"@storybook/react-webpack5@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/react-webpack5@npm:8.6.15"
dependencies:
"@storybook/builder-webpack5": "npm:8.6.2"
"@storybook/preset-react-webpack": "npm:8.6.2"
"@storybook/react": "npm:8.6.2"
"@storybook/builder-webpack5": "npm:8.6.15"
"@storybook/preset-react-webpack": "npm:8.6.15"
"@storybook/react": "npm:8.6.15"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
storybook: ^8.6.2
storybook: ^8.6.15
typescript: ">= 4.2.x"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10/1d8c745d21da7853328a1870797808982864be68783c2a56248ab642a81eaad667f5522cc9f0eba74a9b96658d6fcd9b6a5b9296e235ff8e1566edbc48e5d146
checksum: 10/0468aa5ca0ed76170cbdef6b2a211625e64b74a8012aabeca03d38c8fa8f34013b2068f68dd173bb5db32aa9ccaa87c923344a506c561ad98d0afb0f88856b79
languageName: node
linkType: hard
@@ -8536,41 +8537,41 @@ __metadata:
languageName: node
linkType: hard
"@storybook/react@npm:8.6.2, @storybook/react@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/react@npm:8.6.2"
"@storybook/react@npm:8.6.15, @storybook/react@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/react@npm:8.6.15"
dependencies:
"@storybook/components": "npm:8.6.2"
"@storybook/components": "npm:8.6.15"
"@storybook/global": "npm:^5.0.0"
"@storybook/manager-api": "npm:8.6.2"
"@storybook/preview-api": "npm:8.6.2"
"@storybook/react-dom-shim": "npm:8.6.2"
"@storybook/theming": "npm:8.6.2"
"@storybook/manager-api": "npm:8.6.15"
"@storybook/preview-api": "npm:8.6.15"
"@storybook/react-dom-shim": "npm:8.6.15"
"@storybook/theming": "npm:8.6.15"
peerDependencies:
"@storybook/test": 8.6.2
"@storybook/test": 8.6.15
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
storybook: ^8.6.2
storybook: ^8.6.15
typescript: ">= 4.2.x"
peerDependenciesMeta:
"@storybook/test":
optional: true
typescript:
optional: true
checksum: 10/b8a91e6a8aeb9e32e05e12db4df1dafd59b54d82954e481ea9224316bd1e432093259b474f773911e90aeebe441cbb17e8dc0a6940b79b5899eff1f2b4aae334
checksum: 10/a7e33bd68e25bf04fac77c9573c51d76d556c51a4329e84dae2a4e2afd39950e4d3ab9a49787ac465e9e81522b40ea12dc86cd0b60a2aab1ee2f88a753bc9b43
languageName: node
linkType: hard
"@storybook/source-loader@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/source-loader@npm:8.6.2"
"@storybook/source-loader@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/source-loader@npm:8.6.15"
dependencies:
es-toolkit: "npm:^1.22.0"
estraverse: "npm:^5.2.0"
prettier: "npm:^3.1.1"
peerDependencies:
storybook: ^8.6.2
checksum: 10/8cf43eb6ce2df997272c71f3d9f8e85f3fecb6ca1d176c87fd349ea17e1d821dadb43496af5d10a2c6163fd6d920940a253a075a7774fc9bb5f724c132cfcaf0
storybook: ^8.6.15
checksum: 10/37e6749a8bd633aa7b84546eb8f3bf4f259614846589fe5cfe9b461926b57bbda013948b95ccb12108324f1580d7330fcab7828ab90936b0567dba27e0a626a1
languageName: node
linkType: hard
@@ -8604,29 +8605,29 @@ __metadata:
languageName: node
linkType: hard
"@storybook/test@npm:8.6.2":
version: 8.6.2
resolution: "@storybook/test@npm:8.6.2"
"@storybook/test@npm:8.6.15":
version: 8.6.15
resolution: "@storybook/test@npm:8.6.15"
dependencies:
"@storybook/global": "npm:^5.0.0"
"@storybook/instrumenter": "npm:8.6.2"
"@storybook/instrumenter": "npm:8.6.15"
"@testing-library/dom": "npm:10.4.0"
"@testing-library/jest-dom": "npm:6.5.0"
"@testing-library/user-event": "npm:14.5.2"
"@vitest/expect": "npm:2.0.5"
"@vitest/spy": "npm:2.0.5"
peerDependencies:
storybook: ^8.6.2
checksum: 10/4cb89e254143374716fcd72c3a9a4c603a9f664162c5755ead7257ce130bc33d3c48c9cbaa35274023f4b961d66c4e84733e35ca663019d770fcfa6ef5b21b84
storybook: ^8.6.15
checksum: 10/5f54b9ef1910011813059708f6d2c32f4db5f4e719de9de2a7f2280efe7535c45c36668cf3e346b4788f4bbe6b71a3ab169ccdc17f0d8e634443d92849b46bf1
languageName: node
linkType: hard
"@storybook/theming@npm:8.6.2, @storybook/theming@npm:^8.6.2":
version: 8.6.2
resolution: "@storybook/theming@npm:8.6.2"
"@storybook/theming@npm:8.6.15, @storybook/theming@npm:^8.6.15":
version: 8.6.15
resolution: "@storybook/theming@npm:8.6.15"
peerDependencies:
storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
checksum: 10/81ff1f740edaa000d6abaab5a47b038b46cfc54ddad308335b8d26d7a6f1ee100f617f52d51cd6596f424a534dbda0d9801e3928b4b6f758d9a3e8da6f9d40f5
checksum: 10/f02760831a13d7af9dbfeb6feea949f4c13c897861cbc75253a6776d133891567889c8d99c7e91a99124d0772c3bde1f978984c83b19117d1d7c908ed7eb8409
languageName: node
linkType: hard
@@ -9859,17 +9860,6 @@ __metadata:
languageName: node
linkType: hard
"@ts-morph/common@npm:~0.28.1":
version: 0.28.1
resolution: "@ts-morph/common@npm:0.28.1"
dependencies:
minimatch: "npm:^10.0.1"
path-browserify: "npm:^1.0.1"
tinyglobby: "npm:^0.2.14"
checksum: 10/d5c6ed11cf046c186c7263c28c7e9b5fbefb61c65b99f66cfe6a3b249f70f3fbf116b5aace2980602a7ceabecdc399065d5a7f14aabe5475eb43fd573a3cc665
languageName: node
linkType: hard
"@tsconfig/node10@npm:^1.0.7":
version: 1.0.8
resolution: "@tsconfig/node10@npm:1.0.8"
@@ -14285,13 +14275,6 @@ __metadata:
languageName: node
linkType: hard
"code-block-writer@npm:^13.0.3":
version: 13.0.3
resolution: "code-block-writer@npm:13.0.3"
checksum: 10/771546224f38610eecee0598e83c9e0f86dcd600ea316dbf27c2cfebaab4fed51b042325aa460b8e0f131fac5c1de208f6610a1ddbffe4b22e76f9b5256707cb
languageName: node
linkType: hard
"code-point-at@npm:^1.0.0":
version: 1.1.0
resolution: "code-point-at@npm:1.1.0"
@@ -18194,18 +18177,6 @@ __metadata:
languageName: node
linkType: hard
"fdir@npm:^6.5.0":
version: 6.5.0
resolution: "fdir@npm:6.5.0"
peerDependencies:
picomatch: ^3 || ^4
peerDependenciesMeta:
picomatch:
optional: true
checksum: 10/14ca1c9f0a0e8f4f2e9bf4e8551065a164a09545dae548c12a18d238b72e51e5a7b39bd8e5494b56463a0877672d0a6c1ef62c6fa0677db1b0c847773be939b1
languageName: node
linkType: hard
"fflate@npm:^0.8.2":
version: 0.8.2
resolution: "fflate@npm:0.8.2"
@@ -19820,7 +19791,6 @@ __metadata:
testing-library-selector: "npm:0.3.1"
tracelib: "npm:1.0.1"
ts-jest: "npm:29.4.0"
ts-morph: "npm:^27.0.2"
ts-node: "npm:10.9.2"
tslib: "npm:2.8.1"
tween-functions: "npm:^1.2.0"
@@ -24388,7 +24358,7 @@ __metadata:
languageName: node
linkType: hard
"minimatch@npm:10.1.1, minimatch@npm:^10.0.1, minimatch@npm:^10.1.1":
"minimatch@npm:10.1.1, minimatch@npm:^10.1.1":
version: 10.1.1
resolution: "minimatch@npm:10.1.1"
dependencies:
@@ -27001,13 +26971,6 @@ __metadata:
languageName: node
linkType: hard
"picomatch@npm:^4.0.3":
version: 4.0.3
resolution: "picomatch@npm:4.0.3"
checksum: 10/57b99055f40b16798f2802916d9c17e9744e620a0db136554af01d19598b96e45e2f00014c91d1b8b13874b80caa8c295b3d589a3f72373ec4aaf54baa5962d5
languageName: node
linkType: hard
"pify@npm:5.0.0":
version: 5.0.0
resolution: "pify@npm:5.0.0"
@@ -31469,11 +31432,11 @@ __metadata:
languageName: node
linkType: hard
"storybook@npm:^8.6.2":
version: 8.6.2
resolution: "storybook@npm:8.6.2"
"storybook@npm:^8.6.15":
version: 8.6.15
resolution: "storybook@npm:8.6.15"
dependencies:
"@storybook/core": "npm:8.6.2"
"@storybook/core": "npm:8.6.15"
peerDependencies:
prettier: ^2 || ^3
peerDependenciesMeta:
@@ -31483,7 +31446,7 @@ __metadata:
getstorybook: ./bin/index.cjs
sb: ./bin/index.cjs
storybook: ./bin/index.cjs
checksum: 10/81884ce80d36bfe3170c46ce08168f24a2a27b2698a9ec66ebb1a9727502ab9db3e6e221121a10606ef06db466966b47a12b48b99e519755c508bc183a2de815
checksum: 10/15762c79ec8444a46bc14cddfadbdd54dfd379828acd38555887a246c01e7c9ebb61e4eafafe04efb3ddf6278fb47035216e7f7d9f94fc205da148870173abdf
languageName: node
linkType: hard
@@ -32453,16 +32416,6 @@ __metadata:
languageName: node
linkType: hard
"tinyglobby@npm:^0.2.14":
version: 0.2.15
resolution: "tinyglobby@npm:0.2.15"
dependencies:
fdir: "npm:^6.5.0"
picomatch: "npm:^4.0.3"
checksum: 10/d72bd826a8b0fa5fa3929e7fe5ba48fceb2ae495df3a231b6c5408cd7d8c00b58ab5a9c2a76ba56a62ee9b5e083626f1f33599734bed1ffc4b792406408f0ca2
languageName: node
linkType: hard
"tinyqueue@npm:^3.0.0":
version: 3.0.0
resolution: "tinyqueue@npm:3.0.0"
@@ -32833,16 +32786,6 @@ __metadata:
languageName: node
linkType: hard
"ts-morph@npm:^27.0.2":
version: 27.0.2
resolution: "ts-morph@npm:27.0.2"
dependencies:
"@ts-morph/common": "npm:~0.28.1"
code-block-writer: "npm:^13.0.3"
checksum: 10/b9bd8ed86d4b76ca23446d3f808787cfe95a3bcb2316769a2f3fa262ea9ab4043bb76bf8aef677f9be0d758576f074df2926e701a535f84fd21946fdbf465148
languageName: node
linkType: hard
"ts-node@npm:10.9.2, ts-node@npm:^10.9.1":
version: 10.9.2
resolution: "ts-node@npm:10.9.2"