@cloudtower/eagle 0.31.9 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/index.js +12 -15
- package/dist/cjs/coreX/ChartWithTooltip/index.js +12 -14
- package/dist/cjs/coreX/UnitWithChart/index.js +12 -14
- package/dist/cjs/index.js +237 -239
- package/dist/cjs/legacy-antd.js +109 -111
- package/dist/cjs/stats1.html +1 -1
- package/dist/cjs/utils/tower.js +0 -17
- package/dist/components.css +1017 -1034
- package/dist/esm/core/index.js +1 -3
- package/dist/esm/coreX/ChartWithTooltip/index.js +0 -2
- package/dist/esm/coreX/UnitWithChart/index.js +0 -2
- package/dist/esm/index.js +0 -1
- package/dist/esm/legacy-antd.js +0 -2
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/utils/tower.js +1 -17
- package/dist/src/core/Tooltip/index.d.ts +0 -1
- package/dist/src/core/index.d.ts +0 -3
- package/dist/src/coreX/UnitWithChart/index.d.ts +0 -1
- package/dist/src/spec/base.d.ts +0 -1
- package/dist/src/utils/tower.d.ts +0 -1
- package/dist/style.css +938 -953
- package/package.json +4 -4
- package/dist/cjs/core/BytePerSecond/index.js +0 -45
- package/dist/esm/core/BytePerSecond/index.js +0 -39
- package/dist/src/core/BytePerSecond/index.d.ts +0 -3
- package/dist/stories/docs/core/BytePerSecond.stories.d.ts +0 -17
package/dist/cjs/utils/tower.js
CHANGED
|
@@ -125,22 +125,6 @@ function formatBytes(bytes, decimals = 2) {
|
|
|
125
125
|
unit: units[i]
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
function formatBytePerSecond(bytes, decimals = 2) {
|
|
129
|
-
if (bytes <= 0 || bytes === MAGIC_METRIC_NULL) {
|
|
130
|
-
return {
|
|
131
|
-
value: 0,
|
|
132
|
-
unit: "B/s"
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
const k = 1024;
|
|
136
|
-
const units = ["B/s", "KiB/s", "MiB/s", "GiB/s", "TiB/s", "PiB/s"];
|
|
137
|
-
let i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
138
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
139
|
-
return {
|
|
140
|
-
value: parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)),
|
|
141
|
-
unit: units[i]
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
128
|
function formatPercent(input, decimals = 2, saturated = true) {
|
|
145
129
|
if (input === MAGIC_METRIC_NULL) {
|
|
146
130
|
input = 0;
|
|
@@ -197,7 +181,6 @@ exports.WEEK = WEEK;
|
|
|
197
181
|
exports.formatBitPerSecond = formatBitPerSecond;
|
|
198
182
|
exports.formatBits = formatBits;
|
|
199
183
|
exports.formatBps = formatBps;
|
|
200
|
-
exports.formatBytePerSecond = formatBytePerSecond;
|
|
201
184
|
exports.formatBytes = formatBytes;
|
|
202
185
|
exports.formatFrequency = formatFrequency;
|
|
203
186
|
exports.formatPercent = formatPercent;
|