Merge pull request #2119 from influxdata/enhancement/tickscript-cancel
UX-IMPROVEMENT: Add Cancel button for tickscript editorpull/10616/head
commit
46accab9fc
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
### UI Improvements
|
### UI Improvements
|
||||||
1. [#2111](https://github.com/influxdata/chronograf/pull/2111): Increase size of Cell Editor query tabs to reveal more of their query strings
|
1. [#2111](https://github.com/influxdata/chronograf/pull/2111): Increase size of Cell Editor query tabs to reveal more of their query strings
|
||||||
|
1. [#2119](https://github.com/influxdata/chronograf/pull/2119): Add cancel button to Tickscript editor
|
||||||
|
|
||||||
## v1.3.9.0 [2017-10-06]
|
## v1.3.9.0 [2017-10-06]
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, {PropTypes} from 'react'
|
import React, {PropTypes} from 'react'
|
||||||
|
|
||||||
import TickscriptHeader from 'src/kapacitor/components/TickscriptHeader'
|
import TickscriptHeader from 'src/kapacitor/components/TickscriptHeader'
|
||||||
import TickscriptEditor from 'src/kapacitor/components/TickscriptEditor'
|
import TickscriptEditor from 'src/kapacitor/components/TickscriptEditor'
|
||||||
|
|
||||||
|
@ -48,7 +49,9 @@ const {arrayOf, bool, func, shape, string} = PropTypes
|
||||||
|
|
||||||
Tickscript.propTypes = {
|
Tickscript.propTypes = {
|
||||||
onSave: func.isRequired,
|
onSave: func.isRequired,
|
||||||
source: shape(),
|
source: shape({
|
||||||
|
id: string,
|
||||||
|
}),
|
||||||
task: shape({
|
task: shape({
|
||||||
id: string,
|
id: string,
|
||||||
script: string,
|
script: string,
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import React, {PropTypes} from 'react'
|
import React, {PropTypes} from 'react'
|
||||||
|
import {Link} from 'react-router'
|
||||||
|
|
||||||
import SourceIndicator from 'shared/components/SourceIndicator'
|
import SourceIndicator from 'shared/components/SourceIndicator'
|
||||||
import TickscriptType from 'src/kapacitor/components/TickscriptType'
|
import TickscriptType from 'src/kapacitor/components/TickscriptType'
|
||||||
import MultiSelectDBDropdown from 'shared/components/MultiSelectDBDropdown'
|
import MultiSelectDBDropdown from 'shared/components/MultiSelectDBDropdown'
|
||||||
|
@ -11,6 +13,7 @@ const addName = list => list.map(l => ({...l, name: `${l.db}.${l.rp}`}))
|
||||||
const TickscriptHeader = ({
|
const TickscriptHeader = ({
|
||||||
task: {id, type, dbrps},
|
task: {id, type, dbrps},
|
||||||
task,
|
task,
|
||||||
|
source,
|
||||||
onSave,
|
onSave,
|
||||||
onChangeType,
|
onChangeType,
|
||||||
onChangeID,
|
onChangeID,
|
||||||
|
@ -31,6 +34,12 @@ const TickscriptHeader = ({
|
||||||
selectedItems={addName(dbrps)}
|
selectedItems={addName(dbrps)}
|
||||||
onApply={onSelectDbrps}
|
onApply={onSelectDbrps}
|
||||||
/>
|
/>
|
||||||
|
<Link
|
||||||
|
className="btn btn-sm btn-default"
|
||||||
|
to={`/sources/${source.id}/alert-rules`}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Link>
|
||||||
<button
|
<button
|
||||||
className="btn btn-success btn-sm"
|
className="btn btn-success btn-sm"
|
||||||
title={id ? '' : 'ID your TICKscript to save'}
|
title={id ? '' : 'ID your TICKscript to save'}
|
||||||
|
@ -47,6 +56,9 @@ const {arrayOf, bool, func, shape, string} = PropTypes
|
||||||
|
|
||||||
TickscriptHeader.propTypes = {
|
TickscriptHeader.propTypes = {
|
||||||
onSave: func,
|
onSave: func,
|
||||||
|
source: shape({
|
||||||
|
id: string,
|
||||||
|
}),
|
||||||
onSelectDbrps: func.isRequired,
|
onSelectDbrps: func.isRequired,
|
||||||
task: shape({
|
task: shape({
|
||||||
dbrps: arrayOf(
|
dbrps: arrayOf(
|
||||||
|
|
Loading…
Reference in New Issue