ChangeScreen2: add Gerrit config and user preference
Now gerrit.changeScreen can be set in gerrit.config to select which UI is presented: OLD_UI for the legacy view, and CHANGE_SCREEN2 for the new UI. The current default is OLD_UI but this is expected to change in the future before the old UI is deleted. A per user preference can be used to switch the screen. Started-by: David Ostrovsky <david@ostrovsky.org> Change-Id: I340efe7ff264a534cb9a83609bbc63621e2b60c1
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.gerrit.httpd;
|
||||
import com.google.gerrit.common.data.GerritConfig;
|
||||
import com.google.gerrit.common.data.GitwebConfig;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AccountGeneralPreferences;
|
||||
import com.google.gerrit.server.account.Realm;
|
||||
import com.google.gerrit.server.config.AllProjectsName;
|
||||
import com.google.gerrit.server.config.AnonymousCowardName;
|
||||
@@ -124,6 +125,9 @@ class GerritConfigProvider implements Provider<GerritConfig> {
|
||||
config.setSuggestFrom(cfg.getInt("suggest", "from", 0));
|
||||
config.setChangeUpdateDelay((int) ConfigUtil.getTimeUnit(
|
||||
cfg, "change", null, "updateDelay", 30, TimeUnit.SECONDS));
|
||||
config.setChangeScreen(cfg.getEnum(
|
||||
"gerrit", null, "changeScreen",
|
||||
AccountGeneralPreferences.ChangeScreen.OLD_UI));
|
||||
|
||||
config.setReportBugUrl(cfg.getString("gerrit", null, "reportBugUrl"));
|
||||
if (config.getReportBugUrl() == null) {
|
||||
|
||||
Reference in New Issue
Block a user