Revert "fix(ui): disabled group functionality for check query builder (#17110)" (#17112)

This reverts commit ff6d9c87cb.
pull/17114/head
Ariel Salem 2020-03-05 17:14:44 -08:00 committed by GitHub
parent ff6d9c87cb
commit 037d4845d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 35 deletions

View File

@ -1,7 +1,6 @@
## v2.0.0-beta.6 [unreleased]
### Features
1. [17085](https://github.com/influxdata/influxdb/pull/17085): Clicking on bucket name takes user to Data Explorer with bucket selected
1. [17095](https://github.com/influxdata/influxdb/pull/17095): Extend pkger dashboards with table view support
@ -14,7 +13,6 @@
1. [17072](https://github.com/influxdata/influxdb/pull/17072): Fixed issue where creating a variable of type map was piping the incorrect value when map variables were used in queries
1. [17050](https://github.com/influxdata/influxdb/pull/17050): Added missing user names to auth CLI commands
1. [17091](https://github.com/influxdata/influxdb/pull/17091): Require Content-Type for query endpoint
1. [17110](https://github.com/influxdata/influxdb/pull/17110): Disabled group functionality for check query builder
## v2.0.0-beta.5 [2020-02-27]

View File

@ -28,11 +28,7 @@ describe('Checks', () => {
cy.getByTestID('create-check').click()
cy.getByTestID('create-threshold-check').click()
// added test to disable group on check query builder
cy.getByTestID('dropdown--button')
.should('be.disabled')
.and('not.contain', 'Group')
.contains('Filter')
cy.getByTestID(`selector-list ${measurement}`).click()
cy.getByTestID('save-cell--button').should('be.disabled')

View File

@ -105,15 +105,11 @@ class TagSelector extends PureComponent<Props> {
}
private get header() {
const {aggregateFunctionType, index, isInCheckOverlay} = this.props
let options = ['filter', 'group']
if (isInCheckOverlay) {
options = ['filter']
}
const {aggregateFunctionType, index} = this.props
return (
<BuilderCard.DropdownHeader
options={options}
options={['filter', 'group']}
selectedOption={this.renderAggregateFunctionType(aggregateFunctionType)}
onDelete={index !== 0 && this.handleRemoveTagSelector}
onSelect={this.handleAggregateFunctionSelect}

View File

@ -1,7 +1,7 @@
// Libraries
import React, {PureComponent} from 'react'
import {ComponentStatus, Dropdown, SelectDropdown} from '@influxdata/clockface'
import {SelectDropdown} from '@influxdata/clockface'
import {BuilderAggregateFunctionType} from 'src/types'
interface Props {
@ -21,30 +21,15 @@ export default class BuilderCardDropdownHeader extends PureComponent<Props> {
public render() {
const {children, options, onSelect, selectedOption, testID} = this.props
const button = () => (
<Dropdown.Button status={ComponentStatus.Disabled} onClick={() => {}}>
{selectedOption}
</Dropdown.Button>
)
const menu = () => null
return (
<div className="builder-card--header" data-testid={testID}>
{options.length === 1 && (
<Dropdown
button={button}
menu={menu}
testID="disabled--filter-dropdown"
/>
)}
{options.length !== 1 && (
<SelectDropdown
options={options}
selectedOption={selectedOption}
testID="select-option-dropdown"
onSelect={onSelect ? onSelect : emptyFunction}
/>
)}
<SelectDropdown
options={options}
selectedOption={selectedOption}
testID="select-option-dropdown"
onSelect={onSelect ? onSelect : emptyFunction}
/>
{children}
{this.deleteButton}