use of org.ovirt.engine.core.common.mode.ApplicationMode in project ovirt-engine by oVirt.
the class ClusterModel method refreshAdditionalClusterFeaturesList.
private void refreshAdditionalClusterFeaturesList() {
if (getVersion() == null || getVersion().getSelectedItem() == null) {
return;
}
Version version = getVersion().getSelectedItem();
ApplicationMode category = null;
if (getEnableGlusterService().getEntity() && getEnableOvirtService().getEntity()) {
category = ApplicationMode.AllModes;
} else if (getEnableGlusterService().getEntity()) {
category = ApplicationMode.GlusterOnly;
} else if (getEnableOvirtService().getEntity()) {
category = ApplicationMode.VirtOnly;
}
// Get all the addtional features avaivalble for the cluster
startProgress();
AsyncDataProvider.getInstance().getClusterFeaturesByVersionAndCategory(new AsyncQuery<>(features -> {
stopProgress();
// cluster
if (getIsEdit() && !features.isEmpty()) {
startProgress();
AsyncDataProvider.getInstance().getClusterFeaturesByClusterId(new AsyncQuery<>(clusterFeatures -> {
stopProgress();
Set<AdditionalFeature> featuresEnabled = new HashSet<>();
for (SupportedAdditionalClusterFeature feature : clusterFeatures) {
if (feature.isEnabled()) {
featuresEnabled.add(feature.getFeature());
}
}
updateAddtionClusterFeatureList(features, featuresEnabled);
}), getEntity().getId());
} else {
updateAddtionClusterFeatureList(features, Collections.emptySet());
}
}), version, category);
}
use of org.ovirt.engine.core.common.mode.ApplicationMode in project ovirt-engine by oVirt.
the class ApplicationInit method performBootstrap.
@Override
protected void performBootstrap() {
super.performBootstrap();
Window.setTitle(dynamicMessages.applicationTitle());
// Check for ApplicationMode configuration
ApplicationMode uiMode = UiModeData.getUiMode();
if (uiMode != null) {
ApplicationModeHelper.setUiMode(uiMode);
}
}
Aggregations