Merge branch 'master' into bugfix/1003-hosts-loading-message
# Conflicts: # CHANGELOG.mdpull/10616/head
commit
707c8eefb3
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,13 +1,13 @@
|
||||||
## v1.2.0 [unreleased]
|
## 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
|
|
||||||
3. [#1087](https://github.com/influxdata/chronograf/pull/1087): Hosts page now displays proper loading, host count, and error messages.
|
|
||||||
|
|
||||||
## v1.2.0-beta6 [2017-03-24]
|
## 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
|
||||||
|
3. [#1085](https://github.com/influxdata/chronograf/pull/1085): Make graphs resizable again
|
||||||
|
4. [#1087](https://github.com/influxdata/chronograf/pull/1087): Hosts page now displays proper loading, host count, and error messages.
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
1. [#1056](https://github.com/influxdata/chronograf/pull/1056): Add ability to add a dashboard cell
|
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
|
2. [#1020](https://github.com/influxdata/chronograf/pull/1020): Allow users to edit cell names on dashboards
|
||||||
|
|
|
@ -11,8 +11,10 @@ const DatabaseManager = ({
|
||||||
onKeyDownDatabase,
|
onKeyDownDatabase,
|
||||||
onCancelDatabase,
|
onCancelDatabase,
|
||||||
onConfirmDatabase,
|
onConfirmDatabase,
|
||||||
|
onDeleteDatabase,
|
||||||
onStartDeleteDatabase,
|
onStartDeleteDatabase,
|
||||||
onDatabaseDeleteConfirm,
|
onDatabaseDeleteConfirm,
|
||||||
|
onRemoveDeleteCode,
|
||||||
onAddRetentionPolicy,
|
onAddRetentionPolicy,
|
||||||
onStopEditRetentionPolicy,
|
onStopEditRetentionPolicy,
|
||||||
onCancelRetentionPolicy,
|
onCancelRetentionPolicy,
|
||||||
|
@ -39,6 +41,8 @@ const DatabaseManager = ({
|
||||||
onKeyDownDatabase={onKeyDownDatabase}
|
onKeyDownDatabase={onKeyDownDatabase}
|
||||||
onCancelDatabase={onCancelDatabase}
|
onCancelDatabase={onCancelDatabase}
|
||||||
onConfirmDatabase={onConfirmDatabase}
|
onConfirmDatabase={onConfirmDatabase}
|
||||||
|
onRemoveDeleteCode={onRemoveDeleteCode}
|
||||||
|
onDeleteDatabase={onDeleteDatabase}
|
||||||
onStartDeleteDatabase={onStartDeleteDatabase}
|
onStartDeleteDatabase={onStartDeleteDatabase}
|
||||||
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
||||||
onAddRetentionPolicy={onAddRetentionPolicy}
|
onAddRetentionPolicy={onAddRetentionPolicy}
|
||||||
|
@ -73,6 +77,8 @@ DatabaseManager.propTypes = {
|
||||||
onKeyDownDatabase: func,
|
onKeyDownDatabase: func,
|
||||||
onCancelDatabase: func,
|
onCancelDatabase: func,
|
||||||
onConfirmDatabase: func,
|
onConfirmDatabase: func,
|
||||||
|
onDeleteDatabase: func,
|
||||||
|
onRemoveDeleteCode: func,
|
||||||
onStartDeleteDatabase: func,
|
onStartDeleteDatabase: func,
|
||||||
onDatabaseDeleteConfirm: func,
|
onDatabaseDeleteConfirm: func,
|
||||||
onAddRetentionPolicy: func,
|
onAddRetentionPolicy: func,
|
||||||
|
|
|
@ -195,9 +195,10 @@ class DatabaseRow extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getInputValues() {
|
getInputValues() {
|
||||||
|
const {notify, retentionPolicy: {name: currentName}} = this.props
|
||||||
|
const name = this.name && this.name.value.trim() || currentName
|
||||||
let duration = this.duration.value.trim()
|
let duration = this.duration.value.trim()
|
||||||
const replication = +this.replication.value.trim()
|
const replication = +this.replication.value.trim()
|
||||||
const {notify, retentionPolicy: {name}} = this.props
|
|
||||||
|
|
||||||
if (!duration || !replication) {
|
if (!duration || !replication) {
|
||||||
notify('error', 'Fields cannot be empty')
|
notify('error', 'Fields cannot be empty')
|
||||||
|
|
|
@ -16,6 +16,8 @@ const DatabaseTable = ({
|
||||||
onKeyDownDatabase,
|
onKeyDownDatabase,
|
||||||
onCancelDatabase,
|
onCancelDatabase,
|
||||||
onConfirmDatabase,
|
onConfirmDatabase,
|
||||||
|
onDeleteDatabase,
|
||||||
|
onRemoveDeleteCode,
|
||||||
onStartDeleteDatabase,
|
onStartDeleteDatabase,
|
||||||
onDatabaseDeleteConfirm,
|
onDatabaseDeleteConfirm,
|
||||||
onAddRetentionPolicy,
|
onAddRetentionPolicy,
|
||||||
|
@ -28,15 +30,17 @@ const DatabaseTable = ({
|
||||||
<div className="db-manager">
|
<div className="db-manager">
|
||||||
<DatabaseTableHeader
|
<DatabaseTableHeader
|
||||||
database={database}
|
database={database}
|
||||||
isAddRPDisabled={!!database.retentionPolicies.some(rp => rp.isNew)}
|
|
||||||
onEdit={onEditDatabase}
|
onEdit={onEditDatabase}
|
||||||
onKeyDown={onKeyDownDatabase}
|
|
||||||
onCancel={onCancelDatabase}
|
onCancel={onCancelDatabase}
|
||||||
|
onDelete={onDeleteDatabase}
|
||||||
onConfirm={onConfirmDatabase}
|
onConfirm={onConfirmDatabase}
|
||||||
|
onKeyDown={onKeyDownDatabase}
|
||||||
onStartDelete={onStartDeleteDatabase}
|
onStartDelete={onStartDeleteDatabase}
|
||||||
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
onRemoveDeleteCode={onRemoveDeleteCode}
|
||||||
onAddRetentionPolicy={onAddRetentionPolicy}
|
onAddRetentionPolicy={onAddRetentionPolicy}
|
||||||
onDeleteRetentionPolicy={onDeleteRetentionPolicy}
|
onDeleteRetentionPolicy={onDeleteRetentionPolicy}
|
||||||
|
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
||||||
|
isAddRPDisabled={!!database.retentionPolicies.some(rp => rp.isNew)}
|
||||||
/>
|
/>
|
||||||
<div className="db-manager-table">
|
<div className="db-manager-table">
|
||||||
<table className="table v-center admin-table">
|
<table className="table v-center admin-table">
|
||||||
|
@ -81,8 +85,10 @@ DatabaseTable.propTypes = {
|
||||||
isRFDisplayed: bool,
|
isRFDisplayed: bool,
|
||||||
isAddRPDisabled: bool,
|
isAddRPDisabled: bool,
|
||||||
onKeyDownDatabase: func,
|
onKeyDownDatabase: func,
|
||||||
|
onDeleteDatabase: func,
|
||||||
onCancelDatabase: func,
|
onCancelDatabase: func,
|
||||||
onConfirmDatabase: func,
|
onConfirmDatabase: func,
|
||||||
|
onRemoveDeleteCode: func,
|
||||||
onStartDeleteDatabase: func,
|
onStartDeleteDatabase: func,
|
||||||
onDatabaseDeleteConfirm: func,
|
onDatabaseDeleteConfirm: func,
|
||||||
onAddRetentionPolicy: func,
|
onAddRetentionPolicy: func,
|
||||||
|
@ -99,7 +105,9 @@ const DatabaseTableHeader = ({
|
||||||
onKeyDown,
|
onKeyDown,
|
||||||
onConfirm,
|
onConfirm,
|
||||||
onCancel,
|
onCancel,
|
||||||
|
onDelete,
|
||||||
onStartDelete,
|
onStartDelete,
|
||||||
|
onRemoveDeleteCode,
|
||||||
onDatabaseDeleteConfirm,
|
onDatabaseDeleteConfirm,
|
||||||
onAddRetentionPolicy,
|
onAddRetentionPolicy,
|
||||||
isAddRPDisabled,
|
isAddRPDisabled,
|
||||||
|
@ -119,12 +127,13 @@ const DatabaseTableHeader = ({
|
||||||
return (
|
return (
|
||||||
<Header
|
<Header
|
||||||
database={database}
|
database={database}
|
||||||
onStartDelete={onStartDelete}
|
onCancel={onRemoveDeleteCode}
|
||||||
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
|
||||||
onAddRetentionPolicy={onAddRetentionPolicy}
|
|
||||||
onConfirm={onConfirm}
|
onConfirm={onConfirm}
|
||||||
onCancel={onCancel}
|
onDelete={onDelete}
|
||||||
|
onStartDelete={onStartDelete}
|
||||||
isAddRPDisabled={isAddRPDisabled}
|
isAddRPDisabled={isAddRPDisabled}
|
||||||
|
onAddRetentionPolicy={onAddRetentionPolicy}
|
||||||
|
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -135,20 +144,22 @@ DatabaseTableHeader.propTypes = {
|
||||||
onKeyDown: func,
|
onKeyDown: func,
|
||||||
onCancel: func,
|
onCancel: func,
|
||||||
onConfirm: func,
|
onConfirm: func,
|
||||||
|
onDelete: func,
|
||||||
onStartDelete: func,
|
onStartDelete: func,
|
||||||
onDatabaseDeleteConfirm: func,
|
onDatabaseDeleteConfirm: func,
|
||||||
|
onRemoveDeleteCode: func,
|
||||||
onAddRetentionPolicy: func,
|
onAddRetentionPolicy: func,
|
||||||
isAddRPDisabled: bool,
|
isAddRPDisabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
const Header = ({
|
const Header = ({
|
||||||
database,
|
database,
|
||||||
onStartDelete,
|
|
||||||
onDatabaseDeleteConfirm,
|
|
||||||
onAddRetentionPolicy,
|
|
||||||
isAddRPDisabled,
|
|
||||||
onCancel,
|
onCancel,
|
||||||
onConfirm,
|
onDelete,
|
||||||
|
onStartDelete,
|
||||||
|
isAddRPDisabled,
|
||||||
|
onAddRetentionPolicy,
|
||||||
|
onDatabaseDeleteConfirm,
|
||||||
}) => {
|
}) => {
|
||||||
const confirmStyle = {
|
const confirmStyle = {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
@ -184,7 +195,7 @@ const Header = ({
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmButtons item={database} onConfirm={onConfirm} onCancel={onCancel} />
|
<ConfirmButtons item={database} onConfirm={onDelete} onCancel={onCancel} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -197,13 +208,14 @@ const Header = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
Header.propTypes = {
|
Header.propTypes = {
|
||||||
database: shape(),
|
|
||||||
onStartDelete: func,
|
|
||||||
onDatabaseDeleteConfirm: func,
|
|
||||||
onAddRetentionPolicy: func,
|
|
||||||
isAddRPDisabled: bool,
|
|
||||||
onConfirm: func,
|
onConfirm: func,
|
||||||
onCancel: func,
|
onCancel: func,
|
||||||
|
onDelete: func,
|
||||||
|
database: shape(),
|
||||||
|
onStartDelete: func,
|
||||||
|
isAddRPDisabled: bool,
|
||||||
|
onAddRetentionPolicy: func,
|
||||||
|
onDatabaseDeleteConfirm: func,
|
||||||
}
|
}
|
||||||
|
|
||||||
const EditHeader = ({database, onEdit, onKeyDown, onConfirm, onCancel}) => (
|
const EditHeader = ({database, onEdit, onKeyDown, onConfirm, onCancel}) => (
|
||||||
|
|
|
@ -35,7 +35,9 @@ class DatabaseManagerPage extends Component {
|
||||||
onEditDatabase={actions.editDatabase}
|
onEditDatabase={actions.editDatabase}
|
||||||
onCancelDatabase={actions.removeDatabase}
|
onCancelDatabase={actions.removeDatabase}
|
||||||
onConfirmDatabase={this.handleCreateDatabase}
|
onConfirmDatabase={this.handleCreateDatabase}
|
||||||
|
onDeleteDatabase={actions.deleteDatabaseAsync}
|
||||||
onStartDeleteDatabase={actions.addDatabaseDeleteCode}
|
onStartDeleteDatabase={actions.addDatabaseDeleteCode}
|
||||||
|
onRemoveDeleteCode={actions.removeDatabaseDeleteCode}
|
||||||
onAddRetentionPolicy={actions.addRetentionPolicy}
|
onAddRetentionPolicy={actions.addRetentionPolicy}
|
||||||
onCreateRetentionPolicy={actions.createRetentionPolicyAsync}
|
onCreateRetentionPolicy={actions.createRetentionPolicyAsync}
|
||||||
onUpdateRetentionPolicy={actions.updateRetentionPolicyAsync}
|
onUpdateRetentionPolicy={actions.updateRetentionPolicyAsync}
|
||||||
|
|
|
@ -54,6 +54,7 @@ $dash-graph-heading: 30px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
.dash-graph--container {
|
.dash-graph--container {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
|
@ -15,8 +15,6 @@ export const formatBytes = (bytes) => {
|
||||||
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
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) => {
|
export const formatRPDuration = (duration) => {
|
||||||
if (!duration) {
|
if (!duration) {
|
||||||
return
|
return
|
||||||
|
@ -44,11 +42,3 @@ export const formatRPDuration = (duration) => {
|
||||||
|
|
||||||
return adjustedTime;
|
return adjustedTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const formatInfiniteDuration = (duration) => {
|
|
||||||
if (duration === '0' || duration === '0s' || duration === 'INF') {
|
|
||||||
return '∞';
|
|
||||||
}
|
|
||||||
|
|
||||||
return duration
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue