Commit d5dffae9 by jiangxd2016

release: v1.2.11

parent aac83f10
{
"name": "@grafana/vue",
"version": "1.2.0",
"builtAt": "2026-07-24T10:11:53.683Z",
"builtAt": "2026-07-27T02:29:52.935Z",
"mode": "library-esm-single-file",
"entries": {
"index": "src/index.ts",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(function() {
"use strict";
function createDataFrame(opts) {
const fields = opts.fields.map((f) => ({
name: f.name,
type: f.type ?? inferType(f.values),
config: f.config ?? {},
values: f.values,
labels: f.labels
}));
const length = fields.reduce((max, f) => Math.max(max, f.values.length), 0);
return {
refId: opts.refId,
name: opts.name,
fields,
length,
meta: opts.meta
};
}
function inferType(values) {
const sample = values.find((v) => v != null);
if (typeof sample === "number") return "number";
if (typeof sample === "boolean") return "boolean";
if (sample instanceof Date) return "time";
if (typeof sample === "string" && !Number.isNaN(Date.parse(sample)) && /\d{4}-\d{2}-\d{2}/.test(sample)) {
return "time";
}
return typeof sample === "string" ? "string" : "other";
}
function itemLabel(item) {
const host = item.hosts?.[0]?.name || item.hosts?.[0]?.host || "";
return host ? `${host}: ${item.name}` : item.name || item.key_;
}
function seriesToDataFrame(series, refId, datasourceUid, valueMaps) {
const times = series.points.map((p) => p.time);
let values = series.points.map((p) => p.value);
const asString = values.some((v) => typeof v === "string");
const display = series.name || itemLabel(series.item);
const fields = [
{ name: "Time", type: "time", values: times },
{
name: "Value",
type: asString ? "string" : "number",
values: asString ? values.map((v) => v == null ? null : String(v)) : values.map((v) => v == null || v === "" ? null : Number(v)),
labels: {
itemid: series.item.itemid,
item: series.item.name,
host: series.item.hosts?.[0]?.name || ""
},
config: {
displayNameFromDS: display,
...series.item.units ? { unit: series.item.units } : {}
}
}
];
if (series.points.some((p) => p.valueRaw != null && p.valueRaw !== "")) {
fields.push({
name: "ValueRaw",
type: "string",
values: series.points.map(
(p) => p.valueRaw == null ? null : String(p.valueRaw)
)
});
}
if (series.meta?.source === "trend") {
fields.push(
{
name: "TrendMin",
type: "number",
values: series.points.map(
(p) => p.value_min == null ? null : Number(p.value_min)
)
},
{
name: "TrendAvg",
type: "number",
values: series.points.map(
(p) => p.value_avg == null ? null : Number(p.value_avg)
)
},
{
name: "TrendMax",
type: "number",
values: series.points.map(
(p) => p.value_max == null ? null : Number(p.value_max)
)
},
{
name: "TrendNum",
type: "number",
values: series.points.map(
(p) => p.num == null ? null : Number(p.num)
)
}
);
}
if (series.points.some(
(p) => p.logeventid != null || p.source != null || p.severity != null
)) {
fields.push(
{
name: "timestamp",
type: "string",
values: series.points.map((p) => p.timestamp ?? null)
},
{
name: "source",
type: "string",
values: series.points.map((p) => p.source ?? null)
},
{
name: "severity",
type: "string",
values: series.points.map((p) => p.severity ?? null)
},
{
name: "logeventid",
type: "string",
values: series.points.map((p) => p.logeventid ?? null)
},
{
name: "ns",
type: "string",
values: series.points.map((p) => p.ns ?? null)
}
);
}
const frame = createDataFrame({
refId,
name: display,
fields
});
frame.meta = {
...frame.meta,
source: "live",
datasourceUid,
custom: {
source: "zabbix",
itemid: series.item.itemid,
datasourceUid
},
notices: (series.notices || []).map((text) => ({
severity: "warning",
text
}))
};
return frame;
}
function seriesListToFrames(series, refId, datasourceUid, valueMaps) {
return series.map(
(s) => seriesToDataFrame(s, refId, datasourceUid)
);
}
const ctx = self;
ctx.onmessage = (e) => {
const { id, series, refId, datasourceUid } = e.data || {};
try {
const frames = seriesListToFrames(series || [], refId || "A", datasourceUid || "");
ctx.postMessage({ id, ok: true, frames });
} catch (err) {
ctx.postMessage({
id,
ok: false,
error: err instanceof Error ? err.message : String(err)
});
}
};
})();
//# sourceMappingURL=frameWorker-C6D9tEGY.js.map
{"version":3,"file":"frameWorker-C6D9tEGY.js","sources":["../../grafana-data/src/dataframe.ts","../../grafana-plugin-zabbix/src/datasource/processing/frames.ts","../../grafana-plugin-zabbix/src/datasource/processing/frameWorker.ts"],"sourcesContent":["import type { DataFrame, Field, FieldType } from \"./types\";\n\nexport function createDataFrame(opts: {\n refId?: string;\n name?: string;\n meta?: Record<string, unknown>;\n fields: Array<\n Partial<Field> & { name: string; values: unknown[]; type?: FieldType }\n >;\n}): DataFrame {\n const fields: Field[] = opts.fields.map((f) => ({\n name: f.name,\n type: f.type ?? inferType(f.values),\n config: f.config ?? {},\n values: f.values,\n labels: f.labels,\n }));\n const length = fields.reduce((max, f) => Math.max(max, f.values.length), 0);\n return {\n refId: opts.refId,\n name: opts.name,\n fields,\n length,\n meta: opts.meta,\n };\n}\n\nfunction inferType(values: unknown[]): FieldType {\n const sample = values.find((v) => v != null);\n if (typeof sample === \"number\") return \"number\";\n if (typeof sample === \"boolean\") return \"boolean\";\n if (sample instanceof Date) return \"time\";\n if (\n typeof sample === \"string\" &&\n !Number.isNaN(Date.parse(sample)) &&\n /\\d{4}-\\d{2}-\\d{2}/.test(sample)\n ) {\n return \"time\";\n }\n return typeof sample === \"string\" ? \"string\" : \"other\";\n}\n\nconst TIME_SERIES_VALUE_FIELD_NAME = \"Value\";\nconst TIME_SERIES_TIME_FIELD_NAME = \"Time\";\n\n/** Format labels like Grafana: job=api, instance=localhost:9090 */\nexport function formatLabels(labels?: Record<string, string> | null): string {\n if (!labels) return \"\";\n return Object.entries(labels)\n .filter(([, v]) => v != null && v !== \"\")\n .map(([k, v]) => `${k}=${v}`)\n .join(\", \");\n}\n\n/**\n * Grafana-compatible field display name for legends / stats.\n * Priority: config.displayName → config.displayNameFromDS → labels / frame name → field name\n */\nexport function getFieldDisplayName(\n field: Field,\n frame?: DataFrame,\n allFrames?: DataFrame[],\n): string {\n // Recompute each time so label uniqueness across frames stays correct.\n // Only write field.state when the value actually changes — mutating reactive\n // DataFrame fields inside Vue computeds otherwise causes \"Maximum recursive updates\".\n const name = calculateFieldDisplayName(field, frame, allFrames);\n if (field.state?.displayName !== name) {\n field.state = { ...(field.state || {}), displayName: name };\n }\n return name;\n}\n\nfunction isGenericValueName(s: string): boolean {\n const t = s.trim();\n if (!t || t === TIME_SERIES_VALUE_FIELD_NAME) return true;\n // e.g. Value {job=\"api\", instance=\"localhost:9090\"}\n if (/^Value\\s*\\{/.test(t)) return true;\n return false;\n}\n\nfunction calculateFieldDisplayName(\n field: Field,\n frame?: DataFrame,\n allFrames?: DataFrame[],\n): string {\n const cfg = field.config ?? {};\n if (\n cfg.displayName &&\n String(cfg.displayName).length &&\n !isGenericValueName(String(cfg.displayName))\n ) {\n return String(cfg.displayName);\n }\n if (\n cfg.displayNameFromDS &&\n String(cfg.displayNameFromDS).length &&\n !isGenericValueName(String(cfg.displayNameFromDS))\n ) {\n return String(cfg.displayNameFromDS);\n }\n\n // Time field without labels → \"Time\"\n if (field.type === \"time\" && !field.labels) {\n return field.name || TIME_SERIES_TIME_FIELD_NAME;\n }\n\n const frames = allFrames?.length ? allFrames : frame ? [frame] : [];\n let frameNamesDiffer = false;\n if (frames.length > 1) {\n for (let i = 1; i < frames.length; i++) {\n if (frames[i].name !== frames[i - 1].name) {\n frameNamesDiffer = true;\n break;\n }\n }\n }\n\n const parts: string[] = [];\n let frameNameAdded = false;\n let labelsAdded = false;\n\n if (frameNamesDiffer && frame?.name) {\n parts.push(frame.name);\n frameNameAdded = true;\n }\n\n // Skip generic \"Value\" / \"Value {labels}\" field names — labels / frame name are more useful\n if (field.name && !isGenericValueName(field.name)) {\n parts.push(field.name);\n }\n\n if (field.labels && Object.keys(field.labels).length) {\n const singleLabel = getSingleLabelName(\n frames.length ? frames : frame ? [frame] : [],\n );\n if (\n singleLabel &&\n field.labels[singleLabel] != null &&\n field.labels[singleLabel] !== \"\"\n ) {\n parts.push(String(field.labels[singleLabel]));\n labelsAdded = true;\n } else {\n const allLabels = formatLabels(field.labels);\n if (allLabels) {\n parts.push(allLabels);\n labelsAdded = true;\n }\n }\n }\n\n // Value / Value {..} field with no labels → use frame name\n if (\n frame &&\n !frameNameAdded &&\n !labelsAdded &&\n isGenericValueName(field.name || \"\")\n ) {\n if (frame.name) {\n parts.push(frame.name);\n frameNameAdded = true;\n }\n }\n\n if (parts.length) return parts.join(\" \");\n if (field.name) return field.name;\n if (frame?.name) return frame.name;\n return TIME_SERIES_VALUE_FIELD_NAME;\n}\n\n/** If every frame only has one distinct label key across numeric fields, return that key. */\nfunction getSingleLabelName(frames: DataFrame[]): string | null {\n const keys = new Set<string>();\n for (const fr of frames) {\n for (const f of fr.fields) {\n if (!f.labels) continue;\n for (const k of Object.keys(f.labels)) keys.add(k);\n if (keys.size > 1) return null;\n }\n }\n if (keys.size === 1) return [...keys][0];\n return null;\n}\n\nexport function toDataFrameDTO(frame: DataFrame): DataFrame {\n return {\n ...frame,\n fields: frame.fields.map((f) => ({\n ...f,\n values: [...f.values],\n config: { ...f.config },\n })),\n };\n}\n","import { createDataFrame, type DataFrame } from \"@grafana/data\";\nimport type { ZabbixItem } from \"../types\";\nimport type { ZabbixSeries } from \"./types\";\nimport { mapSeriesValue as mapVal } from \"./valueMapping\";\n\nexport function emptyFrame(refId: string, notice?: string): DataFrame {\n const frame = createDataFrame({\n refId,\n fields: [\n { name: \"Time\", type: \"time\", values: [] },\n { name: \"Value\", type: \"number\", values: [] },\n ],\n });\n if (notice)\n (frame as any).meta = { notices: [{ severity: \"warning\", text: notice }] };\n return frame;\n}\n\nexport function itemLabel(item: ZabbixItem): string {\n const host = item.hosts?.[0]?.name || item.hosts?.[0]?.host || \"\";\n return host ? `${host}: ${item.name}` : item.name || item.key_;\n}\n\nexport function seriesToDataFrame(\n series: ZabbixSeries,\n refId: string,\n datasourceUid: string,\n valueMaps?: Map<\n string,\n import(\"./valueMapping\").ValueMapMapping[] | Record<string, string>\n >,\n): DataFrame {\n const times = series.points.map((p) => p.time);\n let values = series.points.map((p) => p.value);\n if (valueMaps && series.item.valuemapid) {\n values = values.map((v) =>\n mapVal(v as any, series.item.valuemapid, valueMaps),\n );\n }\n const asString = values.some((v) => typeof v === \"string\");\n const display = series.name || itemLabel(series.item);\n const fields: any[] = [\n { name: \"Time\", type: \"time\", values: times },\n {\n name: \"Value\",\n type: asString ? \"string\" : \"number\",\n values: asString\n ? values.map((v) => (v == null ? null : String(v)))\n : values.map((v) => (v == null || v === \"\" ? null : Number(v))),\n labels: {\n itemid: series.item.itemid,\n item: series.item.name,\n host: series.item.hosts?.[0]?.name || \"\",\n },\n config: {\n displayNameFromDS: display,\n ...(series.item.units ? { unit: series.item.units } : {}),\n },\n },\n ];\n if (series.points.some((p) => p.valueRaw != null && p.valueRaw !== \"\")) {\n fields.push({\n name: \"ValueRaw\",\n type: \"string\",\n values: series.points.map((p) =>\n p.valueRaw == null ? null : String(p.valueRaw),\n ),\n });\n }\n if (series.meta?.source === \"trend\") {\n fields.push(\n {\n name: \"TrendMin\",\n type: \"number\",\n values: series.points.map((p) =>\n p.value_min == null ? null : Number(p.value_min),\n ),\n },\n {\n name: \"TrendAvg\",\n type: \"number\",\n values: series.points.map((p) =>\n p.value_avg == null ? null : Number(p.value_avg),\n ),\n },\n {\n name: \"TrendMax\",\n type: \"number\",\n values: series.points.map((p) =>\n p.value_max == null ? null : Number(p.value_max),\n ),\n },\n {\n name: \"TrendNum\",\n type: \"number\",\n values: series.points.map((p) =>\n p.num == null ? null : Number(p.num),\n ),\n },\n );\n }\n if (\n series.points.some(\n (p) => p.logeventid != null || p.source != null || p.severity != null,\n )\n ) {\n fields.push(\n {\n name: \"timestamp\",\n type: \"string\",\n values: series.points.map((p) => p.timestamp ?? null),\n },\n {\n name: \"source\",\n type: \"string\",\n values: series.points.map((p) => p.source ?? null),\n },\n {\n name: \"severity\",\n type: \"string\",\n values: series.points.map((p) => p.severity ?? null),\n },\n {\n name: \"logeventid\",\n type: \"string\",\n values: series.points.map((p) => p.logeventid ?? null),\n },\n {\n name: \"ns\",\n type: \"string\",\n values: series.points.map((p) => p.ns ?? null),\n },\n );\n }\n const frame = createDataFrame({\n refId,\n name: display,\n fields,\n });\n (frame as any).meta = {\n ...(frame as any).meta,\n source: \"live\",\n datasourceUid,\n custom: {\n source: \"zabbix\",\n itemid: series.item.itemid,\n datasourceUid,\n },\n notices: (series.notices || []).map((text) => ({\n severity: \"warning\",\n text,\n })),\n };\n return frame;\n}\n\nexport function seriesListToFrames(\n series: ZabbixSeries[],\n refId: string,\n datasourceUid: string,\n valueMaps?: Map<\n string,\n import(\"./valueMapping\").ValueMapMapping[] | Record<string, string>\n >,\n): DataFrame[] {\n return series.map((s) =>\n seriesToDataFrame(s, refId, datasourceUid, valueMaps),\n );\n}\n\n/** Back-compat for metrics executor */\nexport function seriesToFrames(\n series: ZabbixSeries[],\n refId: string,\n): DataFrame[] {\n return seriesListToFrames(series, refId, \"\");\n}\n","import { seriesListToFrames } from \"./frames\";\nimport type { ZabbixSeries } from \"./types\";\n\nexport type FrameWorkerRequest = {\n id: string;\n series: ZabbixSeries[];\n refId: string;\n datasourceUid: string;\n};\n\nexport type FrameWorkerResponse =\n | { id: string; ok: true; frames: unknown[] }\n | { id: string; ok: false; error: string };\n\nconst ctx = self as unknown as Worker & { onmessage: ((e: MessageEvent) => void) | null };\n\nctx.onmessage = (e: MessageEvent<FrameWorkerRequest>) => {\n const { id, series, refId, datasourceUid } = e.data || ({} as FrameWorkerRequest);\n try {\n const frames = seriesListToFrames(series || [], refId || \"A\", datasourceUid || \"\");\n ctx.postMessage({ id, ok: true, frames } satisfies FrameWorkerResponse);\n } catch (err) {\n ctx.postMessage({\n id,\n ok: false,\n error: err instanceof Error ? err.message : String(err),\n } satisfies FrameWorkerResponse);\n }\n};\n\nexport {};\n"],"names":[],"mappings":";;AAEO,WAAS,gBAAgB,MAOlB;AACZ,UAAM,SAAkB,KAAK,OAAO,IAAI,CAAC,OAAO;AAAA,MAC9C,MAAM,EAAE;AAAA,MACR,MAAM,EAAE,QAAQ,UAAU,EAAE,MAAM;AAAA,MAClC,QAAQ,EAAE,UAAU,CAAA;AAAA,MACpB,QAAQ,EAAE;AAAA,MACV,QAAQ,EAAE;AAAA,IAAA,EACV;AACF,UAAM,SAAS,OAAO,OAAO,CAAC,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,OAAO,MA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AAA,EACA;AAAA,IAAA;AAEJ,WAAO;AAAA,EACT;AAEO,WAAS,mBACd,QACA,OACA,eACA,WAIa;AACb,WAAO,OAAO;AAAA,MAAI,CAAC,MACjB,kBAAkB,GAAG,OAAO,aAAwB;AAAA,IAAA;AAAA,EAExD;AC1JA,QAAM,MAAM;AAEZ,MAAI,YAAY,CAAC,MAAwC;AACvD,UAAM,EAAE,IAAI,QAAQ,OAAO,kBAAkB,EAAE,QAAS,CAAA;AACxD,QAAI;AACF,YAAM,SAAS,mBAAmB,UAAU,CAAA,GAAI,SAAS,KAAK,iBAAiB,EAAE;AACjF,UAAI,YAAY,EAAE,IAAI,IAAI,MAAM,QAAsC;AAAA,IACxE,SAAS,KAAK;AACZ,UAAI,YAAY;AAAA,QACd;AAAA,QACA,IAAI;AAAA,QACJ,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MAAA,CACzB;AAAA,IACjC;AAAA,EACF;;"}
\ No newline at end of file
(function() {
"use strict";
const registry = /* @__PURE__ */ new Map();
function getTransformer(id) {
return registry.get(id);
}
const ALIASES = {
// filterFieldsByName is first-class; filterByName is internal alias
filterByName: "filterFieldsByName",
filterFramesByRefId: "filterByRefId",
seriesToColumns: "joinByField"
};
const DEFAULT_OPTIONS$1 = {
limit: { limitField: 10 },
sortBy: { sort: [] },
reduce: { reducers: ["sum"] },
histogram: { bucketCount: 10 },
smoothing: { windowSize: 3 },
filterByValue: { type: "include", filters: [] },
prepareTimeSeries: { format: "multi" }
};
function resolveTransformerId(id) {
return ALIASES[id] ?? id;
}
function deepCloneFrames(frames) {
return frames.map((frame) => {
const fields = frame.fields.map((f) => ({
name: f.name,
type: f.type,
config: f.config ? { ...f.config } : {},
values: f.values.slice(),
labels: f.labels ? { ...f.labels } : void 0,
state: f.state ? { ...f.state } : void 0
}));
return {
refId: frame.refId,
name: frame.name,
meta: frame.meta ? { ...frame.meta } : void 0,
fields,
length: frame.length ?? fields[0]?.values.length ?? 0
};
});
}
function interpolateOptions(value, interpolate) {
return value;
}
function patternFromFilterOptions(options) {
if (options == null) return "";
if (typeof options === "string" || typeof options === "number")
return String(options);
if (typeof options === "object") {
const o = options;
if (o.pattern != null) return String(o.pattern);
if (o.refId != null) return String(o.refId);
if (o.value != null) return String(o.value);
if (Array.isArray(o.names))
return o.names.map(String).join("|");
}
return String(options);
}
function compileMatcher(raw) {
const s = raw.trim();
if (!s) return () => true;
const m = s.match(/^\/(.+)\/([gimsuy]*)$/);
if (m) {
try {
const re = new RegExp(m[1], m[2]);
return (v) => re.test(v);
} catch {
return (v) => v === s;
}
}
try {
const re = new RegExp(`^(?:${s})$`);
return (v) => re.test(v);
} catch {
return (v) => v === s;
}
}
function matchFrameFilter(frame, filter) {
if (filter == null || filter === "") return true;
if (typeof filter === "string") {
const hit2 = compileMatcher(filter);
return hit2(String(frame.refId ?? "")) || hit2(String(frame.name ?? ""));
}
const id = String(filter.id || "byRefId");
const pattern = patternFromFilterOptions(filter.options);
const hit = compileMatcher(pattern);
if (id === "byName" || id === "byFrameName") {
return hit(String(frame.name ?? ""));
}
if (id === "byRefId" || id === "byFrameRefID" || id === "byFrameRefId") {
return hit(String(frame.refId ?? ""));
}
return hit(String(frame.refId ?? "")) || hit(String(frame.name ?? ""));
}
function applyWithFrameFilter(frames, filter, fn, options) {
if (filter == null || filter === "") {
return fn(frames, options);
}
const matched = [];
const passthrough = /* @__PURE__ */ new Map();
frames.forEach((f, i) => {
if (matchFrameFilter(f, filter)) {
matched.push(f);
} else {
passthrough.set(i, f);
}
});
if (!matched.length) return frames;
const transformed = fn(matched, options);
const out = [];
let inserted = false;
for (let i = 0; i < frames.length; i++) {
if (passthrough.has(i)) {
out.push(passthrough.get(i));
} else if (!inserted) {
out.push(...transformed);
inserted = true;
transformed.length;
}
}
if (!inserted) out.push(...transformed);
return out;
}
function readLimitOption$1(options) {
if (!options) return void 0;
const raw = options.limit ?? options.limitField ?? options.limitValue;
if (raw == null) return void 0;
const n = Math.floor(Number(raw));
return Number.isFinite(n) && n >= 0 ? n : void 0;
}
function tryFuseSortLimit$1(transformations, index) {
const cur = transformations[index];
const next = transformations[index + 1];
if (!cur || !next) return null;
if (cur.disabled || next.disabled) return null;
const curId = resolveTransformerId(cur.id);
const nextId = resolveTransformerId(next.id);
if (curId !== "sortBy" || nextId !== "limit") return null;
const f1 = cur.filter ?? null;
const f2 = next.filter ?? null;
if (JSON.stringify(f1) !== JSON.stringify(f2)) return null;
const lim = readLimitOption$1(next.options);
if (lim == null) return null;
return {
fusedOptions: { ...cur.options || {}, limit: lim, limitField: lim, limitValue: lim },
skipNext: true
};
}
function applyTransformations(frames, transformations = [], diagnostics, context) {
let acc = deepCloneFrames(frames);
if (!transformations.length) return acc;
const localDiag = [];
for (let i = 0; i < transformations.length; i++) {
const t = transformations[i];
if (t.disabled) continue;
const resolvedId = resolveTransformerId(t.id);
const fn = getTransformer(resolvedId) ?? getTransformer(t.id);
if (!fn) {
localDiag.push({
id: t.id,
level: "warn",
message: `Unknown transformation: ${t.id}`
});
continue;
}
const defaults = DEFAULT_OPTIONS$1[resolvedId] ?? DEFAULT_OPTIONS$1[t.id] ?? {};
const fuse = tryFuseSortLimit$1(transformations, i);
const stepOptions = fuse ? { ...defaults, ...fuse.fusedOptions } : { ...defaults, ...t.options || {} };
const merged = interpolateOptions(stepOptions);
try {
acc = applyWithFrameFilter(
acc,
t.filter,
fn,
merged
);
if (fuse?.skipNext) i += 1;
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);
localDiag.push({ id: t.id, level: "error", message: msg });
throw e;
}
}
return acc;
}
function asNames(options) {
if (Array.isArray(options)) return options.map(String);
if (options && typeof options === "object" && Array.isArray(options.names)) {
return options.names.map(String);
}
return String(options?.names ?? options ?? "").split(",").map((s) => s.trim()).filter(Boolean);
}
function safeRegExp(pattern) {
try {
return new RegExp(String(pattern ?? ""));
} catch {
return null;
}
}
const MATCHERS = [
{
id: "byName",
name: "字段名称为",
pickerDefault: true,
get: (options) => (field) => field.name === options
},
{
id: "byNames",
name: "字段名称为(列表)",
pickerDefault: true,
get: (options) => (field) => {
const names = asNames(options);
const hit = names.includes(field.name);
const mode = typeof options === "object" && options && !Array.isArray(options) ? options.mode || "include" : "include";
return mode === "exclude" ? !hit : hit;
}
},
{
id: "byRegexp",
name: "字段名匹配正则",
pickerDefault: true,
get: (options) => {
const re = safeRegExp(options);
return (field) => re ? re.test(field.name) : false;
}
},
{
id: "byRegexpOrNames",
name: "字段名匹配正则或列表",
pickerDefault: false,
get: (options) => {
const opts = options;
const pattern = typeof opts === "string" ? opts : opts?.pattern ?? "";
const names = typeof opts === "object" && opts ? asNames(opts) : [];
const re = safeRegExp(pattern);
return (field) => names.includes(field.name) || !!re && re.test(field.name);
}
},
{
id: "byType",
name: "字段类型为",
pickerDefault: true,
get: (options) => (field) => field.type === options
},
{
id: "byTypes",
name: "字段类型为(列表)",
pickerDefault: false,
get: (options) => {
const types = Array.isArray(options) ? options.map(String) : String(options ?? "").split(",").map((s) => s.trim()).filter(Boolean);
return (field) => types.includes(String(field.type));
}
},
{
id: "byFrameRefID",
name: "查询返回的字段",
pickerDefault: true,
get: (options) => (_field, frame) => (frame?.refId ?? "") === String(options ?? "")
},
{
id: "byValue",
name: "值为",
pickerDefault: true,
get: (options) => (field) => {
if (options && typeof options === "object" && "op" in options) {
const n2 = Number(options.value);
return field.values.some((v) => Number(v) === n2);
}
const n = Number(options);
if (!Number.isNaN(n) && String(options).trim() !== "") {
return field.values.some((v) => Number(v) === n);
}
return field.values.some((v) => String(v) === String(options ?? ""));
}
},
{
id: "numeric",
name: "数值字段",
pickerDefault: false,
get: () => (field) => field.type === "number"
},
{
id: "time",
name: "时间字段",
pickerDefault: false,
get: () => (field) => field.type === "time"
},
{
id: "first",
name: "第一个字段",
pickerDefault: false,
get: () => (field, frame) => !!frame && frame.fields[0] === field
},
{
id: "firstTimeField",
name: "第一个时间字段",
pickerDefault: false,
get: () => (field, frame) => {
if (!frame) return field.type === "time";
const first = frame.fields.find((f) => f.type === "time");
return first === field;
}
}
];
const byId = new Map(MATCHERS.map((m) => [m.id, m]));
function getFieldMatcher(config) {
const info = byId.get(config.id);
if (!info) {
return () => false;
}
return info.get(config.options);
}
function identity(v) {
return v;
}
function numberOrUndefined(v) {
if (v === "" || v === null || v === void 0) return void 0;
const n = Number(v);
return Number.isFinite(n) ? n : void 0;
}
const STANDARD_OVERRIDE_PROCESSORS = [
{
id: "unit",
name: "单位",
path: "unit",
process: (v) => v == null || v === "" ? void 0 : String(v)
},
{
id: "decimals",
name: "小数位",
path: "decimals",
process: numberOrUndefined
},
{ id: "min", name: "最小值", path: "min", process: numberOrUndefined },
{ id: "max", name: "最大值", path: "max", process: numberOrUndefined },
{
id: "fieldMinMax",
name: "字段最小/最大",
path: "fieldMinMax",
process: (v) => v == null ? void 0 : Boolean(v)
},
{
id: "displayName",
name: "显示名称",
path: "displayName",
process: (v) => v == null || v === "" ? void 0 : String(v)
},
{
id: "noValue",
name: "空值显示",
path: "noValue",
process: (v) => v == null ? void 0 : String(v)
},
{ id: "color", name: "颜色", path: "color", process: identity },
{ id: "thresholds", name: "阈值", path: "thresholds", process: identity },
{ id: "mappings", name: "值映射", path: "mappings", process: identity },
{ id: "links", name: "数据链接", path: "links", process: identity },
{ id: "actions", name: "动作", path: "actions", process: identity },
{
id: "filterable",
name: "可过滤",
path: "filterable",
process: (v) => v == null ? void 0 : Boolean(v)
}
];
const processorById = new Map(
STANDARD_OVERRIDE_PROCESSORS.map((p) => [p.id, p])
);
function getOverrideProcessor(id) {
if (processorById.has(id)) return processorById.get(id);
if (id.startsWith("custom.")) {
return {
id,
name: id.slice(7),
path: id,
process: identity
};
}
return {
id,
name: id,
path: id,
process: identity,
shouldApply: () => false
};
}
function processOverrideValue(id, value) {
return getOverrideProcessor(id).process(value);
}
function isKnownOverrideProperty(id) {
return processorById.has(id) || id.startsWith("custom.");
}
function applyProcessedProperty(config, id, raw) {
const processor = getOverrideProcessor(id);
if (processor.shouldApply === void 0 && !isKnownOverrideProperty(id) && !id.startsWith("custom.")) {
return config;
}
const value = processor.process(raw);
if (value === void 0) {
const next = { ...config };
if (id.startsWith("custom.")) {
const custom = { ...config.custom ?? {} };
delete custom[id.slice(7)];
return { ...config, custom };
}
delete next[id];
return next;
}
if (id.startsWith("custom.")) {
const key = id.slice(7);
return { ...config, custom: { ...config.custom ?? {}, [key]: value } };
}
return { ...config, [id]: value };
}
const compiledRulesCache = /* @__PURE__ */ new WeakMap();
const compiledRulesLru = [];
const COMPILED_RULES_LRU_MAX = 32;
function defaultsCacheKey(defaults) {
const unit = defaults.unit ?? "";
const decimals = defaults.decimals ?? "";
const displayName = defaults.displayName ?? "";
const customKeys = defaults.custom ? Object.keys(defaults.custom).join(",") : "";
return `${unit}|${decimals}|${displayName}|${customKeys}`;
}
function rulesSignature(overrides) {
let s = String(overrides.length);
for (let i = 0; i < overrides.length; i++) {
const r = overrides[i];
s += `|${r.matcher?.id}:${JSON.stringify(r.matcher?.options)}:${r.properties?.length ?? 0}`;
for (const p of r.properties || []) s += `:${p.id}`;
}
return s;
}
function compileOverrideRules(overrides = []) {
return overrides.map((rule) => ({
matcher: rule.matcher,
properties: rule.properties || [],
match: getFieldMatcher(rule.matcher || { id: "" })
}));
}
function getCompiledRules(overrides, defaults) {
const dKey = defaultsCacheKey(defaults);
const weakHit = compiledRulesCache.get(overrides);
if (weakHit && weakHit.defaultsKey === dKey) return weakHit.rules;
const sig = rulesSignature(overrides) + "::" + dKey;
const lruHit = compiledRulesLru.find((e) => e.key === sig);
if (lruHit) {
compiledRulesCache.set(overrides, { rules: lruHit.rules, defaultsKey: dKey });
return lruHit.rules;
}
const rules = compileOverrideRules(overrides);
compiledRulesCache.set(overrides, { rules, defaultsKey: dKey });
compiledRulesLru.unshift({ key: sig, rules });
if (compiledRulesLru.length > COMPILED_RULES_LRU_MAX) compiledRulesLru.pop();
return rules;
}
function normalizePropId(id) {
if (id === "unit" || id === "decimals" || id === "displayName" || id === "min" || id === "max" || id === "noValue" || id === "fieldMinMax" || id === "filterable" || id === "color" || id === "thresholds" || id === "mappings" || id === "links" || id === "actions") {
return id;
}
if (id.startsWith("standardOptions."))
return id.slice("standardOptions.".length);
if (id.startsWith("custom.")) return id;
const customKeys = [
"drawStyle",
"lineInterpolation",
"lineWidth",
"fillOpacity",
"gradientMode",
"spanNulls",
"showPoints",
"pointSize",
"stacking",
"axisPlacement",
"axisLabel",
"axisSoftMin",
"axisSoftMax",
"axisCenteredZero",
"hideFrom",
"scaleDistribution",
"thresholdsStyle",
"barAlignment",
"lineStyle",
"insertNulls",
"barWidthFactor"
];
if (customKeys.includes(id)) return `custom.${id}`;
return id;
}
function setNested(config, path, value) {
if (path.startsWith("custom.")) {
const rest = path.slice(7);
const custom = { ...config.custom ?? {} };
const parts = rest.split(".");
let cur = custom;
for (let i = 0; i < parts.length - 1; i++) {
cur[parts[i]] = cur[parts[i]] && typeof cur[parts[i]] === "object" ? { ...cur[parts[i]] } : {};
cur = cur[parts[i]];
}
cur[parts[parts.length - 1]] = value;
return { ...config, custom };
}
if (path.includes(".")) {
const parts = path.split(".");
const root = { ...config };
let cur = root;
for (let i = 0; i < parts.length - 1; i++) {
cur[parts[i]] = cur[parts[i]] && typeof cur[parts[i]] === "object" ? { ...cur[parts[i]] } : {};
cur = cur[parts[i]];
}
cur[parts[parts.length - 1]] = value;
return root;
}
return { ...config, [path]: value };
}
function applyFieldOverrides(frames, defaults = {}, overrides = []) {
const compiled = getCompiledRules(overrides, defaults);
return frames.map((frame) => ({
...frame,
fields: frame.fields.map((field) => {
let config = { ...defaults, ...field.config };
for (const rule of compiled) {
if (!rule.match(field, frame, frames)) continue;
for (const prop of rule.properties) {
const id = normalizePropId(prop.id);
if (!isKnownOverrideProperty(id) && !id.includes(".")) {
continue;
}
const processed = processOverrideValue(id, prop.value);
if (id.startsWith("custom.") || !isKnownOverrideProperty(id)) {
config = setNested(config, id, processed);
} else {
config = applyProcessedProperty(config, id, prop.value);
}
if (id === "color" && prop.value && typeof prop.value === "object" && prop.value.fixedColor) {
config = {
...config,
color: {
...config.color,
...prop.value,
mode: prop.value.mode ?? "fixed"
}
};
}
}
}
return { ...field, config };
})
}));
}
const DEFAULT_MAX_ENTRIES = 64;
const DEFAULT_MAX_BYTES = 512 * 1024;
const cache = /* @__PURE__ */ new Map();
let cacheBytes = 0;
let maxEntries = DEFAULT_MAX_ENTRIES;
let maxBytes = DEFAULT_MAX_BYTES;
const DEFAULT_OPTIONS = {
limit: { limitField: 10 },
sortBy: { sort: [] },
reduce: { reducers: ["sum"] },
histogram: { bucketCount: 10 },
smoothing: { windowSize: 3 },
filterByValue: { type: "include", filters: [] },
prepareTimeSeries: { format: "multi" }
};
function readLimitOption(options) {
if (!options) return void 0;
const raw = options.limit ?? options.limitField ?? options.limitValue;
if (raw == null) return void 0;
const n = Math.floor(Number(raw));
return Number.isFinite(n) && n >= 0 ? n : void 0;
}
function tryFuseSortLimit(steps, index) {
const cur = steps[index];
const next = steps[index + 1];
if (!cur || !next) return null;
if (cur.disabled || next.disabled) return null;
const curId = resolveTransformerId(cur.id);
const nextId = resolveTransformerId(next.id);
if (curId !== "sortBy" || nextId !== "limit") return null;
if (JSON.stringify(cur.filter ?? null) !== JSON.stringify(next.filter ?? null)) {
return null;
}
const lim = readLimitOption(next.options);
if (lim == null) return null;
const defaults = DEFAULT_OPTIONS.sortBy ?? {};
return {
fused: {
id: "sortBy",
filter: cur.filter,
options: {
...defaults,
...cur.options || {},
limit: lim,
limitField: lim,
limitValue: lim
}
},
skipNext: true
};
}
function compileTransformSteps(transformations = []) {
const out = [];
const src = transformations ?? [];
for (let i = 0; i < src.length; i++) {
const t = src[i];
if (t.disabled) continue;
const fuse = tryFuseSortLimit(src, i);
if (fuse) {
out.push(fuse.fused);
if (fuse.skipNext) i += 1;
continue;
}
const resolvedId = resolveTransformerId(t.id);
const defaults = DEFAULT_OPTIONS[resolvedId] ?? DEFAULT_OPTIONS[t.id] ?? {};
out.push({
id: resolvedId,
filter: t.filter,
options: { ...defaults, ...t.options || {} }
});
}
return out;
}
function estimateConfigBytes(config) {
let n = 128;
const transforms = config.transformations ?? [];
n += transforms.length * 64;
for (const t of transforms) {
n += String(t.id).length + 16;
if (t.options) n += Object.keys(t.options).length * 24;
}
const overrides = config.fieldConfigOverrides ?? [];
n += overrides.length * 96;
for (const r of overrides) {
n += String(r.matcher?.id ?? "").length;
n += (r.properties?.length ?? 0) * 32;
}
const defaults = config.fieldConfigDefaults;
if (defaults) n += Object.keys(defaults).length * 24 + 32;
return n;
}
function pipelineConfigRevision(config) {
const transforms = config.transformations ?? [];
const overrides = config.fieldConfigOverrides ?? [];
const defaults = config.fieldConfigDefaults ?? {};
const parts = [`t${transforms.length}`, `o${overrides.length}`];
for (let i = 0; i < transforms.length; i++) {
const t = transforms[i];
parts.push(
`${t.disabled ? "D" : ""}${t.id}:${stableSmallJson(t.options)}:${stableSmallJson(t.filter)}`
);
}
for (let i = 0; i < overrides.length; i++) {
const r = overrides[i];
const props = (r.properties || []).map((p) => `${p.id}=${stableSmallJson(p.value)}`).join(",");
parts.push(
`m${r.matcher?.id}:${stableSmallJson(r.matcher?.options)}:${props}`
);
}
parts.push(`d:${stableSmallJson(defaults)}`);
return parts.join("|");
}
function stableSmallJson(value) {
if (value == null) return "";
if (typeof value === "string") return value.length > 64 ? value.slice(0, 64) : value;
if (typeof value === "number" || typeof value === "boolean") return String(value);
try {
const s = JSON.stringify(value);
return s.length > 256 ? s.slice(0, 256) : s;
} catch {
return "?";
}
}
function touch(revision, entry) {
cache.delete(revision);
cache.set(revision, entry);
}
function evictIfNeeded() {
while ((cache.size > maxEntries || cacheBytes > maxBytes) && cache.size > 0) {
const oldest = cache.keys().next().value;
if (oldest == null) break;
const e = cache.get(oldest);
cache.delete(oldest);
if (e) cacheBytes -= e.bytes;
}
if (cacheBytes < 0) cacheBytes = 0;
}
function getCompiledPipeline(config) {
const revision = pipelineConfigRevision(config);
const hit = cache.get(revision);
if (hit) {
touch(revision, hit);
return hit.compiled;
}
const transformations = (config.transformations ?? []).map((t) => ({
id: t.id,
options: t.options ? { ...t.options } : void 0,
disabled: t.disabled,
filter: t.filter
}));
const defaults = { ...config.fieldConfigDefaults ?? {} };
const overrides = (config.fieldConfigOverrides ?? []).map((r) => ({
matcher: { ...r.matcher || { id: "" } },
properties: (r.properties || []).map((p) => ({ ...p }))
}));
const fastSteps = compileTransformSteps(transformations);
const compiledOverrides = compileOverrideRules(overrides);
const estimatedBytes = estimateConfigBytes(config);
const compiled = {
revision,
transformations,
fastSteps,
defaults,
overrides,
compiledOverrides,
estimatedBytes
};
const bytes = Math.max(estimatedBytes, revision.length + 64);
cacheBytes += bytes;
cache.set(revision, { revision, compiled, bytes });
evictIfNeeded();
return compiled;
}
function runCompiledPipeline(frames, compiled, opts) {
const transformed = applyTransformations(
frames,
compiled.fastSteps
);
const series = applyFieldOverrides(
transformed,
compiled.defaults,
compiled.overrides
);
return { frames: series, steps: [], diagnostics: [] };
}
function canEncodeF64(values) {
for (let i = 0; i < values.length; i++) {
const v = values[i];
if (v == null) continue;
if (typeof v !== "number") return false;
}
return true;
}
function packFramesForTransfer(frames) {
const transfer = [];
const wire = (frames ?? []).map((frame) => {
const fields = (frame.fields ?? []).map((f) => {
const values = f.values ?? [];
const type = f.type;
const numericLike = (type === "number" || type === "time") && canEncodeF64(values);
if (numericLike) {
const f64 = new Float64Array(values.length);
const nulls = new Uint8Array(values.length);
for (let i = 0; i < values.length; i++) {
const v = values[i];
if (v == null) {
nulls[i] = 1;
f64[i] = 0;
} else {
nulls[i] = 0;
f64[i] = v;
}
}
transfer.push(f64.buffer, nulls.buffer);
return {
name: f.name,
type,
config: f.config ? { ...f.config } : {},
labels: f.labels ? { ...f.labels } : void 0,
encoding: "f64",
f64,
nulls
};
}
return {
name: f.name,
type,
config: f.config ? { ...f.config } : {},
labels: f.labels ? { ...f.labels } : void 0,
encoding: "clone",
values: values.slice()
};
});
const len = frame.length ?? fields[0]?.f64?.length ?? fields[0]?.values?.length ?? 0;
return {
refId: frame.refId,
name: frame.name,
meta: frame.meta ? { ...frame.meta } : void 0,
length: len,
fields
};
});
return { frames: wire, transfer };
}
function unpackWireFrames(frames) {
return (frames ?? []).map((frame) => {
const fields = (frame.fields ?? []).map((f) => {
if (f.encoding === "f64" && f.f64) {
const n = f.f64.length;
const values = new Array(n);
const nulls = f.nulls;
for (let i = 0; i < n; i++) {
values[i] = nulls && nulls[i] ? null : f.f64[i];
}
return {
name: f.name,
type: f.type,
config: f.config ?? {},
values,
labels: f.labels
};
}
return {
name: f.name,
type: f.type,
config: f.config ?? {},
values: f.values ?? [],
labels: f.labels
};
});
return {
refId: frame.refId,
name: frame.name,
meta: frame.meta,
fields,
length: frame.length ?? fields.reduce((m, field) => Math.max(m, field.values.length), 0)
};
});
}
const cancelled = /* @__PURE__ */ new Set();
function handlePanelPipelineMessage(msg, post) {
if (msg == null || msg.id == null) return;
if (msg.type === "cancel") {
cancelled.add(msg.id);
return;
}
if (cancelled.has(msg.id)) {
cancelled.delete(msg.id);
post({
id: msg.id,
generation: msg.generation,
ok: false,
error: "aborted",
aborted: true
});
return;
}
try {
const series = unpackWireFrames(msg.frames ?? []);
const compiled = getCompiledPipeline({
transformations: msg.transformations ?? [],
fieldConfigDefaults: msg.fieldConfigDefaults ?? {},
fieldConfigOverrides: msg.fieldConfigOverrides ?? []
});
if (cancelled.has(msg.id)) {
cancelled.delete(msg.id);
post({
id: msg.id,
generation: msg.generation,
ok: false,
error: "aborted",
aborted: true
});
return;
}
const out = runCompiledPipeline(series, compiled, { withTrace: false });
if (cancelled.has(msg.id)) {
cancelled.delete(msg.id);
post({
id: msg.id,
generation: msg.generation,
ok: false,
error: "aborted",
aborted: true
});
return;
}
const packed = packFramesForTransfer(out.frames);
post(
{
id: msg.id,
generation: msg.generation,
ok: true,
frames: packed.frames
},
packed.transfer
);
} catch (e) {
post({
id: msg.id,
generation: msg.generation,
ok: false,
error: e instanceof Error ? e.message : String(e)
});
}
}
function onMessage(ev) {
handlePanelPipelineMessage(ev.data, (res, transfer) => {
const scope = self;
if (transfer?.length) scope.postMessage(res, transfer);
else scope.postMessage(res);
});
}
const isDedicatedWorker = typeof WorkerGlobalScope !== "undefined" && typeof self !== "undefined" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope;
if (isDedicatedWorker) {
self.onmessage = onMessage;
}
})();
//# sourceMappingURL=panelPipelineWorker-5BqW8fRn.js.map
{"version":3,"file":"panelPipelineWorker-5BqW8fRn.js","sources":["../../grafana-data/src/transformations/registry.ts","../../grafana-data/src/transformations/runner.ts","../../grafana-data/src/field/matchers.ts","../../grafana-data/src/field/overrideProcessors.ts","../../grafana-data/src/fieldOverrides.ts","../../grafana-data/src/performance/compiledPipeline.ts","../../grafana-vue-dashboard/src/query/panelPipelineTransfer.ts","../../grafana-vue-dashboard/src/query/panelPipelineWorker.ts"],"sourcesContent":["import type { DataFrame } from \"../types\";\n\nexport type TransformerFn = (\n frames: DataFrame[],\n options?: Record<string, unknown>,\n) => DataFrame[];\n\nconst registry = new Map<string, TransformerFn>();\n\nexport function registerTransformer(id: string, fn: TransformerFn): void {\n registry.set(id, fn);\n}\n\nexport function getTransformer(id: string): TransformerFn | undefined {\n return registry.get(id);\n}\n\nexport function listTransformerIds(): string[] {\n return [...registry.keys()];\n}\n\nfunction getTransformerRegistry(): Map<string, TransformerFn> {\n return registry;\n}\nvoid getTransformerRegistry;\n","import type { DataFrame } from \"../types\";\nimport {\n getTransformer,\n listTransformerIds as listIdsFromRegistry,\n type TransformerFn,\n} from \"./registry\";\n\nexport type { TransformerFn };\n\nconst ALIASES: Record<string, string> = {\n // filterFieldsByName is first-class; filterByName is internal alias\n filterByName: \"filterFieldsByName\",\n filterFramesByRefId: \"filterByRefId\",\n seriesToColumns: \"joinByField\",\n};\n\nconst DEFAULT_OPTIONS: Record<string, Record<string, unknown>> = {\n limit: { limitField: 10 },\n sortBy: { sort: [] },\n reduce: { reducers: [\"sum\"] },\n histogram: { bucketCount: 10 },\n smoothing: { windowSize: 3 },\n filterByValue: { type: \"include\", filters: [] },\n prepareTimeSeries: { format: \"multi\" },\n};\n\nexport type TransformDiagnostic = {\n id: string;\n level: \"warn\" | \"error\";\n message: string;\n};\n\nexport function resolveTransformerId(id: string): string {\n return ALIASES[id] ?? id;\n}\n\n/** Detach frames from caller ownership (one entry copy). Prefer slice over spread. */\nfunction deepCloneFrames(frames: DataFrame[]): DataFrame[] {\n return frames.map((frame) => {\n const fields = frame.fields.map((f) => ({\n name: f.name,\n type: f.type,\n config: f.config ? { ...f.config } : {},\n values: f.values.slice(),\n labels: f.labels ? { ...f.labels } : undefined,\n state: f.state ? { ...f.state } : undefined,\n }));\n return {\n refId: frame.refId,\n name: frame.name,\n meta: frame.meta ? { ...frame.meta } : undefined,\n fields,\n length: frame.length ?? fields[0]?.values.length ?? 0,\n };\n });\n}\n\nfunction interpolateOptions<T>(\n value: T,\n interpolate?: (s: string) => string,\n): T {\n if (!interpolate) return value;\n if (typeof value === \"string\") return interpolate(value) as T;\n if (Array.isArray(value))\n return value.map((v) => interpolateOptions(v, interpolate)) as T;\n if (value && typeof value === \"object\") {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n out[k] = interpolateOptions(v, interpolate);\n }\n return out as T;\n }\n return value;\n}\n\n/** Grafana MatcherConfig-like frame filter on a transformation step. */\nexport type FrameFilterConfig =\n | string\n | {\n id?: string;\n options?: unknown;\n }\n | null\n | undefined;\n\nfunction patternFromFilterOptions(options: unknown): string {\n if (options == null) return \"\";\n if (typeof options === \"string\" || typeof options === \"number\")\n return String(options);\n if (typeof options === \"object\") {\n const o = options as Record<string, unknown>;\n if (o.pattern != null) return String(o.pattern);\n if (o.refId != null) return String(o.refId);\n if (o.value != null) return String(o.value);\n if (Array.isArray(o.names))\n return (o.names as unknown[]).map(String).join(\"|\");\n }\n return String(options);\n}\n\nfunction compileMatcher(raw: string): (value: string) => boolean {\n const s = raw.trim();\n if (!s) return () => true;\n // /regex/flags\n const m = s.match(/^\\/(.+)\\/([gimsuy]*)$/);\n if (m) {\n try {\n const re = new RegExp(m[1], m[2]);\n return (v) => re.test(v);\n } catch {\n return (v) => v === s;\n }\n }\n // plain regex or alternation without slashes\n try {\n const re = new RegExp(`^(?:${s})$`);\n return (v) => re.test(v);\n } catch {\n return (v) => v === s;\n }\n}\n\n/**\n * Select which frames a transform applies to (Grafana transformation.filter).\n * Non-matching frames pass through unchanged and keep relative order.\n */\nexport function matchFrameFilter(\n frame: DataFrame,\n filter: FrameFilterConfig,\n): boolean {\n if (filter == null || filter === \"\") return true;\n if (typeof filter === \"string\") {\n const hit = compileMatcher(filter);\n return hit(String(frame.refId ?? \"\")) || hit(String(frame.name ?? \"\"));\n }\n const id = String(filter.id || \"byRefId\");\n const pattern = patternFromFilterOptions(filter.options);\n const hit = compileMatcher(pattern);\n if (id === \"byName\" || id === \"byFrameName\") {\n return hit(String(frame.name ?? \"\"));\n }\n if (id === \"byRefId\" || id === \"byFrameRefID\" || id === \"byFrameRefId\") {\n return hit(String(frame.refId ?? \"\"));\n }\n // default: try refId then name\n return hit(String(frame.refId ?? \"\")) || hit(String(frame.name ?? \"\"));\n}\n\nfunction applyWithFrameFilter(\n frames: DataFrame[],\n filter: FrameFilterConfig,\n fn: TransformerFn,\n options: Record<string, unknown>,\n): DataFrame[] {\n if (filter == null || filter === \"\") {\n return fn(frames, options);\n }\n const matched: DataFrame[] = [];\n const matchedIdx: number[] = [];\n const passthrough = new Map<number, DataFrame>();\n frames.forEach((f, i) => {\n if (matchFrameFilter(f, filter)) {\n matchedIdx.push(i);\n matched.push(f);\n } else {\n passthrough.set(i, f);\n }\n });\n if (!matched.length) return frames;\n const transformed = fn(matched, options);\n // If transformer collapses/expands frame count, append results after passthrough in original order:\n // replace matched block with transformed sequence starting at first matched index.\n const out: DataFrame[] = [];\n let t = 0;\n let inserted = false;\n for (let i = 0; i < frames.length; i++) {\n if (passthrough.has(i)) {\n out.push(passthrough.get(i)!);\n } else if (!inserted) {\n out.push(...transformed);\n inserted = true;\n t = transformed.length;\n }\n }\n if (!inserted) out.push(...transformed);\n void t;\n return out;\n}\n\nexport type ApplyTransformationsContext = {\n interpolate?: (value: string) => string;\n /** When true, WithTrace records frame list after each step (editor debug). */\n includeFrameSnapshots?: boolean;\n};\n\nexport type TransformStepSnapshot = {\n id: string;\n resolvedId: string;\n disabled?: boolean;\n frameCount: number;\n fieldNames: string[];\n rowCounts: number[];\n error?: string;\n /** Sanitized option keys only (no secrets) */\n optionKeys: string[];\n filtered?: boolean;\n};\n\nexport type TransformPipelineResult = {\n frames: DataFrame[];\n steps: TransformStepSnapshot[];\n diagnostics: TransformDiagnostic[];\n /**\n * Frame list after each step (index 0 = input clone).\n * Only populated when context.includeFrameSnapshots is true (editor debug).\n */\n frameSnapshots?: DataFrame[][];\n};\n\nfunction snapshotFrames(\n frames: DataFrame[],\n): Pick<TransformStepSnapshot, \"frameCount\" | \"fieldNames\" | \"rowCounts\"> {\n return {\n frameCount: frames.length,\n fieldNames: frames.flatMap((f) => f.fields.map((field) => field.name)),\n rowCounts: frames.map((f) => f.length ?? f.fields[0]?.values?.length ?? 0),\n };\n}\n\nexport function applyTransformationsWithTrace(\n frames: DataFrame[],\n transformations: Array<{\n id: string;\n options?: Record<string, unknown>;\n disabled?: boolean;\n filter?: unknown;\n }> = [],\n context?: ApplyTransformationsContext,\n): TransformPipelineResult {\n const diagnostics: TransformDiagnostic[] = [];\n const steps: TransformStepSnapshot[] = [];\n const includeSnaps = !!context?.includeFrameSnapshots;\n const frameSnapshots: DataFrame[][] | undefined = includeSnaps ? [] : undefined;\n let acc = deepCloneFrames(frames);\n frameSnapshots?.push(acc);\n steps.push({\n id: \"__input__\",\n resolvedId: \"__input__\",\n frameCount: acc.length,\n fieldNames: acc.flatMap((f) => f.fields.map((field) => field.name)),\n rowCounts: acc.map((f) => f.length ?? f.fields[0]?.values?.length ?? 0),\n optionKeys: [],\n });\n\n for (const t of transformations) {\n const resolvedId = resolveTransformerId(t.id);\n if (t.disabled) {\n steps.push({\n id: t.id,\n resolvedId,\n disabled: true,\n ...snapshotFrames(acc),\n optionKeys: Object.keys(t.options || {}),\n });\n frameSnapshots?.push(acc);\n continue;\n }\n const fn = getTransformer(resolvedId) ?? getTransformer(t.id);\n if (!fn) {\n diagnostics.push({\n id: t.id,\n level: \"warn\",\n message: `Unknown transformation: ${t.id}`,\n });\n steps.push({\n id: t.id,\n resolvedId,\n ...snapshotFrames(acc),\n error: `Unknown transformation: ${t.id}`,\n optionKeys: Object.keys(t.options || {}),\n });\n frameSnapshots?.push(acc);\n continue;\n }\n const defaults = DEFAULT_OPTIONS[resolvedId] ?? DEFAULT_OPTIONS[t.id] ?? {};\n const merged = interpolateOptions(\n { ...defaults, ...(t.options || {}) },\n context?.interpolate,\n );\n try {\n // Entry clone already detached input. Transformers should not mutate in place;\n // avoid unconditional inter-step deepClone (Task 12).\n acc = applyWithFrameFilter(\n acc,\n t.filter as FrameFilterConfig,\n fn,\n merged as Record<string, unknown>,\n );\n steps.push({\n id: t.id,\n resolvedId,\n ...snapshotFrames(acc),\n optionKeys: Object.keys(t.options || {}),\n filtered: t.filter != null && t.filter !== \"\",\n });\n frameSnapshots?.push(acc);\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n diagnostics.push({ id: t.id, level: \"error\", message: msg });\n steps.push({\n id: t.id,\n resolvedId,\n ...snapshotFrames(acc),\n error: msg,\n optionKeys: Object.keys(t.options || {}),\n });\n // Spec: transformer failure must not return pre-transform data as Done success\n throw e;\n }\n }\n return { frames: acc, steps, diagnostics, frameSnapshots };\n}\n\n\n/** Extract numeric limit from limit-transform options. */\nfunction readLimitOption(options: Record<string, unknown> | undefined): number | undefined {\n if (!options) return undefined;\n const raw = options.limit ?? options.limitField ?? options.limitValue;\n if (raw == null) return undefined;\n const n = Math.floor(Number(raw));\n return Number.isFinite(n) && n >= 0 ? n : undefined;\n}\n\n/**\n * When sortBy is immediately followed by limit (same filter / no disable),\n * fuse into one top-K sortBy call. Preserves final semantics; avoids O(N log N)\n * full reorder when only K rows are kept.\n */\nfunction tryFuseSortLimit(\n transformations: Array<{\n id: string;\n options?: Record<string, unknown>;\n disabled?: boolean;\n filter?: unknown;\n }>,\n index: number,\n): { fusedOptions: Record<string, unknown>; skipNext: boolean } | null {\n const cur = transformations[index];\n const next = transformations[index + 1];\n if (!cur || !next) return null;\n if (cur.disabled || next.disabled) return null;\n const curId = resolveTransformerId(cur.id);\n const nextId = resolveTransformerId(next.id);\n if (curId !== \"sortBy\" || nextId !== \"limit\") return null;\n const f1 = cur.filter ?? null;\n const f2 = next.filter ?? null;\n if (JSON.stringify(f1) !== JSON.stringify(f2)) return null;\n const lim = readLimitOption(next.options as Record<string, unknown> | undefined);\n if (lim == null) return null;\n return {\n fusedOptions: { ...(cur.options || {}), limit: lim, limitField: lim, limitValue: lim },\n skipNext: true,\n };\n}\n\n/**\n * Fast path: one entry detach, no step snapshots / fieldNames / rowCounts.\n * Use applyTransformationsWithTrace for editor debug.\n */\nexport function applyTransformations(\n frames: DataFrame[],\n transformations: Array<{\n id: string;\n options?: Record<string, unknown>;\n disabled?: boolean;\n filter?: unknown;\n }> = [],\n diagnostics?: TransformDiagnostic[],\n context?: ApplyTransformationsContext,\n): DataFrame[] {\n // Always return frames detached from the input (even with zero transforms).\n let acc = deepCloneFrames(frames);\n if (!transformations.length) return acc;\n\n const localDiag: TransformDiagnostic[] = diagnostics ?? [];\n\n for (let i = 0; i < transformations.length; i++) {\n const t = transformations[i];\n if (t.disabled) continue;\n const resolvedId = resolveTransformerId(t.id);\n const fn = getTransformer(resolvedId) ?? getTransformer(t.id);\n if (!fn) {\n localDiag.push({\n id: t.id,\n level: \"warn\",\n message: `Unknown transformation: ${t.id}`,\n });\n continue;\n }\n const defaults = DEFAULT_OPTIONS[resolvedId] ?? DEFAULT_OPTIONS[t.id] ?? {};\n const fuse = tryFuseSortLimit(transformations, i);\n const stepOptions = fuse\n ? { ...defaults, ...fuse.fusedOptions }\n : { ...defaults, ...(t.options || {}) };\n const merged = interpolateOptions(stepOptions, context?.interpolate);\n try {\n acc = applyWithFrameFilter(\n acc,\n t.filter as FrameFilterConfig,\n fn,\n merged as Record<string, unknown>,\n );\n if (fuse?.skipNext) i += 1; // skip fused limit step\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n localDiag.push({ id: t.id, level: \"error\", message: msg });\n throw e;\n }\n }\n\n if (diagnostics && diagnostics !== localDiag) {\n diagnostics.push(...localDiag);\n }\n return acc;\n}\n\nexport function listTransformerIds(): string[] {\n return listIdsFromRegistry();\n}\n","/**\n * Field matcher registry (Task 5.3) — IDs aligned with Grafana FieldMatcherID.\n * @see grafana-main/packages/grafana-data/src/transformations/matchers\n */\nimport type { DataFrame, Field } from \"../types\";\n\nexport enum FieldMatcherID {\n numeric = \"numeric\",\n time = \"time\",\n first = \"first\",\n firstTimeField = \"firstTimeField\",\n byType = \"byType\",\n byTypes = \"byTypes\",\n byName = \"byName\",\n byNames = \"byNames\",\n byRegexp = \"byRegexp\",\n byRegexpOrNames = \"byRegexpOrNames\",\n byFrameRefID = \"byFrameRefID\",\n byValue = \"byValue\",\n}\n\nexport type MatcherConfig = { id: string; options?: unknown };\n\nexport type FieldMatcherFn = (\n field: Field,\n frame?: DataFrame,\n allFrames?: DataFrame[],\n) => boolean;\n\nexport interface FieldMatcherInfo {\n id: string;\n name: string;\n description?: string;\n /** Whether this matcher is offered in the field override picker */\n pickerDefault?: boolean;\n get: (options?: unknown) => FieldMatcherFn;\n}\n\nfunction asNames(options: unknown): string[] {\n if (Array.isArray(options)) return options.map(String);\n if (\n options &&\n typeof options === \"object\" &&\n Array.isArray((options as any).names)\n ) {\n return ((options as any).names as unknown[]).map(String);\n }\n return String((options as any)?.names ?? options ?? \"\")\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n}\n\nfunction safeRegExp(pattern: unknown): RegExp | null {\n try {\n return new RegExp(String(pattern ?? \"\"));\n } catch {\n return null;\n }\n}\n\nconst MATCHERS: FieldMatcherInfo[] = [\n {\n id: FieldMatcherID.byName,\n name: \"字段名称为\",\n pickerDefault: true,\n get: (options) => (field) => field.name === options,\n },\n {\n id: FieldMatcherID.byNames,\n name: \"字段名称为(列表)\",\n pickerDefault: true,\n get: (options) => (field) => {\n const names = asNames(options);\n const hit = names.includes(field.name);\n const mode =\n typeof options === \"object\" && options && !Array.isArray(options)\n ? ((options as any).mode as string) || \"include\"\n : \"include\";\n return mode === \"exclude\" ? !hit : hit;\n },\n },\n {\n id: FieldMatcherID.byRegexp,\n name: \"字段名匹配正则\",\n pickerDefault: true,\n get: (options) => {\n const re = safeRegExp(options);\n return (field) => (re ? re.test(field.name) : false);\n },\n },\n {\n id: FieldMatcherID.byRegexpOrNames,\n name: \"字段名匹配正则或列表\",\n pickerDefault: false,\n get: (options) => {\n const opts = options as\n { pattern?: string; names?: string[] } | string | undefined;\n const pattern = typeof opts === \"string\" ? opts : (opts?.pattern ?? \"\");\n const names = typeof opts === \"object\" && opts ? asNames(opts) : [];\n const re = safeRegExp(pattern);\n return (field) =>\n names.includes(field.name) || (!!re && re.test(field.name));\n },\n },\n {\n id: FieldMatcherID.byType,\n name: \"字段类型为\",\n pickerDefault: true,\n get: (options) => (field) => field.type === options,\n },\n {\n id: FieldMatcherID.byTypes,\n name: \"字段类型为(列表)\",\n pickerDefault: false,\n get: (options) => {\n const types = Array.isArray(options)\n ? options.map(String)\n : String(options ?? \"\")\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n return (field) => types.includes(String(field.type));\n },\n },\n {\n id: FieldMatcherID.byFrameRefID,\n name: \"查询返回的字段\",\n pickerDefault: true,\n get: (options) => (_field, frame) =>\n (frame?.refId ?? \"\") === String(options ?? \"\"),\n },\n {\n id: FieldMatcherID.byValue,\n name: \"值为\",\n pickerDefault: true,\n get: (options) => (field) => {\n // Grafana byValue reduces field and compares — simplified: any equal numeric/string\n if (options && typeof options === \"object\" && \"op\" in (options as any)) {\n const n = Number((options as any).value);\n return field.values.some((v) => Number(v) === n);\n }\n const n = Number(options);\n if (!Number.isNaN(n) && String(options).trim() !== \"\") {\n return field.values.some((v) => Number(v) === n);\n }\n return field.values.some((v) => String(v) === String(options ?? \"\"));\n },\n },\n {\n id: FieldMatcherID.numeric,\n name: \"数值字段\",\n pickerDefault: false,\n get: () => (field) => field.type === \"number\",\n },\n {\n id: FieldMatcherID.time,\n name: \"时间字段\",\n pickerDefault: false,\n get: () => (field) => field.type === \"time\",\n },\n {\n id: FieldMatcherID.first,\n name: \"第一个字段\",\n pickerDefault: false,\n get: () => (field, frame) => !!frame && frame.fields[0] === field,\n },\n {\n id: FieldMatcherID.firstTimeField,\n name: \"第一个时间字段\",\n pickerDefault: false,\n get: () => (field, frame) => {\n if (!frame) return field.type === \"time\";\n const first = frame.fields.find((f) => f.type === \"time\");\n return first === field;\n },\n },\n];\n\nconst byId = new Map(MATCHERS.map((m) => [m.id, m]));\n\nexport function listFieldMatchers(): FieldMatcherInfo[] {\n return [...MATCHERS];\n}\n\nexport function listOverridePickerMatchers(): FieldMatcherInfo[] {\n return MATCHERS.filter((m) => m.pickerDefault);\n}\n\nexport function getFieldMatcherInfo(id: string): FieldMatcherInfo | undefined {\n return byId.get(id);\n}\n\n/** Resolve matcher; unknown id returns always-false (does not throw — round-trip safe). */\nexport function getFieldMatcher(config: MatcherConfig): FieldMatcherFn {\n const info = byId.get(config.id);\n if (!info) {\n return () => false;\n }\n return info.get(config.options);\n}\n\nexport function matchFieldWithRegistry(\n field: Field,\n matcher: MatcherConfig,\n frame?: DataFrame,\n allFrames?: DataFrame[],\n): boolean {\n return getFieldMatcher(matcher)(field, frame, allFrames);\n}\n","/**\n * Override property processors — typed process/shouldApply for standard field props.\n * @see Grafana fieldConfig registry process functions\n */\nimport type { Field, FieldConfig } from \"../types\";\n\nexport type OverridePropertyId =\n | \"unit\"\n | \"decimals\"\n | \"min\"\n | \"max\"\n | \"fieldMinMax\"\n | \"displayName\"\n | \"noValue\"\n | \"color\"\n | \"thresholds\"\n | \"mappings\"\n | \"links\"\n | \"actions\"\n | \"filterable\"\n | string;\n\nexport interface OverridePropertyProcessor {\n id: OverridePropertyId;\n name: string;\n path: string;\n /** Process raw editor value into stored config value */\n process: (value: unknown) => unknown;\n shouldApply?: (field: Field) => boolean;\n /** Identity used when value is undefined / clear */\n isEmpty?: (value: unknown) => boolean;\n}\n\nfunction identity(v: unknown) {\n return v;\n}\n\nfunction numberOrUndefined(v: unknown): number | undefined {\n if (v === \"\" || v === null || v === undefined) return undefined;\n const n = Number(v);\n return Number.isFinite(n) ? n : undefined;\n}\n\nexport const STANDARD_OVERRIDE_PROCESSORS: OverridePropertyProcessor[] = [\n {\n id: \"unit\",\n name: \"单位\",\n path: \"unit\",\n process: (v) => (v == null || v === \"\" ? undefined : String(v)),\n },\n {\n id: \"decimals\",\n name: \"小数位\",\n path: \"decimals\",\n process: numberOrUndefined,\n },\n { id: \"min\", name: \"最小值\", path: \"min\", process: numberOrUndefined },\n { id: \"max\", name: \"最大值\", path: \"max\", process: numberOrUndefined },\n {\n id: \"fieldMinMax\",\n name: \"字段最小/最大\",\n path: \"fieldMinMax\",\n process: (v) => (v == null ? undefined : Boolean(v)),\n },\n {\n id: \"displayName\",\n name: \"显示名称\",\n path: \"displayName\",\n process: (v) => (v == null || v === \"\" ? undefined : String(v)),\n },\n {\n id: \"noValue\",\n name: \"空值显示\",\n path: \"noValue\",\n process: (v) => (v == null ? undefined : String(v)),\n },\n { id: \"color\", name: \"颜色\", path: \"color\", process: identity },\n { id: \"thresholds\", name: \"阈值\", path: \"thresholds\", process: identity },\n { id: \"mappings\", name: \"值映射\", path: \"mappings\", process: identity },\n { id: \"links\", name: \"数据链接\", path: \"links\", process: identity },\n { id: \"actions\", name: \"动作\", path: \"actions\", process: identity },\n {\n id: \"filterable\",\n name: \"可过滤\",\n path: \"filterable\",\n process: (v) => (v == null ? undefined : Boolean(v)),\n },\n];\n\nconst processorById = new Map(\n STANDARD_OVERRIDE_PROCESSORS.map((p) => [p.id, p]),\n);\n\nexport function getOverrideProcessor(\n id: string,\n): OverridePropertyProcessor | undefined {\n if (processorById.has(id)) return processorById.get(id);\n if (id.startsWith(\"custom.\")) {\n return {\n id,\n name: id.slice(7),\n path: id,\n process: identity,\n };\n }\n // unknown property: identity process — preserve lossless, never apply via shouldApply false\n return {\n id,\n name: id,\n path: id,\n process: identity,\n shouldApply: () => false,\n };\n}\n\nexport function processOverrideValue(id: string, value: unknown): unknown {\n return getOverrideProcessor(id)!.process(value);\n}\n\nexport function isKnownOverrideProperty(id: string): boolean {\n return processorById.has(id) || id.startsWith(\"custom.\");\n}\n\n/** Apply a single processed property onto field config (does not mutate). */\nexport function applyProcessedProperty(\n config: FieldConfig,\n id: string,\n raw: unknown,\n): FieldConfig {\n const processor = getOverrideProcessor(id)!;\n if (\n processor.shouldApply === undefined &&\n !isKnownOverrideProperty(id) &&\n !id.startsWith(\"custom.\")\n ) {\n // unknown: keep config unchanged (lossless rule stored separately by consumer)\n return config;\n }\n const value = processor.process(raw);\n if (value === undefined) {\n const next = { ...config } as Record<string, unknown>;\n if (id.startsWith(\"custom.\")) {\n const custom = { ...(config.custom ?? {}) } as Record<string, unknown>;\n delete custom[id.slice(7)];\n return { ...config, custom };\n }\n delete next[id];\n return next as FieldConfig;\n }\n if (id.startsWith(\"custom.\")) {\n const key = id.slice(7);\n return { ...config, custom: { ...(config.custom ?? {}), [key]: value } };\n }\n return { ...config, [id]: value };\n}\n","import type { DataFrame, Field, FieldConfig } from \"./types\";\nimport {\n getFieldMatcher,\n matchFieldWithRegistry,\n type FieldMatcherFn,\n type MatcherConfig,\n} from \"./field/matchers\";\nimport {\n applyProcessedProperty,\n isKnownOverrideProperty,\n processOverrideValue,\n} from \"./field/overrideProcessors\";\n\nexport interface DynamicConfigValue {\n id: string;\n value?: unknown;\n}\n\nexport interface ConfigOverrideRule {\n matcher: MatcherConfig;\n properties: DynamicConfigValue[];\n}\n\nexport interface CompiledOverrideRule {\n match: FieldMatcherFn;\n properties: DynamicConfigValue[];\n matcher: MatcherConfig;\n}\n\n/** Weak identity cache: same overrides array reference reuses compiled matchers. */\nconst compiledRulesCache = new WeakMap<\n ConfigOverrideRule[],\n { rules: CompiledOverrideRule[]; defaultsKey: string }\n>();\n\n/** Bound small strong cache for ephemeral override arrays (Task 13). */\nconst compiledRulesLru: Array<{\n key: string;\n rules: CompiledOverrideRule[];\n}> = [];\nconst COMPILED_RULES_LRU_MAX = 32;\n\nfunction defaultsCacheKey(defaults: FieldConfig): string {\n // Cheap identity-ish key for defaults (not full dashboard stringify).\n const unit = defaults.unit ?? \"\";\n const decimals = defaults.decimals ?? \"\";\n const displayName = defaults.displayName ?? \"\";\n const customKeys = defaults.custom ? Object.keys(defaults.custom).join(\",\") : \"\";\n return `${unit}|${decimals}|${displayName}|${customKeys}`;\n}\n\nfunction rulesSignature(overrides: ConfigOverrideRule[]): string {\n // Stable short signature for LRU when array identity changes but content is equal.\n let s = String(overrides.length);\n for (let i = 0; i < overrides.length; i++) {\n const r = overrides[i];\n s += `|${r.matcher?.id}:${JSON.stringify(r.matcher?.options)}:${r.properties?.length ?? 0}`;\n for (const p of r.properties || []) s += `:${p.id}`;\n }\n return s;\n}\n\nexport function compileOverrideRules(\n overrides: ConfigOverrideRule[] = [],\n): CompiledOverrideRule[] {\n return overrides.map((rule) => ({\n matcher: rule.matcher,\n properties: rule.properties || [],\n match: getFieldMatcher(rule.matcher || { id: \"\" }),\n }));\n}\n\nfunction getCompiledRules(\n overrides: ConfigOverrideRule[],\n defaults: FieldConfig,\n): CompiledOverrideRule[] {\n const dKey = defaultsCacheKey(defaults);\n const weakHit = compiledRulesCache.get(overrides);\n if (weakHit && weakHit.defaultsKey === dKey) return weakHit.rules;\n\n const sig = rulesSignature(overrides) + \"::\" + dKey;\n const lruHit = compiledRulesLru.find((e) => e.key === sig);\n if (lruHit) {\n compiledRulesCache.set(overrides, { rules: lruHit.rules, defaultsKey: dKey });\n return lruHit.rules;\n }\n\n const rules = compileOverrideRules(overrides);\n compiledRulesCache.set(overrides, { rules, defaultsKey: dKey });\n compiledRulesLru.unshift({ key: sig, rules });\n if (compiledRulesLru.length > COMPILED_RULES_LRU_MAX) compiledRulesLru.pop();\n return rules;\n}\n\n/** Test/helper: clear compile caches. */\nexport function clearFieldOverrideCompileCache(): void {\n compiledRulesLru.length = 0;\n}\n\nexport {\n FieldMatcherID,\n listFieldMatchers,\n listOverridePickerMatchers,\n getFieldMatcher,\n matchFieldWithRegistry,\n} from \"./field/matchers\";\nexport type { FieldMatcherInfo, FieldMatcherFn } from \"./field/matchers\";\nexport {\n STANDARD_OVERRIDE_PROCESSORS,\n getOverrideProcessor,\n processOverrideValue,\n isKnownOverrideProperty,\n applyProcessedProperty,\n} from \"./field/overrideProcessors\";\n\n/** @deprecated prefer matchFieldWithRegistry — kept for existing call sites */\nexport function matchField(\n field: Field,\n matcher: { id: string; options?: unknown },\n frame?: DataFrame,\n): boolean {\n return matchFieldWithRegistry(field, matcher, frame);\n}\n\nfunction normalizePropId(id: string): string {\n if (\n id === \"unit\" ||\n id === \"decimals\" ||\n id === \"displayName\" ||\n id === \"min\" ||\n id === \"max\" ||\n id === \"noValue\" ||\n id === \"fieldMinMax\" ||\n id === \"filterable\" ||\n id === \"color\" ||\n id === \"thresholds\" ||\n id === \"mappings\" ||\n id === \"links\" ||\n id === \"actions\"\n ) {\n return id;\n }\n if (id.startsWith(\"standardOptions.\"))\n return id.slice(\"standardOptions.\".length);\n if (id.startsWith(\"custom.\")) return id;\n const customKeys = [\n \"drawStyle\",\n \"lineInterpolation\",\n \"lineWidth\",\n \"fillOpacity\",\n \"gradientMode\",\n \"spanNulls\",\n \"showPoints\",\n \"pointSize\",\n \"stacking\",\n \"axisPlacement\",\n \"axisLabel\",\n \"axisSoftMin\",\n \"axisSoftMax\",\n \"axisCenteredZero\",\n \"hideFrom\",\n \"scaleDistribution\",\n \"thresholdsStyle\",\n \"barAlignment\",\n \"lineStyle\",\n \"insertNulls\",\n \"barWidthFactor\",\n ];\n if (customKeys.includes(id)) return `custom.${id}`;\n return id;\n}\n\nfunction setNested(\n config: FieldConfig,\n path: string,\n value: unknown,\n): FieldConfig {\n if (path.startsWith(\"custom.\")) {\n const rest = path.slice(7);\n const custom = { ...(config.custom ?? {}) } as Record<string, unknown>;\n const parts = rest.split(\".\");\n let cur: any = custom;\n for (let i = 0; i < parts.length - 1; i++) {\n cur[parts[i]] =\n cur[parts[i]] && typeof cur[parts[i]] === \"object\"\n ? { ...cur[parts[i]] }\n : {};\n cur = cur[parts[i]];\n }\n cur[parts[parts.length - 1]] = value;\n return { ...config, custom };\n }\n if (path.includes(\".\")) {\n const parts = path.split(\".\");\n const root = { ...(config as any) };\n let cur: any = root;\n for (let i = 0; i < parts.length - 1; i++) {\n cur[parts[i]] =\n cur[parts[i]] && typeof cur[parts[i]] === \"object\"\n ? { ...cur[parts[i]] }\n : {};\n cur = cur[parts[i]];\n }\n cur[parts[parts.length - 1]] = value;\n return root as FieldConfig;\n }\n return { ...config, [path]: value };\n}\n\n/**\n * Apply field config defaults + ordered override rules.\n * Unknown property ids are preserved on the rule (caller) but not applied to field config.\n * Rules execute in array order (Grafana semantics).\n */\nexport function applyFieldOverrides(\n frames: DataFrame[],\n defaults: FieldConfig = {},\n overrides: ConfigOverrideRule[] = [],\n): DataFrame[] {\n const compiled = getCompiledRules(overrides, defaults);\n return frames.map((frame) => ({\n ...frame,\n fields: frame.fields.map((field) => {\n let config: FieldConfig = { ...defaults, ...field.config };\n for (const rule of compiled) {\n if (!rule.match(field, frame, frames)) continue;\n for (const prop of rule.properties) {\n const id = normalizePropId(prop.id);\n // Unknown non-custom properties: do not apply, but keep rule intact (lossless)\n if (!isKnownOverrideProperty(id) && !id.includes(\".\")) {\n continue;\n }\n const processed = processOverrideValue(id, prop.value);\n if (id.startsWith(\"custom.\") || !isKnownOverrideProperty(id)) {\n config = setNested(config, id, processed);\n } else {\n config = applyProcessedProperty(config, id, prop.value);\n }\n if (\n id === \"color\" &&\n prop.value &&\n typeof prop.value === \"object\" &&\n (prop.value as any).fixedColor\n ) {\n config = {\n ...config,\n color: {\n ...(config.color as any),\n ...(prop.value as any),\n mode: (prop.value as any).mode ?? \"fixed\",\n },\n };\n }\n }\n }\n return { ...field, config };\n }),\n }));\n}\n","/**\n * Compile + cache panel pipeline config (transforms + field overrides) by revision.\n * Byte/entry limited LRU (Task 9). Does not change transform semantics.\n */\nimport type { DataFrame, FieldConfig } from \"../types\";\nimport {\n applyFieldOverrides,\n compileOverrideRules,\n type CompiledOverrideRule,\n type ConfigOverrideRule,\n} from \"../fieldOverrides\";\nimport {\n applyTransformations,\n applyTransformationsWithTrace,\n resolveTransformerId,\n type TransformDiagnostic,\n type TransformPipelineResult,\n} from \"../transformations/runner\";\n\nexport type PipelineTransformStep = {\n id: string;\n options?: Record<string, unknown>;\n disabled?: boolean;\n filter?: unknown;\n};\n\nexport type PanelPipelineConfig = {\n transformations?: PipelineTransformStep[];\n fieldConfigDefaults?: FieldConfig;\n fieldConfigOverrides?: ConfigOverrideRule[];\n};\n\nexport type CompiledPanelPipeline = {\n /** Stable content revision of the config. */\n revision: string;\n /** Original transform list (trace path / unknown round-trip). */\n transformations: PipelineTransformStep[];\n /**\n * Fast-path steps: disabled dropped, aliases resolved, sort+limit fused,\n * default options merged. Semantics match applyTransformations.\n */\n fastSteps: PipelineTransformStep[];\n defaults: FieldConfig;\n /** Stable overrides array identity while cache entry lives. */\n overrides: ConfigOverrideRule[];\n /** Precompiled matchers (also cached inside fieldOverrides). */\n compiledOverrides: CompiledOverrideRule[];\n estimatedBytes: number;\n};\n\nconst DEFAULT_MAX_ENTRIES = 64;\nconst DEFAULT_MAX_BYTES = 512 * 1024; // signature + shallow config estimate\n\ntype CacheEntry = {\n revision: string;\n compiled: CompiledPanelPipeline;\n bytes: number;\n};\n\nconst cache = new Map<string, CacheEntry>();\nlet cacheBytes = 0;\nlet maxEntries = DEFAULT_MAX_ENTRIES;\nlet maxBytes = DEFAULT_MAX_BYTES;\n\nconst DEFAULT_OPTIONS: Record<string, Record<string, unknown>> = {\n limit: { limitField: 10 },\n sortBy: { sort: [] },\n reduce: { reducers: [\"sum\"] },\n histogram: { bucketCount: 10 },\n smoothing: { windowSize: 3 },\n filterByValue: { type: \"include\", filters: [] },\n prepareTimeSeries: { format: \"multi\" },\n};\n\nfunction readLimitOption(\n options: Record<string, unknown> | undefined,\n): number | undefined {\n if (!options) return undefined;\n const raw = options.limit ?? options.limitField ?? options.limitValue;\n if (raw == null) return undefined;\n const n = Math.floor(Number(raw));\n return Number.isFinite(n) && n >= 0 ? n : undefined;\n}\n\nfunction tryFuseSortLimit(\n steps: PipelineTransformStep[],\n index: number,\n): { fused: PipelineTransformStep; skipNext: boolean } | null {\n const cur = steps[index];\n const next = steps[index + 1];\n if (!cur || !next) return null;\n if (cur.disabled || next.disabled) return null;\n const curId = resolveTransformerId(cur.id);\n const nextId = resolveTransformerId(next.id);\n if (curId !== \"sortBy\" || nextId !== \"limit\") return null;\n if (JSON.stringify(cur.filter ?? null) !== JSON.stringify(next.filter ?? null)) {\n return null;\n }\n const lim = readLimitOption(next.options);\n if (lim == null) return null;\n const defaults = DEFAULT_OPTIONS.sortBy ?? {};\n return {\n fused: {\n id: \"sortBy\",\n filter: cur.filter,\n options: {\n ...defaults,\n ...(cur.options || {}),\n limit: lim,\n limitField: lim,\n limitValue: lim,\n },\n },\n skipNext: true,\n };\n}\n\n/** Build fast-path steps: resolve aliases, merge defaults, fuse sort→limit. */\nexport function compileTransformSteps(\n transformations: PipelineTransformStep[] = [],\n): PipelineTransformStep[] {\n const out: PipelineTransformStep[] = [];\n const src = transformations ?? [];\n for (let i = 0; i < src.length; i++) {\n const t = src[i];\n if (t.disabled) continue;\n const fuse = tryFuseSortLimit(src, i);\n if (fuse) {\n out.push(fuse.fused);\n if (fuse.skipNext) i += 1;\n continue;\n }\n const resolvedId = resolveTransformerId(t.id);\n const defaults = DEFAULT_OPTIONS[resolvedId] ?? DEFAULT_OPTIONS[t.id] ?? {};\n out.push({\n id: resolvedId,\n filter: t.filter,\n options: { ...defaults, ...(t.options || {}) },\n });\n }\n return out;\n}\n\nfunction estimateConfigBytes(config: PanelPipelineConfig): number {\n // Avoid full JSON.stringify of large option trees on every call — sample keys.\n let n = 128;\n const transforms = config.transformations ?? [];\n n += transforms.length * 64;\n for (const t of transforms) {\n n += String(t.id).length + 16;\n if (t.options) n += Object.keys(t.options).length * 24;\n }\n const overrides = config.fieldConfigOverrides ?? [];\n n += overrides.length * 96;\n for (const r of overrides) {\n n += String(r.matcher?.id ?? \"\").length;\n n += (r.properties?.length ?? 0) * 32;\n }\n const defaults = config.fieldConfigDefaults;\n if (defaults) n += Object.keys(defaults).length * 24 + 32;\n return n;\n}\n\n/**\n * Content revision for pipeline config. Stable across equivalent plain objects.\n * Not a cryptographic hash — collision-resistant enough for cache keys.\n */\nexport function pipelineConfigRevision(config: PanelPipelineConfig): string {\n const transforms = config.transformations ?? [];\n const overrides = config.fieldConfigOverrides ?? [];\n const defaults = config.fieldConfigDefaults ?? {};\n // Structured, bounded signature (no full options deep dump of huge arrays).\n const parts: string[] = [`t${transforms.length}`, `o${overrides.length}`];\n for (let i = 0; i < transforms.length; i++) {\n const t = transforms[i];\n parts.push(\n `${t.disabled ? \"D\" : \"\"}${t.id}:${stableSmallJson(t.options)}:${stableSmallJson(t.filter)}`,\n );\n }\n for (let i = 0; i < overrides.length; i++) {\n const r = overrides[i];\n const props = (r.properties || [])\n .map((p) => `${p.id}=${stableSmallJson(p.value)}`)\n .join(\",\");\n parts.push(\n `m${r.matcher?.id}:${stableSmallJson(r.matcher?.options)}:${props}`,\n );\n }\n parts.push(`d:${stableSmallJson(defaults)}`);\n return parts.join(\"|\");\n}\n\nfunction stableSmallJson(value: unknown): string {\n if (value == null) return \"\";\n if (typeof value === \"string\") return value.length > 64 ? value.slice(0, 64) : value;\n if (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n try {\n const s = JSON.stringify(value);\n return s.length > 256 ? s.slice(0, 256) : s;\n } catch {\n return \"?\";\n }\n}\n\nfunction touch(revision: string, entry: CacheEntry): void {\n // Map preserves insertion order; re-insert for LRU.\n cache.delete(revision);\n cache.set(revision, entry);\n}\n\nfunction evictIfNeeded(): void {\n while (\n (cache.size > maxEntries || cacheBytes > maxBytes) &&\n cache.size > 0\n ) {\n const oldest = cache.keys().next().value as string | undefined;\n if (oldest == null) break;\n const e = cache.get(oldest);\n cache.delete(oldest);\n if (e) cacheBytes -= e.bytes;\n }\n if (cacheBytes < 0) cacheBytes = 0;\n}\n\nexport function getCompiledPipeline(\n config: PanelPipelineConfig,\n): CompiledPanelPipeline {\n const revision = pipelineConfigRevision(config);\n const hit = cache.get(revision);\n if (hit) {\n touch(revision, hit);\n return hit.compiled;\n }\n\n const transformations = (config.transformations ?? []).map((t) => ({\n id: t.id,\n options: t.options ? { ...t.options } : undefined,\n disabled: t.disabled,\n filter: t.filter,\n }));\n const defaults = { ...(config.fieldConfigDefaults ?? {}) };\n const overrides = (config.fieldConfigOverrides ?? []).map((r) => ({\n matcher: { ...(r.matcher || { id: \"\" }) },\n properties: (r.properties || []).map((p) => ({ ...p })),\n }));\n const fastSteps = compileTransformSteps(transformations);\n const compiledOverrides = compileOverrideRules(overrides);\n const estimatedBytes = estimateConfigBytes(config);\n const compiled: CompiledPanelPipeline = {\n revision,\n transformations,\n fastSteps,\n defaults,\n overrides,\n compiledOverrides,\n estimatedBytes,\n };\n const bytes = Math.max(estimatedBytes, revision.length + 64);\n cacheBytes += bytes;\n cache.set(revision, { revision, compiled, bytes });\n evictIfNeeded();\n return compiled;\n}\n\nexport function runCompiledPipeline(\n frames: DataFrame[],\n compiled: CompiledPanelPipeline,\n opts?: { withTrace?: boolean },\n): {\n frames: DataFrame[];\n steps: TransformPipelineResult[\"steps\"];\n diagnostics: TransformDiagnostic[];\n} {\n if (opts?.withTrace) {\n const pipeline = applyTransformationsWithTrace(\n frames,\n compiled.transformations as any,\n );\n const series = applyFieldOverrides(\n pipeline.frames,\n compiled.defaults,\n compiled.overrides,\n );\n return {\n frames: series,\n steps: pipeline.steps,\n diagnostics: pipeline.diagnostics,\n };\n }\n\n // Fast path: pre-fused steps. applyTransformations still clones entry once.\n // Pass steps that already have defaults + fusion so runner fuse is a no-op\n // (sortBy already carries limit; next is not limit).\n const transformed = applyTransformations(\n frames,\n compiled.fastSteps as any,\n );\n const series = applyFieldOverrides(\n transformed,\n compiled.defaults,\n compiled.overrides,\n );\n return { frames: series, steps: [], diagnostics: [] };\n}\n\nexport function clearCompiledPipelineCache(): void {\n cache.clear();\n cacheBytes = 0;\n}\n\nexport function compiledPipelineCacheStats(): {\n entries: number;\n bytes: number;\n maxEntries: number;\n maxBytes: number;\n} {\n return {\n entries: cache.size,\n bytes: cacheBytes,\n maxEntries,\n maxBytes,\n };\n}\n\n/** Test/ops: tighten or restore cache caps. */\nexport function configureCompiledPipelineCache(opts: {\n maxEntries?: number;\n maxBytes?: number;\n}): void {\n if (opts.maxEntries != null) maxEntries = Math.max(1, opts.maxEntries);\n if (opts.maxBytes != null) maxBytes = Math.max(1024, opts.maxBytes);\n evictIfNeeded();\n}\n","/**\n * Shared transferable DataFrame wire format for panel pipeline worker (Task 9).\n */\nimport type { DataFrame, Field, FieldConfig, FieldType } from \"@grafana/data\";\n\nexport type WireField = {\n name: string;\n type: FieldType;\n config: FieldConfig;\n labels?: Record<string, string>;\n /** 'f64' = transferable Float64Array + null mask; 'clone' = structured-clone values. */\n encoding: \"f64\" | \"clone\";\n f64?: Float64Array;\n nulls?: Uint8Array;\n values?: unknown[];\n};\n\nexport type WireFrame = {\n refId?: string;\n name?: string;\n meta?: Record<string, unknown>;\n length: number;\n fields: WireField[];\n};\n\n/** True when every non-null value is a number (not string/uint64/object). */\nexport function canEncodeF64(values: unknown[]): boolean {\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n if (v == null) continue;\n if (typeof v !== \"number\") return false;\n }\n return true;\n}\n\nexport function packFramesForTransfer(frames: DataFrame[]): {\n frames: WireFrame[];\n transfer: Transferable[];\n} {\n const transfer: Transferable[] = [];\n const wire: WireFrame[] = (frames ?? []).map((frame) => {\n const fields: WireField[] = (frame.fields ?? []).map((f) => {\n const values = f.values ?? [];\n const type = f.type;\n const numericLike =\n (type === \"number\" || type === \"time\") && canEncodeF64(values);\n if (numericLike) {\n const f64 = new Float64Array(values.length);\n const nulls = new Uint8Array(values.length);\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n if (v == null) {\n nulls[i] = 1;\n f64[i] = 0;\n } else {\n nulls[i] = 0;\n f64[i] = v as number;\n }\n }\n transfer.push(f64.buffer, nulls.buffer);\n return {\n name: f.name,\n type,\n config: f.config ? { ...f.config } : {},\n labels: f.labels ? { ...f.labels } : undefined,\n encoding: \"f64\" as const,\n f64,\n nulls,\n };\n }\n return {\n name: f.name,\n type,\n config: f.config ? { ...f.config } : {},\n labels: f.labels ? { ...f.labels } : undefined,\n encoding: \"clone\" as const,\n values: values.slice(),\n };\n });\n const len =\n frame.length ??\n fields[0]?.f64?.length ??\n fields[0]?.values?.length ??\n 0;\n return {\n refId: frame.refId,\n name: frame.name,\n meta: frame.meta ? { ...frame.meta } : undefined,\n length: len,\n fields,\n };\n });\n return { frames: wire, transfer };\n}\n\nexport function unpackWireFrames(frames: WireFrame[]): DataFrame[] {\n return (frames ?? []).map((frame) => {\n const fields: Field[] = (frame.fields ?? []).map((f) => {\n if (f.encoding === \"f64\" && f.f64) {\n const n = f.f64.length;\n const values = new Array<number | null>(n);\n const nulls = f.nulls;\n for (let i = 0; i < n; i++) {\n values[i] = nulls && nulls[i] ? null : f.f64[i];\n }\n return {\n name: f.name,\n type: f.type,\n config: f.config ?? {},\n values,\n labels: f.labels,\n };\n }\n return {\n name: f.name,\n type: f.type,\n config: f.config ?? {},\n values: f.values ?? [],\n labels: f.labels,\n };\n });\n return {\n refId: frame.refId,\n name: frame.name,\n meta: frame.meta,\n fields,\n length:\n frame.length ??\n fields.reduce((m, field) => Math.max(m, field.values.length), 0),\n } satisfies DataFrame;\n });\n}\n","/// <reference lib=\"webworker\" />\n/**\n * Worker entry: unpack frames → compiled pipeline → pack result (Task 9).\n * Supports run + cancel; transferable numeric/time columns via packFramesForTransfer.\n */\nimport {\n getCompiledPipeline,\n runCompiledPipeline,\n} from \"@grafana/data\";\n// Side-effect: register transformers in worker scope.\nimport \"@grafana/data\";\nimport {\n packFramesForTransfer,\n unpackWireFrames,\n type WireFrame,\n} from \"./panelPipelineTransfer\";\n\nexport type PanelPipelineWorkerRequest = {\n type?: \"run\" | \"cancel\";\n id: number;\n generation?: number;\n frames?: WireFrame[];\n transformations?: unknown[];\n fieldConfigDefaults?: unknown;\n fieldConfigOverrides?: unknown[];\n requestId?: string;\n};\n\nexport type PanelPipelineWorkerResponse =\n | {\n id: number;\n generation?: number;\n ok: true;\n frames: WireFrame[];\n }\n | {\n id: number;\n generation?: number;\n ok: false;\n error: string;\n aborted?: boolean;\n };\n\n/** Cancelled ids (cleared once observed). */\nconst cancelled = new Set<number>();\n\nexport function handlePanelPipelineMessage(\n msg: PanelPipelineWorkerRequest,\n post: (res: PanelPipelineWorkerResponse, transfer?: Transferable[]) => void,\n): void {\n if (msg == null || msg.id == null) return;\n if (msg.type === \"cancel\") {\n cancelled.add(msg.id);\n return;\n }\n if (cancelled.has(msg.id)) {\n cancelled.delete(msg.id);\n post({\n id: msg.id,\n generation: msg.generation,\n ok: false,\n error: \"aborted\",\n aborted: true,\n });\n return;\n }\n try {\n const series = unpackWireFrames(msg.frames ?? []);\n const compiled = getCompiledPipeline({\n transformations: (msg.transformations as any) ?? [],\n fieldConfigDefaults: (msg.fieldConfigDefaults as any) ?? {},\n fieldConfigOverrides: (msg.fieldConfigOverrides as any) ?? [],\n });\n if (cancelled.has(msg.id)) {\n cancelled.delete(msg.id);\n post({\n id: msg.id,\n generation: msg.generation,\n ok: false,\n error: \"aborted\",\n aborted: true,\n });\n return;\n }\n const out = runCompiledPipeline(series, compiled, { withTrace: false });\n if (cancelled.has(msg.id)) {\n cancelled.delete(msg.id);\n post({\n id: msg.id,\n generation: msg.generation,\n ok: false,\n error: \"aborted\",\n aborted: true,\n });\n return;\n }\n const packed = packFramesForTransfer(out.frames);\n post(\n {\n id: msg.id,\n generation: msg.generation,\n ok: true,\n frames: packed.frames,\n },\n packed.transfer,\n );\n } catch (e) {\n post({\n id: msg.id,\n generation: msg.generation,\n ok: false,\n error: e instanceof Error ? e.message : String(e),\n });\n }\n}\n\nfunction onMessage(ev: MessageEvent<PanelPipelineWorkerRequest>) {\n handlePanelPipelineMessage(ev.data, (res, transfer) => {\n const scope = self as DedicatedWorkerGlobalScope;\n if (transfer?.length) scope.postMessage(res, transfer);\n else scope.postMessage(res);\n });\n}\n\nconst isDedicatedWorker =\n typeof WorkerGlobalScope !== \"undefined\" &&\n typeof self !== \"undefined\" &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope;\n\nif (isDedicatedWorker) {\n (self as DedicatedWorkerGlobalScope).onmessage = onMessage;\n}\n\nexport { onMessage as handlePanelPipelineWorkerMessage };\n"],"names":["DEFAULT_OPTIONS","hit","readLimitOption","tryFuseSortLimit","n"],"mappings":";;AAOA,QAAM,+BAAe,IAAA;AAMd,WAAS,eAAe,IAAuC;AACpE,WAAO,SAAS,IAAI,EAAE;AAAA,EACxB;ACNA,QAAM,UAAkC;AAAA;AAAA,IAEtC,cAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,EACnB;AAEA,QAAMA,oBAA2D;AAAA,IAC/D,OAAO,EAAE,YAAY,GAAA;AAAA,IACrB,QAAQ,EAAE,MAAM,GAAC;AAAA,IACjB,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAA;AAAA,IAC1B,WAAW,EAAE,aAAa,GAAA;AAAA,IAC1B,WAAW,EAAE,YAAY,EAAA;AAAA,IACzB,eAAe,EAAE,MAAM,WAAW,SAAS,CAAA,EAAC;AAAA,IAC5C,mBAAmB,EAAE,QAAQ,QAAA;AAAA,EAC/B;AAQO,WAAS,qB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,UAAI,UAAU,OAAQ,OAAM,YAAY,KAAK,QAAQ;AAAA,UAChD,OAAM,YAAY,GAAG;AAAA,IAC5B,CAAC;AAAA,EACH;AAEA,QAAM,oBACJ,OAAO,sBAAsB,eAC7B,OAAO,SAAS;AAAA,EAEhB,gBAAgB;AAElB,MAAI,mBAAmB;AACpB,SAAoC,YAAY;AAAA,EACnD;;"}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,6 +3,10 @@ import { Component } from "vue";
import { AxiosAdapter, AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
import * as vue from "vue";
import { InjectionKey } from "vue";
import * as __ from ".";
import { TablePaginationConfig } from "ant-design-vue";
import { CompletionContext, CompletionResult } from "@codemirror/autocomplete";
import { EditorView } from "@codemirror/view";
import { Tree } from "@lezer/common";
// ----- @grafana/data -----
......@@ -341,6 +345,8 @@ type FrameFilterConfig = string | {
declare function matchFrameFilter(frame: DataFrame, filter: FrameFilterConfig): boolean;
type ApplyTransformationsContext = {
interpolate?: (value: string) => string;
/** When true, WithTrace records frame list after each step (editor debug). */
includeFrameSnapshots?: boolean;
};
type TransformStepSnapshot = {
id: string;
......@@ -358,6 +364,11 @@ type TransformPipelineResult = {
frames: DataFrame[];
steps: TransformStepSnapshot[];
diagnostics: TransformDiagnostic[];
/**
* Frame list after each step (index 0 = input clone).
* Only populated when context.includeFrameSnapshots is true (editor debug).
*/
frameSnapshots?: DataFrame[][];
};
declare function applyTransformationsWithTrace(frames: DataFrame[], transformations?: Array<{
id: string;
......@@ -365,6 +376,10 @@ declare function applyTransformationsWithTrace(frames: DataFrame[], transformati
disabled?: boolean;
filter?: unknown;
}>, context?: ApplyTransformationsContext): TransformPipelineResult;
/**
* Fast path: one entry detach, no step snapshots / fieldNames / rowCounts.
* Use applyTransformationsWithTrace for editor debug.
*/
declare function applyTransformations(frames: DataFrame[], transformations?: Array<{
id: string;
options?: Record<string, unknown>;
......@@ -574,6 +589,14 @@ interface ConfigOverrideRule {
matcher: MatcherConfig;
properties: DynamicConfigValue[];
}
interface CompiledOverrideRule {
match: FieldMatcherFn;
properties: DynamicConfigValue[];
matcher: MatcherConfig;
}
declare function compileOverrideRules(overrides?: ConfigOverrideRule[]): CompiledOverrideRule[];
/** Test/helper: clear compile caches. */
declare function clearFieldOverrideCompileCache(): void;
/** @deprecated prefer matchFieldWithRegistry — kept for existing call sites */
declare function matchField(field: Field, matcher: {
......@@ -1305,8 +1328,92 @@ interface ThemeVisualizationColors {
}
declare function createVisualizationColors(colors: ThemeColors): ThemeVisualizationColors;
export { CLASSIC_PALETTE, CLASSIC_PALETTE_DARK, CLASSIC_PALETTE_LIGHT, DATA_TRANSFORMER_IDS, DataLinkBuiltInVars, DataTransformerID, FALLBACK_COLOR, FieldMatcherID, FieldNamePickerBaseNameMode, LoadingStateEnum, ReducerID, STANDARD_OVERRIDE_PROCESSORS, V1_SCHEMA_VERSION, VariableOrigin, VariableSuggestionsScope, alpha, applyDocumentPatches, applyFieldOverrides, applyGlobalStyles, applyJsonPatch, applyProcessedProperty, applyResolvedTheme, applyTheme2CssVars, applyTransformations, applyTransformationsWithTrace, applyValueMappings, asHexString, asRgbString, buildDataLinkUrl, buildDataLinkVars, colorManipulator, continuousGrYlRd, convertV2DashboardToV1, createColors, createDataFrame, createGlobalStyles, createTheme, createThemeFromPreference, createVisualizationColors, darken, dashboardRoundTrip, dateTime, decomposeColor, defaultRefreshIntervals, detectSourceKind, diffJsonPaths, displayValueToString, emphasize, flattenV2Layout, formatLabels, formatSuggestionToken, formatUnit, formatValue, formatValueWithUnit, formattedValueToString, frameFingerprint, frameHasName, getActiveThreshold, getAtPath, getClassicPalette, getContrastRatio, getContrastText, getDashboardLinkUrl, getDataFrameVars, getDataLinksVariableSuggestions, getDisplayProcessor, getFieldColor, getFieldDisplayName, getFieldLinks, getFieldMatcher, getFieldMatcherInfo, getFieldNameOptions, getFieldSeriesColor, getFrameFieldsDisplayNames, getInterval, getLuminance, getOverrideProcessor, getRawDisplayProcessor, getTemplateVariableSuggestions, getThresholdColor, getTransformer, getValueFormat, groupLabelForScope, hexToRgb, hslToRgb, interpolateDataLinkString, intervalToMs, isKnownOverrideProperty, isV2Dashboard, lighten, listFieldMatchers, listOverridePickerMatchers, listReducerIds, listStandardTransformers, listTransformerIds, listValueFormatIds, matchField, matchFieldWithRegistry, matchFrameFilter, migrateDashboard, migrateV1Dashboard, normalizeBaseNameMode, normalizeDashboard, normalizeDataFrames, palette, parseDashboardDocument, parsePath, preProcessPanelData, preserveUnknownFields, processOverrideValue, rangeUtil_parse, recomposeColor, reduceField, reduceField$1 as reduceFieldFromRegistry, registerTransformer, removeAtPath, resolveDataLink, resolveThemeMode, resolveThemeModeHint, resolveTransformerId, resolveV2Datasource, resolveVizColor, rgbToHex, runMigrations, setAtPath, sortThresholds, standardTransformers, stringToMs, toDataFrameDTO, toSerializableDashboard, v1Migrations, v2ResourceToV1, watchSystemTheme };
export type { AbsoluteTimeRange, AnnotationQuery, ApplyTransformationsContext, ConfigOverrideRule, CreateThemeOptions, DashboardDocumentEnvelope, DashboardModel, DashboardSourceKind, DataFrame, DataLink, DataLinkVars, DataQuery, DataSourceJsonData, DataSourceSettings, DecimalCount, DecomposeColor, DisplayProcessor, DisplayValue, DynamicConfigValue, Field, FieldCalcs, FieldConfig, FieldMatcherFn, FieldMatcherInfo, FieldType, FrameFieldsDisplayNames, FrameFilterConfig, FrameNormalizationContext, GrafanaTheme2, GridPos, JsonPatchOp, LayoutItem, LayoutRow, LoadingState, LoadingStateValue, MatcherConfig, MatcherScope, PaletteKey, PanelData, PanelDataLike, PanelLoadingState, PanelModel, ResolveDataLinkContext, ScopedVars, ThemeColors, ThemeColorsBase, ThemeMode, ThemePreference, ThemeRichColor, ThemeSpacing, ThemeTypography, ThemeVisualizationColors$1 as ThemeVisualizationColors, ThemeVizHue, ThemeVizShade, Threshold, ThresholdsConfig, TimeRange, TimeZone, TransformDiagnostic, TransformPipelineResult, TransformStepSnapshot, TransformerFn, V2DashboardKind, ValueMapping, VariableModel, VariableSuggestion, VariableType };
/**
* Frame revision tokens for skip-work on already-normalized DataFrames (Task 9).
* Uses WeakMap so DataFrame JSON / round-trip stay free of implementation keys.
*/
declare function assignFrameRevision(frame: DataFrame, revision?: number): number;
declare function getFrameRevision(frame: DataFrame): number | undefined;
/** Mark frame as fully normalized at its current (or new) revision. */
declare function markFrameNormalized(frame: DataFrame, revision?: number): number;
/** True when frame was normalized at its current revision (no dirty bump). */
declare function isFrameNormalized(frame: DataFrame): boolean;
/** Invalidate normalization skip without changing object identity. */
declare function bumpFrameRevision(frame: DataFrame): number;
/**
* Context is "already applied" when every provided ctx field is present on meta.custom
* (or top-level preferredVisualisationType). Missing ctx → always true.
*/
declare function frameContextMatches(frame: DataFrame, ctx?: FrameNormalizationContext): boolean;
/** Skip full normalize when same revision is already normalized and ctx matches. */
declare function canSkipNormalize(frame: DataFrame, ctx?: FrameNormalizationContext): boolean;
/** Structural key for a frame set (identity + shape; not full value hash). */
declare function frameSetRevisionKey(frames: DataFrame[]): string;
/**
* Compile + cache panel pipeline config (transforms + field overrides) by revision.
* Byte/entry limited LRU (Task 9). Does not change transform semantics.
*/
type PipelineTransformStep = {
id: string;
options?: Record<string, unknown>;
disabled?: boolean;
filter?: unknown;
};
type PanelPipelineConfig = {
transformations?: PipelineTransformStep[];
fieldConfigDefaults?: FieldConfig;
fieldConfigOverrides?: ConfigOverrideRule[];
};
type CompiledPanelPipeline = {
/** Stable content revision of the config. */
revision: string;
/** Original transform list (trace path / unknown round-trip). */
transformations: PipelineTransformStep[];
/**
* Fast-path steps: disabled dropped, aliases resolved, sort+limit fused,
* default options merged. Semantics match applyTransformations.
*/
fastSteps: PipelineTransformStep[];
defaults: FieldConfig;
/** Stable overrides array identity while cache entry lives. */
overrides: ConfigOverrideRule[];
/** Precompiled matchers (also cached inside fieldOverrides). */
compiledOverrides: CompiledOverrideRule[];
estimatedBytes: number;
};
/** Build fast-path steps: resolve aliases, merge defaults, fuse sort→limit. */
declare function compileTransformSteps(transformations?: PipelineTransformStep[]): PipelineTransformStep[];
/**
* Content revision for pipeline config. Stable across equivalent plain objects.
* Not a cryptographic hash — collision-resistant enough for cache keys.
*/
declare function pipelineConfigRevision(config: PanelPipelineConfig): string;
declare function getCompiledPipeline(config: PanelPipelineConfig): CompiledPanelPipeline;
declare function runCompiledPipeline(frames: DataFrame[], compiled: CompiledPanelPipeline, opts?: {
withTrace?: boolean;
}): {
frames: DataFrame[];
steps: TransformPipelineResult["steps"];
diagnostics: TransformDiagnostic[];
};
declare function clearCompiledPipelineCache(): void;
declare function compiledPipelineCacheStats(): {
entries: number;
bytes: number;
maxEntries: number;
maxBytes: number;
};
/** Test/ops: tighten or restore cache caps. */
declare function configureCompiledPipelineCache(opts: {
maxEntries?: number;
maxBytes?: number;
}): void;
export { CLASSIC_PALETTE, CLASSIC_PALETTE_DARK, CLASSIC_PALETTE_LIGHT, DATA_TRANSFORMER_IDS, DataLinkBuiltInVars, DataTransformerID, FALLBACK_COLOR, FieldMatcherID, FieldNamePickerBaseNameMode, LoadingStateEnum, ReducerID, STANDARD_OVERRIDE_PROCESSORS, V1_SCHEMA_VERSION, VariableOrigin, VariableSuggestionsScope, alpha, applyDocumentPatches, applyFieldOverrides, applyGlobalStyles, applyJsonPatch, applyProcessedProperty, applyResolvedTheme, applyTheme2CssVars, applyTransformations, applyTransformationsWithTrace, applyValueMappings, asHexString, asRgbString, assignFrameRevision, buildDataLinkUrl, buildDataLinkVars, bumpFrameRevision, canSkipNormalize, clearCompiledPipelineCache, clearFieldOverrideCompileCache, colorManipulator, compileOverrideRules, compileTransformSteps, compiledPipelineCacheStats, configureCompiledPipelineCache, continuousGrYlRd, convertV2DashboardToV1, createColors, createDataFrame, createGlobalStyles, createTheme, createThemeFromPreference, createVisualizationColors, darken, dashboardRoundTrip, dateTime, decomposeColor, defaultRefreshIntervals, detectSourceKind, diffJsonPaths, displayValueToString, emphasize, flattenV2Layout, formatLabels, formatSuggestionToken, formatUnit, formatValue, formatValueWithUnit, formattedValueToString, frameContextMatches, frameFingerprint, frameHasName, frameSetRevisionKey, getActiveThreshold, getAtPath, getClassicPalette, getCompiledPipeline, getContrastRatio, getContrastText, getDashboardLinkUrl, getDataFrameVars, getDataLinksVariableSuggestions, getDisplayProcessor, getFieldColor, getFieldDisplayName, getFieldLinks, getFieldMatcher, getFieldMatcherInfo, getFieldNameOptions, getFieldSeriesColor, getFrameFieldsDisplayNames, getFrameRevision, getInterval, getLuminance, getOverrideProcessor, getRawDisplayProcessor, getTemplateVariableSuggestions, getThresholdColor, getTransformer, getValueFormat, groupLabelForScope, hexToRgb, hslToRgb, interpolateDataLinkString, intervalToMs, isFrameNormalized, isKnownOverrideProperty, isV2Dashboard, lighten, listFieldMatchers, listOverridePickerMatchers, listReducerIds, listStandardTransformers, listTransformerIds, listValueFormatIds, markFrameNormalized, matchField, matchFieldWithRegistry, matchFrameFilter, migrateDashboard, migrateV1Dashboard, normalizeBaseNameMode, normalizeDashboard, normalizeDataFrames, palette, parseDashboardDocument, parsePath, pipelineConfigRevision, preProcessPanelData, preserveUnknownFields, processOverrideValue, rangeUtil_parse, recomposeColor, reduceField, reduceField$1 as reduceFieldFromRegistry, registerTransformer, removeAtPath, resolveDataLink, resolveThemeMode, resolveThemeModeHint, resolveTransformerId, resolveV2Datasource, resolveVizColor, rgbToHex, runCompiledPipeline, runMigrations, setAtPath, sortThresholds, standardTransformers, stringToMs, toDataFrameDTO, toSerializableDashboard, v1Migrations, v2ResourceToV1, watchSystemTheme };
export type { AbsoluteTimeRange, AnnotationQuery, ApplyTransformationsContext, CompiledOverrideRule, CompiledPanelPipeline, ConfigOverrideRule, CreateThemeOptions, DashboardDocumentEnvelope, DashboardModel, DashboardSourceKind, DataFrame, DataLink, DataLinkVars, DataQuery, DataSourceJsonData, DataSourceSettings, DecimalCount, DecomposeColor, DisplayProcessor, DisplayValue, DynamicConfigValue, Field, FieldCalcs, FieldConfig, FieldMatcherFn, FieldMatcherInfo, FieldType, FrameFieldsDisplayNames, FrameFilterConfig, FrameNormalizationContext, GrafanaTheme2, GridPos, JsonPatchOp, LayoutItem, LayoutRow, LoadingState, LoadingStateValue, MatcherConfig, MatcherScope, PaletteKey, PanelData, PanelDataLike, PanelLoadingState, PanelModel, PanelPipelineConfig, PipelineTransformStep, ResolveDataLinkContext, ScopedVars, ThemeColors, ThemeColorsBase, ThemeMode, ThemePreference, ThemeRichColor, ThemeSpacing, ThemeTypography, ThemeVisualizationColors$1 as ThemeVisualizationColors, ThemeVizHue, ThemeVizShade, Threshold, ThresholdsConfig, TimeRange, TimeZone, TransformDiagnostic, TransformPipelineResult, TransformStepSnapshot, TransformerFn, V2DashboardKind, ValueMapping, VariableModel, VariableSuggestion, VariableType };
// ----- @grafana/plugin-sdk -----
/**
......@@ -2099,6 +2206,8 @@ declare function isFeatureEnabled(name: string): boolean;
interface QueryRequest extends DataSourceQueryRequest {
panelId?: number;
visible?: boolean;
/** Higher runs first when concurrency is saturated. Default: visible ? 10 : 0 */
priority?: number;
}
type DataSourceApi = DataSourcePluginApi<any, any, any> & {
uid: string;
......@@ -2114,6 +2223,8 @@ interface QuerySchedulerOptions {
resolveDataSource: DataSourceResolver;
cacheTtlMs?: number;
maxCacheEntries?: number;
/** Soft cap on estimated cache payload bytes (Task 7). */
maxCacheBytes?: number;
}
/**
* Vue-native query scheduler (no RxJS).
......@@ -2124,7 +2235,10 @@ declare class QueryScheduler {
private resolveDataSource;
private cacheTtlMs;
private maxCacheEntries;
private maxCacheBytes;
private cacheBytes;
private active;
private inflight;
private queue;
private running;
private cache;
......@@ -2134,12 +2248,33 @@ declare class QueryScheduler {
cancel(requestId: string): void;
cancelAll(): void;
clearCache(): void;
/** Drop queued (not yet running) work — resolve as NotStarted and drain. */
cancelQueued(): void;
private buildCacheKey;
private putCache;
private evictCache;
private enqueue;
private execute;
}
type PriorityQueueItem<T> = {
priority: number;
seq: number;
value: T;
cancelled?: boolean;
};
/** Higher priority first; FIFO among equals via seq. */
declare class QueryPriorityQueue<T> {
private items;
private seq;
get size(): number;
enqueue(value: T, priority: number): PriorityQueueItem<T>;
/** Mark matching queued items cancelled (O(n)); start-time skip is O(1). */
cancelWhere(pred: (value: T) => boolean): number;
dequeue(): T | undefined;
clear(): void;
}
type Dict = Record<string, string>;
declare function setLocale(locale: string): void;
declare function setRTL(rtl: boolean): void;
......@@ -2193,6 +2328,8 @@ interface DataSourceErrorDetails {
ref?: unknown;
/** Comma-separated loaded UIDs for diagnostics. */
loaded?: string;
/** Top-level keys observed on an invalid response body (names only, no values/secrets). */
bodyKeys?: string[];
}
declare function sanitizeErrorText(text: string): string;
declare class DataSourceError extends Error {
......@@ -2494,8 +2631,97 @@ declare function applyGrafanaAuthHeaders(headers?: Record<string, string>): Reco
declare function isGrafanaLiveConfigured(): boolean;
declare function getGrafanaBaseUrl(): string;
export { DataSourceError, GrafanaAuthError, NormalizedHeaders, OFFLINE_STORAGE_KEYS, QueryScheduler, RuntimeDataSourceSettingsError, THEME_STORAGE_KEY, applyCredentialHeaders, applyGrafanaAuthHeaders, axiosHeadersToRecord, backendRequest, backendSrv, clearDatasourceHttpLog, clearQueryInspectorStore, clearRuntimeCredentials, clearRuntimeDataSourceSettings, configureBackendSrv, configureDatasourceHttpClient, configureQueryInspectorStore, configureRuntimeCredentials, configureRuntimeDataSourceSettings, createDataSourceCatalog, createDefaultBootData, createHttpClient, datasourceHttp, getAppHttp, getBackendHttp, getBackendMode, getBootData, getDataSourceByUid, getDataSourceCatalog, getDatasourceHttpClient, getDatasourceHttpLog, getEffectiveDefaultDataSource, getGrafanaAuthSnapshot, getGrafanaAuthToken, getGrafanaBaseUrl, getLiveDashboardBuilders, getQueryInspectorEntry, getQueryInspectorStats, getResourceHttp, getRuntimeCredential, getRuntimeDataSourceSettings, hasPermission, initTheme, isDataSourceError, isFeatureEnabled, isGrafanaLiveConfigured, listDataSources, listQueryInspectorEntries, listRuntimeDataSourceSettings, makeInspectorKey, mergeDataSourceSettings, normalizeDataSourceType, onThemeChange, putQueryInspectorEntry, readUrlTheme, redactToken, registerI18nCatalog, registerLiveDashboardBuilders, requireGrafanaAuthToken, resetDataSourceCatalog, resetHttpClients, resetOfflineStorage, resolveInitialPreference, sanitizeErrorText, saveDataSource, setBootData, setGrafanaAuthToken, setLocale, setRTL, setRuntimeCredential, t, useBootData, useI18n, useLocationService, usePermissions, useTheme, withDataSourceContext };
export type { BackendAdapter, BackendMode, BackendRequestOptions, BackendResponse, BootData, BootUser, CreateHttpClientOptions, DataSourceApi, DataSourceCatalog, DataSourceConfigurationInput, DataSourceErrorCode, DataSourceErrorDetails, DataSourceInstanceSettings, DataSourceListItem, DataSourceRef, DataSourceResolver, DataSourceSummary, DatasourceHttpLogEntry, DatasourceHttpRequest, DatasourceHttpResponse, GrafanaAuthSnapshot, GrafanaAuthSource, HttpClient, HttpClientKind, InspectorEntry, LocationState, QueryRequest, QuerySchedulerOptions, RuntimeCredential, RuntimeCredentialProvider, StreamChunk, ThemeMode, ThemePreference };
type PerfMarkName = "app-shell-painted" | "route-skeleton-painted" | "dashboard-document-ready" | "dashboard-shell-painted" | "dashboard-interactive" | "panel-plugin-ready" | "panel-first-data" | "visible-panels-settled" | "dashboard-settled";
type PerfCounterName = "panelHost.update" | "uplot.build" | "uplot.setData" | "uplot.setSize" | "uplot.destroy" | "query.queued" | "query.started" | "query.cancelled" | "query.deduped" | "query.cacheHit" | "worker.transferBytes" | "dom.rows" | "observer.count" | "listener.count";
type PerfDetail = {
generation?: number | string;
panelId?: string | number;
};
type PerfConfig = {
enabled: boolean;
counters: boolean;
};
declare function configurePerf(opts?: Partial<PerfConfig>): void;
declare function isPerfEnabled(): boolean;
declare function perfMark(name: PerfMarkName, detail?: PerfDetail): void;
declare function perfMeasure(name: string, startMark: PerfMarkName, endMark: PerfMarkName, detail?: PerfDetail): void;
declare function perfCount(name: PerfCounterName, delta?: number, detail?: PerfDetail): void;
declare function getPerfCounters(): Record<string, number>;
declare function getPerfRing(): {
t: number;
type: string;
name: string;
detail?: PerfDetail;
}[];
declare function resetPerf(): void;
declare function listPerfMarkNames(): PerfMarkName[];
/**
* Performance feature flags (Task 17 release ladder).
*
* Stages:
* 1. internal: flags default true in dogfood; ?perfFlag=0 disables
* 2. default-on with rollback: same, documented rollback
* 3. delete old path: after nightly observation
*
* Sources (later wins): defaults → window.__GRAFANA_VUE_PERF_FLAGS__ → ?perfFlag=
*/
type PerfFlags = {
/** Panel DataFrame pipeline Web Worker offload */
panelPipelineWorker: boolean;
/** Progressive query scheduler / visible-first */
progressiveScheduler: boolean;
/** GSelect filter-on-demand for large option lists */
filterOnDemandSelect: boolean;
};
/** Resolve and apply flags once at boot (or after tests reset). */
declare function initPerfFlags(overrides?: Partial<PerfFlags>): PerfFlags;
declare function getPerfFlags(): PerfFlags;
declare function setPerfFlags(next: Partial<PerfFlags>): PerfFlags;
/** Test helper */
declare function __resetPerfFlagsForTests(): void;
/**
* Decide whether DataFrame pipeline work should run in a Worker.
* Small payloads stay on the main thread (ADR 0004).
*/
type PipelineWorkerDecision = {
useWorker: boolean;
reason: "disabled" | "below-threshold" | "above-threshold" | "no-worker";
estimatedBytes: number;
thresholdBytes: number;
};
declare const DEFAULT_PIPELINE_WORKER_THRESHOLD_BYTES: number;
declare function estimateFrameBytes(frames: Array<{
length?: number;
fields?: unknown[];
}> | null | undefined): number;
declare function shouldUsePipelineWorker(input: {
frames?: Array<{
length?: number;
fields?: unknown[];
}> | null;
estimatedBytes?: number;
thresholdBytes?: number;
enabled?: boolean;
}): PipelineWorkerDecision;
/**
* Coalesce streaming partial panel updates to at most one commit per animation frame.
* Latest partial wins; completed state always flushes immediately.
* After dispose(), all further pushes are no-ops (prevents Streaming after Done).
*/
type StreamCommit<T> = {
value: T;
complete: boolean;
};
declare function createStreamCoalescer<T>(commit: (value: T) => void): {
push: (item: StreamCommit<T>) => void;
dispose: () => void;
};
export { DEFAULT_PIPELINE_WORKER_THRESHOLD_BYTES, DataSourceError, GrafanaAuthError, NormalizedHeaders, OFFLINE_STORAGE_KEYS, QueryPriorityQueue, QueryScheduler, RuntimeDataSourceSettingsError, THEME_STORAGE_KEY, __resetPerfFlagsForTests, applyCredentialHeaders, applyGrafanaAuthHeaders, axiosHeadersToRecord, backendRequest, backendSrv, clearDatasourceHttpLog, clearQueryInspectorStore, clearRuntimeCredentials, clearRuntimeDataSourceSettings, configureBackendSrv, configureDatasourceHttpClient, configurePerf, configureQueryInspectorStore, configureRuntimeCredentials, configureRuntimeDataSourceSettings, createDataSourceCatalog, createDefaultBootData, createHttpClient, createStreamCoalescer, datasourceHttp, estimateFrameBytes, getAppHttp, getBackendHttp, getBackendMode, getBootData, getDataSourceByUid, getDataSourceCatalog, getDatasourceHttpClient, getDatasourceHttpLog, getEffectiveDefaultDataSource, getGrafanaAuthSnapshot, getGrafanaAuthToken, getGrafanaBaseUrl, getLiveDashboardBuilders, getPerfCounters, getPerfFlags, getPerfRing, getQueryInspectorEntry, getQueryInspectorStats, getResourceHttp, getRuntimeCredential, getRuntimeDataSourceSettings, hasPermission, initPerfFlags, initTheme, isDataSourceError, isFeatureEnabled, isGrafanaLiveConfigured, isPerfEnabled, listDataSources, listPerfMarkNames, listQueryInspectorEntries, listRuntimeDataSourceSettings, makeInspectorKey, mergeDataSourceSettings, normalizeDataSourceType, onThemeChange, perfCount, perfMark, perfMeasure, putQueryInspectorEntry, readUrlTheme, redactToken, registerI18nCatalog, registerLiveDashboardBuilders, requireGrafanaAuthToken, resetDataSourceCatalog, resetHttpClients, resetOfflineStorage, resetPerf, resolveInitialPreference, sanitizeErrorText, saveDataSource, setBootData, setGrafanaAuthToken, setLocale, setPerfFlags, setRTL, setRuntimeCredential, shouldUsePipelineWorker, t, useBootData, useI18n, useLocationService, usePermissions, useTheme, withDataSourceContext };
export type { BackendAdapter, BackendMode, BackendRequestOptions, BackendResponse, BootData, BootUser, CreateHttpClientOptions, DataSourceApi, DataSourceCatalog, DataSourceConfigurationInput, DataSourceErrorCode, DataSourceErrorDetails, DataSourceInstanceSettings, DataSourceListItem, DataSourceRef, DataSourceResolver, DataSourceSummary, DatasourceHttpLogEntry, DatasourceHttpRequest, DatasourceHttpResponse, GrafanaAuthSnapshot, GrafanaAuthSource, HttpClient, HttpClientKind, InspectorEntry, LocationState, PerfCounterName, PerfDetail, PerfFlags, PerfMarkName, PipelineWorkerDecision, QueryRequest, QuerySchedulerOptions, RuntimeCredential, RuntimeCredentialProvider, StreamChunk, StreamCommit, ThemeMode, ThemePreference };
// ----- @grafana/ui -----
declare const grafanaCssVars: {
......@@ -2577,8 +2803,8 @@ declare function resolveIcon(_name: string): undefined;
/** @deprecated empty for parity surfaces */
declare const iconMap: Record<string, never>;
type __VLS_Props$F = {
variant?: "primary" | "secondary" | "destructive" | "text";
type __VLS_Props$G = {
variant?: "primary" | "secondary" | "destructive" | "text" | "toolbar" | "canvas";
size?: "sm" | "md" | "lg";
disabled?: boolean;
loading?: boolean;
......@@ -2586,41 +2812,44 @@ type __VLS_Props$F = {
testId?: string;
};
declare var __VLS_8$1: {};
type __VLS_Slots$g = {} & {
type __VLS_Slots$h = {} & {
default?: (props: typeof __VLS_8$1) => any;
};
declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$F, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$F> & Readonly<{}>, {
variant: "primary" | "secondary" | "destructive" | "text";
declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$G, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$G> & Readonly<{}>, {
variant: "primary" | "secondary" | "destructive" | "text" | "toolbar" | "canvas";
size: "sm" | "md" | "lg";
htmlType: "button" | "submit" | "reset";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$H: __VLS_WithSlots$g<typeof __VLS_base$g, __VLS_Slots$g>;
declare const _default$H: typeof __VLS_export$H;
declare const __VLS_export$I: __VLS_WithSlots$h<typeof __VLS_base$h, __VLS_Slots$h>;
declare const _default$I: typeof __VLS_export$I;
type __VLS_WithSlots$g<T, S> = T & {
type __VLS_WithSlots$h<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_Props$E = {
type __VLS_Props$F = {
open: boolean;
title?: string;
width?: number | string;
confirmLoading?: boolean;
okText?: string;
cancelText?: string;
/** Grafana Modal primary action — destructive maps to error solid. */
okVariant?: "primary" | "destructive";
hideFooter?: boolean;
testId?: string;
};
declare var __VLS_12$1: {};
type __VLS_Slots$f = {} & {
default?: (props: typeof __VLS_12$1) => any;
declare var __VLS_28: {};
type __VLS_Slots$g = {} & {
default?: (props: typeof __VLS_28) => any;
};
declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$E, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$F, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:open": (args_0: boolean) => any;
ok: () => any;
cancel: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$E> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$F> & Readonly<{
"onUpdate:open"?: ((args_0: boolean) => any) | undefined;
onOk?: (() => any) | undefined;
onCancel?: (() => any) | undefined;
......@@ -2628,11 +2857,13 @@ declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$E, {}, {}, {}, {}, v
width: number | string;
okText: string;
cancelText: string;
okVariant: "primary" | "destructive";
hideFooter: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$G: __VLS_WithSlots$f<typeof __VLS_base$f, __VLS_Slots$f>;
declare const _default$G: typeof __VLS_export$G;
declare const __VLS_export$H: __VLS_WithSlots$g<typeof __VLS_base$g, __VLS_Slots$g>;
declare const _default$H: typeof __VLS_export$H;
type __VLS_WithSlots$f<T, S> = T & {
type __VLS_WithSlots$g<T, S> = T & {
new (): {
$slots: S;
};
......@@ -2644,7 +2875,8 @@ type GSelectOption = {
disabled?: boolean;
options?: GSelectOption[];
};
type __VLS_Props$D = {
type __VLS_Props$E = {
value?: string | number | Array<string | number> | null;
options?: GSelectOption[];
placeholder?: string;
......@@ -2659,46 +2891,61 @@ type __VLS_Props$D = {
filterOption?: boolean | ((input: string, option: any) => boolean);
/** Disable virtual list when options must all be clickable without scroll (e.g. viz picker). */
virtual?: boolean;
};
declare const __VLS_export$F: vue.DefineComponent<__VLS_Props$D, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
/**
* When true (or when options.length >= filterOnDemandThreshold), search is client-side
* but only a bounded window of options is passed to Ant Select.
* Parent can also listen to `search` for server-side filtering.
*/
filterOnDemand?: boolean;
/** Option count that auto-enables filter-on-demand. Default 200. */
filterOnDemandThreshold?: number;
/** Max options rendered into the dropdown at once. Default 100. */
maxVisibleOptions?: number;
};
declare const __VLS_export$G: vue.DefineComponent<__VLS_Props$E, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
search: (args_0: string) => any;
change: (args_0: unknown) => any;
"update:value": (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$D> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$E> & Readonly<{
onSearch?: ((args_0: string) => any) | undefined;
onChange?: ((args_0: unknown) => any) | undefined;
"onUpdate:value"?: ((args_0: unknown) => any) | undefined;
}>, {
size: "small" | "middle" | "large";
showSearch: boolean;
virtual: boolean;
filterOnDemand: boolean;
filterOnDemandThreshold: number;
maxVisibleOptions: number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$F: typeof __VLS_export$F;
declare const _default$G: typeof __VLS_export$G;
type __VLS_Props$C = {
type __VLS_Props$D = {
layout?: "horizontal" | "vertical" | "inline";
model?: Record<string, unknown>;
testId?: string;
};
declare var __VLS_11$2: {};
type __VLS_Slots$e = {} & {
type __VLS_Slots$f = {} & {
default?: (props: typeof __VLS_11$2) => any;
};
declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$C, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$D, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
finish: (args_0: Record<string, unknown>) => any;
finishFailed: (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$C> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$D> & Readonly<{
onFinish?: ((args_0: Record<string, unknown>) => any) | undefined;
onFinishFailed?: ((args_0: unknown) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$E: __VLS_WithSlots$e<typeof __VLS_base$e, __VLS_Slots$e>;
declare const _default$E: typeof __VLS_export$E;
declare const __VLS_export$F: __VLS_WithSlots$f<typeof __VLS_base$f, __VLS_Slots$f>;
declare const _default$F: typeof __VLS_export$F;
type __VLS_WithSlots$e<T, S> = T & {
type __VLS_WithSlots$f<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_Props$B = {
type __VLS_Props$C = {
name: string;
size?: number | string;
color?: string;
......@@ -2706,14 +2953,14 @@ type __VLS_Props$B = {
spin?: boolean;
strict?: boolean;
};
declare const __VLS_export$D: vue.DefineComponent<__VLS_Props$B, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$B> & Readonly<{}>, {
declare const __VLS_export$E: vue.DefineComponent<__VLS_Props$C, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$C> & Readonly<{}>, {
strict: boolean;
size: number | string;
spin: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$D: typeof __VLS_export$D;
declare const _default$E: typeof __VLS_export$E;
type __VLS_Props$A = {
type __VLS_Props$B = {
value?: string | number;
modelValue?: string | number;
placeholder?: string;
......@@ -2721,12 +2968,12 @@ type __VLS_Props$A = {
disabled?: boolean;
testId?: string;
};
declare const __VLS_export$C: vue.DefineComponent<__VLS_Props$A, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$D: vue.DefineComponent<__VLS_Props$B, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:value": (args_0: string | number) => any;
focus: (args_0: FocusEvent) => any;
"update:modelValue": (args_0: string | number) => any;
blur: (args_0: FocusEvent) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$A> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$B> & Readonly<{
"onUpdate:value"?: ((args_0: string | number) => any) | undefined;
onFocus?: ((args_0: FocusEvent) => any) | undefined;
"onUpdate:modelValue"?: ((args_0: string | number) => any) | undefined;
......@@ -2734,44 +2981,44 @@ declare const __VLS_export$C: vue.DefineComponent<__VLS_Props$A, {}, {}, {}, {},
}>, {
type: "text" | "number" | "password" | "email" | "url" | "search" | "time" | "date";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$C: typeof __VLS_export$C;
declare const _default$D: typeof __VLS_export$D;
type __VLS_Props$z = {
type __VLS_Props$A = {
checked?: boolean;
disabled?: boolean;
testId?: string;
};
declare const __VLS_export$B: vue.DefineComponent<__VLS_Props$z, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$C: vue.DefineComponent<__VLS_Props$A, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:checked": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$z> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$A> & Readonly<{
"onUpdate:checked"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$B: typeof __VLS_export$B;
declare const _default$C: typeof __VLS_export$C;
type __VLS_Props$y = {
type __VLS_Props$z = {
checked?: boolean;
disabled?: boolean;
testId?: string;
};
declare var __VLS_10$1: {};
type __VLS_Slots$d = {} & {
default?: (props: typeof __VLS_10$1) => any;
declare var __VLS_10$2: {};
type __VLS_Slots$e = {} & {
default?: (props: typeof __VLS_10$2) => any;
};
declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$y, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$z, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:checked": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$y> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$z> & Readonly<{
"onUpdate:checked"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$A: __VLS_WithSlots$d<typeof __VLS_base$d, __VLS_Slots$d>;
declare const _default$A: typeof __VLS_export$A;
declare const __VLS_export$B: __VLS_WithSlots$e<typeof __VLS_base$e, __VLS_Slots$e>;
declare const _default$B: typeof __VLS_export$B;
type __VLS_WithSlots$d<T, S> = T & {
type __VLS_WithSlots$e<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_Props$x = {
type __VLS_Props$y = {
activeKey?: string;
items: Array<{
key: string;
......@@ -2781,107 +3028,233 @@ type __VLS_Props$x = {
};
declare var __VLS_17: string;
declare var __VLS_18: {};
type __VLS_Slots$c = {} & {
type __VLS_Slots$d = {} & {
[K in NonNullable<typeof __VLS_17>]?: (props: typeof __VLS_18) => any;
};
declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$x, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$y, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:activeKey": (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$x> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$y> & Readonly<{
"onUpdate:activeKey"?: ((args_0: string) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$z: __VLS_WithSlots$c<typeof __VLS_base$c, __VLS_Slots$c>;
declare const _default$z: typeof __VLS_export$z;
declare const __VLS_export$A: __VLS_WithSlots$d<typeof __VLS_base$d, __VLS_Slots$d>;
declare const _default$A: typeof __VLS_export$A;
type __VLS_WithSlots$c<T, S> = T & {
type __VLS_WithSlots$d<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_Props$w = {
type __VLS_Props$x = {
open?: boolean;
title?: string;
/** CSS width — Grafana md ≈ 50vw / min 568px */
width?: number | string;
/** sm | md | lg maps to Grafana drawerSizes */
size?: "sm" | "md" | "lg";
testId?: string;
destroyOnClose?: boolean;
/** Allow left-edge drag resize (Grafana default true) */
resizable?: boolean;
};
declare var __VLS_10: {};
type __VLS_Slots$b = {} & {
default?: (props: typeof __VLS_10) => any;
declare var __VLS_10$1: {};
type __VLS_Slots$c = {} & {
default?: (props: typeof __VLS_10$1) => any;
};
declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$w, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$x, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$w> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$x> & Readonly<{
"onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$y: __VLS_WithSlots$b<typeof __VLS_base$b, __VLS_Slots$b>;
declare const _default$y: typeof __VLS_export$y;
}>, {
width: number | string;
size: "sm" | "md" | "lg";
destroyOnClose: boolean;
resizable: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$z: __VLS_WithSlots$c<typeof __VLS_base$c, __VLS_Slots$c>;
declare const _default$z: typeof __VLS_export$z;
type __VLS_WithSlots$b<T, S> = T & {
type __VLS_WithSlots$c<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_Props$v = {
type __VLS_Props$w = {
title?: string;
};
declare var __VLS_8: {};
type __VLS_Slots$a = {} & {
type __VLS_Slots$b = {} & {
default?: (props: typeof __VLS_8) => any;
};
declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$v, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$v> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$x: __VLS_WithSlots$a<typeof __VLS_base$a, __VLS_Slots$a>;
declare const _default$x: typeof __VLS_export$x;
declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$w, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$w> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$y: __VLS_WithSlots$b<typeof __VLS_base$b, __VLS_Slots$b>;
declare const _default$y: typeof __VLS_export$y;
type __VLS_WithSlots$a<T, S> = T & {
type __VLS_WithSlots$b<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_Props$u = {
type RowRecord = Record<string, unknown>;
type __VLS_Props$v = {
columns: Array<Record<string, unknown>>;
dataSource: Array<Record<string, unknown>>;
/** Full or non-virtual rows. Ignored for body rows when getRow is provided. */
dataSource?: RowRecord[];
loading?: boolean;
testId?: string;
pagination?: boolean | Record<string, unknown>;
size?: "small" | "middle" | "large";
bordered?: boolean;
showHeader?: boolean;
scroll?: {
x?: string | number | true;
y?: string | number;
};
rowClassName?: string | ((record: RowRecord, index: number) => string);
customRow?: (record: RowRecord, index?: number) => Record<string, unknown>;
/** Enable fixed-height windowed rendering. */
virtual?: boolean;
/** Fixed row height in px (dynamic heights unsupported — use ellipsis). */
rowHeight?: number;
/** Logical row count when using getRow. Defaults to dataSource.length. */
rowCount?: number;
/** Lazy row factory: index is into the full logical list (0..rowCount). */
getRow?: (index: number) => RowRecord;
/**
* Reactive dependency the parent should pass (e.g. rowIndices / frame)
* so window re-materializes when sort/filter/data changes.
*/
rowsDep?: unknown;
rowKey?: string | ((record: RowRecord) => string);
};
declare const __VLS_export$w: vue.DefineComponent<__VLS_Props$u, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$u> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$w: typeof __VLS_export$w;
declare var __VLS_10: {};
type __VLS_Slots$a = {} & {
footer?: (props: typeof __VLS_10) => any;
};
declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$v, {
/** Test / debug helpers */
getVisibleRange: () => __.GTableVisibleRange;
getScrollTop: () => number;
setScrollTop: (v: number) => void;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
change: (pagination: TablePaginationConfig, filters: Record<string, unknown>, sorter: unknown, extra: unknown) => any;
scroll: (payload: {
scrollTop: number;
clientHeight: number;
}) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$v> & Readonly<{
onChange?: ((pagination: TablePaginationConfig, filters: Record<string, unknown>, sorter: unknown, extra: unknown) => any) | undefined;
onScroll?: ((payload: {
scrollTop: number;
clientHeight: number;
}) => any) | undefined;
}>, {
rowHeight: number;
size: "small" | "middle" | "large";
virtual: boolean;
bordered: boolean;
dataSource: RowRecord[];
showHeader: boolean;
rowKey: string | ((record: RowRecord) => string);
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$x: __VLS_WithSlots$a<typeof __VLS_base$a, __VLS_Slots$a>;
declare const _default$x: typeof __VLS_export$x;
type __VLS_Props$t = {
value?: string;
language?: string;
height?: string | number;
type __VLS_WithSlots$a<T, S> = T & {
new (): {
$slots: S;
};
};
/**
* Fixed-height table virtualization window.
* Shared by GTable; panels may keep richer VariableSizeList helpers separately.
*/
declare const GTABLE_VIRT: {
readonly OVERSCAN: 8;
readonly DEFAULT_ROW_HEIGHT: 36;
};
interface GTableVisibleRange {
start: number;
end: number;
offsetY: number;
bottomSpacer: number;
totalHeight: number;
windowCount: number;
}
declare function computeTableVisibleRange(scrollTop: number, viewportHeight: number, rowHeight: number, itemCount: number, overscan?: number): GTableVisibleRange;
type __VLS_Props$u = {
modelValue?: string;
placeholder?: string;
readOnly?: boolean;
disabled?: boolean;
/** When true, Enter emits run (reference LogQuerySearch). */
runOnEnter?: boolean;
/** Optional async/sync completion source. */
completionSource?: (context: CompletionContext) => CompletionResult | null | Promise<CompletionResult | null>;
testId?: string;
invalid?: boolean;
/**
* Optional chip matcher. When a match is valid (validator optional),
* the matched span gets class `gqe-chip` for aggregation-style chips.
*/
chipPattern?: RegExp | null;
/** Return true to decorate the match (default: all matches). */
chipValidate?: ((matched: string, groups: string[]) => boolean) | null;
/** Parent wrap owns border/background (Argus LQS/QAE). */
embedded?: boolean;
/** CM font size in px (Argus agg uses 13). */
fontSize?: number;
/** Accessible name for the contenteditable surface. */
ariaLabel?: string;
};
declare const __VLS_export$v: vue.DefineComponent<__VLS_Props$t, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$w: vue.DefineComponent<__VLS_Props$u, {
focus: () => void | undefined;
getView: () => EditorView | null;
startCompletion: () => boolean | null;
closeCompletion: () => boolean | null;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
change: (args_0: string) => any;
"update:value": (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$t> & Readonly<{
focus: () => any;
"update:modelValue": (args_0: string) => any;
blur: () => any;
run: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$u> & Readonly<{
onChange?: ((args_0: string) => any) | undefined;
"onUpdate:value"?: ((args_0: string) => any) | undefined;
onFocus?: (() => any) | undefined;
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
onBlur?: (() => any) | undefined;
onRun?: (() => any) | undefined;
}>, {
value: string;
height: string | number;
language: string;
disabled: boolean;
placeholder: string;
ariaLabel: string;
modelValue: string;
invalid: boolean;
readOnly: boolean;
runOnEnter: boolean;
chipPattern: RegExp | null;
chipValidate: ((matched: string, groups: string[]) => boolean) | null;
embedded: boolean;
fontSize: number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$v: typeof __VLS_export$v;
declare const _default$w: typeof __VLS_export$w;
type __VLS_Props$s = {
type __VLS_Props$t = {
modelValue?: string | null;
clearable?: boolean;
};
declare const __VLS_export$u: vue.DefineComponent<__VLS_Props$s, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$v: vue.DefineComponent<__VLS_Props$t, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$s> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$t> & Readonly<{
"onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$u: typeof __VLS_export$u;
declare const _default$v: typeof __VLS_export$v;
type __VLS_Props$r = {
type __VLS_Props$s = {
modelValue?: string | {
mode?: string;
fixedColor?: string;
......@@ -2889,12 +3262,12 @@ type __VLS_Props$r = {
/** When true treat as fieldColor object; default simple hex/string */
fieldMode?: boolean;
};
declare const __VLS_export$t: vue.DefineComponent<__VLS_Props$r, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$u: vue.DefineComponent<__VLS_Props$s, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$r> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$s> & Readonly<{
"onUpdate:modelValue"?: ((args_0: unknown) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$t: typeof __VLS_export$t;
declare const _default$u: typeof __VLS_export$u;
type FieldColor = {
mode?: string;
......@@ -2902,16 +3275,16 @@ type FieldColor = {
seriesBy?: "min" | "max" | "last";
gradientColorTo?: string;
};
type __VLS_Props$q = {
type __VLS_Props$r = {
modelValue?: FieldColor | string | null;
byValueSupport?: boolean;
};
declare const __VLS_export$s: vue.DefineComponent<__VLS_Props$q, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$t: vue.DefineComponent<__VLS_Props$r, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: FieldColor) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$q> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$r> & Readonly<{
"onUpdate:modelValue"?: ((args_0: FieldColor) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$s: typeof __VLS_export$s;
declare const _default$t: typeof __VLS_export$t;
interface ThresholdStep {
value: number;
......@@ -2921,15 +3294,15 @@ interface ThresholdsConfig {
mode: "absolute" | "percentage";
steps: ThresholdStep[];
}
type __VLS_Props$p = {
type __VLS_Props$q = {
modelValue?: ThresholdsConfig | null;
};
declare const __VLS_export$r: vue.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$s: vue.DefineComponent<__VLS_Props$q, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: ThresholdsConfig) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$q> & Readonly<{
"onUpdate:modelValue"?: ((args_0: ThresholdsConfig) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$r: typeof __VLS_export$r;
declare const _default$s: typeof __VLS_export$s;
type ValueMapping = {
type: "value";
......@@ -2966,34 +3339,34 @@ type ValueMapping = {
};
}>;
};
type __VLS_Props$o = {
type __VLS_Props$p = {
modelValue?: ValueMapping[] | null;
};
declare const __VLS_export$q: vue.DefineComponent<__VLS_Props$o, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$r: vue.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: ValueMapping[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{
"onUpdate:modelValue"?: ((args_0: ValueMapping[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$q: typeof __VLS_export$q;
declare const _default$r: typeof __VLS_export$r;
interface DataLink {
title?: string;
url?: string;
targetBlank?: boolean;
}
type __VLS_Props$n = {
type __VLS_Props$o = {
modelValue?: DataLink[] | null;
dataFrames?: DataFrame[];
templateVars?: string[];
/** Grafana getVariableValueProperties paths keyed by var name */
templateVarProperties?: Record<string, string[]>;
};
declare const __VLS_export$p: vue.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$q: vue.DefineComponent<__VLS_Props$o, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: DataLink[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
"onUpdate:modelValue"?: ((args_0: DataLink[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$p: typeof __VLS_export$p;
declare const _default$q: typeof __VLS_export$q;
type FieldNameOption = {
label: string;
......@@ -3005,7 +3378,7 @@ type FieldNameOption = {
refId?: string;
};
type __VLS_Props$m = {
type __VLS_Props$n = {
modelValue?: string | null;
/** Flat list of names (legacy) */
fieldNames?: string[];
......@@ -3033,9 +3406,9 @@ type __VLS_Props$m = {
allowClear?: boolean;
includeAuto?: boolean;
};
declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$m, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$p: vue.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
"onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
}>, {
placeholder: string;
......@@ -3044,40 +3417,40 @@ declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$m, {}, {}, {}, {},
baseNameMode: "exclude" | "only" | "default" | string;
includeAuto: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$o: typeof __VLS_export$o;
declare const _default$p: typeof __VLS_export$p;
type __VLS_Props$l = {
type __VLS_Props$m = {
modelValue?: string | string[] | null;
allowMultiple?: boolean;
};
declare const __VLS_export$n: vue.DefineComponent<__VLS_Props$l, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$m, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: string[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
"onUpdate:modelValue"?: ((args_0: string[]) => any) | undefined;
}>, {
allowMultiple: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$n: typeof __VLS_export$n;
declare const _default$o: typeof __VLS_export$o;
type __VLS_Props$k = {
type __VLS_Props$l = {
modelValue?: string[] | null;
};
declare const __VLS_export$m: vue.DefineComponent<__VLS_Props$k, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$n: vue.DefineComponent<__VLS_Props$l, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: string[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
"onUpdate:modelValue"?: ((args_0: string[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$m: typeof __VLS_export$m;
declare const _default$n: typeof __VLS_export$n;
type __VLS_Props$j = {
type __VLS_Props$k = {
modelValue?: string | null;
};
declare const __VLS_export$l: vue.DefineComponent<__VLS_Props$j, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$m: vue.DefineComponent<__VLS_Props$k, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
"onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$l: typeof __VLS_export$l;
declare const _default$m: typeof __VLS_export$m;
interface ActionItem {
type?: string;
......@@ -3086,15 +3459,15 @@ interface ActionItem {
url?: string;
};
}
type __VLS_Props$i = {
type __VLS_Props$j = {
modelValue?: ActionItem[] | null;
};
declare const __VLS_export$k: vue.DefineComponent<__VLS_Props$i, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$l: vue.DefineComponent<__VLS_Props$j, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:modelValue": (args_0: ActionItem[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{
"onUpdate:modelValue"?: ((args_0: ActionItem[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$k: typeof __VLS_export$k;
declare const _default$l: typeof __VLS_export$l;
/** Auto-generated from grafana-main valueFormats/categories.ts — unit catalog for UnitPicker */
interface UnitOption {
......@@ -3108,7 +3481,7 @@ interface UnitCategory {
declare const UNIT_CATEGORIES: UnitCategory[];
declare function flattenUnits(): UnitOption[];
type __VLS_Props$h = {
type __VLS_Props$i = {
width: number;
height: number;
legendPlacement?: "bottom" | "right";
......@@ -3126,13 +3499,13 @@ type __VLS_Slots$9 = {} & {
} & {
legend?: (props: typeof __VLS_3$1) => any;
};
declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {
declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$i, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{}>, {
legendPlacement: "bottom" | "right";
legendMaxHeight: string;
legendMaxWidth: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$j: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
declare const _default$j: typeof __VLS_export$j;
declare const __VLS_export$k: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
declare const _default$k: typeof __VLS_export$k;
type __VLS_WithSlots$9<T, S> = T & {
new (): {
......@@ -3166,16 +3539,16 @@ declare function createDefaultPanelContext(partial?: Partial<PanelContext>): Pan
declare function providePanelContext(ctx: PanelContext): void;
declare function usePanelContext(): PanelContext;
type __VLS_Props$g = {
type __VLS_Props$h = {
value?: Partial<PanelContext>;
};
declare var __VLS_1$5: {};
type __VLS_Slots$8 = {} & {
default?: (props: typeof __VLS_1$5) => any;
};
declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$i: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
declare const _default$i: typeof __VLS_export$i;
declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$j: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
declare const _default$j: typeof __VLS_export$j;
type __VLS_WithSlots$8<T, S> = T & {
new (): {
......@@ -3234,14 +3607,14 @@ interface BigValueProps {
wideLayout?: boolean;
}
declare const __VLS_export$h: vue.DefineComponent<BigValueProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<BigValueProps> & Readonly<{}>, {
declare const __VLS_export$i: vue.DefineComponent<BigValueProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<BigValueProps> & Readonly<{}>, {
width: number;
height: number;
colorMode: BigValueColorMode | string;
graphMode: BigValueGraphMode | string;
wideLayout: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$h: typeof __VLS_export$h;
declare const _default$i: typeof __VLS_export$i;
declare function estimateTextWidth(text: string, fontSize: number, weight?: number): number;
/**
......@@ -3287,17 +3660,17 @@ type VizLegendItem = {
type VizLegendPlacement = "bottom" | "right";
type VizLegendDisplayMode = "list" | "table" | "hidden";
type __VLS_Props$f = {
type __VLS_Props$g = {
items: VizLegendItem[];
placement?: VizLegendPlacement;
displayMode?: VizLegendDisplayMode;
readonly?: boolean;
};
declare const __VLS_export$g: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$h: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"label-click": (item: VizLegendItem, event: MouseEvent) => any;
"label-mouseover": (item: VizLegendItem, event: MouseEvent) => any;
"label-mouseout": (item: VizLegendItem, event: MouseEvent) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{
"onLabel-click"?: ((item: VizLegendItem, event: MouseEvent) => any) | undefined;
"onLabel-mouseover"?: ((item: VizLegendItem, event: MouseEvent) => any) | undefined;
"onLabel-mouseout"?: ((item: VizLegendItem, event: MouseEvent) => any) | undefined;
......@@ -3306,7 +3679,7 @@ declare const __VLS_export$g: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {},
readonly: boolean;
displayMode: VizLegendDisplayMode;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$g: typeof __VLS_export$g;
declare const _default$h: typeof __VLS_export$h;
type VizTooltipMode = "single" | "multi" | "none";
type VizTooltipItem = {
......@@ -3316,7 +3689,7 @@ type VizTooltipItem = {
isActive?: boolean;
};
type __VLS_Props$e = {
type __VLS_Props$f = {
title?: string;
items?: VizTooltipItem[];
mode?: VizTooltipMode;
......@@ -3328,38 +3701,38 @@ type __VLS_Props$e = {
maxWidth?: number | string;
maxHeight?: number | string;
};
declare const __VLS_export$f: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{}>, {
declare const __VLS_export$g: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{}>, {
x: number;
y: number;
mode: VizTooltipMode;
x: number;
items: VizTooltipItem[];
visible: boolean;
floating: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$f: typeof __VLS_export$f;
declare const _default$g: typeof __VLS_export$g;
interface RadioOption {
label: string;
value: string | number | boolean;
disabled?: boolean;
}
type __VLS_Props$d = {
type __VLS_Props$e = {
options: RadioOption[];
value?: string | number | boolean;
disabled?: boolean;
size?: "small" | "middle" | "large";
};
declare const __VLS_export$e: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$f: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:value": (v: string | number | boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{
"onUpdate:value"?: ((v: string | number | boolean) => any) | undefined;
}>, {
options: RadioOption[];
size: "small" | "middle" | "large";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$e: typeof __VLS_export$e;
declare const _default$f: typeof __VLS_export$f;
type __VLS_Props$c = {
type __VLS_Props$d = {
label?: string;
labelWidth?: number;
tooltip?: string;
......@@ -3371,12 +3744,12 @@ declare var __VLS_1$4: {};
type __VLS_Slots$7 = {} & {
default?: (props: typeof __VLS_1$4) => any;
};
declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{}>, {
declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{}>, {
labelWidth: number;
grow: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$d: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
declare const _default$d: typeof __VLS_export$d;
declare const __VLS_export$e: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
declare const _default$e: typeof __VLS_export$e;
type __VLS_WithSlots$7<T, S> = T & {
new (): {
......@@ -3389,8 +3762,8 @@ type __VLS_Slots$6 = {} & {
default?: (props: typeof __VLS_1$3) => any;
};
declare const __VLS_base$6: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
declare const __VLS_export$c: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
declare const _default$c: typeof __VLS_export$c;
declare const __VLS_export$d: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
declare const _default$d: typeof __VLS_export$d;
type __VLS_WithSlots$6<T, S> = T & {
new (): {
......@@ -3398,7 +3771,7 @@ type __VLS_WithSlots$6<T, S> = T & {
};
};
type __VLS_Props$b = {
type __VLS_Props$c = {
text?: string;
color?: "default" | "primary" | "success" | "warning" | "error" | "info";
icon?: string;
......@@ -3407,11 +3780,11 @@ declare var __VLS_1$2: {};
type __VLS_Slots$5 = {} & {
default?: (props: typeof __VLS_1$2) => any;
};
declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{}>, {
declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{}>, {
color: "default" | "primary" | "success" | "warning" | "error" | "info";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$b: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
declare const _default$b: typeof __VLS_export$b;
declare const __VLS_export$c: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
declare const _default$c: typeof __VLS_export$c;
type __VLS_WithSlots$5<T, S> = T & {
new (): {
......@@ -3419,21 +3792,21 @@ type __VLS_WithSlots$5<T, S> = T & {
};
};
type __VLS_Props$a = {
type __VLS_Props$b = {
name: string;
color?: string;
closable?: boolean;
};
declare const __VLS_export$a: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$b: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
remove: () => any;
click: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{
onRemove?: (() => any) | undefined;
onClick?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$a: typeof __VLS_export$a;
declare const _default$b: typeof __VLS_export$b;
type __VLS_Props$9 = {
type __VLS_Props$a = {
title?: string;
severity?: "info" | "success" | "warning" | "error";
closable?: boolean;
......@@ -3442,16 +3815,16 @@ declare var __VLS_1$1: {};
type __VLS_Slots$4 = {} & {
default?: (props: typeof __VLS_1$1) => any;
};
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
close: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
onClose?: (() => any) | undefined;
}>, {
closable: boolean;
severity: "info" | "success" | "warning" | "error";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$9: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
declare const _default$9: typeof __VLS_export$9;
declare const __VLS_export$a: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
declare const _default$a: typeof __VLS_export$a;
type __VLS_WithSlots$4<T, S> = T & {
new (): {
......@@ -3459,7 +3832,7 @@ type __VLS_WithSlots$4<T, S> = T & {
};
};
type __VLS_Props$8 = {
type __VLS_Props$9 = {
title?: string;
href?: string;
disabled?: boolean;
......@@ -3474,9 +3847,9 @@ type __VLS_Slots$3 = {} & {
} & {
actions?: (props: typeof __VLS_5) => any;
};
declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$8: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
declare const _default$8: typeof __VLS_export$8;
declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$9: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
declare const _default$9: typeof __VLS_export$9;
type __VLS_WithSlots$3<T, S> = T & {
new (): {
......@@ -3484,7 +3857,7 @@ type __VLS_WithSlots$3<T, S> = T & {
};
};
type __VLS_Props$7 = {
type __VLS_Props$8 = {
open: boolean;
title?: string;
body?: string;
......@@ -3496,11 +3869,11 @@ declare var __VLS_12: {};
type __VLS_Slots$2 = {} & {
default?: (props: typeof __VLS_12) => any;
};
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:open": (v: boolean) => any;
cancel: () => any;
confirm: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{
"onUpdate:open"?: ((v: boolean) => any) | undefined;
onCancel?: (() => any) | undefined;
onConfirm?: (() => any) | undefined;
......@@ -3510,8 +3883,8 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, v
cancelText: string;
confirmText: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$7: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
declare const _default$7: typeof __VLS_export$7;
declare const __VLS_export$8: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
declare const _default$8: typeof __VLS_export$8;
type __VLS_WithSlots$2<T, S> = T & {
new (): {
......@@ -3519,34 +3892,34 @@ type __VLS_WithSlots$2<T, S> = T & {
};
};
type __VLS_Props$6 = {
type __VLS_Props$7 = {
size?: number;
tip?: string;
};
declare const __VLS_export$6: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{}>, {
declare const __VLS_export$7: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{}>, {
size: number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$6: typeof __VLS_export$6;
declare const _default$7: typeof __VLS_export$7;
type __VLS_Props$5 = {
type __VLS_Props$6 = {
text?: string;
};
declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{}>, {
declare const __VLS_export$6: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{}>, {
text: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$5: typeof __VLS_export$5;
declare const _default$6: typeof __VLS_export$6;
type __VLS_Props$4 = {
type __VLS_Props$5 = {
current?: number;
pageSize?: number;
total?: number;
showSizeChanger?: boolean;
};
declare const __VLS_export$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
change: (page: number, pageSize: number) => any;
"update:current": (n: number) => any;
"update:pageSize": (n: number) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{
onChange?: ((page: number, pageSize: number) => any) | undefined;
"onUpdate:current"?: ((n: number) => any) | undefined;
"onUpdate:pageSize"?: ((n: number) => any) | undefined;
......@@ -3556,27 +3929,27 @@ declare const __VLS_export$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {},
total: number;
showSizeChanger: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$4: typeof __VLS_export$4;
declare const _default$5: typeof __VLS_export$5;
type __VLS_Props$3 = {
type __VLS_Props$4 = {
label?: string;
value?: string | number;
placeholder?: string;
disabled?: boolean;
};
declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
change: (args_0: string | number) => any;
"update:value": (args_0: string | number) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
onChange?: ((args_0: string | number) => any) | undefined;
"onUpdate:value"?: ((args_0: string | number) => any) | undefined;
}>, {
label: string;
placeholder: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$3: typeof __VLS_export$3;
declare const _default$4: typeof __VLS_export$4;
type __VLS_Props$2 = {
type __VLS_Props$3 = {
title?: string;
content?: string;
placement?: "top" | "bottom" | "left" | "right";
......@@ -3588,11 +3961,11 @@ type __VLS_Slots$1 = {} & {
} & {
default?: (props: typeof __VLS_11$1) => any;
};
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{}>, {
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{}>, {
placement: "top" | "bottom" | "left" | "right";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$2: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
declare const _default$2: typeof __VLS_export$2;
declare const __VLS_export$3: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
declare const _default$3: typeof __VLS_export$3;
type __VLS_WithSlots$1<T, S> = T & {
new (): {
......@@ -3600,7 +3973,7 @@ type __VLS_WithSlots$1<T, S> = T & {
};
};
type __VLS_Props$1 = {
type __VLS_Props$2 = {
title?: string;
content?: string;
open?: boolean;
......@@ -3614,16 +3987,16 @@ type __VLS_Slots = {} & {
} & {
default?: (props: typeof __VLS_13) => any;
};
declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_base: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
"update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
"onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {
placement: "top" | "bottom" | "left" | "right";
trigger: "hover" | "click" | "focus";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$1: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default$1: typeof __VLS_export$1;
declare const __VLS_export$2: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default$2: typeof __VLS_export$2;
type __VLS_WithSlots<T, S> = T & {
new (): {
......@@ -3631,26 +4004,40 @@ type __VLS_WithSlots<T, S> = T & {
};
};
type __VLS_Props = {
type __VLS_Props$1 = {
value?: string;
placeholder?: string;
allowRelative?: boolean;
disabled?: boolean;
};
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
declare const __VLS_export$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
change: (args_0: string) => any;
"update:value": (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
onChange?: ((args_0: string) => any) | undefined;
"onUpdate:value"?: ((args_0: string) => any) | undefined;
}>, {
placeholder: string;
allowRelative: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$1: typeof __VLS_export$1;
type __VLS_Props = {
width?: string | number;
height?: string | number;
radius?: string | number;
block?: boolean;
};
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
width: string | number;
height: string | number;
block: boolean;
radius: string | number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;
export { _default$k as ActionsEditor, _default$h as BigValue, BigValueColorMode, BigValueGraphMode, BigValueJustifyMode, BigValueTextMode, _default$t as ColorPicker, _default$p as DataLinksEditor, _default$s as FieldColorEditor, _default$o as FieldNamePicker, _default$9 as GAlert, _default$b as GBadge, _default$H as GButton, _default$8 as GCard, _default$A as GCheckbox, _default$v as GCodeEditor, _default$7 as GConfirmModal, _default as GDatePicker, _default$y as GDrawer, _default$E as GForm, _default$D as GIcon, _default$d as GInlineField, _default$c as GInlineFieldRow, _default$C as GInput, _default$5 as GLoadingPlaceholder, _default$G as GModal, _default$4 as GPagination, _default$1 as GPopover, _default$e as GRadioButtonGroup, _default$3 as GSegmentInput, _default$F as GSelect, _default$6 as GSpinner, _default$B as GSwitch, _default$w as GTable, _default$z as GTabs, _default$a as GTag, _default$2 as GToggletip, _default$x as GTooltip, _default$i as PanelContextProvider, _default$n as StatsPicker, _default$m as StringArrayEditor, _default$r as ThresholdsEditor, _default$l as TimezonePicker, UNIT_CATEGORIES, _default$u as UnitPicker, _default$q as ValueMappingsEditor, _default$j as VizLayout, _default$g as VizLegend, _default$f as VizTooltip, antDesignThemeTokens, applyTextDirection, applyThemeVars, calculateFontSize, computeBigValueLayout, createDefaultPanelContext, createEventBus, detectTextDirection, estimateTextWidth, flattenUnits, getIcon, grafanaCssVars, iconMap, listIconNames, panelContextKey, providePanelContext, registerIcon, resolveIcon, resolveIconName, toDisplayValue, usePanelContext };
export type { BigValueDisplayValue, BigValueLayoutResult, BigValueProps, BigValueTextSizes, EventBus, EventHandler, FieldNameOption, IconDefinition, IconSize, PanelContext, PercentChangeColorMode, SeriesVisibilityChangeMode, TextDirection, ThemeMode, VizLegendDisplayMode, VizLegendItem, VizLegendPlacement, VizTooltipItem, VizTooltipMode };
export { _default$l as ActionsEditor, _default$i as BigValue, BigValueColorMode, BigValueGraphMode, BigValueJustifyMode, BigValueTextMode, _default$u as ColorPicker, _default$q as DataLinksEditor, _default$t as FieldColorEditor, _default$p as FieldNamePicker, _default$a as GAlert, _default$c as GBadge, _default$I as GButton, _default$9 as GCard, _default$B as GCheckbox, _default$8 as GConfirmModal, _default$1 as GDatePicker, _default$z as GDrawer, _default$F as GForm, _default$E as GIcon, _default$e as GInlineField, _default$d as GInlineFieldRow, _default$D as GInput, _default$6 as GLoadingPlaceholder, _default$H as GModal, _default$5 as GPagination, _default$2 as GPopover, _default$w as GQueryExpressionEditor, _default$f as GRadioButtonGroup, _default$4 as GSegmentInput, _default$G as GSelect, _default as GSkeleton, _default$7 as GSpinner, _default$C as GSwitch, GTABLE_VIRT, _default$x as GTable, _default$A as GTabs, _default$b as GTag, _default$3 as GToggletip, _default$y as GTooltip, _default$j as PanelContextProvider, _default$o as StatsPicker, _default$n as StringArrayEditor, _default$s as ThresholdsEditor, _default$m as TimezonePicker, UNIT_CATEGORIES, _default$v as UnitPicker, _default$r as ValueMappingsEditor, _default$k as VizLayout, _default$h as VizLegend, _default$g as VizTooltip, antDesignThemeTokens, applyTextDirection, applyThemeVars, calculateFontSize, computeBigValueLayout, computeTableVisibleRange, createDefaultPanelContext, createEventBus, detectTextDirection, estimateTextWidth, flattenUnits, getIcon, grafanaCssVars, iconMap, listIconNames, panelContextKey, providePanelContext, registerIcon, resolveIcon, resolveIconName, toDisplayValue, usePanelContext };
export type { BigValueDisplayValue, BigValueLayoutResult, BigValueProps, BigValueTextSizes, EventBus, EventHandler, FieldNameOption, GTableVisibleRange, IconDefinition, IconSize, PanelContext, PercentChangeColorMode, SeriesVisibilityChangeMode, TextDirection, ThemeMode, VizLegendDisplayMode, VizLegendItem, VizLegendPlacement, VizTooltipItem, VizTooltipMode };
// ----- @grafana/panels -----
/** Panel plugin IDs — pure list, no registration side effects. */
......@@ -4076,8 +4463,25 @@ declare function buildQueryBodyForType(type: string, queries: DataQuery[], range
intervalMs?: number;
}): DsQueryRequestBody;
export { DATASOURCE_IDS, DS_TYPE_LABELS, buildQueryBodyForType, catalogCoversDatasourceIds, computeStepMs, createBuiltinDataSourceApi, createPrometheusDataSource, createSignozDataSource, defaultQueryForType, dsTypeBadge, dsTypeLabel, ensureDatasourceCatalogEntryRegistered, formatDurationProm, formatPromLegend, getBuiltinDatasourceCatalogEntry, hasPrometheusDataSourceFactory, hasSignozDataSourceFactory, interpolatePromMacros, interpolateQuery, isValidPromql, listBuiltinDatasourceCatalog, mapPrometheusResponse, normalizeDsType, parseDurationMs, parsePromqlToAst, queryFieldFamily, registerPrometheusDataSourceFactory, registerSignozDataSourceFactory, resetPrometheusDataSourceFactory, resetSignozDataSourceFactory, sanitizePromqlForLezer, switchQueryDatasource, wireResponseToDataFrames };
export type { AzureMonitorQuery, BuiltinDataSourceId, BuiltinDatasourceCatalogEntry, BuiltinDatasourceCategory, CloudWatchQuery, ElasticsearchQuery, GraphiteQuery, InfluxQuery, JaegerQuery, LokiQuery, PrometheusQuery, PromqlAstParseResult, PromqlDiagnostic, PromqlDiagnosticSeverity, PromqlRange, PyroscopeQuery, QueryFieldFamily, SqlQuery, TempoQuery, TestDataQuery };
interface AssertLiveFramesOptions {
frames: DataFrame[];
datasourceUid: string;
requiredFields?: string[];
requiredBusinessKey?: string;
minRows?: number;
}
declare class LiveAcceptanceError extends Error {
readonly code: string;
constructor(message: string, code: string);
}
/**
* Assert that query frames are real live business data — never empty, offline,
* TestData, random_walk, raw fallback, or error frames.
*/
declare function assertLiveFrames(opts: AssertLiveFramesOptions): void;
export { DATASOURCE_IDS, DS_TYPE_LABELS, LiveAcceptanceError, assertLiveFrames, buildQueryBodyForType, catalogCoversDatasourceIds, computeStepMs, createBuiltinDataSourceApi, createPrometheusDataSource, createSignozDataSource, defaultQueryForType, dsTypeBadge, dsTypeLabel, ensureDatasourceCatalogEntryRegistered, formatDurationProm, formatPromLegend, getBuiltinDatasourceCatalogEntry, hasPrometheusDataSourceFactory, hasSignozDataSourceFactory, interpolatePromMacros, interpolateQuery, isValidPromql, listBuiltinDatasourceCatalog, mapPrometheusResponse, normalizeDsType, parseDurationMs, parsePromqlToAst, queryFieldFamily, registerPrometheusDataSourceFactory, registerSignozDataSourceFactory, resetPrometheusDataSourceFactory, resetSignozDataSourceFactory, sanitizePromqlForLezer, switchQueryDatasource, wireResponseToDataFrames };
export type { AssertLiveFramesOptions, AzureMonitorQuery, BuiltinDataSourceId, BuiltinDatasourceCatalogEntry, BuiltinDatasourceCategory, CloudWatchQuery, ElasticsearchQuery, GraphiteQuery, InfluxQuery, JaegerQuery, LokiQuery, PrometheusQuery, PromqlAstParseResult, PromqlDiagnostic, PromqlDiagnosticSeverity, PromqlRange, PyroscopeQuery, QueryFieldFamily, SqlQuery, TempoQuery, TestDataQuery };
// ----- @grafana/zabbix -----
declare function registerZabbixPlugin(): Promise<void>;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "@grafana/vue",
"version": "1.2.10",
"version": "1.2.11",
"type": "module",
"main": "./dist/index.js",
"main": "./src/index.ts",
"exports": {
".": "./dist/index.js",
"./register": "./dist/register.js",
".": "./src/index.ts",
"./register": "./src/register.ts",
"./package.json": "./package.json"
},
"files": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment