Fix the table view
parent
0f9cb6aef7
commit
13b2af3b09
|
@ -35,10 +35,6 @@ const ChronoTable = React.createClass({
|
|||
containerWidth: number.isRequired,
|
||||
},
|
||||
|
||||
contextTypes: {
|
||||
clusterID: string,
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
return {
|
||||
cellData: {
|
||||
|
@ -52,7 +48,7 @@ const ChronoTable = React.createClass({
|
|||
fetchCellData(query) {
|
||||
this.setState({isLoading: true});
|
||||
// second param is db, we want to leave this blank
|
||||
fetchTimeSeries(query.host, undefined, query.text, this.context.clusterID).then((resp) => {
|
||||
fetchTimeSeries(query.host, undefined, query.text).then((resp) => {
|
||||
const cellData = _.get(resp.data, ['results', '0', 'series', '0'], false);
|
||||
if (!cellData) {
|
||||
return this.setState({isLoading: false});
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
import {proxy, buildInfluxUrl} from 'utils/queryUrlGenerator';
|
||||
import {proxy} from 'utils/queryUrlGenerator';
|
||||
|
||||
export default function fetchTimeSeries(host, database, query, clusterID) {
|
||||
const url = buildInfluxUrl({
|
||||
host,
|
||||
database,
|
||||
statement: query,
|
||||
});
|
||||
|
||||
return proxy(url, clusterID);
|
||||
export default function fetchTimeSeries(source, database, query) {
|
||||
return proxy({source, query, database});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue