Skip to content

Commit c562316

Browse files
bug fixes and package name change as per org name
1 parent 7a36947 commit c562316

File tree

8 files changed

+7977
-37685
lines changed

8 files changed

+7977
-37685
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ mage -v build:windows
184184

185185
- Documentation on [Backend plugins](https://grafana.com/docs/grafana/latest/developers/plugins/backend/)
186186
- [Build a data source backend plugin tutorial](https://grafana.com/tutorials/build-a-data-source-backend-plugin)
187+
- [Grafana backend datasource template project on GitHub](https://github.com/grafana/grafana-starter-datasource-backend)
187188
- [Grafana documentation](https://grafana.com/docs/)
188189
- [Grafana Tutorials](https://grafana.com/tutorials/) - Grafana Tutorials are step-by-step guides that help you make the most of Grafana
189190
- [Grafana UI Library](https://developers.grafana.com/ui) - UI components to help you build interfaces using Grafana Design System

package-lock.json

Lines changed: 0 additions & 29745 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "api-backend-datasource",
2+
"name": "nagasudhir-api-datasource",
33
"version": "1.0.0",
44
"description": "",
55
"scripts": {
@@ -28,4 +28,4 @@
2828
"engines": {
2929
"node": ">=14"
3030
}
31-
}
31+
}

pkg/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func main() {
1717
// from Grafana to create different instances of SampleDatasource (per datasource
1818
// ID). When datasource configuration changed Dispose method will be called and
1919
// new datasource instance created using NewSampleDatasource factory.
20-
if err := datasource.Manage("api-backend-datasource", plugin.NewDataSourceInstance, datasource.ManageOpts{}); err != nil {
20+
if err := datasource.Manage("nagasudhir-api-datasource", plugin.NewDataSourceInstance, datasource.ManageOpts{}); err != nil {
2121
log.DefaultLogger.Error(err.Error())
2222
os.Exit(1)
2323
}

src/ConfigEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const ConfigEditor: ComponentType<Props> = ({ options, onOptionsChange })
3333
height="200px"
3434
language="json"
3535
showLineNumbers={true}
36-
showMiniMap={schemaStr.length > 100}
36+
showMiniMap={(schemaStr??"").length > 100}
3737
value={schemaStr}
3838
onBlur={(txt: string) => {
3939
const schema: JSONSchema7 = (() => {

src/QueryEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class QueryEditor extends PureComponent<Props>{
4747
if (["number", "string", "integer"].indexOf(propType) === -1) { continue }
4848
const propOpts = sProperty.enum;
4949
if (!Array.isArray(propOpts)) { continue }
50-
var selOpts = propOpts.map((v) => {
50+
let selOpts = propOpts.map((v) => {
5151
let val: string | number = (propType === "string") ? `${v}` : parseFloat(`${v}`)
5252
return { label: "" + v, value: val }
5353
});

src/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"metrics": true,
77
"backend": true,
88
"alerting": true,
9-
"executable": "gpx_api-backend-datasource_windows_amd64.exe",
9+
"executable": "gpx_nagasudhir-api-datasource",
1010
"info": {
1111
"description": "",
1212
"author": {

yarn.lock

Lines changed: 7970 additions & 7934 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)