|
|
@ -55,6 +55,7 @@ import { RefreshEvent } from '@grafana/runtime'; |
|
|
|
|
|
|
|
|
|
|
|
import React, { useState, useEffect } from 'react'; |
|
|
|
import React, { useState, useEffect } from 'react'; |
|
|
|
import * as _ from 'lodash'; |
|
|
|
import * as _ from 'lodash'; |
|
|
|
|
|
|
|
import PluginState from 'plugin_state'; |
|
|
|
|
|
|
|
|
|
|
|
const PANEL_ID = 'corpglory-dataexporter-panel'; |
|
|
|
const PANEL_ID = 'corpglory-dataexporter-panel'; |
|
|
|
const APP_ID = 'corpglory-dataexporter-app'; |
|
|
|
const APP_ID = 'corpglory-dataexporter-app'; |
|
|
@ -215,6 +216,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { |
|
|
|
queries: selectedQueries, |
|
|
|
queries: selectedQueries, |
|
|
|
csvDelimiter, |
|
|
|
csvDelimiter, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const token = await PluginState.createGrafanaToken(); |
|
|
|
// TODO: move this function to API Service
|
|
|
|
// TODO: move this function to API Service
|
|
|
|
await queryApi('/task', { |
|
|
|
await queryApi('/task', { |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
@ -222,6 +224,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { |
|
|
|
task, |
|
|
|
task, |
|
|
|
url: window.location.toString(), |
|
|
|
url: window.location.toString(), |
|
|
|
timeZoneName, |
|
|
|
timeZoneName, |
|
|
|
|
|
|
|
apiKey: token.key, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|