|
|
|
@ -952,6 +952,11 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
previewResolutionBtnM.setEnabled(enabled); |
|
|
|
|
// 设计器启动选项-延迟启动云端运维模块
|
|
|
|
|
this.cloudAnalyticsDelayCheckBox.setSelected(designerEnvManager.isCloudAnalyticsDelay()); |
|
|
|
|
// 异步加载高级配置
|
|
|
|
|
loadAdvanceConfigAsync(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void loadAdvanceConfigAsync() { |
|
|
|
|
List<Supplier<Object>> advanceConfigLoaders = Arrays.asList( |
|
|
|
|
GcConfig.getInstance()::isGcEnable, |
|
|
|
|
ServerPreferenceConfig.getInstance()::isUseUniverseDBM, |
|
|
|
@ -973,7 +978,9 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); |
|
|
|
|
//如果是集群并且是老版本则不可用
|
|
|
|
|
if (VcsHelper.getInstance().isLegacyMode() && WorkContext.getCurrent().isCluster()) { |
|
|
|
|
// 保存自动生成版本
|
|
|
|
|
vcsEnableCheckBox.setEnabled(false); |
|
|
|
|
// 模板版本控制存储优化
|
|
|
|
|
gcEnableCheckBox.setEnabled(false); |
|
|
|
|
} |
|
|
|
|
if (VcsHelper.getInstance().needInit()) { |
|
|
|
@ -982,6 +989,8 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
vcsEnableCheckBox.setEnabled(false); |
|
|
|
|
vcsEnableCheckBox.setSelected(false); |
|
|
|
|
} |
|
|
|
|
autoSaveIntervalEditor.setValue(vcsConfigManager.getAutoSaveInterval()); |
|
|
|
|
//版本管理-存储与清理机制
|
|
|
|
|
if (!vcsEnableCheckBox.isSelected()) { |
|
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
@ -990,7 +999,11 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
saveIntervalEditor.setValue(vcsConfigManager.getSaveInterval()); |
|
|
|
|
saveCommitCheckBox.setSelected(vcsConfigManager.isSaveCommit()); |
|
|
|
|
useIntervalCheckBox.setSelected(vcsConfigManager.isUseInterval()); |
|
|
|
|
//版本管理-存储与清理机制
|
|
|
|
|
// 异步加载版本管理配置
|
|
|
|
|
loadVersionControlConfigsAsync(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void loadVersionControlConfigsAsync() { |
|
|
|
|
List<Supplier<Object>> vcsConfigLoaders = Arrays.asList( |
|
|
|
|
VcsConfig.getInstance()::isUseV2AutoClean, |
|
|
|
|
VcsConfig.getInstance()::getV2CleanInterval, |
|
|
|
@ -1002,7 +1015,6 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
v2RetainInterval -> autoCleanRetainIntervalComboBox.setSelectedIndex(getIndex((Integer) v2RetainInterval)) |
|
|
|
|
); |
|
|
|
|
UIUtil.loadConfigsAndUpdateUI(vcsConfigLoaders, vcsConfigUpdaters); |
|
|
|
|
autoSaveIntervalEditor.setValue(vcsConfigManager.getAutoSaveInterval()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void updateGcConfigUI(Boolean gcEnable) { |
|
|
|
|