@grafana/create-plugin 2.8.1 → 2.9.0-canary.573.1b536d6.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.
- package/CHANGELOG.md +0 -16
- package/package.json +2 -2
- package/templates/common/_package.json +1 -1
- package/templates/scenes-app/src/components/App/App.tsx +1 -1
- package/templates/scenes-app/src/components/AppConfig/AppConfig.tsx +5 -2
- package/templates/scenes-app/src/components/Routes/Routes.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
# v2.8.1 (Fri Dec 08 2023)
|
|
2
|
-
|
|
3
|
-
:tada: This release contains work from a new contributor! :tada:
|
|
4
|
-
|
|
5
|
-
Thank you, Ludovic Muller ([@ludovicm67](https://github.com/ludovicm67)), for all your work!
|
|
6
|
-
|
|
7
|
-
#### 🐛 Bug Fix
|
|
8
|
-
|
|
9
|
-
- Templates: import DataQuery from `@grafana/schema` instead of `@grafana/data` [#549](https://github.com/grafana/plugin-tools/pull/549) ([@ludovicm67](https://github.com/ludovicm67))
|
|
10
|
-
|
|
11
|
-
#### Authors: 1
|
|
12
|
-
|
|
13
|
-
- Ludovic Muller ([@ludovicm67](https://github.com/ludovicm67))
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
1
|
# v2.8.0 (Thu Dec 07 2023)
|
|
18
2
|
|
|
19
3
|
#### 🚀 Enhancement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0-canary.573.1b536d6.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/create-plugin",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=20"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "1b536d6e316b014cbf00ea56f0dd9918474e09e3"
|
|
70
70
|
}
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@grafana/runtime": "{{ grafanaVersion }}",
|
|
64
64
|
"@grafana/ui": "{{ grafanaVersion }}",
|
|
65
65
|
"@grafana/schema": "{{ grafanaVersion }}",{{#if_eq pluginType "scenesapp"}}
|
|
66
|
-
"@grafana/scenes": "
|
|
66
|
+
"@grafana/scenes": "^1.28.0",{{/if_eq}}
|
|
67
67
|
"react": "17.0.2",
|
|
68
68
|
"react-dom": "17.0.2",{{#if isAppType}}
|
|
69
69
|
"react-router-dom": "^5.2.0",
|
|
@@ -4,6 +4,7 @@ import { PluginConfigPageProps, AppPluginMeta, PluginMeta, GrafanaTheme2 } from
|
|
|
4
4
|
import { getBackendSrv, locationService } from '@grafana/runtime';
|
|
5
5
|
import { css } from '@emotion/css';
|
|
6
6
|
import { testIds } from '../testIds';
|
|
7
|
+
import { lastValueFrom } from 'rxjs';
|
|
7
8
|
|
|
8
9
|
export type JsonData = {
|
|
9
10
|
apiUrl?: string;
|
|
@@ -182,11 +183,13 @@ const updatePluginAndReload = async (pluginId: string, data: Partial<PluginMeta<
|
|
|
182
183
|
};
|
|
183
184
|
|
|
184
185
|
export const updatePlugin = async (pluginId: string, data: Partial<PluginMeta>) => {
|
|
185
|
-
const response =
|
|
186
|
+
const response = getBackendSrv().fetch({
|
|
186
187
|
url: `/api/plugins/${pluginId}/settings`,
|
|
187
188
|
method: 'POST',
|
|
188
189
|
data,
|
|
189
190
|
});
|
|
190
191
|
|
|
191
|
-
|
|
192
|
+
const dataResponse = await lastValueFrom(response);
|
|
193
|
+
|
|
194
|
+
return dataResponse.data;
|
|
192
195
|
};
|