diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c034dc9..4197c7b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -106,6 +106,6 @@ jobs: - name: Archive plugin build artifacts uses: actions/upload-artifact@v4 with: - name: grafana-questdb-datasource.zip + name: questdb-questdb-datasource.zip path: ${{ steps.metadata.outputs.archive }} retention-days: 7 diff --git a/README.md b/README.md index 3316982..ea9253a 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Here are some provisioning examples for this data source using basic authenticat apiVersion: 1 datasources: - name: QuestDB - type: grafana-questdb-datasource + type: questdb-questdb-datasource jsonData: server: localhost port: 8812 diff --git a/docker-compose.yml b/docker-compose.yml index 41d9035..a396d12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: ports: - '3000:3000' volumes: - - ./:/var/lib/grafana/plugins/grafana-questdb-datasource + - ./:/var/lib/grafana/plugins/questdb-questdb-datasource - ./provisioning:/etc/grafana/provisioning environment: - TERM=linux diff --git a/package.json b/package.json index 48bda15..ceecb82 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "grafana-questdb-datasource", + "name": "questdb-questdb-datasource", "version": "0.1.2", "description": "QuestDB Datasource for Grafana", "engines": { diff --git a/pkg/main.go b/pkg/main.go index e7e103c..8e69d65 100644 --- a/pkg/main.go +++ b/pkg/main.go @@ -13,7 +13,7 @@ import ( ) func main() { - if err := datasource.Manage("grafana-questdb-datasource", newDatasource, datasource.ManageOpts{}); err != nil { + if err := datasource.Manage("questdb-questdb-datasource", newDatasource, datasource.ManageOpts{}); err != nil { log.DefaultLogger.Error(err.Error()) os.Exit(1) } diff --git a/pkg/plugin/driver.go b/pkg/plugin/driver.go index 300e786..6275945 100644 --- a/pkg/plugin/driver.go +++ b/pkg/plugin/driver.go @@ -40,7 +40,7 @@ func getClientVersion(ctx context.Context) string { if version != "" { version += ";" } - result += fmt.Sprintf("questdb-datasource:%s", info.Version) + result += fmt.Sprintf("questdb-questdb-datasource:%s", info.Version) } return result diff --git a/provisioning/datasources/questdb_datasource.yaml b/provisioning/datasources/questdb_questdb_datasource.yaml similarity index 92% rename from provisioning/datasources/questdb_datasource.yaml rename to provisioning/datasources/questdb_questdb_datasource.yaml index 2a38bb0..4594e5a 100644 --- a/provisioning/datasources/questdb_datasource.yaml +++ b/provisioning/datasources/questdb_questdb_datasource.yaml @@ -1,7 +1,7 @@ apiVersion: 1 datasources: - name: QuestDB-test - type: grafana-questdb-datasource + type: questdb-questdb-datasource jsonData: server: grafana-questdb-server port: 8812 diff --git a/src/__mocks__/datasource.ts b/src/__mocks__/datasource.ts index 320e9c6..ddf8c37 100644 --- a/src/__mocks__/datasource.ts +++ b/src/__mocks__/datasource.ts @@ -5,7 +5,7 @@ import { Datasource } from '../data/QuestDbDatasource'; export const mockDatasource = new Datasource({ id: 1, uid: 'questdb_ds', - type: 'grafana-questdb-datasource', + type: 'questdb-questdb-datasource', name: 'QuestDB', jsonData: { server: 'foo.com', @@ -15,7 +15,7 @@ export const mockDatasource = new Datasource({ readOnly: true, access: 'direct', meta: { - id: 'grafana-questdb-datasource', + id: 'questdb-grafana-datasource', name: 'QuestDB', type: PluginType.datasource, module: '', diff --git a/src/components/queryBuilder/utils.spec.ts b/src/components/queryBuilder/utils.spec.ts index 71c2e2b..3e81466 100644 --- a/src/components/queryBuilder/utils.spec.ts +++ b/src/components/queryBuilder/utils.spec.ts @@ -14,7 +14,7 @@ let mockTimeField = ""; const mockDatasource = new Datasource({ id: 1, uid: 'questdb_ds', - type: 'grafana-questdb-datasource', + type: 'questdb-questdb-datasource', name: 'QuestDB', jsonData: { server: 'foo.com', @@ -24,7 +24,7 @@ const mockDatasource = new Datasource({ readOnly: true, access: 'direct', meta: { - id: 'grafana-questdb-datasource', + id: 'questdb-questdb-datasource', name: 'QuestDB', type: PluginType.datasource, module: '', diff --git a/src/img/sql_builder.png b/src/img/sql_builder.png new file mode 100644 index 0000000..f0ea2c9 Binary files /dev/null and b/src/img/sql_builder.png differ diff --git a/src/plugin.json b/src/plugin.json index b05821d..e851224 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json", "type": "datasource", "name": "QuestDB", - "id": "grafana-questdb-datasource", + "id": "questdb-questdb-datasource", "metrics": true, "backend": true, "logs": true, @@ -30,7 +30,12 @@ "url": "https://github.com/questdb/grafana-questdb-datasource/blob/master/LICENSE" } ], - "screenshots": [], + "screenshots": [ + { + "name": "SQL Builder", + "path": "img/sql_builder.png" + } + ], "version": "%VERSION%", "updated": "%TODAY%" },