From 0bd172ac8df9454132ab02d782dfd87e34f46aba Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Wed, 28 Mar 2018 11:04:31 -0700 Subject: [PATCH 01/14] update CHANGELOG.md --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3063f7d8c..5e337939ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ -## v1.4.3.0 [unreleased] +## v1.5.0.0 [unreleased] + +### Features + +### UI Improvements + +### Bug Fixes + +## v1.4.3.0 [2018-3-28] ### Features From 21daf088c9ae8dc39bed3a1bb3f3c36fceee9608 Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Wed, 28 Mar 2018 11:34:23 -0700 Subject: [PATCH 02/14] update versions with bumpversion --- .bumpversion.cfg | 2 +- README.md | 4 ++-- server/swagger.json | 2 +- ui/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e0dcb8cf8f..b701ac3ce3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.4.2.3 +current_version = 1.4.3.0 files = README.md server/swagger.json parse = (?P\d+)\.(?P\d+)\.(?P\d+)\.(?P\d+) serialize = {major}.{minor}.{patch}.{release} diff --git a/README.md b/README.md index 940acafc3a..ebdc997c3e 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ option. ## Versions The most recent version of Chronograf is -[v1.4.2.3](https://www.influxdata.com/downloads/). +[v1.4.3.0](https://www.influxdata.com/downloads/). Spotted a bug or have a feature request? Please open [an issue](https://github.com/influxdata/chronograf/issues/new)! @@ -178,7 +178,7 @@ By default, chronograf runs on port `8888`. To get started right away with Docker, you can pull down our latest release: ```sh -docker pull chronograf:1.4.2.3 +docker pull chronograf:1.4.3.0 ``` ### From Source diff --git a/server/swagger.json b/server/swagger.json index 8a109a2c72..3f2b7b4ab4 100644 --- a/server/swagger.json +++ b/server/swagger.json @@ -3,7 +3,7 @@ "info": { "title": "Chronograf", "description": "API endpoints for Chronograf", - "version": "1.4.2.3" + "version": "1.4.3.0" }, "schemes": ["http"], "basePath": "/chronograf/v1", diff --git a/ui/package.json b/ui/package.json index 6b95613217..c9854a3050 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "chronograf-ui", - "version": "1.4.2-3", + "version": "1.4.3-0", "private": false, "license": "AGPL-3.0", "description": "", From e1ef619d110ed5d6b5f551b9bf9a48d91d1569ee Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Wed, 28 Mar 2018 11:52:32 -0700 Subject: [PATCH 03/14] Fix date format --- ui/src/shared/components/AnnotationTooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/shared/components/AnnotationTooltip.js b/ui/src/shared/components/AnnotationTooltip.js index 3e0f825882..481bda39fb 100644 --- a/ui/src/shared/components/AnnotationTooltip.js +++ b/ui/src/shared/components/AnnotationTooltip.js @@ -10,7 +10,7 @@ import * as actions from 'shared/actions/annotations' const TimeStamp = ({time}) => (
- {`${moment(+time).format('YYYY/DD/MM HH:mm:ss.SS')}`} + {`${moment(+time).format('YYYY/MM/DD HH:mm:ss.SS')}`}
) From 6adc8f96c5df3f39c17f6c4080de3f4648708140 Mon Sep 17 00:00:00 2001 From: Luke Morris Date: Wed, 28 Mar 2018 11:13:42 -0700 Subject: [PATCH 04/14] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e337939ff..659dc2e64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ 1. [#2970](https://github.com/influxdata/chronograf/pull/2970): Fix hanging browser on docker host dashboard 1. [#3006](https://github.com/influxdata/chronograf/pull/3006): Fix Kapacitor Rules task enabled checkboxes to only toggle exactly as clicked 1. [#3048](https://github.com/influxdata/chronograf/pull/3048): Prevent Multi-Select Dropdown in InfluxDB Admin Users and Roles tabs from losing selection state +1. [#3068](https://github.com/influxdata/chronograf/pull/3068): Fix intermittent missing fill from graphs +1. [#3079](https://github.com/influxdata/chronograf/pull/3082): Support custom time range in annotations api wrapper ## v1.4.2.3 [2018-03-08] From 5863a5e764a76e737c9f3829d11ac177d72678d8 Mon Sep 17 00:00:00 2001 From: Luke Morris Date: Wed, 28 Mar 2018 11:11:09 -0700 Subject: [PATCH 05/14] Support custom time range in annotations api wrapper --- ui/src/dashboards/containers/DashboardPage.js | 29 ++++++++++++++----- ui/src/shared/actions/annotations.js | 7 +++-- ui/src/shared/apis/annotation.js | 4 +-- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ui/src/dashboards/containers/DashboardPage.js b/ui/src/dashboards/containers/DashboardPage.js index 29516e202d..0e05ead688 100644 --- a/ui/src/dashboards/containers/DashboardPage.js +++ b/ui/src/dashboards/containers/DashboardPage.js @@ -78,10 +78,8 @@ class DashboardPage extends Component { timeRange, } = this.props - getAnnotationsAsync( - source.links.annotations, - Date.now() - timeRange.seconds * 1000 - ) + const annotationRange = this.millisecondTimeRange(timeRange) + getAnnotationsAsync(source.links.annotations, annotationRange) window.addEventListener('resize', this.handleWindowResize, true) const dashboards = await getDashboardsAsync() @@ -159,10 +157,25 @@ class DashboardPage extends Component { ...timeRange, format: FORMAT_INFLUXQL, }) - getAnnotationsAsync( - source.links.annotations, - Date.now() - timeRange.seconds * 1000 - ) + + const annotationRange = this.millisecondTimeRange(timeRange) + getAnnotationsAsync(source.links.annotations, annotationRange) + } + + millisecondTimeRange({seconds, lower, upper}) { + // Is this a relative time range? + if (seconds) { + return { + since: Date.now() - seconds * 1000, + until: null, + } + } + + // No, this is an absolute (custom) time range + return { + since: Date.parse(lower), + until: Date.parse(upper), + } } handleUpdatePosition = cells => { diff --git a/ui/src/shared/actions/annotations.js b/ui/src/shared/actions/annotations.js index d4f151f362..328cdb1a10 100644 --- a/ui/src/shared/actions/annotations.js +++ b/ui/src/shared/actions/annotations.js @@ -63,8 +63,11 @@ export const addAnnotationAsync = (createUrl, annotation) => async dispatch => { dispatch(deleteAnnotation(annotation)) } -export const getAnnotationsAsync = (indexUrl, since) => async dispatch => { - const annotations = await api.getAnnotations(indexUrl, since) +export const getAnnotationsAsync = ( + indexUrl, + {since, until} +) => async dispatch => { + const annotations = await api.getAnnotations(indexUrl, since, until) dispatch(loadAnnotations(annotations)) } diff --git a/ui/src/shared/apis/annotation.js b/ui/src/shared/apis/annotation.js index f410222609..e36c24859d 100644 --- a/ui/src/shared/apis/annotation.js +++ b/ui/src/shared/apis/annotation.js @@ -19,11 +19,11 @@ export const createAnnotation = async (url, annotation) => { return annoToMillisecond(response.data) } -export const getAnnotations = async (url, since) => { +export const getAnnotations = async (url, since, until) => { const {data} = await AJAX({ method: 'GET', url, - params: {since: msToRFC(since)}, + params: {since: msToRFC(since), until: msToRFC(until)}, }) return data.annotations.map(annoToMillisecond) } From f3cdfa923d97633f31fd9da473c1871f172d5102 Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 28 Mar 2018 10:36:41 -0700 Subject: [PATCH 06/14] Limit render of Done Editing button to cell types that support annotations --- ui/src/shared/components/LayoutCellMenu.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ui/src/shared/components/LayoutCellMenu.js b/ui/src/shared/components/LayoutCellMenu.js index 59e20506ad..82584daff9 100644 --- a/ui/src/shared/components/LayoutCellMenu.js +++ b/ui/src/shared/components/LayoutCellMenu.js @@ -96,16 +96,17 @@ class LayoutCellMenu extends Component { /> )} - {mode === 'editing' && ( -
-
- Done Editing + {mode === 'editing' && + cellSupportsAnnotations(cell.type) && ( +
+
+ Done Editing +
-
- )} + )}
) } From ebaa8172b9a694a45c93c9f948dfb3827c961092 Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 28 Mar 2018 12:31:44 -0700 Subject: [PATCH 07/14] Fix typo --- ui/src/dashboards/containers/DashboardPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/dashboards/containers/DashboardPage.js b/ui/src/dashboards/containers/DashboardPage.js index 0e05ead688..e46af417e0 100644 --- a/ui/src/dashboards/containers/DashboardPage.js +++ b/ui/src/dashboards/containers/DashboardPage.js @@ -105,7 +105,7 @@ class DashboardPage extends Component { this.setState({windowHeight: window.innerHeight}) } - componentWillUnMount() { + componentWillUnmount() { window.removeEventListener('resize', this.handleWindowResize, true) } From 05f58ef7ecaf67df68cf912e94dfd74c64950a77 Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 28 Mar 2018 12:36:57 -0700 Subject: [PATCH 08/14] Exit annotation editing mode when user leaves dashboard --- ui/src/dashboards/containers/DashboardPage.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/src/dashboards/containers/DashboardPage.js b/ui/src/dashboards/containers/DashboardPage.js index e46af417e0..7a9c73ada2 100644 --- a/ui/src/dashboards/containers/DashboardPage.js +++ b/ui/src/dashboards/containers/DashboardPage.js @@ -28,6 +28,8 @@ import { hideCellEditorOverlay, } from 'src/dashboards/actions/cellEditorOverlay' +import {dismissEditingAnnotation} from 'src/shared/actions/annotations' + import { setAutoRefresh, templateControlBarVisibilityToggled as templateControlBarVisibilityToggledAction, @@ -107,6 +109,7 @@ class DashboardPage extends Component { componentWillUnmount() { window.removeEventListener('resize', this.handleWindowResize, true) + this.props.handleDismissEditingAnnotation() } inView = cell => { @@ -524,6 +527,7 @@ DashboardPage.propTypes = { getAnnotationsAsync: func.isRequired, handleShowCellEditorOverlay: func.isRequired, handleHideCellEditorOverlay: func.isRequired, + handleDismissEditingAnnotation: func.isRequired, selectedCell: shape({}), thresholdsListType: string.isRequired, thresholdsListColors: arrayOf(shape({}).isRequired).isRequired, @@ -600,6 +604,10 @@ const mapDispatchToProps = dispatch => ({ hideCellEditorOverlay, dispatch ), + handleDismissEditingAnnotation: bindActionCreators( + dismissEditingAnnotation, + dispatch + ), }) export default connect(mapStateToProps, mapDispatchToProps)( From c09d92f31b7f5ce7c47926bd325b6fe9906879bd Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 28 Mar 2018 12:43:19 -0700 Subject: [PATCH 09/14] Updoot changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 659dc2e64e..4fd38d4bb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ 1. [#3048](https://github.com/influxdata/chronograf/pull/3048): Prevent Multi-Select Dropdown in InfluxDB Admin Users and Roles tabs from losing selection state 1. [#3068](https://github.com/influxdata/chronograf/pull/3068): Fix intermittent missing fill from graphs 1. [#3079](https://github.com/influxdata/chronograf/pull/3082): Support custom time range in annotations api wrapper +1. [#3087](https://github.com/influxdata/chronograf/pull/3087): Exit annotation edit mode when user navigates away from dashboard ## v1.4.2.3 [2018-03-08] From 5eb952f84119644b3ef6038ed5413d6789843a1f Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Wed, 28 Mar 2018 17:02:38 -0700 Subject: [PATCH 10/14] Update Changelog --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fd38d4bb7..728df78a58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,6 @@ ### Bug Fixes -1. [#2866](https://github.com/influxdata/chronograf/pull/2866): Change hover text on delete mappings confirmation button to 'Delete' -1. [#2911](https://github.com/influxdata/chronograf/pull/2911): Fix Heroku OAuth 1. [#2859](https://github.com/influxdata/chronograf/pull/2859): Enable Mappings save button when valid 1. [#2933](https://github.com/influxdata/chronograf/pull/2933): Include url in Kapacitor connection creation requests From a7a22dbb4575c95f3c6012101a761fd88db48ae6 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 27 Mar 2018 15:03:35 -0700 Subject: [PATCH 11/14] Use plain JS arrow function instead of lodash curry --- ui/src/admin/components/chronograf/AllUsersTableRow.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/admin/components/chronograf/AllUsersTableRow.js b/ui/src/admin/components/chronograf/AllUsersTableRow.js index c42203686f..c45a331950 100644 --- a/ui/src/admin/components/chronograf/AllUsersTableRow.js +++ b/ui/src/admin/components/chronograf/AllUsersTableRow.js @@ -38,7 +38,9 @@ const AllUsersTableRow = ({ name: organizations.find(o => r.organization === o.id).name, })) - const wrappedDelete = _.curry(onDelete, user) + const wrappedDelete = () => { + onDelete(user) + } const removeWarning = userIsMe ? 'Delete your user record\nand log yourself out?' From dddc8a28074eb8f5c0e0d9b96497474aa8a03ee8 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 27 Mar 2018 15:06:58 -0700 Subject: [PATCH 12/14] Remove lodash --- ui/src/admin/components/chronograf/AllUsersTableRow.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/src/admin/components/chronograf/AllUsersTableRow.js b/ui/src/admin/components/chronograf/AllUsersTableRow.js index c45a331950..4a2227500e 100644 --- a/ui/src/admin/components/chronograf/AllUsersTableRow.js +++ b/ui/src/admin/components/chronograf/AllUsersTableRow.js @@ -1,6 +1,5 @@ import React from 'react' import PropTypes from 'prop-types' -import _ from 'lodash' import Tags from 'shared/components/Tags' import SlideToggle from 'shared/components/SlideToggle' From 57c554b3f1484fbbd72dc7fc4f4dc8f6f9454080 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 27 Mar 2018 15:08:09 -0700 Subject: [PATCH 13/14] Make current org delete user UX consistent with all users table --- .../components/chronograf/UsersTableRow.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ui/src/admin/components/chronograf/UsersTableRow.js b/ui/src/admin/components/chronograf/UsersTableRow.js index 5edc1cbbe2..9920876395 100644 --- a/ui/src/admin/components/chronograf/UsersTableRow.js +++ b/ui/src/admin/components/chronograf/UsersTableRow.js @@ -2,7 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import Dropdown from 'shared/components/Dropdown' -import DeleteConfirmTableCell from 'shared/components/DeleteConfirmTableCell' +import ConfirmButton from 'shared/components/ConfirmButton' import {USER_ROLES} from 'src/admin/constants/chronografAdmin' import {USERS_TABLE} from 'src/admin/constants/chronografTableSizing' @@ -26,6 +26,12 @@ const UsersTableRow = ({ const userIsMe = user.id === meID + const wrappedDelete = () => { + onDelete(user) + } + + const removeWarning = 'Remove this user\nfrom Current Org?' + return ( @@ -52,12 +58,13 @@ const UsersTableRow = ({ {user.provider} {user.scheme} - ) From 905521311fed18fcf9a894b2551a46f4b81f47eb Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 27 Mar 2018 15:11:31 -0700 Subject: [PATCH 14/14] Updoot log of Change --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 728df78a58..15762c637a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ 1. [#3068](https://github.com/influxdata/chronograf/pull/3068): Fix intermittent missing fill from graphs 1. [#3079](https://github.com/influxdata/chronograf/pull/3082): Support custom time range in annotations api wrapper 1. [#3087](https://github.com/influxdata/chronograf/pull/3087): Exit annotation edit mode when user navigates away from dashboard +1. [#3073](https://github.com/influxdata/chronograf/pull/3073): Fix Delete button in All Users admin page ## v1.4.2.3 [2018-03-08]