with feature toggles

This commit is contained in:
Ryan McKinley
2025-10-02 18:09:34 +03:00
parent 0af3f1000c
commit 4b46067319
6 changed files with 3 additions and 181 deletions
+2 -2
View File
@@ -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"
+1 -1
View File
@@ -10,7 +10,7 @@ manifest: {
enabled: true
}
ts: {
enabled: true
enabled: false
}
}
@@ -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<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 Correlation {
kind: string;
apiVersion: string;
metadata: Metadata;
spec: Spec;
status: Status;
}
@@ -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<string, string>;
}
export const defaultMetadata = (): Metadata => ({
updateTimestamp: "",
createdBy: "",
uid: "",
creationTimestamp: "",
finalizers: [],
resourceVersion: "",
generation: 0,
updatedBy: "",
labels: {},
});
@@ -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<string, any>;
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,
});
@@ -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<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 => ({
});