Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1326,11 +1326,9 @@ private void onNewTemplate() {
return;
}

if (!model.validateNaming()) {
return;
}

if (model.getIsSubTemplate().getEntity()) {
if (!model.validate(false)) {
model.setIsValid(false);
} else if (model.getIsSubTemplate().getEntity()) {
postNameUniqueCheck();
} else {
String name = model.getName().getEntity();
Expand Down Expand Up @@ -2193,7 +2191,7 @@ public void executeCommand(UICommand command) {
}

protected void exportOva() {
VM selectedEntity = (VM) getSelectedItem();
VM selectedEntity = getSelectedItem();
if (selectedEntity == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1694,17 +1694,17 @@ public void updateMaxMemory() {
}

public void updateMemory() {
Integer memoryMb = getModel().getMemSize().getEntity();
AsyncDataProvider.getMinMemoryForOs(new AsyncQuery<>(minMemory -> {
Integer memoryMb = getModel().getMemSize().getEntity();
if (memoryMb == null || memoryMb < minMemory) {
getModel().getMemSize().setEntity(minMemory);
}
}), getSelectedOSType(), getCompatibilityVersion());
}

public void updateTotalCpuCores() {
int cpuCores = getTotalCpuCores();
AsyncDataProvider.getMinCpus(new AsyncQuery<>(minCpus -> {
int cpuCores = getTotalCpuCores();
if (cpuCores < minCpus) {
getModel().getTotalCPUCores().setEntity(Integer.toString(minCpus));
}
Expand Down