Commit a105da0c by jiangxd2016

release: v1.2.18

parent 51d3139d
......@@ -13,10 +13,10 @@ pnpm add @grafana/vue vue pinia
## 快速开始
```ts
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { DashboardViewer } from '@grafana/vue';
import { bootstrapGrafanaVue } from '@grafana/vue/register';
import { createApp } from "vue";
import { createPinia } from "pinia";
import { DashboardViewer } from "@grafana/vue";
import { bootstrapGrafanaVue } from "@grafana/vue/register";
// Registers core plugins, kicks off heavy plugins, BootData, theme, backend mode.
// Optional datasources: same uid merges, different uids combine.
......@@ -40,14 +40,14 @@ bootstrapGrafanaVue({
## 入口
| Import | 说明 |
| --- | --- |
| ----------------------- | ------------------------------------------------------------------------- |
| `@grafana/vue` | 组件 + API(无自动注册副作用) |
| `@grafana/vue/register` | `bootstrapGrafanaVue` + `registerBuiltinPlugins` / `registerHeavyPlugins` |
## 主要组件
| 组件 | 场景 |
| --- | --- |
| ------------------------ | ---------------------------------------------- |
| **DashboardViewer** | 传入 dashboard JSON + datasources 配置嵌入整页 |
| **PanelHost** | 传入 `PanelData` 渲染单面板 |
| **DashboardPage** | 完整应用内仪表盘页 |
......
{
"name": "@grafana/vue",
"version": "1.2.0",
"builtAt": "2026-07-30T07:55:17.908Z",
"builtAt": "2026-08-04T03:10:55.966Z",
"mode": "library-esm-single-file",
"entries": {
"index": "src/index.ts",
"pure": "src/pure.ts",
"register": "src/register.ts"
}
}
\ No newline at end of file
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.
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.
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.
......@@ -5,4 +5,60 @@ export declare function registerBuiltinPlugins(): void;
export declare function registerHeavyPlugins(): Promise<void> | void;
export declare function isBuiltinPluginsRegistered(): boolean;
export declare function isHeavyPluginsRegistered(): boolean;
export declare function bootstrapGrafanaVue(): void;
// ----- Bootstrap (also exported at ./register) -----
export type BackendBootSelection =
| { mode: 'offline' }
| { mode: 'live'; baseUrl: string; requireAuth: boolean };
export type BootstrapGrafanaVueOptions = {
datasources?: ObservabilityDataSourceInput[];
env?: Record<string, string | undefined>;
windowInjection?: ObservabilityDataSourceInput[] | null;
};
export declare function bootstrapGrafanaVue(options?: BootstrapGrafanaVueOptions): void;
// ----- Observability datasource helpers (from ./observabilityDataSources) -----
export type ObservabilityCredentialMode =
| 'token' | 'bearer' | 'apiKey' | 'basic' | 'proxy' | 'none';
export type ObservabilityDataSourceInput = {
uid: string;
name: string;
type: string;
url?: string;
default?: boolean;
isDefault?: boolean;
profile?: string;
jsonData?: Record<string, unknown>;
token?: string;
refreshToken?: string;
password?: string;
username?: string;
email?: string;
orgID?: string;
credentialMode?: ObservabilityCredentialMode;
apiKeyHeader?: string;
};
export type ResolvedObservabilityDataSources = {
settings: import('@grafana/vue-runtime').DataSourceInstanceSettings[];
credentials: Array<{ uid: string; credential: import('@grafana/vue-runtime').RuntimeCredential }>;
};
export type ResolveObservabilityOptions = {
windowInjection?: ObservabilityDataSourceInput[] | null;
env?: Record<string, string | undefined>;
defaults?: ObservabilityDataSourceInput[];
datasources?: ObservabilityDataSourceInput[];
};
export declare function defaultObservabilityDataSources(
env?: Record<string, string | undefined>,
): ObservabilityDataSourceInput[];
export declare function mergeObservabilityDataSourceInput(
prev: ObservabilityDataSourceInput | undefined,
next: ObservabilityDataSourceInput,
): ObservabilityDataSourceInput;
export declare function mergeObservabilityDataSourceInputsByUid(
...layers: Array<ObservabilityDataSourceInput[] | undefined | null>
): ObservabilityDataSourceInput[];
export declare function resolveObservabilityDataSources(
opts?: ResolveObservabilityOptions,
): ResolvedObservabilityDataSources;
export declare function bootstrapObservabilityDataSources(
resolved?: ResolvedObservabilityDataSources,
): ResolvedObservabilityDataSources;
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.16",
"version": "1.2.18",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
......@@ -10,6 +10,11 @@
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./pure": {
"types": "./dist/pure.d.ts",
"import": "./dist/pure.js",
"default": "./dist/pure.js"
},
"./register": {
"types": "./dist/register.d.ts",
"import": "./dist/register.js",
......@@ -18,26 +23,27 @@
"./package.json": "./package.json"
},
"files": [
"dist",
"README.md",
"package.json"
"dist",
"package.json",
"src"
],
"dependencies": {
"ant-design-vue": "4.2.6",
"axios": "1.13.2",
"dayjs": "1.11.21",
"pinia": "^3.0.3",
"vue-grid-layout-v3": "^3.1.2",
"vue-router": "^4.5.1",
"uplot": "^1.6.32",
"ol": "10.4.0",
"monaco-editor": "^0.56.0",
"@prometheus-io/lezer-promql": "0.308.0",
"@lezer/common": "^1.5.1",
"@ant-design/icons-vue": "7.0.1"
"@grafana/data": "workspace:*",
"@grafana/plugin-signoz": "workspace:*",
"@grafana/plugin-zabbix": "workspace:*",
"@grafana/vue-dashboard": "workspace:*",
"@grafana/vue-datasources": "workspace:*",
"@grafana/vue-panels": "workspace:*",
"@grafana/vue-plugin-sdk": "workspace:*",
"@grafana/vue-runtime": "workspace:*",
"@grafana/vue-ui": "workspace:*"
},
"peerDependencies": {
"vue": "^3.5.0"
"ant-design-vue": "^4.2.0",
"pinia": "^2.0.0 || ^3.0.0",
"vue": "^3.5.0",
"vue-router": "^4.5.0"
},
"description": "Grafana Vue single entry package — dashboard, panels, datasources, UI, runtime",
"license": "AGPL-3.0-only"
......
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