Merge pull request #3341 from influxdata/bugfix/decimalplaces-backend
Fix backend defaults for decimal placespull/10616/head
commit
2611b9a549
|
@ -465,6 +465,9 @@ func UnmarshalDashboard(data []byte, d *chronograf.Dashboard) error {
|
|||
if c.DecimalPlaces != nil {
|
||||
decimalPlaces.IsEnforced = c.DecimalPlaces.IsEnforced
|
||||
decimalPlaces.Digits = c.DecimalPlaces.Digits
|
||||
} else {
|
||||
decimalPlaces.IsEnforced = false
|
||||
decimalPlaces.Digits = 3
|
||||
}
|
||||
|
||||
// FIXME: this is merely for legacy cells and
|
||||
|
|
|
@ -163,11 +163,11 @@ const propTypes = {
|
|||
wrapping: string.isRequired,
|
||||
fixFirstColumn: bool.isRequired,
|
||||
}),
|
||||
timeFormat: string.isRequired,
|
||||
timeFormat: string,
|
||||
decimalPlaces: shape({
|
||||
isEnforced: bool.isRequired,
|
||||
digits: number.isRequired,
|
||||
}).isRequired,
|
||||
}),
|
||||
fieldOptions: arrayOf(
|
||||
shape({
|
||||
internalName: string.isRequired,
|
||||
|
|
|
@ -173,7 +173,7 @@ LayoutRenderer.propTypes = {
|
|||
i: string.isRequired,
|
||||
name: string.isRequired,
|
||||
type: string.isRequired,
|
||||
timeFormat: string.isRequired,
|
||||
timeFormat: string,
|
||||
tableOptions: shape({
|
||||
verticalTimeAxis: bool.isRequired,
|
||||
sortBy: shape({
|
||||
|
|
|
@ -13,6 +13,10 @@ import TableGraph from 'shared/components/TableGraph'
|
|||
|
||||
import {colorsStringSchema} from 'shared/schemas'
|
||||
import {setHoverTime} from 'src/dashboards/actions'
|
||||
import {
|
||||
DEFAULT_TIME_FORMAT,
|
||||
DEFAULT_DECIMAL_PLACES,
|
||||
} from 'src/dashboards/constants'
|
||||
|
||||
const RefreshingLineGraph = AutoRefresh(LineGraph)
|
||||
const RefreshingSingleStat = AutoRefresh(SingleStat)
|
||||
|
@ -203,6 +207,8 @@ RefreshingGraph.defaultProps = {
|
|||
manualRefresh: 0,
|
||||
staticLegend: false,
|
||||
inView: true,
|
||||
timeFormat: DEFAULT_TIME_FORMAT,
|
||||
decimalPlaces: DEFAULT_DECIMAL_PLACES,
|
||||
}
|
||||
|
||||
const mapStateToProps = ({dashboardUI, annotations: {mode}}) => ({
|
||||
|
|
Loading…
Reference in New Issue