Add config gerrit.primaryWeblinkName

Add gerrit.primaryWeblinkName to ServerInfo.
Lets the UI know which is the preferred weblink in instances were
only one weblink can be used, for example in inline links.

Change-Id: I01deaca3418d5c0486e3f5ebabf10827d47c3631
This commit is contained in:
Sven Selberg
2019-01-22 18:19:19 +01:00
committed by Sven Selberg
parent 6aecc2294e
commit e63e92d89e
3 changed files with 18 additions and 0 deletions

View File

@@ -26,4 +26,5 @@ public class GerritInfo {
public String reportBugUrl;
public String reportBugText;
public Set<UiType> webUis;
public String primaryWeblinkName;
}

View File

@@ -313,6 +313,7 @@ public class GetServerInfo implements RestReadView<ConfigResource> {
if (gerritOptions.enableGwtUi()) {
info.webUis.add(UiType.GWT);
}
info.primaryWeblinkName = config.getString("gerrit", null, "primaryWeblinkName");
return info;
}