Skip to content

Commit

Permalink
v5.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed May 20, 2024
1 parent cca79d3 commit a6c5420
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 71 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.9",
"version": "5.0.10",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
84 changes: 15 additions & 69 deletions src/helpers/units/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,39 +645,6 @@ export default {
base_unit: "s/s",
prefix_symbol: "m",
},
"ms/{operation}": {
symbol: "ms/{operation}",
name: "milliseconds per operation",
print_symbol: "ms/operation",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: false,
base_unit: "s/{operation}",
prefix_symbol: "m",
},
"ms/{request}": {
symbol: "ms/{request}",
name: "milliseconds per request",
print_symbol: "ms/request",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: false,
base_unit: "s/{request}",
prefix_symbol: "m",
},
"ms/{run}": {
symbol: "ms/{run}",
name: "milliseconds per run",
print_symbol: "ms/run",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: false,
base_unit: "s/{run}",
prefix_symbol: "m",
},
ns: {
symbol: "ns",
name: "nanoseconds",
Expand Down Expand Up @@ -707,33 +674,6 @@ export default {
is_scalable: true,
is_binary: false,
},
"s/{operation}": {
symbol: "s/{operation}",
name: "seconds per operation",
print_symbol: "s/operation",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: false,
},
"s/{request}": {
symbol: "s/{request}",
name: "seconds per request",
print_symbol: "s/request",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: false,
},
"s/{run}": {
symbol: "s/{run}",
name: "seconds per run",
print_symbol: "s/run",
is_metric: true,
is_special: false,
is_scalable: true,
is_binary: false,
},
us: {
symbol: "us",
name: "microseconds",
Expand Down Expand Up @@ -3776,15 +3716,15 @@ export default {
"methods/s": "{method}/s",
"MiB/s": "MiBy/s",
"Mibit/s": "Mibit/s",
"milliseconds/request": "ms/{request}",
"milliseconds/run": "ms/{run}",
"milliseconds/request": "ms",
"milliseconds/run": "ms",
"milliseconds/s": "ms/s",
"misses/s": "{miss}/s",
"modifications/s": "{modification}/s",
"ms/operation": "ms/{operation}",
"milliseconds/operation": "ms/{operation}",
"ms/request": "ms/{request}",
"ms/run": "ms/{run}",
"ms/operation": "ms",
"milliseconds/operation": "ms",
"ms/request": "ms",
"ms/run": "ms",
"ms/s": "ms/s",
"msg/s": "{message}/s",
"netsplits/s": "{netsplit}/s",
Expand Down Expand Up @@ -3833,9 +3773,9 @@ export default {
"Rotations / Minute": "{rotation}/min",
"Rotations/min": "{rotation}/min",
"rows/s": "{row}/s",
"s/operation": "s/{operation}",
"s/request": "s/{request}",
"s/run": "s/{run}",
"s/operation": "s",
"s/request": "s",
"s/run": "s",
"s/s": "s/s",
"seconds/s": "s/s",
"scans/s": "{scan}/s",
Expand Down Expand Up @@ -4105,5 +4045,11 @@ export default {
"faults/s": "{fault}/s",
Mbps: "Mibit/s",
RPM: "{rotation}/min",
"ms/{operation}": "ms",
"ms/{request}": "ms",
"ms/{run}": "ms",
"s/{operation}": "s",
"s/{request}": "s",
"s/{run}": "s",
},
}
2 changes: 1 addition & 1 deletion src/helpers/units/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const getUnitsString = (u, prefix = "", base = "", long) => {
if (!isScalable(u)) return labelify(base, u, long).trim()

if (isMetric(u) || isBinary(u) || isBit(u))
return `${labelify(prefix, allUnits.prefixes[prefix], long)}${isBinary(u) || isBit(u) ? "" : " "}${labelify(base, u, long)}`.trim()
return `${labelify(prefix, allUnits.prefixes[prefix], long)}${labelify(base, u, long)}`.trim()

return `${labelify(prefix, allUnits.decimal_prefixes[prefix], long)} ${labelify(base, u, long)}`.trim()
}
Expand Down

0 comments on commit a6c5420

Please sign in to comment.