2018-03-30 10:53:36 -07:00
|
|
|
= Gerrit Code Review - Admin customization API
|
|
|
|
|
|
|
|
This API is provided by link:pg-plugin-dev.html#plugin-admin[plugin.admin()]
|
|
|
|
and provides customization of the admin menu.
|
|
|
|
|
|
|
|
== addMenuLink
|
2019-10-22 13:36:59 +02:00
|
|
|
`adminApi.addMenuLink(text, url, opt_capability)`
|
2018-03-30 10:53:36 -07:00
|
|
|
|
|
|
|
Add a new link to the end of the admin navigation menu.
|
|
|
|
|
|
|
|
.Params
|
|
|
|
- *text* String text to appear in the link.
|
|
|
|
- *url* String of the destination URL for the link.
|
2019-10-22 13:36:59 +02:00
|
|
|
- *opt_capability* String of capability required to show this link.
|
2018-03-30 10:53:36 -07:00
|
|
|
|
|
|
|
When adding an external link, the URL provided should be a full URL. Otherwise,
|
|
|
|
a non-external link should be relative beginning with a slash. For example, to
|
2019-10-22 13:36:59 +02:00
|
|
|
create a link to open changes, use the value `/q/status:open`.
|
|
|
|
|
|
|
|
See more about capability from
|
|
|
|
link:rest-api-accounts.html#list-account-capabilities[List Account Capabilities].
|