Commit 9f2ec4b5 by 五更

release: v1.0.1

parent 12c4e15d
/**
* ArgusBoard.vue — main entry component for third-party embedding.
*
* Mirrors React's Root + ArgusBoardElement pattern:
* - Accepts ArgusBoardConfig as props
* - Provides config via provide/inject to the whole tree
* - Handles theme, lang, locked, initialConfig side-effects
* - Emits 'save' when user saves the dashboard
*/
import type { ArgusBoardConfig } from './_stores';
type __VLS_Props = {
config?: ArgusBoardConfig;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
save: (json: string) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onSave?: ((json: string) => any) | undefined;
}>, {
config: ArgusBoardConfig;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
/**
* Argus QueryBuilder 客户端
* POST {url}/api/v5/query_range
* GET {url}/api/v5/metrics
* GET {url}/api/v5/attribute_keys
*/
import type { ArgusField, ArgusQueryItem } from '../types/dashboard';
export interface ArgusClientConfig {
url: string;
token: string;
}
export interface ArgusMetricMeta {
metricName: string;
description: string;
type: string;
unit: string;
temporality: string;
isMonotonic: boolean;
}
export interface ArgusMetricsListResponse {
status: string;
data: {
metrics: ArgusMetricMeta[];
};
}
export declare function getMetrics(cfg: ArgusClientConfig): Promise<ArgusMetricMeta[]>;
export interface ArgusAttributeKeysResponse {
data: {
attributeKeys: ArgusField[];
};
}
/**
* Fetch attribute keys for GroupBy autocomplete.
* GET {url}/api/v5/attribute_keys?signal=&metricName=&search=
*/
export declare function getAttributeKeys(cfg: ArgusClientConfig, params: {
signal: string;
metricName?: string;
search?: string;
}): Promise<ArgusField[]>;
export interface ArgusTimeSeriesValue {
timestamp: number;
value: number;
}
export interface ArgusTimeSeries {
labels?: Array<{
key: {
name: string;
};
value: unknown;
}>;
values: ArgusTimeSeriesValue[];
}
export interface ArgusAggregationBucket {
index: number;
alias: string;
series: ArgusTimeSeries[];
}
export interface ArgusQueryResult {
queryName: string;
aggregations: ArgusAggregationBucket[];
}
export interface ArgusQueryRangeResponse {
data: {
results: ArgusQueryResult[];
};
}
export declare function queryRange(queries: ArgusQueryItem[], timeFrom: number, // epoch seconds
timeTill: number, // epoch seconds
cfg: ArgusClientConfig, metricsMap?: Map<string, ArgusMetricMeta>): Promise<ArgusQueryRangeResponse>;
import type { DataFrame, Field } from '@grafana/data';
import type { AlignedData } from 'uplot';
import type { Threshold } from '../types/dashboard';
export interface TimeSeriesData {
timestamps: number[];
series: Array<{
label: string;
values: number[];
}>;
}
export declare function createDataFrame(opts: {
name?: string;
refId?: string;
fields: Array<{
name: string;
type: string;
values: any[];
config?: Record<string, any>;
}>;
}): DataFrame;
export declare function timeSeriesToDataFrame(data: TimeSeriesData, name?: string, unit?: string): DataFrame;
export declare function dataFrameToAlignedData(frame: DataFrame): AlignedData;
export declare function getFieldValues<T = number>(frame: DataFrame, fieldName: string): T[];
export declare function getFieldLabel(field: Field, frame?: DataFrame): string;
export declare function extractTimeField(frame: DataFrame): {
name: string;
timestamps: number[];
};
export declare function getThresholdColor(value: number, thresholds: Threshold[]): string;
import type { DatasourcePlugin } from './types';
export declare function registerDatasource(plugin: DatasourcePlugin<any>): void;
export declare function getDatasource(type: string): DatasourcePlugin | undefined;
export declare function getAllDatasourceMetas(): (import("./types").DatasourcePluginMeta | undefined)[];
export declare function getAllDatasources(): DatasourcePlugin<any>[];
export declare function clearRegistry(): void;
import type { DataQueryRequest, DataQueryResponse } from '../types/datasource';
export interface DatasourcePluginMeta {
type: string;
displayName: string;
icon?: string;
}
export interface QueryEditorProps<TQuery = object> {
query: TQuery;
onChange: (query: TQuery) => void;
datasourceId: string;
isChart: boolean;
}
export interface DatasourcePlugin<TQuery = object> {
type: string;
meta?: DatasourcePluginMeta;
defaultQuery?: () => TQuery;
QueryEditor?: any;
query: (request: DataQueryRequest<TQuery>) => Promise<DataQueryResponse>;
}
export * from './argus/client';
export { createDataFrame, dataFrameToAlignedData, extractTimeField, getFieldLabel, getFieldValues, getThresholdColor, type TimeSeriesData, timeSeriesToDataFrame, } from './dataframe/dataframeAdapter';
export * from './datasource/registry';
export * from './datasource/types';
export { defaultTimeRange, generateBarData, generateTimeSeries, MockDatasourcePlugin, type MetricPattern as MockMetricPattern, randomWalkStep, } from './mock/data';
export * from './panel/chartFormatting';
export * from './panel/colors';
export * from './panel/gaugeDefaults';
export * from './panel/histogram';
export * from './panel/panelDefaults';
export * from './panel/plugins';
export { registerAllPanelPlugins } from './panel/plugins';
export * from './panel/registry';
export * from './panel/statReducer';
export * from './types/dashboard';
export * from './types/datasource';
export * from './types/variables';
export { ConfigBuilder, type ConfigBuilderProps, DistributionType, type ExtendedSeries, FillMode, type LegendItem, SelectionPreferencesSource, } from './uplot/config/types';
export { DrawStyle as UPlotDrawStyle, LineInterpolation as UPlotLineInterpolation, LineStyle as UPlotLineStyle } from './uplot/config/types';
export { UPlotAxisBuilder } from './uplot/config/UPlotAxisBuilder';
export { UPlotConfigBuilder } from './uplot/config/UPlotConfigBuilder';
export { UPlotScaleBuilder } from './uplot/config/UPlotScaleBuilder';
export { UPlotSeriesBuilder } from './uplot/config/UPlotSeriesBuilder';
export { applySpanGapsToAlignedData, type SeriesSpanGapsOption, } from './uplot/dataUtils';
export { getStoredSeriesVisibility, type SeriesVisibilityItem, updateSeriesVisibilityToLocalStorage, } from './uplot/legendVisibilityUtils';
export { VariableDependencyGraph } from './variable/variableDependencyGraph';
export * from './variable/variableParser';
export * from './zabbix/client';
export * from './zabbix/funcDefs';
export { isEqual } from 'lodash-es';
import type { MockDataSource } from '../types/dashboard';
import type { DataQueryRequest, DataQueryResponse } from '../types/datasource';
export type MetricPattern = 'sine' | 'spike' | 'step' | 'sawtooth' | 'noise' | 'trend-up' | 'trend-down' | 'plateau' | 'random-walk' | 'live';
export interface TimeSeriesData {
timestamps: number[];
series: Array<{
label: string;
values: number[];
}>;
}
export declare function generateTimeSeries(range: {
from: number;
to: number;
}, stepSeconds?: number, seriesCount?: number, pattern?: MetricPattern, labels?: string[]): TimeSeriesData;
/** Step one random-walk series forward by one point. */
export declare function randomWalkStep(prev: number, amplitude: number, min: number, max: number): number;
export declare function defaultTimeRange(): {
from: number;
to: number;
};
export declare function generateBarData(range: {
from: number;
to: number;
}, buckets?: number): TimeSeriesData;
export declare class MockDatasourcePlugin {
type: string;
meta: {
type: "mock";
displayName: string;
icon: string;
};
defaultQuery: () => MockDataSource;
query(request: DataQueryRequest<MockDataSource>): Promise<DataQueryResponse>;
}
export declare function formatValue(value: number, unit?: string, decimals?: number): string;
export declare function createAxisFormatter(unit?: string, decimals?: number): (_value: number) => string;
export declare const CHART_UNITS: {
readonly byte: "bytes";
readonly decbyte: "decbytes";
readonly bit: "bits";
readonly percent: "percent";
readonly percentUnit: "percentunit";
readonly millisecond: "ms";
readonly second: "s";
readonly nanosecond: "ns";
readonly reqPerSec: "reqps";
readonly opPerSec: "ops";
readonly bytesPerSec: "Bps";
readonly bitsPerSec: "bps";
readonly none: "none";
};
/** Default classic palette */
export declare const CHART_COLORS: string[];
/**
* Generate a palette by linearly interpolating between anchor colors (RGB space).
*/
export declare function interpolatePalette(anchors: string[], stops: number): string[];
export declare const COLOR_PALETTES: Record<string, string[]>;
export declare function getPalette(schemeId: string | undefined): string[];
export declare function resolveSeriesColors(schemeId: string | undefined, seriesCount: number, distribution?: 'sequential' | 'distributed', singleColor?: string): string[];
export declare const GAUGE_DEFAULTS: {
readonly min: 0;
readonly max: 100;
readonly capRound: true;
readonly trackWidth: 28;
readonly fillWidth: 30;
readonly trackColor: "#F4F5F5";
readonly sweepAngle: 270;
readonly valueColor: "#e6e6e6";
readonly valueSize: 28;
readonly valueVisible: true;
readonly paddingX: 12;
readonly paddingY: 12;
readonly thresholdDisplay: "marker" | "track" | "none";
readonly thresholdLabelDisplay: "label" | "value" | "both" | "none";
readonly orientation: "auto" | "horizontal" | "vertical";
readonly colorFromScheme: false;
readonly valueOffsetY: 18;
};
/**
* buildHistogramBuckets — 将原始数值序列分桶
*/
export declare function buildHistogramBuckets(values: number[], options?: {
bucketSize?: number;
bucketCount?: number;
bucketOffset?: number;
}): {
bucketStarts: number[];
counts: number[];
};
export declare function combineSeriesBuckets(allValues: number[][], options?: Parameters<typeof buildHistogramBuckets>[1]): {
bucketStarts: number[];
counts: number[];
};
import type { GridItem, PanelConfig, PanelType } from '../types/dashboard';
export declare function genPanelId(): string;
export declare function createPanelConfig(type: PanelType, overrides?: Partial<PanelConfig>): PanelConfig;
export declare function createDefaultDashboard(): {
panels: Record<string, PanelConfig>;
layouts: GridItem[];
};
export declare function getDefaultDashboardJSON(): string;
import type { PanelPlugin } from '../registry';
export declare const barPlugin: PanelPlugin;
import type { PanelPlugin } from '../registry';
export declare const gaugePlugin: PanelPlugin;
import type { PanelPlugin } from '../registry';
export declare const histogramPlugin: PanelPlugin;
export declare function registerAllPanelPlugins(): void;
import type { PanelPlugin } from '../registry';
export declare const piePlugin: PanelPlugin;
import type { PanelPlugin } from '../registry';
export declare const statPlugin: PanelPlugin;
import type { PanelPlugin } from '../registry';
export declare const tablePlugin: PanelPlugin;
import type { PanelPlugin } from '../registry';
export declare const timeseriesPlugin: PanelPlugin;
import type { PanelType } from '../types/dashboard';
export interface PanelOptionCategoryProps {
panel: any;
onChange: (patch: any) => void;
numericFieldNames?: string[];
allFieldNames?: string[];
}
export interface PanelOptionCategory {
key: string;
labelKey: string;
Component: any;
}
export interface PanelPluginMeta {
type: PanelType;
displayNameKey: string;
icon?: string;
}
export interface PanelPlugin {
meta: PanelPluginMeta;
optionCategories: PanelOptionCategory[];
}
export declare function registerPanel(plugin: PanelPlugin): void;
export declare function getPanel(type: PanelType): PanelPlugin | undefined;
export declare function getAllPanels(): PanelPlugin[];
import type { StatReducer } from '../types/dashboard';
export declare function isNumericValueType(value_type: string | undefined): boolean;
export declare function applyReducer(values: (number | null)[], reducer?: StatReducer, value_type?: string): number;
export declare function calcPercentChange(values: (number | null)[], value_type?: string): number | null;
import type { DataFrame } from '@grafana/data';
export interface TimeRange {
from: number;
to: number;
}
export interface DataQueryRequest<TQuery = unknown> {
requestId: string;
range: TimeRange;
intervalMs: number;
maxDataPoints: number;
targets: TQuery[];
scopedVars?: Record<string, string | string[]>;
}
export interface DataQueryError {
message: string;
status?: number;
}
export interface DataQueryResponse {
data: DataFrame[];
error?: DataQueryError;
state?: 'Done' | 'Loading' | 'Error';
}
export type VariableType = 'custom' | 'query' | 'textbox' | 'dynamic' | 'datasource' | 'constant';
export interface VariableConfig {
id: string;
name: string;
label: string;
type: VariableType;
hide: boolean;
refresh: 'never' | 'onLoad' | 'onTimeChange';
multi: boolean;
includeAll: boolean;
defaultValue?: string;
customValues?: string;
query?: string;
description?: string;
showOnDashboard?: 'label-and-value' | 'value' | 'nothing';
dsType?: string;
instanceFilterRegex?: string;
targetDsUid?: string;
queryType?: string;
extractRegex?: string;
sortMode?: 'disabled' | 'alphabetical' | 'numeric';
customOptions?: Array<{
text: string;
value: string;
}>;
allValue?: string;
inputWidth?: number;
constantValue?: string;
constantValueType?: 'string' | 'number';
hideFromVariableList?: boolean;
}
export interface VariableOption {
value: string;
label: string;
}
export interface VariableState {
config: VariableConfig;
options: VariableOption[];
current: string | string[];
loading: boolean;
error: string | null;
}
export interface ResolvedVariables {
[name: string]: string | string[] | number;
}
export type VariableFormat = 'single' | 'csv' | 'sql' | 'pipe';
import type { Axis } from 'uplot';
import type { AxisProps } from './types';
import { ConfigBuilder } from './types';
export declare class UPlotAxisBuilder extends ConfigBuilder<AxisProps, Axis> {
private buildGridConfig;
private buildTicksConfig;
private buildXAxisValuesFormatter;
private buildYAxisValuesFormatter;
private buildValuesFormatter;
private buildSizeCalculator;
private buildStrokeColor;
getConfig(): Axis;
merge(props: Partial<AxisProps>): void;
}
export type { AxisProps };
import type { Cursor, Hooks, Options } from 'uplot';
import type uPlot from 'uplot';
import type { SeriesSpanGapsOption } from '../dataUtils';
import type { ThresholdsDrawHookOptions } from '../hooks/types';
import type { ConfigBuilderProps, LegendItem } from './types';
import type { AxisProps } from './UPlotAxisBuilder';
import type { ScaleProps } from './UPlotScaleBuilder';
import type { SeriesProps } from './UPlotSeriesBuilder';
import { ConfigBuilder } from './types';
import { UPlotScaleBuilder } from './UPlotScaleBuilder';
import { UPlotSeriesBuilder } from './UPlotSeriesBuilder';
interface LegendConfig {
show?: boolean;
live?: boolean;
isolate?: boolean;
[key: string]: unknown;
}
export declare class UPlotConfigBuilder extends ConfigBuilder<ConfigBuilderProps, Partial<Options>> {
series: UPlotSeriesBuilder[];
private selectionPreferencesSource;
private shouldSaveSelectionPreference;
private axes;
private stepInterval;
readonly scales: UPlotScaleBuilder[];
private bands;
private cursor;
private hooks;
private plugins;
private padding;
private legend;
private focus;
private select;
private thresholds;
private tzDate;
private id;
private onDragSelect;
constructor(args: ConfigBuilderProps);
getShouldSaveSelectionPreference(): boolean;
getId(): string;
addAxis(props: AxisProps): void;
addScale(props: ScaleProps): void;
addSeries(props: SeriesProps): void;
getSeriesSpanGapsOptions(): SeriesSpanGapsOption[];
addHook<T extends keyof Hooks.Defs>(type: T, hook: Hooks.Defs[T]): () => void;
addPlugin(plugin: uPlot.Plugin): void;
addThresholds(options: ThresholdsDrawHookOptions): void;
setBands(bands: uPlot.Band[]): void;
setCursor(cursor: Cursor): void;
setPadding(padding: [number, number, number, number]): void;
setLegend(legend: LegendConfig): void;
setFocus(focus: uPlot.Focus): void;
setSelect(select: uPlot.Select): void;
setTzDate(tzDate: (timestamp: number) => Date): void;
getCursorConfig(): Cursor;
private getStoredVisibility;
private getVisibilityResolutionState;
getLegendItems(): Record<number, LegendItem>;
getConfig(): Partial<Options>;
}
export {};
import type { Scale } from 'uplot';
import type { ScaleProps } from './types';
import { ConfigBuilder } from './types';
export declare class UPlotScaleBuilder extends ConfigBuilder<ScaleProps, Record<string, Scale>> {
private softMin;
private softMax;
private min;
private max;
constructor(props: ScaleProps);
getConfig(): Record<string, Scale>;
merge(props: Partial<ScaleProps>): void;
}
export type { ScaleProps };
import type { ExtendedSeries, SeriesProps } from './types';
import { ConfigBuilder } from './types';
export declare const POINT_SIZE_FACTOR = 2.5;
export declare class UPlotSeriesBuilder extends ConfigBuilder<SeriesProps, ExtendedSeries> {
constructor(props: SeriesProps);
private getLineColor;
private buildLineConfig;
private buildPathConfig;
private resolvePointsShow;
private shouldApplyIsolatedPointFilter;
private buildPointsConfig;
getConfig(): ExtendedSeries;
merge(props: Partial<SeriesProps>): void;
}
export type { SeriesProps };
import type { Series } from 'uplot';
import type uPlot from 'uplot';
export declare abstract class ConfigBuilder<P, T> {
props: P;
constructor(props: P);
abstract getConfig(): T;
merge?(props: Partial<P>): void;
}
export declare enum SelectionPreferencesSource {
LOCAL_STORAGE = "LOCAL_STORAGE",
IN_MEMORY = "IN_MEMORY"
}
export interface ConfigBuilderProps {
id: string;
onDragSelect?: (startTime: number, endTime: number) => void;
tzDate?: uPlot.LocalDateFromUnix;
selectionPreferencesSource?: SelectionPreferencesSource;
shouldSaveSelectionPreference?: boolean;
stepInterval?: number;
}
export declare enum DistributionType {
Linear = "linear",
Logarithmic = "logarithmic",
Symlog = "symlog"
}
export declare enum DrawStyle {
Lines = "lines",
Bars = "bars",
Points = "points",
Histogram = "histogram"
}
export declare enum LineInterpolation {
Linear = "linear",
Smooth = "smooth",
StepBefore = "stepBefore",
StepAfter = "stepAfter"
}
export declare enum LineStyle {
Solid = "solid",
Dashed = "dashed",
Dotted = "dotted"
}
export declare enum FillMode {
None = "none",
Solid = "solid",
Gradient = "gradient"
}
export declare enum BarAlignment {
Before = -1,
Center = 0,
After = 1
}
export interface AxisProps {
scaleKey: string;
label?: string;
show?: boolean;
side?: 0 | 1 | 2 | 3;
stroke?: string;
grid?: {
stroke?: string;
width?: number;
show?: boolean;
};
ticks?: {
stroke?: string;
width?: number;
show?: boolean;
size?: number;
};
border?: {
show?: boolean;
stroke?: string;
width?: number;
};
values?: uPlot.Axis.Values;
gap?: number;
size?: uPlot.Axis.Size;
formatValue?: (v: number) => string;
space?: number;
isDarkMode?: boolean;
isLogScale?: boolean;
isTimeAxis?: boolean;
yAxisUnit?: string;
decimalPrecision?: number;
}
export interface ScaleProps {
scaleKey: string;
time?: boolean;
min?: number;
max?: number;
softMin?: number;
softMax?: number;
range?: uPlot.Range.MinMax | ((u: uPlot, min: number, max: number) => uPlot.Range.MinMax);
distribution?: DistributionType;
logBase?: number;
padMinBy?: number;
padMaxBy?: number;
auto?: boolean;
thresholds?: {
thresholds: import('../hooks/types').Threshold[];
yAxisUnit?: string;
};
}
export interface SeriesProps {
scaleKey?: string;
label?: string;
show?: boolean;
colorMapping?: Record<string, string>;
lineColor?: string;
isDarkMode?: boolean;
drawStyle?: DrawStyle;
lineInterpolation?: LineInterpolation;
lineStyle?: LineStyle;
fillMode?: FillMode;
fillOpacity?: number;
fillColor?: string;
lineWidth?: number;
pointSize?: number;
showPoints?: boolean;
barAlignment?: BarAlignment;
barMaxWidth?: number;
barWidthFactor?: number;
stepInterval?: number;
pathBuilder?: Series.PathBuilder;
pointsBuilder?: Series.Points.Show;
pointsFilter?: Series.Points.Filter;
spanGaps?: number | boolean;
lineCap?: CanvasLineCap;
color?: string;
metric?: Record<string, string>;
}
export type ExtendedSeries = Series & {
metric?: Record<string, string>;
};
export interface LegendItem {
seriesIndex: number;
label: string;
color: string;
show: boolean;
yAxis: number;
}
import type { Cursor, Options } from 'uplot';
export declare const DEFAULT_HOVER_PROXIMITY_VALUE = 30;
export declare const DEFAULT_FOCUS_PROXIMITY_VALUE = 1000000;
export declare const STEP_INTERVAL_MULTIPLIER = 3;
export declare const DEFAULT_PLOT_CONFIG: Partial<Options>;
export declare const DEFAULT_CURSOR_CONFIG: Cursor;
/**
* Checks if a value is invalid for plotting
*
* @param value - The value to check
* @returns true if the value is invalid (should be replaced with null), false otherwise
*/
export declare function isInvalidPlotValue(value: unknown): boolean;
export declare function normalizePlotValue(value: number | string | null | undefined): number | null;
export interface SeriesSpanGapsOption {
spanGaps?: boolean | number;
}
/**
* For each series with a numeric spanGaps threshold, insert a null data point
* between consecutive x timestamps whose gap exceeds the threshold.
*
* Why: uPlot draws a continuous line between all non-null points. When the
* time gap between two consecutive samples is larger than the configured
* spanGaps value, we inject a synthetic null at the midpoint so uPlot renders
* a visible break instead of a misleading straight line across the gap.
*
* Because uPlot's AlignedData shares a single x-axis across all series, a null
* is inserted for every series at each position where any series needs a break.
*
* Two-pass approach for performance:
* Pass 1 — count how many nulls will be inserted (no allocations).
* Pass 2 — fill pre-allocated output arrays by index (no push/reallocation).
*/
export declare function insertLargeGapNullsIntoAlignedData(data: uPlot.AlignedData, seriesOptions: SeriesSpanGapsOption[]): uPlot.AlignedData;
/**
* Apply per-series spanGaps (boolean | number) handling to an aligned dataset.
*
* spanGaps controls how uPlot handles gaps in a series:
* - boolean true → convert null → undefined so uPlot spans over every gap
* (draws a continuous line, skipping missing samples)
* - boolean false → no change; nulls render as visible breaks (default)
* - number → insert a null break point between any two consecutive
* timestamps whose difference exceeds the threshold;
* gaps smaller than the threshold are left as-is
*
* The input data is expected to be of the form:
* [xValues, series1Values, series2Values, ...]
*/
export declare function applySpanGapsToAlignedData(data: uPlot.AlignedData, seriesOptions: SeriesSpanGapsOption[]): uPlot.AlignedData;
import type { Hooks } from 'uplot';
import type { ThresholdsDrawHookOptions } from './types';
export declare function thresholdsDrawHook(options: ThresholdsDrawHookOptions): Hooks.Defs['draw'];
export interface Threshold {
thresholdValue: number;
thresholdColor?: string;
thresholdUnit?: string;
thresholdLabel?: string;
}
export interface ThresholdsDrawHookOptions {
scaleKey: string;
thresholds: Threshold[];
yAxisUnit?: string;
}
/**
* Convert a value from one unit to another.
* Currently a passthrough — unit conversion is handled at the data layer.
*/
export declare function convertValue(value: number, _currentUnit?: string, _targetUnit?: string): number | null;
export declare function generateColor(key: string): string;
export declare function resolveSeriesVisibility({ seriesShow, seriesLabel, visibleStoredLabels, hiddenStoredLabels, hasActivePreference, }: {
seriesShow: boolean | undefined | null;
seriesLabel: string;
visibleStoredLabels: Set<string> | null;
hiddenStoredLabels: Set<string> | null;
hasActivePreference: boolean;
}): boolean;
interface ThemeColors {
chartcolors: string[];
white: string;
black: string;
}
export declare const themeColors: ThemeColors;
export {};
export interface SeriesVisibilityItem {
label: string;
show: boolean;
}
export declare function getStoredSeriesVisibility(widgetId: string): SeriesVisibilityItem[] | null;
export declare function updateSeriesVisibilityToLocalStorage(widgetId: string, items: SeriesVisibilityItem[]): void;
import type uPlot from 'uplot';
export declare function calculateWidthBasedOnStepInterval({ uPlotInstance, stepInterval, }: {
uPlotInstance: uPlot;
stepInterval: number;
}): number;
import type uPlot from 'uplot';
export declare function buildYAxisSizeCalculator(gap: number): uPlot.Axis.Size;
import type uPlot from 'uplot';
export declare function generateGradientFill(uPlotInstance: uPlot, startColor: string, endColor: string, fillOpacity?: number): CanvasGradient;
import type { Range, Scale } from 'uplot';
import type { ScaleProps } from '../config/types';
import type { Threshold } from '../hooks/types';
import type { LogScaleLimits, RangeFunctionParams } from './types';
import { DistributionType } from '../config/types';
export declare function normalizeLogScaleLimits({ distr, logBase, limits, }: {
distr?: DistributionType;
logBase: number;
limits: LogScaleLimits;
}): LogScaleLimits;
export declare function getDistributionConfig({ time, distr, logBase, }: {
time: ScaleProps['time'];
distr?: DistributionType;
logBase?: number;
}): Partial<Scale>;
export declare function getRangeConfig(min: number | null, max: number | null, softMin: number | null, softMax: number | null, padMinBy: number, padMaxBy: number): {
rangeConfig: Range.Config;
hardMinOnly: boolean;
hardMaxOnly: boolean;
hasFixedRange: boolean;
};
export declare function createRangeFunction(params: RangeFunctionParams): Range.Function;
export declare function adjustSoftLimitsWithThresholds(softMin: number | null, softMax: number | null, thresholds?: Threshold[], yAxisUnit?: string): {
softMin: number | null;
softMax: number | null;
};
import type uPlot from 'uplot';
export declare function isolatedPointFilter(uPlotInstance: uPlot, seriesIdx: number, show: boolean, gaps?: null | number[][]): number[] | null;
import type { Threshold } from '../hooks/types';
export declare function findMinMaxThresholdValues(thresholds: Threshold[], _yAxisUnit?: string): [number | null, number | null];
import type { Range } from 'uplot';
export interface LogScaleLimits {
min: number | null;
max: number | null;
softMin: number | null;
softMax: number | null;
}
export interface RangeFunctionParams {
rangeConfig: Range.Config;
hardMinOnly: boolean;
hardMaxOnly: boolean;
hasFixedRange: boolean;
min: number | null;
max: number | null;
}
import type { VariableConfig } from '../types/variables';
export interface DependencyNode {
name: string;
dependsOn: string[];
dependents: string[];
}
export declare class VariableDependencyGraph {
private nodes;
private ensureNode;
addVariable(config: VariableConfig): void;
removeVariable(name: string): void;
getDependents(name: string): string[];
getAllDependents(name: string): string[];
detectCycle(): string[] | null;
topologicalSort(): string[];
clear(): void;
}
import type { ResolvedVariables, VariableFormat } from '../types/variables';
export interface ParsedVariable {
name: string;
format: VariableFormat;
start: number;
end: number;
}
export declare function parseVariables(text: string): ParsedVariable[];
export declare function containsVariable(text: string): boolean;
export declare function interpolateVariables(text: string, resolved: ResolvedVariables): string;
export declare function extractVariableNames(text: string): string[];
/**
* Zabbix JSON-RPC 2.0 客户端
* 代理路径:/zabbix-api → http://172.16.50.14/api_jsonrpc.php
*/
export interface ZabbixClientConfig {
url: string;
token: string;
}
export interface ZabbixGroup {
groupid: string;
name: string;
}
export interface ZabbixApplication {
applicationid: string;
name: string;
}
export interface ZabbixHost {
hostid: string;
host: string;
name: string;
}
export interface ZabbixItemTag {
tag: string;
value?: string;
}
export interface ZabbixItem {
itemid: string;
hostid: string;
name: string;
key_: string;
value_type: string;
units: string;
valuemapid?: string;
tags?: ZabbixItemTag[];
}
export interface ZabbixHistoryPoint {
itemid: string;
clock: string;
value: string;
ns: string;
}
export interface ZabbixTrendPoint {
itemid: string;
clock: string;
num: string;
value_min: string;
value_avg: string;
value_max: string;
}
/** 查询主机组列表 */
export declare function getGroups(cfg: ZabbixClientConfig): Promise<ZabbixGroup[]>;
/** 查询主机列表,可按组过滤 */
export declare function getHosts(groupids: string[] | undefined, search: string | undefined, cfg: ZabbixClientConfig): Promise<ZabbixHost[]>;
/** 查询应用集列表(Zabbix < 5.4),可按主机过滤 */
export declare function getApplications(hostids: string[], cfg: ZabbixClientConfig): Promise<ZabbixApplication[]>;
/** 查询指定主机的监控项,可按应用集和 tag 过滤 */
/**
* 查询指定主机的监控项,可按应用集和 item tag 过滤(Zabbix 5.4+)
* itemTag: "tag: value" 格式字符串,空字符串表示不过滤
*/
export declare function getItems(hostids: string[], applicationids: string[] | undefined, search: string | undefined, cfg: ZabbixClientConfig, itemTag?: string): Promise<ZabbixItem[]>;
/** 按 itemid 列表直接查询监控项元数据(不限 value_type) */
export declare function getItemsByIds(itemids: string[], cfg: ZabbixClientConfig): Promise<ZabbixItem[]>;
/** Format item tag to display string */
export declare function itemTagToString(tag: ZabbixItemTag): string;
/** 查询文本类型监控项(value_type=1,2,4) */
export declare function getTextItems(hostids: string[], applicationids: string[] | undefined, cfg: ZabbixClientConfig): Promise<ZabbixItem[]>;
export interface ZabbixTrigger {
triggerid: string;
description: string;
priority: string;
status: string;
}
export interface ZabbixProblem {
eventid: string;
objectid: string;
name: string;
severity: string;
clock: string;
acknowledged: string;
}
export interface ZabbixMacro {
hostmacroid: string;
macro: string;
value: string;
}
export interface ZabbixITService {
serviceid: string;
name: string;
}
/** 查询触发器列表 */
export declare function getTriggers(hostids: string[] | undefined, groupids: string[] | undefined, cfg: ZabbixClientConfig): Promise<ZabbixTrigger[]>;
/** 查询当前问题列表 */
export declare function getProblems(groupids: string[] | undefined, hostids: string[] | undefined, severities: number[] | undefined, timeFrom: number | undefined, timeTill: number | undefined, cfg: ZabbixClientConfig): Promise<ZabbixProblem[]>;
/** 查询主机宏 */
export declare function getMacros(hostids: string[] | undefined, cfg: ZabbixClientConfig): Promise<ZabbixMacro[]>;
/** 查询 IT 服务列表 */
export declare function getITServices(cfg: ZabbixClientConfig): Promise<ZabbixITService[]>;
/**
* 拉取历史数据
* 时间跨度 < 7天 用 history.get,否则用 trend.get(小时级聚合)
*/
export declare function getHistory(itemids: string[], timeFrom: number, timeTill: number, cfg: ZabbixClientConfig): Promise<ZabbixHistoryPoint[]>;
export interface ZabbixValueMap {
valuemapid: string;
name: string;
mappings: {
value: string;
newvalue: string;
}[];
}
/** 拉取所有 value mapping 定义 */
export declare function getValueMappings(cfg: ZabbixClientConfig): Promise<ZabbixValueMap[]>;
export interface ZabbixDiscoveryRule {
itemid: string;
hostid: string;
name: string;
key_: string;
}
export interface ZabbixDiscoveredItem {
itemid: string;
hostid: string;
name: string;
key_: string;
value_type: string;
units: string;
lastvalue: string;
lastclock: string;
description: string;
}
/** 查询主机上的 LLD 发现规则列表 */
export declare function getDiscoveryRules(hostids: string[], cfg: ZabbixClientConfig): Promise<ZabbixDiscoveryRule[]>;
export interface ZabbixItemPrototype {
itemid: string;
name: string;
key_: string;
}
/** 查询发现规则下的监控项原型,返回 key_ 列表(含宏,如 net.if.in[ifHCInOctets.{#SNMPINDEX}]) */
export declare function getItemPrototypes(discoveryRuleId: string, cfg: ZabbixClientConfig): Promise<ZabbixItemPrototype[]>;
/**
* 查询 LLD 规则下已发现的监控项(item.get 过滤 discoveryRule)
* keyPatterns: 要匹配的 item key 前缀列表,如 ["net.if.in", "net.if.out"]
* 空数组表示返回该规则下所有 item
*/
/**
* 查询 LLD 规则下已发现的监控项。
* 流程:
* 1. itemprototype.get 拿原型 key 列表
* 2. 若 keyPatterns 非空,按前缀筛选原型
* 3. 从原型 key 提取前缀(去掉 [...]),用于客户端过滤实际 item
* 4. item.get 拉取该规则下全部 item,客户端按前缀过滤
*/
export declare function getDiscoveredItems(hostids: string[], discoveryRuleId: string, keyPatterns: string[], cfg: ZabbixClientConfig): Promise<ZabbixDiscoveredItem[]>;
import type { FuncDef } from '../types/dashboard';
export declare const FUNC_CATEGORIES: readonly ["Transform", "Aggregate", "Filter", "Trends", "Time", "Alias", "Special"];
export declare const FUNC_DEFS: FuncDef[];
export declare const en: Record<string, string>;
export { en } from './en';
export { provideLang, useTranslation } from './useTranslation';
export type { Lang } from './useTranslation';
export { zh } from './zh';
import { zh } from './zh';
export type Lang = 'zh' | 'en';
type TranslationKey = keyof typeof zh;
export declare function provideLang(lang: import('vue').Ref<Lang>): void;
export declare function useTranslation(): {
t: (key: TranslationKey, vars?: Record<string, string | number>) => string;
lang: import("vue").Ref<Lang, Lang>;
};
export {};
export declare const zh: Record<string, string>;
export interface DataSourceConfig {
type: 'zabbix' | 'argus';
uid: string;
url: string;
token: string;
name: string;
default?: boolean;
}
export interface PresetItem {
label: string;
config: string;
}
export interface ArgusBoardConfig {
hideHeader: boolean;
canEdit: boolean;
theme: 'dark' | 'light' | null;
lang: 'zh' | 'en' | null;
isEditing: boolean | null;
initialEditingPanelId: string | null;
datasourceConfig: DataSourceConfig[] | null;
initialConfig?: string;
renderDefaultDashboard?: boolean;
onSave?: (json: string) => void;
presets?: PresetItem[];
}
export declare function provideArgusBoardConfig(config: ArgusBoardConfig): {
config: Readonly<import("vue").Ref<{
readonly hideHeader: boolean;
readonly canEdit: boolean;
readonly theme: "dark" | "light" | null;
readonly lang: "zh" | "en" | null;
readonly isEditing: boolean | null;
readonly initialEditingPanelId: string | null;
readonly datasourceConfig: readonly {
readonly type: "zabbix" | "argus";
readonly uid: string;
readonly url: string;
readonly token: string;
readonly name: string;
readonly default?: boolean | undefined;
}[] | null;
readonly initialConfig?: string | undefined;
readonly renderDefaultDashboard?: boolean | undefined;
readonly onSave?: ((json: string) => void) | undefined;
readonly presets?: readonly {
readonly label: string;
readonly config: string;
}[] | undefined;
}, {
readonly hideHeader: boolean;
readonly canEdit: boolean;
readonly theme: "dark" | "light" | null;
readonly lang: "zh" | "en" | null;
readonly isEditing: boolean | null;
readonly initialEditingPanelId: string | null;
readonly datasourceConfig: readonly {
readonly type: "zabbix" | "argus";
readonly uid: string;
readonly url: string;
readonly token: string;
readonly name: string;
readonly default?: boolean | undefined;
}[] | null;
readonly initialConfig?: string | undefined;
readonly renderDefaultDashboard?: boolean | undefined;
readonly onSave?: ((json: string) => void) | undefined;
readonly presets?: readonly {
readonly label: string;
readonly config: string;
}[] | undefined;
}>>;
};
export declare function useArgusBoardConfig(): {
config: Readonly<import("vue").Ref<{
readonly hideHeader: boolean;
readonly canEdit: boolean;
readonly theme: "dark" | "light" | null;
readonly lang: "zh" | "en" | null;
readonly isEditing: boolean | null;
readonly initialEditingPanelId: string | null;
readonly datasourceConfig: readonly {
readonly type: "zabbix" | "argus";
readonly uid: string;
readonly url: string;
readonly token: string;
readonly name: string;
readonly default?: boolean | undefined;
}[] | null;
readonly initialConfig?: string | undefined;
readonly renderDefaultDashboard?: boolean | undefined;
readonly onSave?: ((json: string) => void) | undefined;
readonly presets?: readonly {
readonly label: string;
readonly config: string;
}[] | undefined;
}, {
readonly hideHeader: boolean;
readonly canEdit: boolean;
readonly theme: "dark" | "light" | null;
readonly lang: "zh" | "en" | null;
readonly isEditing: boolean | null;
readonly initialEditingPanelId: string | null;
readonly datasourceConfig: readonly {
readonly type: "zabbix" | "argus";
readonly uid: string;
readonly url: string;
readonly token: string;
readonly name: string;
readonly default?: boolean | undefined;
}[] | null;
readonly initialConfig?: string | undefined;
readonly renderDefaultDashboard?: boolean | undefined;
readonly onSave?: ((json: string) => void) | undefined;
readonly presets?: readonly {
readonly label: string;
readonly config: string;
}[] | undefined;
}>>;
};
import type { GridItem, PanelConfig, PanelType } from '../_core';
export interface TimeRange {
from: number;
to: number;
}
interface DashboardSnapshot {
title: string;
panels: Record<string, PanelConfig>;
layouts: GridItem[];
}
export declare const useDashboardStore: import("pinia").StoreDefinition<"dashboard", Pick<{
title: import("vue").Ref<string, string>;
panels: import("vue").Ref<Record<string, PanelConfig>, Record<string, PanelConfig>>;
layouts: import("vue").Ref<{
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[], GridItem[] | {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[]>;
isEditing: import("vue").Ref<boolean, boolean>;
editingPanelId: import("vue").Ref<string | null, string | null>;
addPanelModalOpen: import("vue").Ref<boolean, boolean>;
timeRange: import("vue").Ref<{
from: number;
to: number;
}, TimeRange | {
from: number;
to: number;
}>;
autoRefresh: import("vue").Ref<number, number>;
_editSnapshot: import("vue").Ref<{
title: string;
panels: Record<string, PanelConfig>;
layouts: {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[];
} | null, DashboardSnapshot | {
title: string;
panels: Record<string, PanelConfig>;
layouts: {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[];
} | null>;
isDirty: import("vue").Ref<boolean, boolean>;
panelRefreshKeys: import("vue").Ref<Record<string, number>, Record<string, number>>;
addPanel: (type: PanelType) => void;
removePanel: (id: string) => void;
clonePanel: (id: string) => void;
updatePanel: (id: string, patch: Partial<PanelConfig>) => void;
clearPanels: () => void;
setLayouts: (newLayouts: GridItem[]) => void;
startEditing: () => void;
confirmSave: (onSave?: (json: string) => void) => void;
discardChanges: () => void;
setEditingPanel: (id: string | null) => void;
toggleEditing: () => void;
setEditing: (v: boolean) => void;
setTimeRange: (range: TimeRange) => void;
setAutoRefresh: (seconds: number) => void;
refresh: () => void;
refreshPanel: (id: string) => void;
exportJSON: () => string;
importJSON: (json: string) => boolean;
}, "isEditing" | "title" | "panels" | "layouts" | "editingPanelId" | "addPanelModalOpen" | "timeRange" | "autoRefresh" | "_editSnapshot" | "isDirty" | "panelRefreshKeys">, Pick<{
title: import("vue").Ref<string, string>;
panels: import("vue").Ref<Record<string, PanelConfig>, Record<string, PanelConfig>>;
layouts: import("vue").Ref<{
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[], GridItem[] | {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[]>;
isEditing: import("vue").Ref<boolean, boolean>;
editingPanelId: import("vue").Ref<string | null, string | null>;
addPanelModalOpen: import("vue").Ref<boolean, boolean>;
timeRange: import("vue").Ref<{
from: number;
to: number;
}, TimeRange | {
from: number;
to: number;
}>;
autoRefresh: import("vue").Ref<number, number>;
_editSnapshot: import("vue").Ref<{
title: string;
panels: Record<string, PanelConfig>;
layouts: {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[];
} | null, DashboardSnapshot | {
title: string;
panels: Record<string, PanelConfig>;
layouts: {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[];
} | null>;
isDirty: import("vue").Ref<boolean, boolean>;
panelRefreshKeys: import("vue").Ref<Record<string, number>, Record<string, number>>;
addPanel: (type: PanelType) => void;
removePanel: (id: string) => void;
clonePanel: (id: string) => void;
updatePanel: (id: string, patch: Partial<PanelConfig>) => void;
clearPanels: () => void;
setLayouts: (newLayouts: GridItem[]) => void;
startEditing: () => void;
confirmSave: (onSave?: (json: string) => void) => void;
discardChanges: () => void;
setEditingPanel: (id: string | null) => void;
toggleEditing: () => void;
setEditing: (v: boolean) => void;
setTimeRange: (range: TimeRange) => void;
setAutoRefresh: (seconds: number) => void;
refresh: () => void;
refreshPanel: (id: string) => void;
exportJSON: () => string;
importJSON: (json: string) => boolean;
}, never>, Pick<{
title: import("vue").Ref<string, string>;
panels: import("vue").Ref<Record<string, PanelConfig>, Record<string, PanelConfig>>;
layouts: import("vue").Ref<{
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[], GridItem[] | {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[]>;
isEditing: import("vue").Ref<boolean, boolean>;
editingPanelId: import("vue").Ref<string | null, string | null>;
addPanelModalOpen: import("vue").Ref<boolean, boolean>;
timeRange: import("vue").Ref<{
from: number;
to: number;
}, TimeRange | {
from: number;
to: number;
}>;
autoRefresh: import("vue").Ref<number, number>;
_editSnapshot: import("vue").Ref<{
title: string;
panels: Record<string, PanelConfig>;
layouts: {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[];
} | null, DashboardSnapshot | {
title: string;
panels: Record<string, PanelConfig>;
layouts: {
i: string;
x: number;
y: number;
w: number;
h: number;
minH?: number | undefined;
minW?: number | undefined;
}[];
} | null>;
isDirty: import("vue").Ref<boolean, boolean>;
panelRefreshKeys: import("vue").Ref<Record<string, number>, Record<string, number>>;
addPanel: (type: PanelType) => void;
removePanel: (id: string) => void;
clonePanel: (id: string) => void;
updatePanel: (id: string, patch: Partial<PanelConfig>) => void;
clearPanels: () => void;
setLayouts: (newLayouts: GridItem[]) => void;
startEditing: () => void;
confirmSave: (onSave?: (json: string) => void) => void;
discardChanges: () => void;
setEditingPanel: (id: string | null) => void;
toggleEditing: () => void;
setEditing: (v: boolean) => void;
setTimeRange: (range: TimeRange) => void;
setAutoRefresh: (seconds: number) => void;
refresh: () => void;
refreshPanel: (id: string) => void;
exportJSON: () => string;
importJSON: (json: string) => boolean;
}, "refresh" | "addPanel" | "removePanel" | "clonePanel" | "updatePanel" | "clearPanels" | "setLayouts" | "startEditing" | "confirmSave" | "discardChanges" | "setEditingPanel" | "toggleEditing" | "setEditing" | "setTimeRange" | "setAutoRefresh" | "refreshPanel" | "exportJSON" | "importJSON">>;
export {};
export { provideArgusBoardConfig, useArgusBoardConfig } from './argusBoardConfig';
export type { ArgusBoardConfig, DataSourceConfig, PresetItem } from './argusBoardConfig';
export { useDashboardStore } from './dashboardStore';
export type { TimeRange } from './dashboardStore';
export { useThemeStore } from './themeStore';
export type { ThemeMode } from './themeStore';
export { useVariableStore } from './variableStore';
export type { OptionsResolver } from './variableStore';
export type ThemeMode = 'dark' | 'light';
export declare const useThemeStore: import("pinia").StoreDefinition<"theme", Pick<{
theme: import("vue").Ref<ThemeMode, ThemeMode>;
isDark: import("vue").ComputedRef<boolean>;
toggle: () => void;
setTheme: (t: ThemeMode) => void;
}, "theme">, Pick<{
theme: import("vue").Ref<ThemeMode, ThemeMode>;
isDark: import("vue").ComputedRef<boolean>;
toggle: () => void;
setTheme: (t: ThemeMode) => void;
}, "isDark">, Pick<{
theme: import("vue").Ref<ThemeMode, ThemeMode>;
isDark: import("vue").ComputedRef<boolean>;
toggle: () => void;
setTheme: (t: ThemeMode) => void;
}, "toggle" | "setTheme">>;
import type { ResolvedVariables, VariableConfig, VariableOption, VariableState } from '../_core';
export type OptionsResolver = (query: string) => Promise<VariableOption[]>;
export declare const useVariableStore: import("pinia").StoreDefinition<"variable", Pick<{
variables: import("vue").Ref<Record<string, VariableState>, Record<string, VariableState>>;
optionsResolver: import("vue").Ref<OptionsResolver | null, OptionsResolver | null>;
setOptionsResolver: (resolver: OptionsResolver) => void;
addVariable: (config: VariableConfig) => void;
removeVariable: (id: string) => void;
updateVariable: (id: string, patch: Partial<VariableConfig>) => void;
setValue: (id: string, value: string | string[]) => void;
refreshVariable: (id: string) => Promise<void>;
refreshAll: () => Promise<void>;
resolveAll: () => ResolvedVariables;
getVariable: (name: string) => VariableState | undefined;
getDependents: (name: string) => string[];
detectCycle: () => string[] | null;
}, "variables" | "optionsResolver">, Pick<{
variables: import("vue").Ref<Record<string, VariableState>, Record<string, VariableState>>;
optionsResolver: import("vue").Ref<OptionsResolver | null, OptionsResolver | null>;
setOptionsResolver: (resolver: OptionsResolver) => void;
addVariable: (config: VariableConfig) => void;
removeVariable: (id: string) => void;
updateVariable: (id: string, patch: Partial<VariableConfig>) => void;
setValue: (id: string, value: string | string[]) => void;
refreshVariable: (id: string) => Promise<void>;
refreshAll: () => Promise<void>;
resolveAll: () => ResolvedVariables;
getVariable: (name: string) => VariableState | undefined;
getDependents: (name: string) => string[];
detectCycle: () => string[] | null;
}, never>, Pick<{
variables: import("vue").Ref<Record<string, VariableState>, Record<string, VariableState>>;
optionsResolver: import("vue").Ref<OptionsResolver | null, OptionsResolver | null>;
setOptionsResolver: (resolver: OptionsResolver) => void;
addVariable: (config: VariableConfig) => void;
removeVariable: (id: string) => void;
updateVariable: (id: string, patch: Partial<VariableConfig>) => void;
setValue: (id: string, value: string | string[]) => void;
refreshVariable: (id: string) => Promise<void>;
refreshAll: () => Promise<void>;
resolveAll: () => ResolvedVariables;
getVariable: (name: string) => VariableState | undefined;
getDependents: (name: string) => string[];
detectCycle: () => string[] | null;
}, "setOptionsResolver" | "addVariable" | "removeVariable" | "updateVariable" | "setValue" | "refreshVariable" | "refreshAll" | "resolveAll" | "getVariable" | "getDependents" | "detectCycle">>;
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.
interface LogEntry {
id: string | number;
timestamp: number;
level: 'info' | 'warn' | 'error' | 'debug';
message: string;
labels?: Record<string, string>;
}
type __VLS_Props = {
logs: LogEntry[];
maxHeight?: number;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
maxHeight: number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
interface Node {
id: string;
name: string;
type?: string;
errorRate?: number;
latency?: number;
}
interface Edge {
source: string;
target: string;
callsPerSec?: number;
}
type __VLS_Props = {
nodes?: Node[];
edges?: Edge[];
width?: number;
height?: number;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
width: number;
height: number;
nodes: Node[];
edges: Edge[];
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
interface TraceSpan {
spanId: string;
parentSpanId?: string;
traceId: string;
operationName: string;
serviceName: string;
startTime: number;
duration: number;
status?: 'ok' | 'error' | 'unset';
tags?: Record<string, string>;
}
type __VLS_Props = {
spans?: TraceSpan[];
startTime?: number;
endTime?: number;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
spans: TraceSpan[];
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
/**
* AgChart — uPlot-based chart component for timeseries / bar panels
*
* Mirrors the React AgChart.tsx: accepts raw TimeSeriesData and builds a
* full-featured uPlot config via UPlotConfigBuilder, then delegates rendering
* to the UPlotChart wrapper.
*/
import type { AxisPlacement, ColorDistribution, ColorScheme, GridLines, LegendMode, LegendPosition, LegendValue, LineInterpolation, LineStyle, ScaleDistribution, ShowPointsMode, SpanNulls, StackingMode, Threshold, TimeSeriesData, TooltipMode, TooltipSortOrder } from '../_core';
interface Props {
data: TimeSeriesData;
unit?: string;
decimals?: number;
colorScheme?: ColorScheme;
colorSingleValue?: string;
colorDistribution?: ColorDistribution;
thresholds?: Threshold[];
thresholdBaseColor?: string;
fillOpacity?: number;
lineWidth?: number;
lineInterpolation?: LineInterpolation;
lineStyle?: LineStyle;
drawStyle?: 'lines' | 'bars' | 'points';
gradientMode?: 'none' | 'opacity' | 'hue' | 'scheme';
spanNulls?: SpanNulls;
showPoints?: boolean;
showPointsMode?: ShowPointsMode;
stackingMode?: StackingMode;
legendPosition?: LegendPosition;
legendMode?: LegendMode;
legendValues?: LegendValue[];
syncKey?: string;
panelId?: string;
tooltipMode?: TooltipMode;
tooltipSort?: TooltipSortOrder;
tooltipMaxHeight?: number;
showAxisPointer?: boolean;
softMin?: number | null;
softMax?: number | null;
axisPlacement?: AxisPlacement;
axisName?: string;
axisWidth?: number | null;
showGridLines?: GridLines;
gridColor?: string;
axisLabel?: GridLines;
axisLabelColor?: string;
axisTick?: GridLines;
axisTickColor?: string;
axisBorder?: GridLines;
axisBorderColor?: string;
scaleDistribution?: ScaleDistribution;
centeredZero?: boolean;
/** Set to false for non-time x axes (e.g. histogram bucket values). Default: true */
xAxisTime?: boolean;
/** Bar chart: fraction of slot width the whole group occupies (0–1, default 0.7) */
barGroupWidth?: number;
/** Bar chart: fraction of group slot each individual bar occupies (0–1, default 1/seriesCount) */
barWidth?: number;
}
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
drawStyle: "lines" | "bars" | "points";
lineWidth: number;
fillOpacity: number;
gradientMode: "none" | "opacity" | "hue" | "scheme";
lineInterpolation: LineInterpolation;
lineStyle: LineStyle;
spanNulls: SpanNulls;
showPoints: boolean;
showPointsMode: ShowPointsMode;
stackingMode: StackingMode;
legendPosition: LegendPosition;
legendMode: LegendMode;
legendValues: LegendValue[];
tooltipMode: TooltipMode;
tooltipSort: TooltipSortOrder;
showAxisPointer: boolean;
axisPlacement: AxisPlacement;
showGridLines: GridLines;
axisLabel: GridLines;
axisTick: GridLines;
axisBorder: GridLines;
scaleDistribution: ScaleDistribution;
centeredZero: boolean;
xAxisTime: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { LegendItem, LegendValue } from '../_core';
import type uPlot from 'uplot';
type __VLS_Props = {
items: Record<number, LegendItem>;
uPlotInstance?: uPlot | null;
position?: 'bottom' | 'right';
mode?: 'list' | 'table';
unit?: string;
decimals?: number;
averageLegendWidth?: number;
values?: LegendValue[];
data?: uPlot.AlignedData;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
values: LegendValue[];
mode: "list" | "table";
position: "bottom" | "right";
averageLegendWidth: number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
/**
* ChartTooltip — mirrors React TimeSeriesTooltip + TooltipPlugin
*
* Owns all uPlot interaction state and hook registration.
* Rendering is fully delegated to Tooltip.vue (and its sub-components),
* mirroring React's separation of TooltipPlugin (controller) and Tooltip (view).
*
* Architecture:
* - Position: setCursor hook → direct DOM style.transform (no Vue reactivity on mousemove)
* - Content: setLegend hook → schedules RAF render
* - Focus: setSeries hook (focus opts) → schedules RAF render
* - Pin: P key / Escape, locks cursor via cursor._lock
*/
import type uPlot from 'uplot';
interface Props {
uPlotInstance: uPlot | null;
unit?: string;
decimals?: number;
canPinTooltip?: boolean;
tooltipMode?: 'single' | 'multi' | 'none';
tooltipSort?: 'none' | 'asc' | 'desc';
showTooltipHeader?: boolean;
tooltipMaxHeight?: number;
}
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
unit: string;
tooltipMode: "single" | "multi" | "none";
tooltipSort: "none" | "asc" | "desc";
tooltipMaxHeight: number;
showTooltipHeader: boolean;
canPinTooltip: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { AlignedData, Options } from 'uplot';
type __VLS_Props = {
options: Omit<Options, 'width' | 'height'>;
data: AlignedData;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type uPlot from 'uplot';
/**
* Tooltip.vue — mirrors React Tooltip.tsx
* Pure display component: receives content, renders Header + Divider + List + Footer
*/
import type { TooltipContentItem } from './TooltipItem.vue';
type __VLS_Props = {
uPlotInstance: uPlot;
content: TooltipContentItem[];
headerTitle: string;
isPinned: boolean;
canPinTooltip?: boolean;
showTooltipHeader?: boolean;
tooltipMaxHeight?: number;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
dismiss: () => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onDismiss?: (() => any) | undefined;
}>, {
tooltipMaxHeight: number;
showTooltipHeader: boolean;
canPinTooltip: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
type __VLS_Props = {
isPinned: boolean;
pinKey?: string;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
dismiss: () => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onDismiss?: (() => any) | undefined;
}>, {
pinKey: string;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type uPlot from 'uplot';
import type { TooltipContentItem } from './TooltipItem.vue';
type __VLS_Props = {
uPlotInstance: uPlot;
showTooltipHeader: boolean;
isPinned: boolean;
activeItem: TooltipContentItem | null;
headerTitle: string;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
export interface TooltipContentItem {
label: string;
value: number;
tooltipValue: string;
color: string;
isActive: boolean;
}
type __VLS_Props = {
item: TooltipContentItem;
isItemActive: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { TooltipContentItem } from './TooltipItem.vue';
type __VLS_Props = {
content: TooltipContentItem[];
maxHeight?: number;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
maxHeight: number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
This source diff could not be displayed because it is too large. You can view the blob instead.
import type uPlot from 'uplot';
import type { InjectionKey, Ref } from 'vue';
export interface PlotContextValue {
uPlotInstance: Ref<uPlot | null>;
id: Ref<string>;
shouldSaveSelectionPreference: Ref<boolean>;
setPlotContextInitialState: (state: {
uPlotInstance: uPlot | null;
id?: string;
shouldSaveSelectionPreference?: boolean;
}) => void;
onToggleSeriesVisibility: (seriesIndex: number) => void;
onToggleSeriesOnOff: (seriesIndex: number) => void;
onFocusSeries: (seriesIndex: number | null) => void;
syncSeriesVisibilityToLocalStorage: () => void;
}
export declare const PLOT_CONTEXT_KEY: InjectionKey<PlotContextValue>;
export declare function providePlotContext(): PlotContextValue;
export declare function usePlotContext(): PlotContextValue;
type __VLS_Props = {
char?: string;
};
declare var __VLS_1: {};
type __VLS_Slots = {} & {
default?: (props: typeof __VLS_1) => any;
};
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};
import type { PanelConfig } from '../_core';
type __VLS_Props = {
panel: PanelConfig;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
/** Centralized icon class constants — all UnoCSS icon classes in one place. */
export declare const ICON: {
readonly edit: "i-carbon:edit";
readonly delete: "i-carbon:trash-can";
readonly clone: "i-carbon:stickies ";
readonly plus: "i-carbon:add-large";
readonly save: "i-mdi-content-save";
readonly cancel: "i-mdi-cancel";
readonly refresh: "i-carbon:renew";
readonly download: "i-carbon:download";
readonly upload: "i-carbon:upload";
readonly export: "i-carbon:export";
readonly import: "i-carbon:document-import";
readonly search: "i-mdi-magnify";
readonly settings: "i-carbon:settings";
readonly config: "i-carbon:settings-adjust";
readonly link: "i-mdi-link";
readonly fullscreen: "i-carbon:center-to-fit";
readonly chevronDown: "i-carbon:chevron-down";
readonly chevronRight: "i-carbon:chevron-right";
readonly dotsVertical: "i-mdi-dots-vertical";
readonly dragVertical: "i-carbon:draggable";
readonly closeCircle: "i-mdi-close-circle";
readonly chevronLeft: "i-carbon:chevron-left";
readonly info: "i-carbon:information";
readonly view: "i-carbon:view";
readonly viewOff: "i-carbon:view-off";
readonly sun: "i-mdi-white-balance-sunny";
readonly moon: "i-mdi-weather-night";
readonly chartLine: "i-mdi-chart-line";
readonly chartBar: "i-mdi-chart-bar";
readonly chartArea: "i-mdi-chart-areaspline";
readonly chartPie: "i-mdi-chart-pie";
readonly stat: "i-mdi-format-list-numbered";
readonly gauge: "i-mdi-alarm-panel";
readonly table: "i-mdi-table";
readonly databaseOff: "i-mdi-database-off";
};
/**
* ArgusQueryEditor.vue — mirrors React ArgusQueryBuilderPane.tsx
* QueryEditorProps<ArgusQueryDataSource>
*/
import type { ArgusQueryDataSource } from '../_core';
type __VLS_Props = {
query: ArgusQueryDataSource;
datasourceId: string;
isChart: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (query: ArgusQueryDataSource) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((query: ArgusQueryDataSource) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { ArgusClientConfig, ArgusField, ArgusSignal } from '../../_core';
type __VLS_Props = {
groupBy: ArgusField[];
cfg: ArgusClientConfig | null;
signal: ArgusSignal;
metricName?: string;
disabled?: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (g: ArgusField[]) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((g: ArgusField[]) => any) | undefined;
}>, {
disabled: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { ArgusFunction, ArgusSignal } from '../../_core';
type __VLS_Props = {
functions: ArgusFunction[];
signal: ArgusSignal;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (fns: ArgusFunction[]) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((fns: ArgusFunction[]) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { ArgusClientConfig, ArgusQueryItem } from '../../_core';
type __VLS_Props = {
item: ArgusQueryItem;
cfg: ArgusClientConfig | null;
collapsed: boolean;
canDelete: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
delete: () => any;
change: (item: ArgusQueryItem) => any;
toggleCollapse: () => any;
toggleDisabled: () => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onDelete?: (() => any) | undefined;
onChange?: ((item: ArgusQueryItem) => any) | undefined;
onToggleCollapse?: (() => any) | undefined;
onToggleDisabled?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { MockDataSource } from '../_core';
type __VLS_Props = {
query: MockDataSource;
datasourceId: string;
isChart: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (query: MockDataSource) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((query: MockDataSource) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
export interface ComboSelectGroup {
label: string;
options: {
value: string;
label: string;
}[];
}
type __VLS_Props = {
value?: string;
/** Display text shown in search box. Defaults to value. */
displayValue?: string;
placeholder?: string;
groups: ComboSelectGroup[];
allowCustom?: boolean;
loading?: boolean;
disabled?: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
clear: () => any;
change: (val: string) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onClear?: (() => any) | undefined;
onChange?: ((val: string) => any) | undefined;
}>, {
disabled: boolean;
loading: boolean;
allowCustom: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { MetricFunc } from '../../_core';
type __VLS_Props = {
functions: MetricFunc[];
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (fns: MetricFunc[]) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((fns: MetricFunc[]) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
/**
* OptionsEditor.vue — mirrors React OptionsEditor.tsx
*/
import type { ZabbixQueryOptions, ZabbixQueryType } from '../../_core';
type __VLS_Props = {
queryType: ZabbixQueryType;
options: ZabbixQueryOptions;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (opts: ZabbixQueryOptions) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((opts: ZabbixQueryOptions) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
import type { ZabbixDataSource } from '../../_core';
type __VLS_Props = {
query: ZabbixDataSource;
datasourceId: string;
isChart: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (query: ZabbixDataSource) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((query: ZabbixDataSource) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
/**
* useGroupHostApp — mirrors React useGroupHostApp.ts
* Loads Zabbix groups and hosts, resolving variable references.
*/
import type { ZabbixClientConfig, ZabbixDataSource, ZabbixGroup, ZabbixHost } from '../../_core';
/** Resolve $varName to real value(s); non-variable returns [value]. */
declare function useResolvedVarField(value: () => string): import("vue").ComputedRef<string[]>;
export declare function useGroupHostApp(ds: () => ZabbixDataSource, cfg: () => ZabbixClientConfig): {
groups: import("vue").Ref<{
groupid: string;
name: string;
}[], ZabbixGroup[] | {
groupid: string;
name: string;
}[]>;
hosts: import("vue").Ref<{
hostid: string;
host: string;
name: string;
}[], ZabbixHost[] | {
hostid: string;
host: string;
name: string;
}[]>;
loadingGroups: import("vue").Ref<boolean, boolean>;
loadingHosts: import("vue").Ref<boolean, boolean>;
resolvedGroupIds: import("vue").ComputedRef<string[]>;
};
export { useResolvedVarField };
import type { ZabbixClientConfig } from '../../_core';
import type { MaybeRefOrGetter } from 'vue';
export declare function useZabbixDatasources(datasourceId: MaybeRefOrGetter<string>): {
sources: import("vue").ComputedRef<{
uid: string;
name: string;
url: string;
token: string;
isDefault: boolean;
}[]>;
cfg: import("vue").ComputedRef<ZabbixClientConfig>;
defaultUid: import("vue").ComputedRef<string>;
};
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
export interface DatasourceOption {
value: string;
label: string;
type: string;
uid: string;
}
type __VLS_Props = {
value: string;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
change: (option: DatasourceOption) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onChange?: ((option: DatasourceOption) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
import 'vue-allotment/style.css';
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
/**
* QueryEditorRow.vue — mirrors React QueryEditorRow.tsx
* Single query row: header (label + switch + datasource) + dynamic QueryEditor body.
*/
import type { QueryEntry } from '../_core';
type __VLS_Props = {
entry: QueryEntry;
index: number;
isChart: boolean;
canDelete: boolean;
};
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
remove: () => any;
update: (patch: Partial<QueryEntry>) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onRemove?: (() => any) | undefined;
onUpdate?: ((patch: Partial<QueryEntry>) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;
This diff is collapsed. Click to expand it.
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