Skip to content
Merged
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 @@ -59,6 +59,7 @@ public void execute() {
response.setAllowUserViewAllDomainAccounts((Boolean)capabilities.get("allowUserViewAllDomainAccounts"));
response.setKubernetesServiceEnabled((Boolean)capabilities.get("kubernetesServiceEnabled"));
response.setKubernetesClusterExperimentalFeaturesEnabled((Boolean)capabilities.get("kubernetesClusterExperimentalFeaturesEnabled"));
response.setCustomHypervisorDisplayName((String) capabilities.get("customHypervisorDisplayName"));
if (capabilities.containsKey("apiLimitInterval")) {
response.setApiLimitInterval((Integer)capabilities.get("apiLimitInterval"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public class CapabilitiesResponse extends BaseResponse {
@Param(description = "true if experimental features for Kubernetes cluster such as Docker private registry are enabled, false otherwise")
private boolean kubernetesClusterExperimentalFeaturesEnabled;

@SerializedName("customhypervisordisplayname")
@Param(description = "Display name for custom hypervisor", since = "4.19.0")
private String customHypervisorDisplayName;

@SerializedName("defaultuipagesize")
@Param(description = "default page size in the UI for various views, value set in the configurations", since = "4.15.2")
private Long defaultUiPageSize;
Expand Down Expand Up @@ -215,4 +219,8 @@ public void setInstancesDisksStatsRetentionEnabled(Boolean instancesDisksStatsRe
public void setInstancesDisksStatsRetentionTime(Integer instancesDisksStatsRetentionTime) {
this.instancesDisksStatsRetentionTime = instancesDisksStatsRetentionTime;
}

public void setCustomHypervisorDisplayName(String customHypervisorDisplayName) {
this.customHypervisorDisplayName = customHypervisorDisplayName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import javax.inject.Inject;
import javax.naming.ConfigurationException;

import com.cloud.hypervisor.HypervisorGuru;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.acl.SecurityChecker;
import org.apache.cloudstack.affinity.AffinityGroupProcessor;
Expand Down Expand Up @@ -4326,6 +4327,7 @@ public Map<String, Object> listCapabilities(final ListCapabilitiesCmd cmd) {
capabilities.put("allowUserViewAllDomainAccounts", allowUserViewAllDomainAccounts);
capabilities.put("kubernetesServiceEnabled", kubernetesServiceEnabled);
capabilities.put("kubernetesClusterExperimentalFeaturesEnabled", kubernetesClusterExperimentalFeaturesEnabled);
capabilities.put("customHypervisorDisplayName", HypervisorGuru.HypervisorCustomDisplayName.value());
capabilities.put(ApiServiceConfiguration.DefaultUIPageSize.key(), ApiServiceConfiguration.DefaultUIPageSize.value());
capabilities.put(ApiConstants.INSTANCES_STATS_RETENTION_TIME, StatsCollector.vmStatsMaxRetentionTime.value());
capabilities.put(ApiConstants.INSTANCES_STATS_USER_ONLY, StatsCollector.vmStatsCollectUserVMOnly.value());
Expand Down
12 changes: 3 additions & 9 deletions ui/src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ const user = {
if (result && result.defaultuipagesize) {
commit('SET_DEFAULT_LISTVIEW_PAGE_SIZE', result.defaultuipagesize)
}
if (result && result.customhypervisordisplayname) {
commit('SET_CUSTOM_HYPERVISOR_NAME', result.customhypervisordisplayname)
}
}).catch(error => {
reject(error)
})
Expand All @@ -302,15 +305,6 @@ const user = {
commit('SET_CLOUDIAN', cloudian)
}).catch(ignored => {
})

api('listConfigurations', { name: 'hypervisor.custom.display.name' }).then(json => {
if (json.listconfigurationsresponse.configuration !== null) {
const config = json.listconfigurationsresponse.configuration[0]
commit('SET_CUSTOM_HYPERVISOR_NAME', config.value)
}
}).catch(error => {
reject(error)
})
})
},

Expand Down