|
|
@ -90,9 +90,13 @@ class PluginState { |
|
|
|
this.grafanaBackend.get<DataExporterAppPluginMeta>(this.GRAFANA_PLUGIN_SETTINGS_URL); |
|
|
|
this.grafanaBackend.get<DataExporterAppPluginMeta>(this.GRAFANA_PLUGIN_SETTINGS_URL); |
|
|
|
|
|
|
|
|
|
|
|
static updateGrafanaPluginSettings = async (data: UpdateGrafanaPluginSettingsProps, enabled = true) => |
|
|
|
static updateGrafanaPluginSettings = async (data: UpdateGrafanaPluginSettingsProps, enabled = true) => |
|
|
|
|
|
|
|
this.grafanaBackend.post( |
|
|
|
|
|
|
|
this.GRAFANA_PLUGIN_SETTINGS_URL, |
|
|
|
|
|
|
|
{ ...data, enabled, pinned: true }, |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|
// for some reason, there is no `options` argument in Grafana's public types for BackendSrv but it exists
|
|
|
|
// for some reason, there is no `options` argument in Grafana's public types for BackendSrv but it exists
|
|
|
|
this.grafanaBackend.post(this.GRAFANA_PLUGIN_SETTINGS_URL, { ...data, enabled, pinned: true }, { showSuccessAlert: false }); |
|
|
|
{ showSuccessAlert: false } |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
static createGrafanaToken = async () => { |
|
|
|
static createGrafanaToken = async () => { |
|
|
|
const baseUrl = '/api/auth/keys'; |
|
|
|
const baseUrl = '/api/auth/keys'; |
|
|
|