Added code and translation for customapi format data types:
- percentBinary (1-100% of 8-bit number) - state (boolean value as state)
This commit is contained in:
parent
61b969cced
commit
9994ab4141
@ -306,6 +306,10 @@
|
||||
"7days": "7 Days",
|
||||
"30days": "30 Days"
|
||||
},
|
||||
"customapi": {
|
||||
"active": "Active",
|
||||
"inactive": "Inactive"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
|
||||
@ -35,6 +35,10 @@ function formatValue(t, mapping, value) {
|
||||
return t("common.number", {value});
|
||||
case 'percent':
|
||||
return t("common.percent", {value});
|
||||
case 'percentBinary':
|
||||
return t("common.percent", {value: (100 * value / 255).toFixed()});
|
||||
case 'state':
|
||||
return t(`customapi.${/true/.test(value) ? "active" : "inactive"}`);
|
||||
case 'text':
|
||||
default:
|
||||
return value;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user