Merge v2.7.1 into master (#5170)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
108b9b0e5f
commit
a60431f3cd
|
@ -1,3 +1,11 @@
|
|||
## 2.7.1 / 2019-01-31
|
||||
|
||||
This release has a fix for a Stored DOM XSS vulnerability that can be triggered when using the query history functionality. Thanks to Dor Tumarkin from Checkmarx for reporting it.
|
||||
|
||||
* [BUGFIX/SECURITY] Fix a Stored DOM XSS vulnerability with query history. #5163
|
||||
* [BUGFIX] `prometheus_rule_group_last_duration_seconds` now reports seconds instead of nanoseconds. #5153
|
||||
* [BUGFIX] Make sure the targets are consistently sorted in the targets page. #5161
|
||||
|
||||
## 2.7.0 / 2019-01-28
|
||||
|
||||
We're rolling back the Dockerfile changes introduced in 2.6.0. If you made changes to your docker deployment in 2.6.0, you will need to roll them back. This release also adds experimental support for disk size based retention. To accomodate that we are deprecating the flag `storage.tsdb.retention` in favour of `storage.tsdb.retention.time`. We print a warning if the flag is in use, but it will function without breaking until Prometheus 3.0.
|
||||
|
|
|
@ -369,7 +369,7 @@ func (g *Group) GetEvaluationDuration() time.Duration {
|
|||
|
||||
// setEvaluationDuration sets the time in seconds the last evaluation took.
|
||||
func (g *Group) setEvaluationDuration(dur time.Duration) {
|
||||
g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(float64(dur))
|
||||
g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(dur.Seconds())
|
||||
|
||||
g.mtx.Lock()
|
||||
defer g.mtx.Unlock()
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -311,11 +311,7 @@ Prometheus.Graph.prototype.initTypeahead = function(self) {
|
|||
return i === 0 ? a.localeCompare(b) : i;
|
||||
});
|
||||
return items;
|
||||
},
|
||||
|
||||
highlighter: function (item) {
|
||||
return $("<div>" + self.fuzzyResult.map[item].string + "</div>");
|
||||
},
|
||||
}
|
||||
});
|
||||
// This needs to happen after attaching the typeahead plugin, as it
|
||||
// otherwise breaks the typeahead functionality.
|
||||
|
|
|
@ -695,8 +695,12 @@ func (h *Handler) targets(w http.ResponseWriter, r *http.Request) {
|
|||
tps := h.scrapeManager.TargetsActive()
|
||||
for _, targets := range tps {
|
||||
sort.Slice(targets, func(i, j int) bool {
|
||||
return targets[i].Labels().Get(model.JobLabel) < targets[j].Labels().Get(model.JobLabel) ||
|
||||
targets[i].Labels().Get(model.InstanceLabel) < targets[j].Labels().Get(model.InstanceLabel)
|
||||
iJobLabel := targets[i].Labels().Get(model.JobLabel)
|
||||
jJobLabel := targets[j].Labels().Get(model.JobLabel)
|
||||
if iJobLabel == jJobLabel {
|
||||
return targets[i].Labels().Get(model.InstanceLabel) < targets[j].Labels().Get(model.InstanceLabel)
|
||||
}
|
||||
return iJobLabel < jJobLabel
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue