fix: use configured footprint statType for update

This commit is contained in:
Christoph Kluge 2024-10-23 16:16:28 +02:00
parent 6f74c8cb77
commit 934d1a6114
2 changed files with 12 additions and 2 deletions

View File

@ -642,7 +642,17 @@ func (r *JobRepository) UpdateFootprint(
footprint := make(map[string]float64) footprint := make(map[string]float64)
for _, fp := range sc.Footprint { for _, fp := range sc.Footprint {
statType := "avg" var statType string
for _, gm := range archive.GlobalMetricList {
if gm.Name == fp {
statType = gm.Footprint
}
}
if statType != "avg" && statType != "min" && statType != "max" {
log.Warnf("unknown statType for footprint update: %s", statType)
return stmt, fmt.Errorf("unknown statType for footprint update: %s", statType)
}
if i, err := archive.MetricIndex(sc.MetricConfig, fp); err != nil { if i, err := archive.MetricIndex(sc.MetricConfig, fp); err != nil {
statType = sc.MetricConfig[i].Footprint statType = sc.MetricConfig[i].Footprint

View File

@ -72,7 +72,7 @@
{:else} {:else}
<div <div
class="truncate" class="truncate"
style="cursor:help; width:230px;" style="cursor:help;"
title={job.metaData.jobName} title={job.metaData.jobName}
> >
{job.metaData.jobName} {job.metaData.jobName}