fix: attempt to fix tests for hoverDimension feature

pull/18641/head
David McKay 2020-06-16 19:03:21 +01:00
parent 76e3fe103a
commit fb22376078
8 changed files with 24 additions and 7 deletions

View File

@ -689,6 +689,7 @@ type LinePlusSingleStatProperties struct {
ShadeBelow bool `json:"shadeBelow"` ShadeBelow bool `json:"shadeBelow"`
Position string `json:"position"` Position string `json:"position"`
TimeFormat string `json:"timeFormat"` TimeFormat string `json:"timeFormat"`
HoverDimension string `json:"hoverDimension"`
} }
// XYViewProperties represents options for line, bar, step, or stacked view in Chronograf // XYViewProperties represents options for line, bar, step, or stacked view in Chronograf
@ -706,6 +707,7 @@ type XYViewProperties struct {
ShadeBelow bool `json:"shadeBelow"` ShadeBelow bool `json:"shadeBelow"`
Position string `json:"position"` Position string `json:"position"`
TimeFormat string `json:"timeFormat"` TimeFormat string `json:"timeFormat"`
HoverDimension string `json:"hoverDimension"`
} }
// CheckViewProperties represents options for a view representing a check // CheckViewProperties represents options for a view representing a check

View File

@ -51,8 +51,9 @@ func TestView_MarshalJSON(t *testing.T) {
"xColumn": "", "xColumn": "",
"yColumn": "", "yColumn": "",
"shadeBelow": false, "shadeBelow": false,
"position": "", "position": "",
"timeFormat": "" "timeFormat": "",
"hoverDimension": ""
} }
} }
`, `,

View File

@ -173,7 +173,8 @@
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"xColumn": "_time", "xColumn": "_time",
"yColumn": "_value", "yColumn": "_value",
"shadeBelow": false "shadeBelow": false,
"hoverDimension": "auto"
} }
} }
}, },
@ -258,7 +259,8 @@
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"xColumn": "_time", "xColumn": "_time",
"yColumn": "_value", "yColumn": "_value",
"shadeBelow": false "shadeBelow": false,
"hoverDimension": "auto"
} }
} }
}, },

View File

@ -147,6 +147,7 @@
} }
], ],
"shadeBelow": false, "shadeBelow": false,
"hoverDimension": "auto",
"shape": "chronograf-v2", "shape": "chronograf-v2",
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"type": "xy", "type": "xy",

View File

@ -151,7 +151,8 @@
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"xColumn": "_time", "xColumn": "_time",
"yColumn": "_value", "yColumn": "_value",
"shadeBelow": false "shadeBelow": false,
"hoverDimension": "auto"
} }
} }
}, },

View File

@ -173,7 +173,8 @@
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"xColumn": "_time", "xColumn": "_time",
"yColumn": "_value", "yColumn": "_value",
"shadeBelow": false "shadeBelow": false,
"hoverDimension": "auto"
} }
} }
}, },
@ -258,7 +259,8 @@
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"xColumn": "_time", "xColumn": "_time",
"yColumn": "_value", "yColumn": "_value",
"shadeBelow": false "shadeBelow": false,
"hoverDimension": "auto"
} }
} }
}, },

View File

@ -461,6 +461,7 @@ func TestService_handleGetDashboard(t *testing.T) {
"note": "", "note": "",
"queries": null, "queries": null,
"shadeBelow": false, "shadeBelow": false,
"hoverDimension": "",
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"timeFormat": "", "timeFormat": "",
"type": "xy", "type": "xy",
@ -977,6 +978,7 @@ func TestService_handlePostDashboard(t *testing.T) {
"position": "", "position": "",
"queries": null, "queries": null,
"shadeBelow": false, "shadeBelow": false,
"hoverDimension": "",
"showNoteWhenEmpty": false, "showNoteWhenEmpty": false,
"timeFormat": "", "timeFormat": "",
"type": "", "type": "",

View File

@ -9154,6 +9154,9 @@ components:
type: string type: string
shadeBelow: shadeBelow:
type: boolean type: boolean
hoverDimension:
type: string
enum: [auto, x, y, xy]
position: position:
type: string type: string
enum: [overlaid, stacked] enum: [overlaid, stacked]
@ -9210,6 +9213,9 @@ components:
type: string type: string
shadeBelow: shadeBelow:
type: boolean type: boolean
hoverDimension:
type: string
enum: [auto, x, y, xy]
position: position:
type: string type: string
enum: [overlaid, stacked] enum: [overlaid, stacked]