Remove Kapacitor queryFill filtering from influx queries

pull/10616/head
Jared Scheib 2017-08-28 14:25:39 -07:00
parent 3d83cfbb85
commit a425d92546
3 changed files with 11 additions and 13 deletions

View File

@ -61,7 +61,7 @@ class DataSection extends Component {
}
render() {
const {query, timeRange: {lower}, isKapacitorRule} = this.props
const {query, timeRange: {lower}} = this.props
const statement = query.rawText || buildInfluxQLQuery({lower}, query)
return (
@ -72,7 +72,6 @@ class DataSection extends Component {
onSelection={this.handleFillQuery}
theme="GREEN"
size="sm"
isKapacitorRule={isKapacitorRule}
/>
</h3>
<div className="rule-section--body">

View File

@ -73,7 +73,7 @@ class FillQuery extends Component {
}
render() {
const {size, theme, isKapacitorRule} = this.props
const {size, theme} = this.props
const {selected, numberValue} = this.state
return (
@ -81,9 +81,7 @@ class FillQuery extends Component {
<label>Fill</label>
<Dropdown
selected={selected.text}
items={queryFills.filter(
fill => !(isKapacitorRule && !fill.isInKapacitor) // Filter fill types not supported by Kapacitor
)}
items={queryFills}
className="fill-query--dropdown"
buttonSize={`btn-${size}`}
buttonColor="btn-default"
@ -108,14 +106,13 @@ class FillQuery extends Component {
}
}
const {bool, func, string} = PropTypes
const {func, string} = PropTypes
FillQuery.propTypes = {
onSelection: func.isRequired,
value: string,
size: string,
theme: string,
isKapacitorRule: bool,
}
export default FillQuery

View File

@ -1,7 +1,9 @@
[
{type: 'null', text: 'null', menuOption: '(null)', inputValue: 'null', isInKapacitor: true},
{type: 'previous', text: 'previous', menuOption: '(previous)', inputValue: 'previous', isInKapacitor: false},
{type: 'number', text: 'number', menuOption: '(number)', inputValue: '0', isInKapacitor: true},
{type: 'none', text: 'none', menuOption: '(none)', inputValue: 'none', isInKapacitor: true},
{type: 'linear', text: 'linear', menuOption: '(linear)', inputValue: 'linear', isInKapacitor: false},
{type: 'null', text: 'null', menuOption: '(null)', inputValue: 'null', isValidForKapaNodes: true},
{type: 'previous', text: 'previous', menuOption: '(previous)', inputValue: 'previous', isValidForKapaNodes: false},
{type: 'number', text: 'number', menuOption: '(number)', inputValue: '0', isValidForKapaNodes: true},
{type: 'none', text: 'none', menuOption: '(none)', inputValue: 'none', isValidForKapaNodes: true},
{type: 'linear', text: 'linear', menuOption: '(linear)', inputValue: 'linear', isValidForKapaNodes: false},
]
// for if/when filtering FillQuery queryFill types not supported as Kapacitor nodes:
// queryFills.filter(fill => !(isKapacitorRule && !fill.isValidForKapaNodes))