From 4b46067319c74bd03cde5dfbf528f0bdb1e0634a Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 2 Oct 2025 18:09:34 +0300 Subject: [PATCH] with feature toggles --- apps/history/kinds/cue.mod/module.cue | 4 +- apps/history/kinds/manifest.cue | 2 +- .../v0alpha1/correlation_object_gen.ts | 49 ------------- .../v0alpha1/types.metadata.gen.ts | 30 -------- .../correlation/v0alpha1/types.spec.gen.ts | 69 ------------------- .../correlation/v0alpha1/types.status.gen.ts | 30 -------- 6 files changed, 3 insertions(+), 181 deletions(-) delete mode 100644 apps/history/plugin/src/generated/correlation/v0alpha1/correlation_object_gen.ts delete mode 100644 apps/history/plugin/src/generated/correlation/v0alpha1/types.metadata.gen.ts delete mode 100644 apps/history/plugin/src/generated/correlation/v0alpha1/types.spec.gen.ts delete mode 100644 apps/history/plugin/src/generated/correlation/v0alpha1/types.status.gen.ts diff --git a/apps/history/kinds/cue.mod/module.cue b/apps/history/kinds/cue.mod/module.cue index 2238cffd9a5..27e3deb4e7c 100644 --- a/apps/history/kinds/cue.mod/module.cue +++ b/apps/history/kinds/cue.mod/module.cue @@ -1,2 +1,2 @@ -module: "github.com/grafana/grafana/apps/correlations/kinds" -language: version: "v0.8.2" +module: "github.com/grafana/grafana/apps/history/kinds" +language: version: "v0.9.2" diff --git a/apps/history/kinds/manifest.cue b/apps/history/kinds/manifest.cue index 809b19050dc..25bae580903 100644 --- a/apps/history/kinds/manifest.cue +++ b/apps/history/kinds/manifest.cue @@ -10,7 +10,7 @@ manifest: { enabled: true } ts: { - enabled: true + enabled: false } } diff --git a/apps/history/plugin/src/generated/correlation/v0alpha1/correlation_object_gen.ts b/apps/history/plugin/src/generated/correlation/v0alpha1/correlation_object_gen.ts deleted file mode 100644 index ff5b1b8f03f..00000000000 --- a/apps/history/plugin/src/generated/correlation/v0alpha1/correlation_object_gen.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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; - annotations?: Record; - 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 Correlation { - kind: string; - apiVersion: string; - metadata: Metadata; - spec: Spec; - status: Status; -} diff --git a/apps/history/plugin/src/generated/correlation/v0alpha1/types.metadata.gen.ts b/apps/history/plugin/src/generated/correlation/v0alpha1/types.metadata.gen.ts deleted file mode 100644 index 4377f3c1d08..00000000000 --- a/apps/history/plugin/src/generated/correlation/v0alpha1/types.metadata.gen.ts +++ /dev/null @@ -1,30 +0,0 @@ -// 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; -} - -export const defaultMetadata = (): Metadata => ({ - updateTimestamp: "", - createdBy: "", - uid: "", - creationTimestamp: "", - finalizers: [], - resourceVersion: "", - generation: 0, - updatedBy: "", - labels: {}, -}); - diff --git a/apps/history/plugin/src/generated/correlation/v0alpha1/types.spec.gen.ts b/apps/history/plugin/src/generated/correlation/v0alpha1/types.spec.gen.ts deleted file mode 100644 index 0fa0d2a8e2e..00000000000 --- a/apps/history/plugin/src/generated/correlation/v0alpha1/types.spec.gen.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated - EDITING IS FUTILE. DO NOT EDIT. - -export interface DataSourceRef { - // same as pluginId - group: string; - // same as grafana uid - name: string; -} - -export const defaultDataSourceRef = (): DataSourceRef => ({ - group: "", - name: "", -}); - -// there was a deprecated field here called type, we will need to move that for conversion and provisioning -export interface ConfigSpec { - field: string; - target: TargetSpec; - transformations?: TransformationSpec[]; -} - -export const defaultConfigSpec = (): ConfigSpec => ({ - field: "", - target: defaultTargetSpec(), -}); - -export type TargetSpec = Record; - -export const defaultTargetSpec = (): TargetSpec => ({}); - -export interface TransformationSpec { - type: string; - expression: string; - field: string; - mapValue: string; -} - -export const defaultTransformationSpec = (): TransformationSpec => ({ - type: "", - expression: "", - field: "", - mapValue: "", -}); - -export enum CorrelationType { - Query = "query", - External = "external", -} - -export const defaultCorrelationType = (): CorrelationType => (CorrelationType.Query); - -export interface Spec { - source_ds_ref: DataSourceRef; - target_ds_ref?: DataSourceRef; - label: string; - description?: string; - config: ConfigSpec; - provisioned: boolean; - type: CorrelationType; -} - -export const defaultSpec = (): Spec => ({ - source_ds_ref: defaultDataSourceRef(), - label: "", - config: defaultConfigSpec(), - provisioned: false, - type: CorrelationType.Query, -}); - diff --git a/apps/history/plugin/src/generated/correlation/v0alpha1/types.status.gen.ts b/apps/history/plugin/src/generated/correlation/v0alpha1/types.status.gen.ts deleted file mode 100644 index 01be8df7961..00000000000 --- a/apps/history/plugin/src/generated/correlation/v0alpha1/types.status.gen.ts +++ /dev/null @@ -1,30 +0,0 @@ -// 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; -} - -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; - // additionalFields is reserved for future use - additionalFields?: Record; -} - -export const defaultStatus = (): Status => ({ -}); -