|
|
@ -111,6 +111,7 @@ class PluginState { |
|
|
|
static timeout = (pollCount: number) => new Promise((resolve) => setTimeout(resolve, 10 * 2 ** pollCount)); |
|
|
|
static timeout = (pollCount: number) => new Promise((resolve) => setTimeout(resolve, 10 * 2 ** pollCount)); |
|
|
|
|
|
|
|
|
|
|
|
static connectBackend = async <RT>(): Promise<InstallPluginResponse<RT>> => { |
|
|
|
static connectBackend = async <RT>(): Promise<InstallPluginResponse<RT>> => { |
|
|
|
|
|
|
|
// TODO: try to disable success alerts from Grafana API
|
|
|
|
const { key: grafanaToken } = await this.createGrafanaToken(); |
|
|
|
const { key: grafanaToken } = await this.createGrafanaToken(); |
|
|
|
await this.updateGrafanaPluginSettings({ secureJsonData: { grafanaToken } }); |
|
|
|
await this.updateGrafanaPluginSettings({ secureJsonData: { grafanaToken } }); |
|
|
|
const dataExporterAPIResponse = await makeRequest<RT>(`/connect`, { |
|
|
|
const dataExporterAPIResponse = await makeRequest<RT>(`/connect`, { |
|
|
|