use of com.google.gerrit.extensions.webui.WebUiPlugin in project gerrit by GerritCodeReview.
the class HostPageServlet method plugins.
private void plugins(StringWriter w) {
List<String> urls = new ArrayList<>();
for (WebUiPlugin u : plugins) {
urls.add(String.format("plugins/%s/%s", u.getPluginName(), u.getJavaScriptResourcePath()));
}
if (!urls.isEmpty()) {
w.write(HPD_ID + ".plugins=");
json(urls, w);
w.write(";");
}
}
use of com.google.gerrit.extensions.webui.WebUiPlugin in project gerrit by GerritCodeReview.
the class GetServerInfo method getPluginInfo.
private PluginConfigInfo getPluginInfo() {
PluginConfigInfo info = new PluginConfigInfo();
info.hasAvatars = toBoolean(avatar.get() != null);
info.jsResourcePaths = new ArrayList<>();
info.htmlResourcePaths = new ArrayList<>();
for (WebUiPlugin u : plugins) {
String path = String.format("plugins/%s/%s", u.getPluginName(), u.getJavaScriptResourcePath());
if (path.endsWith(".html")) {
info.htmlResourcePaths.add(path);
} else {
info.jsResourcePaths.add(path);
}
}
return info;
}
Aggregations