mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
fix: use configured footprint statType for update
This commit is contained in:
parent
6f74c8cb77
commit
934d1a6114
@ -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
|
||||||
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user