@grafana/create-plugin 2.8.0 → 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/package.json +2 -2
- package/templates/common/_package.json +3 -3
- package/templates/datasource/src/types.ts +2 -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/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
|
}
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@emotion/css": "^11.1.3",
|
|
62
62
|
"@grafana/data": "{{ grafanaVersion }}",
|
|
63
63
|
"@grafana/runtime": "{{ grafanaVersion }}",
|
|
64
|
-
"@grafana/ui": "{{ grafanaVersion }}",
|
|
65
|
-
"@grafana/schema": "{{ grafanaVersion }}",
|
|
66
|
-
"@grafana/scenes": "
|
|
64
|
+
"@grafana/ui": "{{ grafanaVersion }}",
|
|
65
|
+
"@grafana/schema": "{{ grafanaVersion }}",{{#if_eq pluginType "scenesapp"}}
|
|
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
|
};
|