influx-vue 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ import type { InfluxConnectionConfig } from '../services/influx/types';
2
+ import type { InfluxDashboardExposed, InfluxDashboardProps } from '../components/dashboard/types';
3
+ declare const __VLS_export: import("vue").DefineComponent<InfluxDashboardProps, InfluxDashboardExposed, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InfluxDashboardProps> & Readonly<{}>, {
4
+ autoRun: boolean;
5
+ connectionOverride: Partial<InfluxConnectionConfig>;
6
+ createDataSource: import("../components/dashboard/types").InfluxDashboardCreateDataSource;
7
+ authenticateConnection: import("../components/dashboard/types").InfluxDashboardAuthenticateConnection;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type { InfluxConnectionConfig, InfluxExplorerDataSource } from '../../services/influx/types';
2
+ import type { InfluxDashboardDefinition } from '../../services/influx/dashboard';
3
+ export type InfluxDashboardCreateDataSource = (config: InfluxConnectionConfig) => InfluxExplorerDataSource;
4
+ export type InfluxDashboardAuthenticateConnection = (config: InfluxConnectionConfig) => Promise<InfluxConnectionConfig>;
5
+ export interface InfluxDashboardProps {
6
+ yaml: string;
7
+ autoRun?: boolean;
8
+ connectionOverride?: Partial<InfluxConnectionConfig>;
9
+ createDataSource?: InfluxDashboardCreateDataSource;
10
+ authenticateConnection?: InfluxDashboardAuthenticateConnection;
11
+ }
12
+ export interface InfluxDashboardExposed {
13
+ connect(): Promise<boolean>;
14
+ refresh(): Promise<boolean>;
15
+ getDefinition(): InfluxDashboardDefinition;
16
+ }
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  modelValue: string;
3
3
  placeholder?: string;
4
+ readOnly?: boolean;
4
5
  };
5
6
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
7
  "update:modelValue": (value: string) => any;
@@ -8,6 +9,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
8
9
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
10
  }>, {
10
11
  placeholder: string;
12
+ readOnly: boolean;
11
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
14
  declare const _default: typeof __VLS_export;
13
15
  export default _default;
@@ -77,6 +77,8 @@ export declare function useInfluxWorkbench(options?: UseInfluxWorkbenchOptions):
77
77
  tagValueOptions: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
78
78
  selectedBucket: import("vue").Ref<string, string>;
79
79
  selectedMeasurement: import("vue").Ref<string, string>;
80
+ selectedMeasurementLabel: import("vue").ComputedRef<string>;
81
+ selectedMeasurements: import("vue").Ref<string[], string[]>;
80
82
  selectedFields: import("vue").Ref<string[], string[]>;
81
83
  tagFilters: import("vue").Ref<{
82
84
  tagKey: string;
@@ -121,7 +123,7 @@ export declare function useInfluxWorkbench(options?: UseInfluxWorkbenchOptions):
121
123
  hasExecutedQuery: import("vue").Ref<boolean, boolean>;
122
124
  dashboardName: import("vue").Ref<string, string>;
123
125
  dashboardDescription: import("vue").Ref<string, string>;
124
- dashboardColumns: import("vue").Ref<2 | 1 | 3, 2 | 1 | 3>;
126
+ dashboardColumns: import("vue").Ref<1 | 2 | 3, 1 | 2 | 3>;
125
127
  dashboardPanels: import("vue").Ref<{
126
128
  id: string;
127
129
  title: string;
@@ -131,6 +133,7 @@ export declare function useInfluxWorkbench(options?: UseInfluxWorkbenchOptions):
131
133
  query: {
132
134
  bucket: string;
133
135
  measurement: string;
136
+ measurements?: string[] | undefined;
134
137
  fields: string[];
135
138
  rangePreset: RangePresetKey;
136
139
  customStart: string;
@@ -153,6 +156,7 @@ export declare function useInfluxWorkbench(options?: UseInfluxWorkbenchOptions):
153
156
  query: {
154
157
  bucket: string;
155
158
  measurement: string;
159
+ measurements?: string[] | undefined;
156
160
  fields: string[];
157
161
  rangePreset: RangePresetKey;
158
162
  customStart: string;
@@ -184,6 +188,7 @@ export declare function useInfluxWorkbench(options?: UseInfluxWorkbenchOptions):
184
188
  disconnect: () => void;
185
189
  selectBucket: (bucketName: string) => Promise<void>;
186
190
  selectMeasurement: (measurement: string) => Promise<void>;
191
+ toggleMeasurement: (measurement: string) => Promise<void>;
187
192
  refreshSchema: () => Promise<void>;
188
193
  addTagFilter: () => Promise<void>;
189
194
  updateTagFilterKey: (index: number, tagKey: string) => Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
+ import InfluxDashboard from './components/InfluxDashboard.vue';
1
2
  import InfluxWorkbench from './components/InfluxWorkbench.vue';
3
+ export { InfluxDashboard };
2
4
  export { InfluxWorkbench };
3
5
  export type { InfluxAuthMethod, InfluxConnectionConfig, } from './services/influx/types';
4
6
  export type { InfluxConnectPhase, InfluxConnectionFailure, } from './services/influx/types';
5
- export type { InfluxDashboardDefinition, InfluxDashboardPanelDefinition, InfluxPanelVisualization, } from './services/influx/dashboard';
7
+ export { buildDashboardPanelFlux, createDashboardConnection, createDashboardDefinition, createDashboardPanel, exportDashboardYaml, maskDashboardDefinitionSecrets, parseDashboardYaml, serializeDashboardToDisplayYaml, serializeDashboardToYaml, } from './services/influx/dashboard';
8
+ export type { InfluxDashboardConnection, InfluxDashboardDefinition, InfluxDashboardPanelDefinition, InfluxPanelVisualization, } from './services/influx/dashboard';
9
+ export type { InfluxDashboardAuthenticateConnection, InfluxDashboardCreateDataSource, InfluxDashboardExposed, InfluxDashboardProps, } from './components/dashboard/types';
6
10
  export type { InfluxWorkbenchConnectError, InfluxWorkbenchConnectEvent, InfluxWorkbenchAuthenticateConnection, InfluxWorkbenchCreateDataSource, InfluxWorkbenchDisconnectEvent, InfluxWorkbenchExposed, InfluxWorkbenchProps, InfluxWorkbenchSectionKey, } from './components/workbench/types';
@@ -1,2 +1,2 @@
1
- .panel-shell[data-v-7c30fdb8]{flex-direction:column;gap:12px;display:flex}.status-alert[data-v-7c30fdb8],.health-tags[data-v-7c30fdb8]{margin-top:2px}.auth-hint[data-v-7c30fdb8]{margin-bottom:10px}.flux-editor-root[data-v-9aaf532f],.flux-editor-root[data-v-9aaf532f] .cm-editor{min-height:300px}.stage-panel[data-v-c694217a]{background:#ffffffd6;border:1px solid #e2e8f0eb;border-radius:16px;flex-direction:column;gap:10px;min-height:360px;padding:10px 12px;display:flex}.stage-header[data-v-c694217a]{justify-content:space-between;align-items:center;gap:12px;display:flex}.stage-meta[data-v-c694217a]{align-items:center;gap:8px;display:flex}.stage-body[data-v-c694217a]{flex:1;min-height:0}.panel-shell[data-v-5e360239]{flex-direction:column;gap:12px;min-width:0;display:flex}.panel-toolbar[data-v-5e360239]{justify-content:flex-end;align-items:center;gap:12px;display:flex}.settings-shell[data-v-5e360239]{background:#ffffffd6;border:1px solid #e2e8f0f2;border-radius:16px;padding:10px 12px}.settings-row[data-v-5e360239]{flex-wrap:nowrap;align-items:stretch;gap:10px;display:flex}.setting-item[data-v-5e360239]{flex:1 1 0;min-width:0;margin-bottom:0}.preset-item[data-v-5e360239],.range-item[data-v-5e360239]{flex:1 1 0}.setting-item[data-v-5e360239] .n-base-selection,.setting-item[data-v-5e360239] .n-date-picker,.setting-item[data-v-5e360239] .n-input-number{width:100%}.flow-grid[data-v-5e360239]{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.selection-list[data-v-5e360239]{flex-direction:column;gap:8px;max-height:320px;display:flex;overflow:auto}.selection-item[data-v-5e360239]{text-align:left;cursor:pointer;background:#fff;border:1px solid #94a3b847;border-radius:14px;width:100%;padding:10px 12px;transition:transform .12s,border-color .12s,box-shadow .12s}.selection-item[data-v-5e360239]:hover{border-color:#0ea5e966;transform:translateY(-1px);box-shadow:0 10px 24px #0f172a0f}.selection-item.active[data-v-5e360239]{background:#ecfdf5eb;border-color:#14b8a68c}.item-title[data-v-5e360239],.item-meta[data-v-5e360239]{display:block}.item-title[data-v-5e360239]{font-weight:700}.item-meta[data-v-5e360239]{color:#475569d6;margin-top:4px;font-size:.78rem}.checkbox-item[data-v-5e360239]{background:#f8fafcb3;border:1px solid #e2e8f0cc;border-radius:12px;align-items:center;gap:10px;padding:8px 10px;display:flex}.filter-stack[data-v-5e360239]{flex-direction:column;gap:10px;display:flex}.filter-row[data-v-5e360239]{grid-template-columns:1fr;gap:10px;display:grid}.query-shell[data-v-5e360239]{min-width:0}.code-shell[data-v-5e360239]{background:#0f172a;border:1px solid #0f172a2e;border-radius:16px;overflow:hidden}.code-toolbar[data-v-5e360239]{border-bottom:1px solid #94a3b82e;justify-content:flex-end;padding:8px 10px;display:flex}@media (width<=1400px){.flow-grid[data-v-5e360239]{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-row[data-v-5e360239]{flex-wrap:wrap}}@media (width<=960px){.panel-toolbar[data-v-5e360239]{flex-direction:column;align-items:stretch}.flow-grid[data-v-5e360239]{grid-template-columns:1fr}}.chart-shell[data-v-65855634]{min-height:340px}.chart[data-v-65855634]{width:100%;height:340px}.yaml-editor-root[data-v-b52fd9cd],.yaml-editor-root[data-v-b52fd9cd] .cm-editor{min-height:300px}.panel-shell[data-v-862f857a]{flex-direction:column;gap:12px;min-width:0;display:flex}.result-notice[data-v-862f857a]{margin-top:2px}.yaml-shell[data-v-862f857a]{flex-direction:column;gap:10px;display:flex}.yaml-toolbar[data-v-862f857a]{justify-content:space-between;align-items:flex-start;gap:10px;display:flex}.panel-shell[data-v-862f857a] .n-tabs-nav{margin-bottom:6px}@media (width<=1200px){.yaml-toolbar[data-v-862f857a]{flex-direction:column}}.workbench-shell[data-v-e0c3413c]{flex-direction:column;gap:10px;display:flex;position:relative}.hero-card[data-v-e0c3413c]{background:radial-gradient(circle at 100% 0,#22c55e2e,#0000 24rem),radial-gradient(circle at 0 0,#0ea5e929,#0000 18rem),linear-gradient(135deg,#fffffff5,#f7fbfcfa);border-radius:28px;overflow:hidden}.hero-card[data-v-e0c3413c] .n-card__content{padding:10px 14px}.hero-topline[data-v-e0c3413c]{justify-content:space-between;align-items:center;min-height:20px;display:flex}.popover-content[data-v-e0c3413c]{min-width:220px}.popover-content p[data-v-e0c3413c]{color:#475569e0;margin:6px 0 0}.stats-popover[data-v-e0c3413c]{flex-direction:column;gap:8px;display:flex}.stat-row[data-v-e0c3413c]{justify-content:space-between;align-items:center;gap:16px;display:flex}.workspace[data-v-e0c3413c]{flex-direction:column;gap:6px;display:flex;position:relative}.surface-card[data-v-e0c3413c]{border-radius:28px;min-width:0}.surface-card[data-v-e0c3413c] .n-card__content{padding:10px 12px}.result-surface[data-v-e0c3413c]{min-height:0}.explorer-surface[data-v-e0c3413c]{min-height:680px}.query-error-modal[data-v-e0c3413c]{width:min(560px,100vw - 32px)}.query-error-message[data-v-e0c3413c]{white-space:pre-wrap;color:#334155f5;margin:10px 0 0}.connection-overlay[data-v-e0c3413c]{z-index:10;justify-content:center;align-items:flex-start;padding:clamp(28px,7vh,76px) 20px 20px;display:flex;position:absolute;inset:0}.overlay-backdrop[data-v-e0c3413c]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#f8fafcd1;border-radius:32px;position:absolute;inset:0}.connection-card[data-v-e0c3413c]{z-index:1;border-radius:26px;width:min(680px,100%);position:relative;box-shadow:0 28px 90px #0f172a29}.floating-status[data-v-e0c3413c]{z-index:30;width:min(420px,100vw - 32px);position:fixed;bottom:24px;right:24px;box-shadow:0 20px 48px #0f172a2e}.floating-status-enter-active[data-v-e0c3413c],.floating-status-leave-active[data-v-e0c3413c]{transition:opacity .18s,transform .18s}.floating-status-enter-from[data-v-e0c3413c],.floating-status-leave-to[data-v-e0c3413c]{opacity:0;transform:translateY(8px)}@media (width<=1200px){.workbench-shell[data-v-e0c3413c]{gap:8px}}
1
+ .chart-shell[data-v-88f9dcdf]{min-height:340px}.chart[data-v-88f9dcdf]{width:100%;height:340px}.dashboard-shell[data-v-4228d0a3]{flex-direction:column;gap:12px;min-width:0;display:flex}.dashboard-header[data-v-4228d0a3] .n-card__content{padding:12px 14px}.dashboard-meta[data-v-4228d0a3]{flex-direction:column;gap:4px;min-width:0;display:flex}.dashboard-title-row[data-v-4228d0a3]{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.dashboard-grid[data-v-4228d0a3]{gap:12px;display:grid}.dashboard-panel[data-v-4228d0a3]{min-width:0}.panel-header[data-v-4228d0a3]{align-items:center;gap:8px;min-width:0;display:flex}.panel-description[data-v-4228d0a3]{margin-bottom:10px;display:block}.panel-alert[data-v-4228d0a3]{margin-bottom:10px}.panel-content[data-v-4228d0a3]{flex-direction:column;gap:10px;display:flex}.split-panel[data-v-4228d0a3]{flex-direction:column;gap:12px;display:flex}.panel-footer[data-v-4228d0a3]{margin-top:10px}@media (width<=900px){.dashboard-grid[data-v-4228d0a3]{grid-template-columns:minmax(0,1fr)!important}}.panel-shell[data-v-7c30fdb8]{flex-direction:column;gap:12px;display:flex}.status-alert[data-v-7c30fdb8],.health-tags[data-v-7c30fdb8]{margin-top:2px}.auth-hint[data-v-7c30fdb8]{margin-bottom:10px}.flux-editor-root[data-v-9aaf532f],.flux-editor-root[data-v-9aaf532f] .cm-editor{min-height:300px}.stage-panel[data-v-c694217a]{background:#ffffffd6;border:1px solid #e2e8f0eb;border-radius:16px;flex-direction:column;gap:10px;min-height:360px;padding:10px 12px;display:flex}.stage-header[data-v-c694217a]{justify-content:space-between;align-items:center;gap:12px;display:flex}.stage-meta[data-v-c694217a]{align-items:center;gap:8px;display:flex}.stage-body[data-v-c694217a]{flex:1;min-height:0}.panel-shell[data-v-4e80a5ed]{flex-direction:column;gap:12px;min-width:0;display:flex}.panel-toolbar[data-v-4e80a5ed]{justify-content:flex-end;align-items:center;gap:12px;display:flex}.settings-shell[data-v-4e80a5ed]{background:#ffffffd6;border:1px solid #e2e8f0f2;border-radius:16px;padding:10px 12px}.settings-row[data-v-4e80a5ed]{flex-wrap:nowrap;align-items:stretch;gap:10px;display:flex}.setting-item[data-v-4e80a5ed]{flex:1 1 0;min-width:0;margin-bottom:0}.preset-item[data-v-4e80a5ed],.range-item[data-v-4e80a5ed]{flex:1 1 0}.setting-item[data-v-4e80a5ed] .n-base-selection,.setting-item[data-v-4e80a5ed] .n-date-picker,.setting-item[data-v-4e80a5ed] .n-input-number{width:100%}.flow-grid[data-v-4e80a5ed]{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.selection-list[data-v-4e80a5ed]{flex-direction:column;gap:8px;max-height:320px;display:flex;overflow:auto}.selection-item[data-v-4e80a5ed]{text-align:left;cursor:pointer;background:#fff;border:1px solid #94a3b847;border-radius:14px;width:100%;padding:10px 12px;transition:transform .12s,border-color .12s,box-shadow .12s}.selection-item[data-v-4e80a5ed]:hover{border-color:#0ea5e966;transform:translateY(-1px);box-shadow:0 10px 24px #0f172a0f}.selection-item.active[data-v-4e80a5ed]{background:#ecfdf5eb;border-color:#14b8a68c}.item-title[data-v-4e80a5ed],.item-meta[data-v-4e80a5ed]{display:block}.item-title[data-v-4e80a5ed]{font-weight:700}.item-meta[data-v-4e80a5ed]{color:#475569d6;margin-top:4px;font-size:.78rem}.checkbox-item[data-v-4e80a5ed]{background:#f8fafcb3;border:1px solid #e2e8f0cc;border-radius:12px;align-items:center;gap:10px;padding:8px 10px;display:flex}.filter-stack[data-v-4e80a5ed]{flex-direction:column;gap:10px;display:flex}.filter-row[data-v-4e80a5ed]{grid-template-columns:1fr;gap:10px;display:grid}.query-shell[data-v-4e80a5ed]{min-width:0}.code-shell[data-v-4e80a5ed]{background:#0f172a;border:1px solid #0f172a2e;border-radius:16px;overflow:hidden}.code-toolbar[data-v-4e80a5ed]{border-bottom:1px solid #94a3b82e;justify-content:flex-end;padding:8px 10px;display:flex}@media (width<=1400px){.flow-grid[data-v-4e80a5ed]{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-row[data-v-4e80a5ed]{flex-wrap:wrap}}@media (width<=960px){.panel-toolbar[data-v-4e80a5ed]{flex-direction:column;align-items:stretch}.flow-grid[data-v-4e80a5ed]{grid-template-columns:1fr}}.yaml-editor-root[data-v-66fe2a97]{background:linear-gradient(#020617fa,#0f172afa);border:1px solid #334155e0;border-radius:16px;min-height:300px;overflow:hidden}.yaml-editor-root[data-v-66fe2a97] .cm-editor{background:0 0;min-height:300px}.yaml-editor-root[data-v-66fe2a97] .cm-gutters{color:#94a3b8d6;background:#020617b8;border-right:1px solid #334155b3}.yaml-editor-root[data-v-66fe2a97] .cm-activeLineGutter{background:#0f172aeb}.yaml-editor-root[data-v-66fe2a97] .cm-panels{background:#020617f5}.panel-shell[data-v-b7d18507]{flex-direction:column;gap:12px;min-width:0;display:flex}.result-notice[data-v-b7d18507]{margin-top:2px}.yaml-shell[data-v-b7d18507]{flex-direction:column;gap:10px;display:flex}.yaml-toolbar[data-v-b7d18507]{justify-content:space-between;align-items:flex-start;gap:10px;display:flex}.panel-shell[data-v-b7d18507] .n-tabs-nav{margin-bottom:6px}@media (width<=1200px){.yaml-toolbar[data-v-b7d18507]{flex-direction:column}}.workbench-shell[data-v-de13a79c]{flex-direction:column;gap:10px;display:flex;position:relative}.hero-card[data-v-de13a79c]{background:radial-gradient(circle at 100% 0,#22c55e2e,#0000 24rem),radial-gradient(circle at 0 0,#0ea5e929,#0000 18rem),linear-gradient(135deg,#fffffff5,#f7fbfcfa);border-radius:28px;overflow:hidden}.hero-card[data-v-de13a79c] .n-card__content{padding:10px 14px}.hero-topline[data-v-de13a79c]{justify-content:space-between;align-items:center;min-height:20px;display:flex}.popover-content[data-v-de13a79c]{min-width:220px}.popover-content p[data-v-de13a79c]{color:#475569e0;margin:6px 0 0}.stats-popover[data-v-de13a79c]{flex-direction:column;gap:8px;display:flex}.stat-row[data-v-de13a79c]{justify-content:space-between;align-items:center;gap:16px;display:flex}.workspace[data-v-de13a79c]{flex-direction:column;gap:6px;display:flex;position:relative}.surface-card[data-v-de13a79c]{border-radius:28px;min-width:0}.surface-card[data-v-de13a79c] .n-card__content{padding:10px 12px}.result-surface[data-v-de13a79c]{min-height:0}.explorer-surface[data-v-de13a79c]{min-height:680px}.query-error-modal[data-v-de13a79c]{width:min(560px,100vw - 32px)}.query-error-message[data-v-de13a79c]{white-space:pre-wrap;color:#334155f5;margin:10px 0 0}.connection-overlay[data-v-de13a79c]{z-index:10;justify-content:center;align-items:flex-start;padding:clamp(28px,7vh,76px) 20px 20px;display:flex;position:absolute;inset:0}.overlay-backdrop[data-v-de13a79c]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#f8fafcd1;border-radius:32px;position:absolute;inset:0}.connection-card[data-v-de13a79c]{z-index:1;border-radius:26px;width:min(680px,100%);position:relative;box-shadow:0 28px 90px #0f172a29}.floating-status[data-v-de13a79c]{z-index:30;width:min(420px,100vw - 32px);position:fixed;bottom:24px;right:24px;box-shadow:0 20px 48px #0f172a2e}.floating-status-enter-active[data-v-de13a79c],.floating-status-leave-active[data-v-de13a79c]{transition:opacity .18s,transform .18s}.floating-status-enter-from[data-v-de13a79c],.floating-status-leave-to[data-v-de13a79c]{opacity:0;transform:translateY(8px)}@media (width<=1200px){.workbench-shell[data-v-de13a79c]{gap:8px}}
2
2
  /*$vite$:1*/