From 5137ba593619c8c2707de65acfb1003bd3db0a93 Mon Sep 17 00:00:00 2001 From: Marco Miller Date: Tue, 18 Feb 2020 16:06:14 -0500 Subject: [PATCH 1/5] Documentation: Replace plugins list with home page Feature: Issue 11400 Change-Id: I9f9219825d75a8a72ba2340e0fefb10c7f3e0e67 --- Documentation/config-plugins.txt | 627 +------------------------------ 1 file changed, 2 insertions(+), 625 deletions(-) diff --git a/Documentation/config-plugins.txt b/Documentation/config-plugins.txt index 9f7634af8c..4b8e6ef5a2 100644 --- a/Documentation/config-plugins.txt +++ b/Documentation/config-plugins.txt @@ -126,631 +126,8 @@ only be assigned to groups. [[other-plugins]] == Other Plugins -Besides core plugins there are many other Gerrit plugins available. -These plugins are developed and maintained by different parties. -The Gerrit Project doesn't guarantee proper functionality of any of -these plugins. - -The Gerrit Project doesn't provide binaries for these plugins, but -there is one public service that offers the download of pre-built -plugin jars: - -* link:https://gerrit-ci.gerritforge.com[CI Server from GerritForge] - -The following list gives an overview of available plugins, but the -list may not be complete. You may discover more plugins on -link:https://gerrit-review.googlesource.com/admin/repos/?filter=plugins%252F[ -gerrit-review]. - -Note that the documentation and configuration links in the list below are -to the plugins' master branch. Please refer to the appropriate branch for -the Gerrit version you are using. Be aware that in some cases a stable -branch might not exist when the master branch is compatible with multiple -versions, or the plugin might not be compatible at all with your version. - -[[admin-console]] -=== admin-console - -Plugin to provide administrator-only functionality, intended to -simplify common administrative tasks. Currently providing user-level -information. Also providing access control information by project or -project/account. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/admin-console[ -Project] | -link:https://gerrit.googlesource.com/plugins/admin-console/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[analytics]] -=== analytics - -Plugin to extract commit and review data from Gerrit projects and -expose aggregated metrics over REST and SSH API. -Metrics are extracted in JSON format with one record per line, ready to be -archived and processed with popular BigData transformation tools such -Apache Spark or published and visualized in dashboards. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/analytics[Project] | -link:https://gerrit.googlesource.com/plugins/analytics/+doc/master/README.md[Documentation] - -[[avatars-external]] -=== avatars-external - -This plugin allows to use an external url to load the avatar images -from. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/avatars-external[ -Project] | -link:https://gerrit.googlesource.com/plugins/avatars-external/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/avatars-external/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[avatars-gravatar]] -=== avatars-gravatar - -Plugin to display user icons from Gravatar. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/avatars-gravatar[ -Project] - -[[branch-network]] -=== branch-network - -This plugin allows the rendering of Git repository branch network in a -graphical HTML5 Canvas. It is mainly intended to be used as a -"project link" in a gitweb configuration or by other Gerrit GWT UI -plugins to be plugged elsewhere in Gerrit. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/branch-network[ -Project] | -link:https://gerrit.googlesource.com/plugins/branch-network/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/branch-network/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[changemessage]] -=== changemessage - -This plugin allows to display a static info message on the change screen. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/changemessage[ -Project] | -link:https://gerrit.googlesource.com/plugins/changemessage/+doc/master/src/main/resources/Documentation/about.md[ -Plugin Documentation] | -link:https://gerrit.googlesource.com/plugins/changemessage/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[delete-project]] -=== delete-project - -Provides the ability to delete a project. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/delete-project[ -Project] | -link:https://gerrit.googlesource.com/plugins/delete-project/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[egit]] -=== egit - -This plugin provides extensions for easier usage with EGit. - -The plugin adds a download command for EGit that allows to copy only -the change ref into the clipboard. The change ref is needed for -downloading a Gerrit change from within EGit. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/egit[ -Project] | -link:https://gerrit.googlesource.com/plugins/egit/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[emoticons]] -=== emoticons - -This plugin allows users to see emoticons in comments as images. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/emoticons[ -Project] | -link:https://gerrit.googlesource.com/plugins/emoticons/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/emoticons/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[gitblit]] -=== gitblit - -GitBlit code-viewer plugin with SSO and Security Access Control. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/gitblit[ -Project] - -[[github]] -=== github - -Plugin to integrate with GitHub: replication, pull-request to Change-Sets - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/github[ -Project] - -[[gitiles]] -=== gitiles - -Plugin running Gitiles alongside a Gerrit server. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/gitiles[ -Project] - -[[healthcheck]] -=== healthcheck - -Plugin for monitoring and alerting when Gerrit does not behave properrly. - -When Gerrit Server needs to be available 24x7, it is important to know -*beforehand* if something isn't working correctly: this plugin exposes a -REST-API that provides the real-time status of the Gerrit internals and can -be integrated with real-time monitoring systems and paging platforms. - -Healthcheck metrics (latency and subsystem healthiness) are published as -Gerrit internal metrics and can be published to dashboards. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/healthcheck[ -Project] | -link:https://gerrit.googlesource.com/plugins/healthcheck/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/healthcheck/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[imagare]] -=== imagare - -The imagare plugin allows Gerrit users to upload and share images. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/imagare[ -Project] | -link:https://gerrit.googlesource.com/plugins/imagare/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/imagare/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[importer]] -=== importer - -The importer plugin allows to import projects from one Gerrit server -into another Gerrit server. - -Projects can be imported while both source and target Gerrit server -are online. There is no downtime required. - -The git repository and all changes of the project, including approvals -and review comments, are imported. Historic timestamps are preserved. - -Project imports can be resumed. This means a project team can continue -to work in the source system while the import to the target system is -done. By resuming the import the project in the target system can be -updated with the missing delta. - -The importer plugin can also be used to copy a project within one Gerrit -server, and in combination with the link:#delete-project[delete-project] -plugin it can be used to rename a project. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/importer[ -Project] | -link:https://gerrit.googlesource.com/plugins/importer/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[its-plugins]] -=== Issue Tracker System Plugins - -Plugins to integrate with issue tracker systems (ITS), that (based -on events in Gerrit) allows to take actions in the ITS. For example, -they can add comments to bugs, or change status of bugs. - -All its-plugins have a common base implementation which is stored in -the `its-base` project. `its-base` is not a plugin, but just a -framework for the ITS plugins which is packaged within each ITS plugin. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/its-base[ -its-base Project] | -link:https://gerrit.googlesource.com/plugins/its-base/+doc/master/src/main/resources/Documentation/about.md[ -its-base Documentation] | -link:https://gerrit.googlesource.com/plugins/its-base/+doc/master/src/main/resources/Documentation/config.md[ -its-base Configuration] - -[[its-bugzilla]] -==== its-bugzilla - -Plugin to integrate with Bugzilla. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/its-bugzilla[ -Project] | -link:https://gerrit.googlesource.com/plugins/its-bugzilla/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[its-jira]] -==== its-jira - -Plugin to integrate with Jira. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/its-jira[ -Project] | -link:https://gerrit.googlesource.com/plugins/its-jira/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[its-phabricator]] -==== its-phabricator - -Plugin to integrate with Phabricator. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/its-phabricator[ -Project] | -link:https://gerrit.googlesource.com/plugins/its-phabricator/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[its-rtc]] -==== its-rtc - -Plugin to integrate with IBM Rational Team Concert (RTC). - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/its-rtc[ -Project] | -link:https://gerrit.googlesource.com/plugins/its-rtc/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[its-storyboard]] -==== its-storyboard - -Plugin to integrate with Storyboard task tracking system. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/its-storyboard[ -Project] | -link:https://gerrit.googlesource.com/plugins/its-storyboard/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[javamelody]] -=== javamelody - -This plugin allows to monitor the Gerrit server. - -This plugin integrates JavaMelody in Gerrit in order to retrieve live -instrumentation data from Gerrit. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/javamelody[ -Project] | -link:https://gerrit.googlesource.com/plugins/javamelody/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -https://gerrit.googlesource.com/plugins/javamelody/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[labelui]] -=== labelui - -The labelui plugin adds a user preference that allows users to choose a -table control to render the labels/approvals on the change screen -(similar to how labels/approvals were rendered on the old change -screen). - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/labelui[ -Project] | -link:https://gerrit.googlesource.com/plugins/labelui/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[menuextender]] -=== menuextender - -The menuextender plugin allows Gerrit administrators to configure -additional menu entries from the WebUI. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/menuextender[ -Project] | -link:https://gerrit.googlesource.com/plugins/menuextender/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/menuextender/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[metrics-reporter-elasticsearch]] -=== metrics-reporter-elasticsearch - -This plugin reports Gerrit metrics to Elasticsearch. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/metrics-reporter-elasticsearch[ -Project]. - -[[metrics-reporter-graphite]] -=== metrics-reporter-graphite - -This plugin reports Gerrit metrics to Graphite. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/metrics-reporter-graphite[ -Project]. - -[[metrics-reporter-jmx]] -=== metrics-reporter-jmx - -This plugin reports Gerrit metrics to JMX. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/metrics-reporter-jmx[ -Project]. - -[[metrics-reporter-prometheus]] -=== metrics-reporter-prometheus - -This plugin exposes Gerrit metrics for consumption by Prometheus. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/metrics-reporter-prometheus[ -Project]. - -[[motd]] -=== motd - -This plugin can output messages to clients when pulling/fetching/cloning -code from Gerrit Code Review. If the client (and transport mechanism) -can support sending the message to the client, it will be displayed to -the user (usually prefixed by “remote: ”), but will be silently -discarded otherwise. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/motd[ -Project] | -link:https://gerrit.googlesource.com/plugins/motd/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/motd/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[oauth-authentication-provider]] -=== OAuth authentication provider -This plugin enables Gerrit to use OAuth2 protocol for authentication. -Two different OAuth providers are supported: - -* GitHub -* Google - -https://github.com/davido/gerrit-oauth-provider[Project] | -https://github.com/davido/gerrit-oauth-provider/wiki/Getting-Started[Configuration] - -[[owners]] -=== owners -This plugin provides a Prolog predicate `add_owner_approval/3` that -appends `label('Owner-Approval', need(_))` to a provided list. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/owners[Project] | -link:https://gerrit.googlesource.com/plugins/owners/+doc/master/README.md[Documentation] - -[[project-download-commands]] -=== project-download-commands - -This plugin adds support for project specific download commands. - -Project specific download commands that are defined on a parent project -are inherited by the child projects. Child projects can overwrite the -inherited download command or remove it by assigning no value to it. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/project-download-commands[ -Project] | -link:https://gerrit.googlesource.com/plugins/project-download-commands/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/project-download-commands/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[quota]] -=== quota - -This plugin allows to enforce quotas in Gerrit. - -To protect a Gerrit installation it makes sense to limit the resources -that a project or group can consume. To do this a Gerrit administrator -can use this plugin to define quotas on project namespaces. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/quota[ -Project] | -link:https://gerrit.googlesource.com/plugins/quota/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] -link:https://gerrit.googlesource.com/plugins/quota/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[rabbitmq]] -=== rabbitmq - -A plugin that publishes Gerrit events to a -link:https://www.rabbitmq.com/[RabbitMQ] exchange. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/rabbitmq[Project] -link:https://gerrit.googlesource.com/plugins/rabbitmq/+/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[readonly]] -=== readonly - -A plugin that makes the Gerrit server read-only by rejecting git pushes, -blocking HTTP PUT/POST/DELETE requests, and disabling SSH commands. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/readonly[ -Project] | -link:https://gerrit.googlesource.com/plugins/readonly/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/readonly/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[ref-protection]] -=== ref-protection - -A plugin that protects against commits being lost. - -Backups of deleted or non-fast-forward updated refs are created under the -`refs/backups/` namespace. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/ref-protection[ -Project] | -link:https://gerrit.googlesource.com/plugins/ref-protection/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[reparent]] -=== reparent - -A plugin that provides project reparenting as a self-service for project owners. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/reparent[ -Project] | -link:https://gerrit.googlesource.com/plugins/reparent/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/reparent/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[review-strategy]] -=== review-strategy - -This plugin allows users to configure different review strategies. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/review-strategy[ -Project] | -link:https://gerrit.googlesource.com/plugins/review-strategy/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[reviewers]] -=== reviewers - -A plugin that allows adding default reviewers to a change. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/reviewers[ -Project] | -link:https://gerrit.googlesource.com/plugins/reviewers/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/reviewers/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[reviewers-by-blame]] -=== reviewers-by-blame - -A plugin that allows automatically adding reviewers to a change from -the git blame computation on the changed files. It will add the users -that authored most of the lines touched by the change, since these -users should be familiar with the code and can mostly review the -change. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/reviewers-by-blame[ -Project] | -link:https://gerrit.googlesource.com/plugins/reviewers-by-blame/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/reviewers-by-blame/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[groovy-provider]] -=== scripting/groovy-provider - -This plugin provides a Groovy runtime environment for Gerrit plugins in Groovy. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/scripting/groovy-provider[ -Project] | -link:https://gerrit.googlesource.com/plugins/scripting/groovy-provider/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[scala-provider]] -=== scripting/scala-provider - -This plugin provides a Scala runtime environment for Gerrit plugins in Scala. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/scripting/scala-provider[ -Project] | -link:https://gerrit.googlesource.com/plugins/scripting/scala-provider/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] - -[[scripts]] -=== scripts - -Repository containing a collection of Gerrit scripting plugins that are intended -to provide simple and useful extensions. - -Groovy and Scala scripts require the installation of the corresponding -scripting/*-provider plugin in order to be loaded into Gerrit. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/scripts[Project] -link:https://gerrit.googlesource.com/plugins/scripts/+doc/master/README.md[Documentation] - -[[server-config]] -=== server-config - -This plugin enables access (download and upload) to the server config -files. It may be used to change Gerrit config files (like -`etc/gerrit.config`) in cases where direct access to the file system -where Gerrit's config files are stored is difficult or impossible to -get. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/server-config[ -Project] - -[[serviceuser]] -=== serviceuser - -This plugin allows to create service users in Gerrit. - -A service user is a user that is used by another service to communicate -with Gerrit. E.g. a service user is needed to run the Gerrit Trigger -Plugin in Jenkins. A service user is not able to login into the Gerrit -WebUI and it cannot push commits or tags. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/serviceuser[ -Project] | -link:https://gerrit.googlesource.com/plugins/serviceuser/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/serviceuser/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[uploadvalidator]] -=== uploadvalidator - -This plugin allows to configure upload validations per project. - -Project owners can configure blocked file extensions, required footers -and a maximum allowed path length. Pushes of commits that violate these -settings are rejected by Gerrit. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/uploadvalidator[ -Project] | -link:https://gerrit.googlesource.com/plugins/uploadvalidator/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/uploadvalidator/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[verify-status]] -=== verify-status - -This plugin adds a separate channel for Gerrit to store test metadata and -view them on the Gerrit UI. The metadata can be stored in the Gerrit database -or in a completely separate datastore. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/verify-status[ -Project] | -link:https://gerrit.googlesource.com/plugins/verify-status/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/verify-status/+doc/master/src/main/resources/Documentation/database.md[ -Configuration] - -[[websession-flatfile]] -=== websession-flatfile - -This plugin replaces the built-in Gerrit H2 based websession cache with -a flatfile based implementation. This implementation is shareable -among multiple Gerrit servers, making it useful for multi-master -Gerrit installations. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/websession-flatfile[ -Project] | -link:https://gerrit.googlesource.com/plugins/websession-flatfile/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/websession-flatfile/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - -[[x-docs]] -=== x-docs - -This plugin serves project documentation as HTML pages. - -link:https://gerrit-review.googlesource.com/admin/repos/plugins/x-docs[ -Project] | -link:https://gerrit.googlesource.com/plugins/x-docs/+doc/master/src/main/resources/Documentation/about.md[ -Documentation] | -link:https://gerrit.googlesource.com/plugins/x-docs/+doc/master/src/main/resources/Documentation/config.md[ -Configuration] - +Besides core plugins there are many other Gerrit plugins available. This Gerrit home +link:https://www.gerritcodereview.com/plugins.html[page for plugins] lists them. GERRIT ------ From ff2ed9c01ef768500f19c3a591937fad6bcfc6ad Mon Sep 17 00:00:00 2001 From: Paladox none Date: Thu, 27 Feb 2020 20:48:10 +0000 Subject: [PATCH 2/5] Update .mailmap Change-Id: I7513afa0d400b3134bb9d4127b30b7af72b5234f --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index c1dba8fe8f..38c2a5f2cc 100644 --- a/.mailmap +++ b/.mailmap @@ -66,6 +66,7 @@ Mônica Dionísio Nasser Grainawi Nasser Grainawi Orgad Shaneh +Paladox Patrick Hiesel Peter Jönsson Peter Jönsson Rafael Rabelo Silva rafael.rabelosilva From 4324bc57ba59f518e0786b724e9afb2732c021b9 Mon Sep 17 00:00:00 2001 From: Milutin Kristofic Date: Wed, 26 Feb 2020 13:37:29 +0100 Subject: [PATCH 3/5] Remove target=_self from commentlinks When target=_self is used, the app is fully reloaded. When target is not specified, it is opening in same tab as with target=_self, but page loading is much faster, because it will go via internal navigation without needing to fully reload the app. Change-Id: Ibd0713992344a310976a4ee72a511790c8aff85d (cherry picked from commit aa3f3a29981869eed163f9ee3a98649683805be9) --- .../app/elements/shared/gr-linked-text/gr-linked-text.js | 5 +++-- .../elements/shared/gr-linked-text/gr-linked-text_test.html | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js index 69d157095c..18f089bfa2 100644 --- a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js +++ b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js @@ -71,10 +71,11 @@ // Ensure that external links originating from HTML commentlink configs // open in a new tab. @see Issue 5567 // Ensure links to the same host originating from commentlink configs - // open in the same tab. @see Issue 4616 + // open in the same tab. When target is not set - default is _self + // @see Issue 4616 output.querySelectorAll('a').forEach(anchor => { if (anchor.hostname === window.location.hostname) { - anchor.setAttribute('target', '_self'); + anchor.removeAttribute('target'); } else { anchor.setAttribute('target', '_blank'); } diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.html b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.html index 9084947757..9fc92b1511 100644 --- a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.html +++ b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.html @@ -142,7 +142,7 @@ limitations under the License. const linkEl = element.$.output.childNodes[1]; assert.equal(textNode.textContent, prefix); const url = '/q/' + changeID; - assert.equal(linkEl.target, '_self'); + assert.isFalse(linkEl.hasAttribute('target')); // Since url is a path, the host is added automatically. assert.isTrue(linkEl.href.endsWith(url)); assert.equal(linkEl.textContent, changeID); @@ -160,7 +160,7 @@ limitations under the License. const linkEl = element.$.output.childNodes[1]; assert.equal(textNode.textContent, prefix); const url = '/r/q/' + changeID; - assert.equal(linkEl.target, '_self'); + assert.isFalse(linkEl.hasAttribute('target')); // Since url is a path, the host is added automatically. assert.isTrue(linkEl.href.endsWith(url)); assert.equal(linkEl.textContent, changeID); @@ -201,7 +201,7 @@ limitations under the License. assert.equal(textNode.textContent, prefix); - assert.equal(changeLinkEl.target, '_self'); + assert.isFalse(changeLinkEl.hasAttribute('target')); assert.isTrue(changeLinkEl.href.endsWith(changeUrl)); assert.equal(changeLinkEl.textContent, changeID); From 24c6b9a586b6786ad9bc065fdf0c613892fd6809 Mon Sep 17 00:00:00 2001 From: Tao Zhou Date: Thu, 27 Feb 2020 15:59:39 +0100 Subject: [PATCH 4/5] Add a separator between blame and the edit icon Change-Id: I36cf9acfbf4686404d42bf6d9d04f8ab9eca3ef4 (cherry picked from commit 32a9265505953757bcc00e4dacf05464f1585272) --- .../diff/gr-diff-view/gr-diff-view.html | 10 ++-- .../diff/gr-diff-view/gr-diff-view.js | 11 ++--- .../diff/gr-diff-view/gr-diff-view_test.html | 49 +++++++++++++++++-- 3 files changed, 56 insertions(+), 14 deletions(-) diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html index c87bf9456a..7a74ad3126 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html +++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html @@ -290,13 +290,15 @@ limitations under the License. on-tap="_toggleBlame">[[_computeBlameToggleLabel(_isBlameLoaded, _isBlameLoading)]] +
Diff view: arg === undefined)) { - return ''; - } - return Gerrit.Nav.getEditUrlForDiff( - change, path, patchRange.patchNum); + _goToEditFile() { + // TODO(taoalpha): add a shortcut for editing + const editUrl = Gerrit.Nav.getEditUrlForDiff( + this._change, this._path, this._patchRange.patchNum); + return Gerrit.Nav.navigateToRelativeUrl(editUrl); }, /** diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html index d803cdcfdc..b617379c20 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html +++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html @@ -344,10 +344,51 @@ limitations under the License. PARENT), 'Should navigate to /c/42/1'); }); - test('_computeEditURL uses Gerrit.Nav', () => { - const getUrlStub = sandbox.stub(Gerrit.Nav, 'getEditUrlForDiff'); - element._computeEditURL(123, {patchNum: undefined}, 'abc/def'); - assert.isTrue(getUrlStub.called); + test('edit should redirect to edit page', done => { + element._loggedIn = true; + element._path = 't.txt'; + element._patchRange = { + basePatchNum: PARENT, + patchNum: '1', + }; + element._change = { + _number: 42, + revisions: { + a: {_number: 1, commit: {parents: []}}, + b: {_number: 2, commit: {parents: []}}, + }, + }; + const redirectStub = sandbox.stub(Gerrit.Nav, 'navigateToRelativeUrl'); + flush(() => { + const editBtn = Polymer.dom(element.root) + .querySelector('.editButton gr-button'); + assert.isTrue(!!editBtn); + MockInteractions.tap(editBtn); + assert.isTrue(redirectStub.called); + done(); + }); + }); + + test('edit hidden when not logged in', done => { + element._loggedIn = false; + element._path = 't.txt'; + element._patchRange = { + basePatchNum: PARENT, + patchNum: '1', + }; + element._change = { + _number: 42, + revisions: { + a: {_number: 1, commit: {parents: []}}, + b: {_number: 2, commit: {parents: []}}, + }, + }; + flush(() => { + const editBtn = Polymer.dom(element.root) + .querySelector('.editButton gr-button'); + assert.isFalse(!!editBtn); + done(); + }); }); test('Diff preferences hidden when no prefs or logged out', () => { From 18507842185e5fd3c6404038f060ff1ac338e024 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sat, 29 Feb 2020 13:02:17 +0900 Subject: [PATCH 5/5] UrlFormatter: Fix Javadoc of getSettingsUrl() This method is intended to return the URL of the setting page, not a section of it. The latter is done by the variant of the method that takes a section parameter. Change-Id: I3e9fba38ef78310c80115e0727378fce04950d62 --- java/com/google/gerrit/server/config/UrlFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/com/google/gerrit/server/config/UrlFormatter.java b/java/com/google/gerrit/server/config/UrlFormatter.java index 740daf02dc..eb1e0b256b 100644 --- a/java/com/google/gerrit/server/config/UrlFormatter.java +++ b/java/com/google/gerrit/server/config/UrlFormatter.java @@ -60,7 +60,7 @@ public interface UrlFormatter { .map(url -> url + String.format("@%s%d", side == 0 ? "a" : "", startLine)); } - /** Returns a URL pointing to a section of the settings page. */ + /** Returns a URL pointing to the settings page. */ default Optional getSettingsUrl() { return getWebUrl().map(url -> url + "settings"); }