Fix the table view

pull/10616/head
Will Piers 2016-09-22 13:32:26 -07:00
parent 0f9cb6aef7
commit 13b2af3b09
2 changed files with 4 additions and 14 deletions

View File

@ -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});

View File

@ -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});
}