Merge pull request #3453 from influxdata/bugfix/tickscript-logviewer

Revert back to using fetch to get kapacitors log stream
pull/10616/head
Deniz Kusefoglu 2018-05-14 17:40:51 -07:00 committed by GitHub
commit dfc4e8989b
2 changed files with 12 additions and 11 deletions

View File

@ -37,7 +37,7 @@
1. [#3402](https://github.com/influxdata/chronograf/pull/3402): Fix missing icons when using basepath
1. [#3412](https://github.com/influxdata/chronograf/pull/3412): Limit max-width of TICKScript editor.
1. [#3166](https://github.com/influxdata/chronograf/pull/3166): Fixes naming of new TICKScripts
1. [#3453](https://github.com/influxdata/chronograf/pull/3453): Fix Kapacitor Logs fetch regression
## v1.4.4.1 [2018-04-16]

View File

@ -107,22 +107,23 @@ const kapacitorLogHeaders = {
}
export const getLogStream = kapacitor =>
AJAX({
url: `${kapacitor.links.proxy}?path=/kapacitor/v1preview/logs`,
// fetch required for kapacitors log querying
fetch(`${kapacitor.links.proxy}?path=/kapacitor/v1preview/logs`, {
method: 'GET',
headers: kapacitorLogHeaders,
credentials: 'include',
})
export const getLogStreamByRuleID = (kapacitor, ruleID) =>
AJAX({
url: `${
kapacitor.links.proxy
}?path=/kapacitor/v1preview/logs?task=${ruleID}`,
method: 'GET',
headers: kapacitorLogHeaders,
credentials: 'include',
})
// fetch required for kapacitors log querying
fetch(
`${kapacitor.links.proxy}?path=/kapacitor/v1preview/logs?task=${ruleID}`,
{
method: 'GET',
headers: kapacitorLogHeaders,
credentials: 'include',
}
)
export const pingKapacitorVersion = async kapacitor => {
try {