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]
|
||||
|
||||
### 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]
|
||||
|
||||
### 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
|
||||
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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -16,6 +16,8 @@ const DatabaseTable = ({
|
|||
onKeyDownDatabase,
|
||||
onCancelDatabase,
|
||||
onConfirmDatabase,
|
||||
onDeleteDatabase,
|
||||
onRemoveDeleteCode,
|
||||
onStartDeleteDatabase,
|
||||
onDatabaseDeleteConfirm,
|
||||
onAddRetentionPolicy,
|
||||
|
@ -28,15 +30,17 @@ const DatabaseTable = ({
|
|||
<div className="db-manager">
|
||||
<DatabaseTableHeader
|
||||
database={database}
|
||||
isAddRPDisabled={!!database.retentionPolicies.some(rp => 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)}
|
||||
/>
|
||||
<div className="db-manager-table">
|
||||
<table className="table v-center admin-table">
|
||||
|
@ -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 (
|
||||
<Header
|
||||
database={database}
|
||||
onStartDelete={onStartDelete}
|
||||
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
||||
onAddRetentionPolicy={onAddRetentionPolicy}
|
||||
onCancel={onRemoveDeleteCode}
|
||||
onConfirm={onConfirm}
|
||||
onCancel={onCancel}
|
||||
onDelete={onDelete}
|
||||
onStartDelete={onStartDelete}
|
||||
isAddRPDisabled={isAddRPDisabled}
|
||||
onAddRetentionPolicy={onAddRetentionPolicy}
|
||||
onDatabaseDeleteConfirm={onDatabaseDeleteConfirm}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
@ -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}
|
||||
/>
|
||||
</div>
|
||||
<ConfirmButtons item={database} onConfirm={onConfirm} onCancel={onCancel} />
|
||||
<ConfirmButtons item={database} onConfirm={onDelete} onCancel={onCancel} />
|
||||
</div>
|
||||
)
|
||||
|
||||
|
@ -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}) => (
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -54,6 +54,7 @@ $dash-graph-heading: 30px;
|
|||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.dash-graph--container {
|
||||
z-index: 1;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue