Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ const config = async (env): Promise<Configuration> => {
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
/**
* Disable failing for lint errors in dev mode
* Please revert after upgrade
* @override
*/
failOnError: !Boolean(env.development),
}),
...(env.development ? [new LiveReloadPlugin()] : []),
],
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ All notable changes to **Business Input Data Source** will be documented in this

### Changed

- Update ESLint configuration ([#104](https://github.com/VolkovLabs/business-input/pull/104)).
- Updated ESLint configuration ([#104](https://github.com/VolkovLabs/business-input/pull/104)).
- Updated LLM behavior and plugin not found ([#106](https://github.com/VolkovLabs/business-input/pull/106)).

## [5.0.0] - 2025-07-21

Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,6 @@ Business Input is part of the **Business Suite**, a collection of open-source pl

[![Business Suite for Grafana](https://raw.githubusercontent.com/VolkovLabs/.github/main/business.png)](https://volkovlabs.io/plugins/)

### Enterprise Support

Elevate your experience with [Business Suite Enterprise](https://volkovlabs.io/pricing/):

- Dedicated support via Zendesk.
- Priority feature requests and bug fixes.
- In-person consultations and access to Business Intelligence tools.

## 💬 Get Involved

We value your feedback and contributions! Connect with us through:

- **GitHub Issues**: [Ask questions, request features, or report bugs](https://github.com/volkovlabs/business-input/issues).
- **YouTube**: [Subscribe to our channel](https://youtube.com/@volkovlabs) and leave comments.

## 📜 License

This project is licensed under the Apache License Version 2.0. See the [LICENSE](https://github.com/volkovlabs/business-input/blob/main/LICENSE) file for details.
10 changes: 5 additions & 5 deletions src/components/QueryEditor/QueryEditor.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CoreApp, DataSourcePluginContextProvider } from '@grafana/data';
import { openai } from '@grafana/llm';
import { llm } from '@grafana/llm';
import { act, fireEvent, render, screen } from '@testing-library/react';
import { getJestSelectors } from '@volkovlabs/jest-selectors';
import React from 'react';
Expand Down Expand Up @@ -52,7 +52,7 @@ jest.mock('@grafana/ui', () => ({
* Mock @grafana/llm
*/
jest.mock('@grafana/llm', () => ({
openai: {
llm: {
enabled: jest.fn(),
},
}));
Expand Down Expand Up @@ -198,7 +198,7 @@ describe('Query Editor', () => {
/**
* Enable openai
*/
jest.mocked(openai.enabled).mockResolvedValue(true);
jest.mocked(llm.enabled).mockResolvedValue(true);

const currentQuery: StaticQuery = {
refId: '',
Expand All @@ -225,7 +225,7 @@ describe('Query Editor', () => {
/**
* Disable openai
*/
jest.mocked(openai.enabled).mockResolvedValue(false);
jest.mocked(llm.enabled).mockResolvedValue(false);

const currentQuery: StaticQuery = {
refId: '',
Expand All @@ -252,7 +252,7 @@ describe('Query Editor', () => {
/**
* Enable openai
*/
jest.mocked(openai.enabled).mockResolvedValue(true);
jest.mocked(llm.enabled).mockResolvedValue(true);

const currentQuery: StaticQuery = {
refId: '',
Expand Down
4 changes: 2 additions & 2 deletions src/components/QueryEditor/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
QueryEditorProps,
SelectableValue,
} from '@grafana/data';
import { openai } from '@grafana/llm';
import { llm } from '@grafana/llm';
import { CollapsableSection, InlineField, InlineFieldRow, Input, Select, TextArea, useStyles2 } from '@grafana/ui';
import React, { useCallback, useEffect, useState } from 'react';

Expand Down Expand Up @@ -157,7 +157,7 @@
*/
useEffect(() => {
const check = async () => {
const enabled = await openai.enabled();
const enabled = await llm.enabled();

setLlmEnabled(enabled);
};
Expand All @@ -178,7 +178,7 @@

{app === CoreApp.Explore && (
<InlineField label="Preferred visualization type">
<Select

Check warning on line 181 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / build

`Select` is deprecated. Use Combobox component instead

Check warning on line 181 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / build

`Select` is deprecated. Use Combobox component instead

Check warning on line 181 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / dependency

`Select` is deprecated. Use Combobox component instead

Check warning on line 181 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / dev

`Select` is deprecated. Use Combobox component instead
isClearable={true}
width={17}
value={model.meta?.preferredVisualisationType}
Expand All @@ -196,7 +196,7 @@

{datasource.codeEditorEnabled && (
<InlineField htmlFor="config-values-editor" label="Values Editor">
<Select

Check warning on line 199 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / build

`Select` is deprecated. Use Combobox component instead

Check warning on line 199 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / build

`Select` is deprecated. Use Combobox component instead

Check warning on line 199 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / dependency

`Select` is deprecated. Use Combobox component instead

Check warning on line 199 in src/components/QueryEditor/QueryEditor.tsx

View workflow job for this annotation

GitHub Actions / dev

`Select` is deprecated. Use Combobox component instead
inputId="config-values-editor"
width={17}
value={model.meta?.custom?.valuesEditor || ValuesEditorType.MANUAL}
Expand Down
12 changes: 6 additions & 6 deletions src/datasource/datasource.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { dateTime, FieldType, toDataFrame } from '@grafana/data';
import { openai } from '@grafana/llm';
import { llm } from '@grafana/llm';
import { getTemplateSrv } from '@grafana/runtime';

import { DataSourceTestStatus } from '../constants';
Expand All @@ -17,7 +17,7 @@ jest.mock('@grafana/runtime', () => ({
* Mock @grafana/llm
*/
jest.mock('@grafana/llm', () => ({
openai: {
llm: {
enabled: jest.fn(),
chatCompletions: jest.fn(),
},
Expand Down Expand Up @@ -45,7 +45,7 @@ describe('DataSource', () => {
};

beforeEach(() => {
jest.mocked(openai.chatCompletions).mockClear();
jest.mocked(llm.chatCompletions).mockClear();
});

/**
Expand Down Expand Up @@ -185,8 +185,8 @@ describe('DataSource', () => {
/**
* Enable openai
*/
jest.mocked(openai.enabled).mockResolvedValue(true);
jest.mocked(openai.chatCompletions).mockResolvedValue([1, 2] as any);
jest.mocked(llm.enabled).mockResolvedValue(true);
jest.mocked(llm.chatCompletions).mockResolvedValue([1, 2] as any);

const response = await dataSource.query({ targets, range } as any);
const frames = response.data;
Expand All @@ -199,7 +199,7 @@ describe('DataSource', () => {
/**
* Check if message passed to openai
*/
expect(openai.chatCompletions).toHaveBeenCalledWith({
expect(llm.chatCompletions).toHaveBeenCalledWith({
messages: [{ role: 'user', content: 'get list' }],
});
});
Expand Down
6 changes: 3 additions & 3 deletions src/datasource/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ScopedVars,
toDataFrame,
} from '@grafana/data';
import { openai } from '@grafana/llm';
import { llm } from '@grafana/llm';
import { getTemplateSrv, TemplateSrv } from '@grafana/runtime';

import { DataSourceTestStatus } from '../constants';
Expand Down Expand Up @@ -59,8 +59,8 @@ export class DataSource extends DataSourceApi<StaticQuery, StaticDataSourceOptio
/**
* Chat Completions
*/
if ((await openai.enabled()) && llmQuery?.openai?.message) {
llmResult = await openai.chatCompletions({
if ((await llm.enabled()) && llmQuery?.openai?.message) {
llmResult = await llm.chatCompletions({
messages: [{ role: 'user', content: this.templateSrv.replace(llmQuery.openai.message, scopedVars) }],
});
}
Expand Down
Loading