grafana/public/app/features/explore/QueryRows.tsx

28 lines
847 B
TypeScript
Raw Normal View History

import React, { PureComponent } from 'react';
2018-11-23 08:12:20 -06:00
import { Emitter } from 'app/core/utils/emitter';
import { DataQuery } from 'app/types';
import { ExploreId } from 'app/types/explore';
import QueryRow from './QueryRow';
interface QueryRowsProps {
2018-10-24 07:55:56 -05:00
className?: string;
2018-11-23 08:12:20 -06:00
exploreEvents: Emitter;
exploreId: ExploreId;
initialQueries: DataQuery[];
}
2018-10-24 07:55:56 -05:00
export default class QueryRows extends PureComponent<QueryRowsProps> {
render() {
const { className = '', exploreEvents, exploreId, initialQueries } = this.props;
return (
<div className={className}>
2018-11-21 09:28:30 -06:00
{initialQueries.map((query, index) => (
// TODO instead of relying on initialQueries, move to react key list in redux
<QueryRow key={query.key} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />
))}
</div>
);
}
}