GetServerInfo: Add change.submitWholeTopic configuration

This will help us later displaying the right tabs.

Change-Id: If801865597887b36eb54d858a2c7ce350cfc6582
This commit is contained in:
Stefan Beller
2015-06-29 16:02:28 -07:00
parent a7ad6614df
commit bf2767cd64
3 changed files with 14 additions and 6 deletions

View File

@@ -1064,6 +1064,9 @@ button].
|`update_delay` || |`update_delay` ||
link:config-gerrit.html#change.updateDelay[How often in seconds the web link:config-gerrit.html#change.updateDelay[How often in seconds the web
interface should poll for updates to the currently open change]. interface should poll for updates to the currently open change].
|`submit_whole_topic` ||
link:config-gerrit.html#change.submitWholeTopic[A configuration if
the whole topic is submitted].
|============================= |=============================
[[contact-store-info]] [[contact-store-info]]

View File

@@ -45,6 +45,8 @@ public class ServerInfo extends JavaScriptObject {
public final native String replyLabel() /*-{ return this.reply_label; }-*/; public final native String replyLabel() /*-{ return this.reply_label; }-*/;
public final native String replyTooltip() /*-{ return this.reply_tooltip; }-*/; public final native String replyTooltip() /*-{ return this.reply_tooltip; }-*/;
public final native int updateDelay() /*-{ return this.update_delay || 0; }-*/; public final native int updateDelay() /*-{ return this.update_delay || 0; }-*/;
public final native boolean isSubmitWholeTopicEnabled() /*-{
return this.submit_whole_topic; }-*/;
protected ChangeConfigInfo() { protected ChangeConfigInfo() {
} }

View File

@@ -29,6 +29,7 @@ import com.google.gerrit.reviewdb.client.AuthType;
import com.google.gerrit.server.account.Realm; import com.google.gerrit.server.account.Realm;
import com.google.gerrit.server.change.ArchiveFormat; import com.google.gerrit.server.change.ArchiveFormat;
import com.google.gerrit.server.change.GetArchive; import com.google.gerrit.server.change.GetArchive;
import com.google.gerrit.server.change.Submit;
import com.google.gerrit.server.git.SignedPushModule; import com.google.gerrit.server.git.SignedPushModule;
import com.google.inject.Inject; import com.google.inject.Inject;
@@ -149,6 +150,7 @@ public class GetServerInfo implements RestReadView<ConfigResource> {
.or("Reply") + "\u2026"; .or("Reply") + "\u2026";
info.updateDelay = (int) ConfigUtil.getTimeUnit( info.updateDelay = (int) ConfigUtil.getTimeUnit(
cfg, "change", null, "updateDelay", 30, TimeUnit.SECONDS); cfg, "change", null, "updateDelay", 30, TimeUnit.SECONDS);
info.submitWholeTopic = Submit.wholeTopicEnabled(cfg);
return info; return info;
} }
@@ -311,6 +313,7 @@ public class GetServerInfo implements RestReadView<ConfigResource> {
public String replyLabel; public String replyLabel;
public String replyTooltip; public String replyTooltip;
public int updateDelay; public int updateDelay;
public Boolean submitWholeTopic;
} }
public static class ContactStoreInfo { public static class ContactStoreInfo {