From 0cd4290671654ce2fc585517841aa1ccc6b639d4 Mon Sep 17 00:00:00 2001 From: Regan Kuchan Date: Mon, 27 Mar 2017 10:45:00 -0700 Subject: [PATCH 1/3] Fix beta6 bug fixes entries --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14dde927a6..323fca3173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,15 @@ ## v1.2.0 [unreleased] -### Features ### Bug Fixes - 1. [#1065](https://github.com/influxdata/chronograf/pull/1065): Save and Cancel edits to a Dashboard name - 2. [#1069](https://github.com/influxdata/chronograf/pull/1069): Graphs are no longer editable from a Host Page +### Features +### UI Improvements ## v1.2.0-beta6 [2017-03-24] +### Bug Fixes + 1. [#1065](https://github.com/influxdata/chronograf/pull/1065): Add functionality to the `save` and `cancel` buttons on editable dashboards + 2. [#1069](https://github.com/influxdata/chronograf/pull/1069): Make graphs on pre-created dashboards un-editable + ### Features 1. [#1056](https://github.com/influxdata/chronograf/pull/1056): Add ability to add a dashboard cell 2. [#1020](https://github.com/influxdata/chronograf/pull/1020): Allow users to edit cell names on dashboards From 766fb91e38b93bf21e1bb4da770543bc29324d68 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Mon, 27 Mar 2017 14:14:42 -0700 Subject: [PATCH 2/3] Fix DBRP page bugs (#1072) * Fix confirm button not deleting a DB * Fix cancel delete button * Fix no name pass on creation of RP --- ui/src/admin/components/DatabaseManager.js | 6 +++ ui/src/admin/components/DatabaseRow.js | 3 +- ui/src/admin/components/DatabaseTable.js | 48 ++++++++++++------- .../admin/containers/DatabaseManagerPage.js | 2 + ui/src/utils/formatting.js | 10 ---- 5 files changed, 40 insertions(+), 29 deletions(-) diff --git a/ui/src/admin/components/DatabaseManager.js b/ui/src/admin/components/DatabaseManager.js index 02bcc4c285..e0272b7ff3 100644 --- a/ui/src/admin/components/DatabaseManager.js +++ b/ui/src/admin/components/DatabaseManager.js @@ -11,8 +11,10 @@ const DatabaseManager = ({ onKeyDownDatabase, onCancelDatabase, onConfirmDatabase, + onDeleteDatabase, onStartDeleteDatabase, onDatabaseDeleteConfirm, + onRemoveDeleteCode, onAddRetentionPolicy, onStopEditRetentionPolicy, onCancelRetentionPolicy, @@ -39,6 +41,8 @@ const DatabaseManager = ({ onKeyDownDatabase={onKeyDownDatabase} onCancelDatabase={onCancelDatabase} onConfirmDatabase={onConfirmDatabase} + onRemoveDeleteCode={onRemoveDeleteCode} + onDeleteDatabase={onDeleteDatabase} onStartDeleteDatabase={onStartDeleteDatabase} onDatabaseDeleteConfirm={onDatabaseDeleteConfirm} onAddRetentionPolicy={onAddRetentionPolicy} @@ -73,6 +77,8 @@ DatabaseManager.propTypes = { onKeyDownDatabase: func, onCancelDatabase: func, onConfirmDatabase: func, + onDeleteDatabase: func, + onRemoveDeleteCode: func, onStartDeleteDatabase: func, onDatabaseDeleteConfirm: func, onAddRetentionPolicy: func, diff --git a/ui/src/admin/components/DatabaseRow.js b/ui/src/admin/components/DatabaseRow.js index 5b0f248ebf..a69d40fede 100644 --- a/ui/src/admin/components/DatabaseRow.js +++ b/ui/src/admin/components/DatabaseRow.js @@ -195,9 +195,10 @@ class DatabaseRow extends Component { } getInputValues() { + const {notify, retentionPolicy: {name: currentName}} = this.props + const name = this.name && this.name.value.trim() || currentName let duration = this.duration.value.trim() const replication = +this.replication.value.trim() - const {notify, retentionPolicy: {name}} = this.props if (!duration || !replication) { notify('error', 'Fields cannot be empty') diff --git a/ui/src/admin/components/DatabaseTable.js b/ui/src/admin/components/DatabaseTable.js index 420ee4d943..abbfc804e1 100644 --- a/ui/src/admin/components/DatabaseTable.js +++ b/ui/src/admin/components/DatabaseTable.js @@ -16,6 +16,8 @@ const DatabaseTable = ({ onKeyDownDatabase, onCancelDatabase, onConfirmDatabase, + onDeleteDatabase, + onRemoveDeleteCode, onStartDeleteDatabase, onDatabaseDeleteConfirm, onAddRetentionPolicy, @@ -28,15 +30,17 @@ const DatabaseTable = ({
rp.isNew)} onEdit={onEditDatabase} - onKeyDown={onKeyDownDatabase} onCancel={onCancelDatabase} + onDelete={onDeleteDatabase} onConfirm={onConfirmDatabase} + onKeyDown={onKeyDownDatabase} onStartDelete={onStartDeleteDatabase} - onDatabaseDeleteConfirm={onDatabaseDeleteConfirm} + onRemoveDeleteCode={onRemoveDeleteCode} onAddRetentionPolicy={onAddRetentionPolicy} onDeleteRetentionPolicy={onDeleteRetentionPolicy} + onDatabaseDeleteConfirm={onDatabaseDeleteConfirm} + isAddRPDisabled={!!database.retentionPolicies.some(rp => rp.isNew)} />
@@ -81,8 +85,10 @@ DatabaseTable.propTypes = { isRFDisplayed: bool, isAddRPDisabled: bool, onKeyDownDatabase: func, + onDeleteDatabase: func, onCancelDatabase: func, onConfirmDatabase: func, + onRemoveDeleteCode: func, onStartDeleteDatabase: func, onDatabaseDeleteConfirm: func, onAddRetentionPolicy: func, @@ -99,7 +105,9 @@ const DatabaseTableHeader = ({ onKeyDown, onConfirm, onCancel, + onDelete, onStartDelete, + onRemoveDeleteCode, onDatabaseDeleteConfirm, onAddRetentionPolicy, isAddRPDisabled, @@ -119,12 +127,13 @@ const DatabaseTableHeader = ({ return (
) } @@ -135,20 +144,22 @@ DatabaseTableHeader.propTypes = { onKeyDown: func, onCancel: func, onConfirm: func, + onDelete: func, onStartDelete: func, onDatabaseDeleteConfirm: func, + onRemoveDeleteCode: func, onAddRetentionPolicy: func, isAddRPDisabled: bool, } const Header = ({ database, - onStartDelete, - onDatabaseDeleteConfirm, - onAddRetentionPolicy, - isAddRPDisabled, onCancel, - onConfirm, + onDelete, + onStartDelete, + isAddRPDisabled, + onAddRetentionPolicy, + onDatabaseDeleteConfirm, }) => { const confirmStyle = { display: 'flex', @@ -184,7 +195,7 @@ const Header = ({ autoFocus={true} /> - + ) @@ -197,13 +208,14 @@ const Header = ({ } Header.propTypes = { - database: shape(), - onStartDelete: func, - onDatabaseDeleteConfirm: func, - onAddRetentionPolicy: func, - isAddRPDisabled: bool, onConfirm: func, onCancel: func, + onDelete: func, + database: shape(), + onStartDelete: func, + isAddRPDisabled: bool, + onAddRetentionPolicy: func, + onDatabaseDeleteConfirm: func, } const EditHeader = ({database, onEdit, onKeyDown, onConfirm, onCancel}) => ( diff --git a/ui/src/admin/containers/DatabaseManagerPage.js b/ui/src/admin/containers/DatabaseManagerPage.js index e6b6c3f9d5..968d5df294 100644 --- a/ui/src/admin/containers/DatabaseManagerPage.js +++ b/ui/src/admin/containers/DatabaseManagerPage.js @@ -35,7 +35,9 @@ class DatabaseManagerPage extends Component { onEditDatabase={actions.editDatabase} onCancelDatabase={actions.removeDatabase} onConfirmDatabase={this.handleCreateDatabase} + onDeleteDatabase={actions.deleteDatabaseAsync} onStartDeleteDatabase={actions.addDatabaseDeleteCode} + onRemoveDeleteCode={actions.removeDatabaseDeleteCode} onAddRetentionPolicy={actions.addRetentionPolicy} onCreateRetentionPolicy={actions.createRetentionPolicyAsync} onUpdateRetentionPolicy={actions.updateRetentionPolicyAsync} diff --git a/ui/src/utils/formatting.js b/ui/src/utils/formatting.js index 9f0da688b7..bb59b45e51 100644 --- a/ui/src/utils/formatting.js +++ b/ui/src/utils/formatting.js @@ -15,8 +15,6 @@ export const formatBytes = (bytes) => { return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`; } -// Using InfluxDB 1.2+ we should no longer need this formatter. -// Times can now be submitted using multiple units i.e. 1d2h3m export const formatRPDuration = (duration) => { if (!duration) { return @@ -44,11 +42,3 @@ export const formatRPDuration = (duration) => { return adjustedTime; } - -export const formatInfiniteDuration = (duration) => { - if (duration === '0' || duration === '0s' || duration === 'INF') { - return '∞'; - } - - return duration -} From 861730fb3ff044f228db00a609d429f1c8cd57a0 Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Mon, 27 Mar 2017 15:32:40 -0700 Subject: [PATCH 3/3] (Fix) Graphs are now resizable again (#1085) * (Fix) Graphs are now resizable again * Update changelog --- CHANGELOG.md | 1 + ui/src/style/pages/dashboards.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 323fca3173..c3f7fe74ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bug Fixes 1. [#1065](https://github.com/influxdata/chronograf/pull/1065): Add functionality to the `save` and `cancel` buttons on editable dashboards 2. [#1069](https://github.com/influxdata/chronograf/pull/1069): Make graphs on pre-created dashboards un-editable + 3. [#1085](https://github.com/influxdata/chronograf/pull/1085): Make graphs resizable again ### Features 1. [#1056](https://github.com/influxdata/chronograf/pull/1056): Add ability to add a dashboard cell diff --git a/ui/src/style/pages/dashboards.scss b/ui/src/style/pages/dashboards.scss index 46b5c4d51f..eadc07bc71 100644 --- a/ui/src/style/pages/dashboards.scss +++ b/ui/src/style/pages/dashboards.scss @@ -54,6 +54,7 @@ $dash-graph-heading: 30px; height: 100%; top: 0; left: 0; + z-index: 0; } .dash-graph--container { z-index: 1;