Use ThresholdsColorToggle in TableOptions
parent
47a66d2ae0
commit
72b9279336
|
@ -5,7 +5,7 @@ import {bindActionCreators} from 'redux'
|
|||
|
||||
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
||||
import ThresholdsList from 'shared/components/ThresholdsList'
|
||||
import ThresholdColorToggle from 'shared/components/ThresholdColorToggle'
|
||||
import ThresholdsColorToggle from 'shared/components/ThresholdsColorToggle'
|
||||
|
||||
import {updateAxes} from 'src/dashboards/actions/cellEditorOverlay'
|
||||
|
||||
|
@ -56,7 +56,7 @@ class SingleStatOptions extends Component {
|
|||
maxLength="5"
|
||||
/>
|
||||
</div>
|
||||
<ThresholdColorToggle containerClass="form-group col-xs-6" />
|
||||
<ThresholdsColorToggle containerClass="form-group col-xs-6" />
|
||||
</div>
|
||||
</div>
|
||||
</FancyScrollbar>
|
||||
|
|
|
@ -9,7 +9,7 @@ import GraphOptionsSortBy from 'src/dashboards/components/GraphOptionsSortBy'
|
|||
import GraphOptionsTextWrapping from 'src/dashboards/components/GraphOptionsTextWrapping'
|
||||
import GraphOptionsCustomizeColumns from 'src/dashboards/components/GraphOptionsCustomizeColumns'
|
||||
import ThresholdsList from 'src/shared/components/ThresholdsList'
|
||||
import GraphOptionsThresholdColoring from 'src/dashboards/components/GraphOptionsThresholdColoring'
|
||||
import ThresholdsColorToggle from 'src/shared/components/ThresholdsColorToggle'
|
||||
|
||||
import {updateTableOptions} from 'src/dashboards/actions/cellEditorOverlay'
|
||||
|
||||
|
@ -107,7 +107,7 @@ export class TableOptions extends PureComponent<Props, {}> {
|
|||
/>
|
||||
<ThresholdsList onResetFocus={onResetFocus} />
|
||||
<div className="form-group-wrapper graph-options-group">
|
||||
<GraphOptionsThresholdColoring />
|
||||
<ThresholdsColorToggle containerClass="form-group col-xs-6" />
|
||||
</div>
|
||||
</div>
|
||||
</FancyScrollbar>
|
||||
|
|
|
@ -6,7 +6,7 @@ import {updateSingleStatType} from 'src/dashboards/actions/cellEditorOverlay'
|
|||
|
||||
import {SINGLE_STAT_TEXT, SINGLE_STAT_BG} from 'shared/constants/thresholds'
|
||||
|
||||
class ThresholdColorToggle extends Component {
|
||||
class ThresholdsColorToggle extends Component {
|
||||
handleToggleSingleStatType = newType => () => {
|
||||
const {handleUpdateSingleStatType} = this.props
|
||||
|
||||
|
@ -39,7 +39,7 @@ class ThresholdColorToggle extends Component {
|
|||
}
|
||||
const {func, string} = PropTypes
|
||||
|
||||
ThresholdColorToggle.propTypes = {
|
||||
ThresholdsColorToggle.propTypes = {
|
||||
singleStatType: string.isRequired,
|
||||
handleUpdateSingleStatType: func.isRequired,
|
||||
containerClass: string.isRequired,
|
||||
|
@ -56,5 +56,5 @@ const mapDispatchToProps = dispatch => ({
|
|||
),
|
||||
})
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(
|
||||
ThresholdColorToggle
|
||||
ThresholdsColorToggle
|
||||
)
|
|
@ -9,7 +9,7 @@ import GraphOptionsSortBy from 'src/dashboards/components/GraphOptionsSortBy'
|
|||
import GraphOptionsTextWrapping from 'src/dashboards/components/GraphOptionsTextWrapping'
|
||||
import GraphOptionsCustomizeColumns from 'src/dashboards/components/GraphOptionsCustomizeColumns'
|
||||
import ThresholdsList from 'src/shared/components/ThresholdsList'
|
||||
import GraphOptionsThresholdColoring from 'src/dashboards/components/GraphOptionsThresholdColoring'
|
||||
import ThresholdsColorToggle from 'src/dashboards/components/ThresholdsColorToggle'
|
||||
|
||||
import {shallow} from 'enzyme'
|
||||
|
||||
|
@ -45,9 +45,7 @@ describe('Dashboards.Components.TableOptions', () => {
|
|||
GraphOptionsCustomizeColumns
|
||||
)
|
||||
const thresholdsList = wrapper.find(ThresholdsList)
|
||||
const graphOptionsThresholdColoring = wrapper.find(
|
||||
GraphOptionsThresholdColoring
|
||||
)
|
||||
const thresholdsColorToggle = wrapper.find(ThresholdsColorToggle)
|
||||
|
||||
expect(fancyScrollbar.exists()).toBe(true)
|
||||
expect(graphOptionsTimeFormat.exists()).toBe(true)
|
||||
|
@ -56,7 +54,7 @@ describe('Dashboards.Components.TableOptions', () => {
|
|||
expect(graphOptionsTextWrapping.exists()).toBe(true)
|
||||
expect(graphOptionsCustomizeColumns.exists()).toBe(true)
|
||||
expect(thresholdsList.exists()).toBe(true)
|
||||
expect(graphOptionsThresholdColoring.exists()).toBe(true)
|
||||
expect(thresholdsColorToggle.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue