-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrading-mode-panels.tf
40 lines (40 loc) · 1.23 KB
/
trading-mode-panels.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
locals {
trading_mode_panels = concat(
[
{
id = 1
type = "row"
title = "Trading Modes"
gridPos = { x = 0, y = 0, h = 1, w = 24 }
}
],
flatten([
for i, chain in local.chains : [
merge(local.common_panel_config, local.state_timeline_config, {
id = i + 2
title = "Rate Feed Trading Mode [${chain}]"
description = "Rate feed trading mode for each active rate feed. If != 0, it means the trading is halted for that pair."
gridPos = { x = i * 12, y = 1, h = 8, w = 24 / length(local.chains) }
fieldConfig = {
defaults = merge(local.state_timeline_config.fieldConfig.defaults, {
decimals = 0
max = 3
min = 0
thresholds = {
mode = "absolute"
steps = [
{ color = "green", value = null },
{ color = "red", value = 80 }
]
}
})
}
targets = [{
expr = "BreakerBox_getRateFeedTradingMode{chain=\"${chain}\"}"
legendFormat = "{{rateFeed}}"
}]
})
]
])
)
}