Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
Upgrade javamelody-core to 1.76.0
Upgrade bazlets to latest stable-2.15 to build with 2.15.9 API
Upgrade bazlets to latest stable-2.15 to build with 2.15.8 API
Upgrade bazlets to latest stable-2.14 to build with 2.14.18 API
MonitoringTopMenu: Prepend path to the top menu item
Change-Id: I07eabdfc7e66a16e867f019ce25c818bdc4a2ecb
diff --git a/WORKSPACE b/WORKSPACE
index 7dda453..26fac86 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,14 +3,14 @@
load("//:bazlets.bzl", "load_bazlets")
load_bazlets(
- commit = "ca34f0cf89b2e041ea7f4aa4b9696efc2d76746f",
+ commit = "c15e64db2a87c0453427ff45f79d1ed3899b5d92",
#local_path = "/home/<user>/projects/bazlets",
)
# Snapshot Plugin API
#load(
-# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
-# "gerrit_api_maven_local",
+# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
+# "gerrit_api_maven_local",
#)
# Load snapshot Plugin API
diff --git a/src/main/java/com/googlesource/gerrit/plugins/javamelody/CapabilityChecker.java b/src/main/java/com/googlesource/gerrit/plugins/javamelody/CapabilityChecker.java
index fc7bef2..c8bb48b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/javamelody/CapabilityChecker.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/javamelody/CapabilityChecker.java
@@ -45,7 +45,7 @@
public boolean canMonitor() {
try {
permissionBackend
- .user(userProvider)
+ .user(userProvider.get())
.checkAny(
ImmutableSet.of(
GlobalPermission.ADMINISTRATE_SERVER,
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index f45afd3..725280d 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -8,3 +8,8 @@
or the 'Administrate Server' capability.
It adds top menu item "Monitoring" to access java melody page.
+
+Gerrit's own metrics can be accessed from within Javamelody monitoring page:
+`<gerrit_host_url>/monitoring?part=mbeans`. The pre-requisite for this is
+[JMX metrics plugin](https://gerrit.googlesource.com/plugins/metrics-reporter-jmx)
+that must be also installed.