mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-25 17:17:29 +01:00
review doubleranged filters, fix and improve valeu selection
This commit is contained in:
@@ -308,7 +308,7 @@ func buildFilterPresets(query url.Values) map[string]any {
|
||||
if parts[0] == "lessthan" {
|
||||
lt, lte := strconv.Atoi(parts[1])
|
||||
if lte == nil {
|
||||
filterPresets["numNodes"] = map[string]int{"from": 1, "to": lt}
|
||||
filterPresets["numNodes"] = map[string]int{"from": 0, "to": lt}
|
||||
}
|
||||
} else if parts[0] == "morethan" {
|
||||
mt, mte := strconv.Atoi(parts[1])
|
||||
@@ -330,7 +330,7 @@ func buildFilterPresets(query url.Values) map[string]any {
|
||||
if parts[0] == "lessthan" {
|
||||
lt, lte := strconv.Atoi(parts[1])
|
||||
if lte == nil {
|
||||
filterPresets["numHWThreads"] = map[string]int{"from": 1, "to": lt}
|
||||
filterPresets["numHWThreads"] = map[string]int{"from": 0, "to": lt}
|
||||
}
|
||||
} else if parts[0] == "morethan" {
|
||||
mt, mte := strconv.Atoi(parts[1])
|
||||
@@ -352,7 +352,7 @@ func buildFilterPresets(query url.Values) map[string]any {
|
||||
if parts[0] == "lessthan" {
|
||||
lt, lte := strconv.Atoi(parts[1])
|
||||
if lte == nil {
|
||||
filterPresets["numAccelerators"] = map[string]int{"from": 1, "to": lt}
|
||||
filterPresets["numAccelerators"] = map[string]int{"from": 0, "to": lt}
|
||||
}
|
||||
} else if parts[0] == "morethan" {
|
||||
mt, mte := strconv.Atoi(parts[1])
|
||||
@@ -408,7 +408,7 @@ func buildFilterPresets(query url.Values) map[string]any {
|
||||
if parts[0] == "lessthan" {
|
||||
lt, lte := strconv.Atoi(parts[1])
|
||||
if lte == nil {
|
||||
filterPresets["energy"] = map[string]int{"from": 1, "to": lt}
|
||||
filterPresets["energy"] = map[string]int{"from": 0, "to": lt}
|
||||
}
|
||||
} else if parts[0] == "morethan" {
|
||||
mt, mte := strconv.Atoi(parts[1])
|
||||
@@ -434,7 +434,7 @@ func buildFilterPresets(query url.Values) map[string]any {
|
||||
if lte == nil {
|
||||
statEntry := map[string]any{
|
||||
"field": parts[0],
|
||||
"from": 1,
|
||||
"from": 0,
|
||||
"to": lt,
|
||||
}
|
||||
statList = append(statList, statEntry)
|
||||
|
||||
Reference in New Issue
Block a user