We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c1d325 commit cc5c1ddCopy full SHA for cc5c1dd
1 file changed
react/src/components/ResourcePresetSettingModal.tsx
@@ -1,4 +1,7 @@
1
-import { convertBinarySizeUnit } from '../helper';
+import {
2
+ convertBinarySizeUnit,
3
+ toFixedFloorWithoutTrailingZeros,
4
+} from '../helper';
5
import { useSuspendedBackendaiClient } from '../hooks';
6
import { useResourceSlots, useResourceSlotsDetails } from '../hooks/backendai';
7
import { useCurrentProjectValue } from '../hooks/useCurrentProject';
@@ -108,6 +111,9 @@ const ResourcePresetSettingModal: React.FC<ResourcePresetSettingModalProps> = ({
108
111
if (_.includes(key, 'mem')) {
109
112
return convertBinarySizeUnit(value, 'b', 0)?.numberFixed;
110
113
}
114
+ if (_.includes(key, '.shares')) {
115
+ return toFixedFloorWithoutTrailingZeros(value, 2);
116
+ }
117
return value;
118
},
119
);
0 commit comments