Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
fix the displayed results of resources limits
Browse files Browse the repository at this point in the history
  • Loading branch information
yylyyl committed Oct 11, 2023
1 parent e1becbd commit b1169b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/routes/Containers/Create/CreateResources.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,17 @@ export default function AccordionResources() {
};

const texts = [];
if (res.setCpuShares) {
if (res.cpuShares) {
texts.push("CPU shares: " + res.cpuShares);
}
if (res.setLimitCpu) {
if (res.cpuCores) {
texts.push("CPU cores: " + res.cpuCores);
}
if (res.setLimitMemory) {
texts.push("Memory: " + res.memoryMB + "MB");
if (res.memoryMB) {
texts.push("Memory: " + res.memoryMB + " MB");
}
if (res.setLimitMemorySwap) {
texts.push("Memory+Swap: " + res.memorySwapMB + "MB");
if (res.memorySwapMB) {
texts.push("Memory+Swap: " + res.memorySwapMB + " MB");
}
const text = texts.join(", ");

Expand Down

0 comments on commit b1169b5

Please sign in to comment.