Skip to content

Commit

Permalink
v5.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed May 20, 2024
1 parent a6c5420 commit 48ab17a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/charts",
"version": "5.0.10",
"version": "5.0.11",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
34 changes: 7 additions & 27 deletions src/helpers/units/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,6 @@ export default {
is_scalable: true,
is_binary: true,
},
"By/{operation}": {
symbol: "By/{operation}",
name: "bytes per operation",
print_symbol: "B/operation",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: true,
},
Cel: {
symbol: "Cel",
name: "degrees Celsius",
Expand Down Expand Up @@ -382,17 +373,6 @@ export default {
base_unit: "By/s",
prefix_symbol: "Ki",
},
"KiBy/{operation}": {
symbol: "KiBy/{operation}",
name: "kibibytes per operation",
print_symbol: "KiB/operation",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: true,
base_unit: "By/{operation}",
prefix_symbol: "Ki",
},
Kibit: {
symbol: "Kibit",
name: "kilobits",
Expand Down Expand Up @@ -1122,7 +1102,7 @@ export default {
"{connection}": {
symbol: "{connection}",
name: "connections",
print_symbol: "connections",
print_symbol: "conns",
is_metric: false,
is_special: false,
is_scalable: true,
Expand All @@ -1131,7 +1111,7 @@ export default {
"{connection}/s": {
symbol: "{connection}/s",
name: "connections per second",
print_symbol: "connections/s",
print_symbol: "conns/s",
is_metric: false,
is_special: false,
is_scalable: true,
Expand Down Expand Up @@ -1167,7 +1147,7 @@ export default {
"{context switch}/s": {
symbol: "{context switch}/s",
name: "context switches per second",
print_symbol: "context switches/s",
print_symbol: "ctx switches/s",
is_metric: false,
is_special: false,
is_scalable: true,
Expand All @@ -1185,7 +1165,7 @@ export default {
"{context}": {
symbol: "{context}",
name: "contexts",
print_symbol: "contexts",
print_symbol: "ctx",
is_metric: false,
is_special: false,
is_scalable: true,
Expand Down Expand Up @@ -2400,7 +2380,7 @@ export default {
"{operation}/s": {
symbol: "{operation}/s",
name: "operations per second",
print_symbol: "operations/s",
print_symbol: "ops/s",
is_metric: false,
is_special: false,
is_scalable: true,
Expand Down Expand Up @@ -3626,7 +3606,7 @@ export default {
"attempts/s": "{attempt}/s",
"authentications/s": "{authentication}/s",
"B(mW)": "B[mW]",
"B/operation": "By/{operation}",
"B/operation": "By",
"B/s": "By/s",
"bans/s": "{ban}/s",
"batches/s": "{batch}/s",
Expand Down Expand Up @@ -3701,7 +3681,7 @@ export default {
"jobs/s": "{job}/s",
"joins/s": "{join}/s",
"keys/s": "{key}/s",
"KiB/operation": "KiBy/{operation}",
"KiB/operation": "KiBy",
"KiB/s": "KiBy/s",
"kills/s": "{kill}/s",
"kilobits/s": "Kibit/s",
Expand Down
8 changes: 4 additions & 4 deletions src/helpers/units/scalableUnits.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const keys = {
binary: ["Ki", "Mi", "Gi", "Ti"],
bit: ["k", "M", "G", "T", "P", "E", "Z", "Y"],
binary: ["1", "Ki", "Mi", "Gi", "Ti"],
bit: ["1", "k", "M", "G", "T", "P", "E", "Z", "Y"],

decimal: ["K", "M", "B", "T"],
num: ["y", "z", "a", "f", "p", "n", "u", "m", "k", "M", "G", "T", "P", "E", "Z", "Y"],
decimal: ["1", "K", "M", "B", "T"],
num: ["y", "z", "a", "f", "p", "n", "u", "m", "1", "k", "M", "G", "T", "P", "E", "Z", "Y"],
}

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/plugins/unitConversion/getConversionUnits.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const scalable = (units, delta, desiredUnits) => {
? [
"adjust",
value => (value * (scaleByKey[prefix] || 1)) / (scaleByKey[scale] || 1),
scale,
scale === "1" ? "" : scale,
base,
]
: ["original"]
Expand Down

0 comments on commit 48ab17a

Please sign in to comment.