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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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