In Release 1.0.4, I noticed that the default Handler Type is not selected for new series as seen in the screenshot below:
I have only recently noticed this and suspect it could actually be due to new behaviour in Grafana version 4.4.1.
The issue results from upgradeOldVersion() being called multiple times on a new series when still on the Metrics tab and before the Options tab has a chance to set the default. This results in valueHandler being incorrectly set to "Regular" rather than the default of"Threshold" (i.e. valueHandlers[0]).
Looking at the code in status_ctrl.js, this occurs as follows:
1) when a series is first created in the Metrics tab then valueHandler is null
2) a first call to upgradeOldVersion() will set the displayType to "Regular" (i.e. displayType[0]) on line 236
3) a second call to upgradeOldVersion() will then copy "Regular" into the valueHandler on line 232
4) when you then go to the Options tab then the Handler Type is blank
I think this is new behaviour in the latest Grafana release as I cannot recall seeing this problem before. The fix uses (target.displayType != null) to limit the upgrade checks to only legacy series and not new ones.
In Release 1.0.4, I noticed that the default Handler Type is not selected for new series as seen in the screenshot below:
I have only recently noticed this and suspect it could actually be due to new behaviour in Grafana version 4.4.1.
The issue results from upgradeOldVersion() being called multiple times on a new series when still on the Metrics tab and before the Options tab has a chance to set the default. This results in valueHandler being incorrectly set to "Regular" rather than the default of"Threshold" (i.e. valueHandlers[0]).
Looking at the code in status_ctrl.js, this occurs as follows: 1) when a series is first created in the Metrics tab then valueHandler is null 2) a first call to upgradeOldVersion() will set the displayType to "Regular" (i.e. displayType[0]) on line 236 3) a second call to upgradeOldVersion() will then copy "Regular" into the valueHandler on line 232 4) when you then go to the Options tab then the Handler Type is blank
I think this is new behaviour in the latest Grafana release as I cannot recall seeing this problem before. The fix uses (target.displayType != null) to limit the upgrade checks to only legacy series and not new ones.