mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
start work on supporting metrics with a scope of hwthread
This commit is contained in:
@@ -156,6 +156,19 @@ func GetClusterConfig(cluster string) *model.Cluster {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetPartition(cluster, partition string) *model.Partition {
|
||||
for _, c := range Clusters {
|
||||
if c.Name == cluster {
|
||||
for _, p := range c.Partitions {
|
||||
if p.Name == partition {
|
||||
return p
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetMetricConfig(cluster, metric string) *model.MetricConfig {
|
||||
for _, c := range Clusters {
|
||||
if c.Name == cluster {
|
||||
|
Reference in New Issue
Block a user