Allow plugins to contribute messages to the UI during initial page
load. Gerrit displays the messages in a butter bar at the top of
the page and allows users to hide them with the "Dismiss" button.
Messages are hidden per-browser using a cookie named after the
message id, set to expire at a date supplied by the server. After
this date the same message could redisplay if the server sends the
same message again.
Change-Id: I0bcca845f501cbeb8c31356fff398c3adb43099a
In a notedb world we would like to slurp all information about a
change from the git-based storage as soon as a ChangeResource is
constructed, which will involve extra work in this parse, analogous to
how parse currently validates the change permissions.
Preserve the ability to pass in a particular ChangeControl object,
since various callers have specific requirements like reusing the
control elsewhere, or using a control for a different user.
Change-Id: Ia7c9761ef92bb8f05ae3323210babaa02b0dbe6f
This class lives in gerrit-reviewdb because "refs/changes/" needs to be
referenced from PatchSet in reviewdb/client (and other UI classes).
Rename constants to all use REFS_* instead of being inconsistent.
Change-Id: I76e6ee7e63a4549b51a43698fb50b54a19dabfc6
The title text shown on the link to the bug tracker can be configured
in the gerrit.config file. If not set, it defaults to "Report Bug".
Bug: Issue 2318
Change-Id: I38c6057b96bf97fc96341621c9d8bbb49060dc40
The config provider will always provide a value. Either the
value given by the user in gerrit.config, or the default value.
Change-Id: I9b7107857c79f939ed5315e52610277b05ef7d67
It is not sufficient only to dispatch doFilter() methods. To initialize and
destroy filters, init() and destroy() methods must be honored.
Change-Id: I5b87583a212c4dc854cf205f2a57125b713736cb
Convert the new RPC data into the old data, just enough to keep the
old UI alive against a newer server. This will allow us to build a
final version of the old UI code and run it for quite some time
against a modern REST API.
Users who refuse to upgrade to ChangeScreen2 can run this frozen old
UI build until it no longer works.
Change-Id: Ieef15c39e97673f6bcdeb03567fc48ddbd289a6e
The idea of 'standalone JavaScript plugins' came during the 'JavaScript
plugins' talk at the Gerrit User Summit.
The main concept is to automatically install and expose all *.js files
that are in Gerrit's plugins/ directory. This should lower the entry
point barrier for JS developers.
There is one limitation of such plugins: they cannot contribute
additional resources. When such are required, the implementer should
inline them in JS code or use the gerrit-plugin-js-archetype.
Change-Id: Ibad8c3938c0855fcabe6937fd8b4d508a9a2eac3
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Some user groups are intolerant of any sort of new feature or
funcationalty being added to the web interface. Add a server
variable that disables or hides most new functionality.
Change-Id: Ide3a6a5e66cbba9c58575345a4a9ad1da209bb16
Checked type inference has changed slightly in Java 7, so many of the
suppressions are no longer necessary.
Change-Id: I73585e888b8204429ea67c8f4822d81d4dad8c46
Internal group names are automatically hyperlinked in the access
control editor. This makes it easy to view the members of the group
and determine if access is correctly assigned.
Plugins supplying group systems may include a url to a group
information page. If present use these URLs as hyperlinks in the
access editor, providing the same functionality.
Change-Id: I9605fdc1d43d6705a01ec2b68b083e8678dbc88a
Delete 'Anonymous Users', 'Registered Users', 'Project Owners' and
'Change Owner' from the database and account_groups table. Define
them inside of a specialized SystemGroupBackend class.
Change-Id: Ia67add4630579f3d0ce25edcfd662bbcf918dc8f
GWT only needs the rebind code for CSS and ServerLinker to be
precompiled as bytecode. Save build time by passing no source
files to the java_library() used by gwt_module().
For a full draft build of ui_safari this cuts the refresh time
down from 32.015s to 26.158s on my MacBook. Saving 6s on each
UI reload adds up during development.
The common annotations need to be provided as bytecode, avoiding
spurious warnings from GWT when there is a Java syntax error.
Change-Id: I37826498650c65c05303e7d4d1177d05781c56f6
Require the secondary index to be enabled in Gerrit 2.9. Unless
configured differently, Lucene is used for the secondary index.
Change-Id: I3d2d804170835d69ffbfef586ddc3873ea3cd1c8
Eclipse Kepler thinks these resources are unclosed.
The refactoring in JettyDaemon combines three duplicate invocations
and confuses Kepler's JDT enough that the unclosed resource warning
goes away.
Change-Id: I0f376ac6116082ed645d6712fe5d98add66f493e
If 'changeMerge.test' is set to true Gerrit checks if a change is
mergeable and shows this on the ChangeScreen. If a change is not
mergeable the submit button is hidden. There are two problems with
hiding the submit button:
1. Users get confused why the change cannot be submitted. They are
searching for the submit button and do not understand that they have
to rebase the change. Gerrit administrators are annoyed to answer
questions about this. If trying to submit the change fails there is a
good error message that tells the user that he needs to rebase the
change. This is mostly a problem with the old change screen. On the
new change screen the red "Cannot Merge" and the "Merge Conflict"
status can hardly be overlooked.
2. If a change has a conflict it is possible to resolve the conflict
in a merge commit which is a successor of the conflicting change. If
this merge commit is submitted it is in state 'Submitted, Merge
Pending'. If now the conflicting change is submitted the merge
succeeds. This way of resolving conflicts is not possible if the
submit button is not available on conflicting changes.
Since we are now always showing the submit button (if the approvals
allow submit and the user has the permission to submit) and we are
also always computing the mergeability flag for each open change,
there is no need for the 'changeMerge.test' configuration parameter
anymore. This feature is now enabled by default and the
'changeMerge.test' configuration parameter is removed.
Change-Id: I37e69e67992b3aea153e134a5f21fe76ba7e2b91
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
When users upate parent project, the default value of
parent project will be 'All-Projects' if users leave it
to be empty, just as that in ceating new project scenario,
thus users need not to recall it should be 'All-Projects'
or 'All_Project' or 'All-projects'.
Change-Id: I831da9cc5fa19c50e8754a0e2a86fc849e21f785
{@code foo} is shorter and easier to read and write than
<code>foo</code>, which is why it was introduced years ago in the
javadoc processor. Make consistent use of it throughout the
documentation comments.
Change-Id: I59d428cb6c5015453629398b0697891b83c8e91d
Get rid of updated() and just use setWrittenOn().
In PostReview create the new comment object with
the transaction timestamp rather than wall clock.
Change-Id: I4cfef0ca82bd031d1b855fa14592489bbad9d25b
Add a new column to change tables and user dashboards in which the
size of a change is visualized by a colored bar. For small changes a
short green bar is shown, for medium sized changes a middle sized
yellow bar is shown and large changes have a full red bar.
Visualizing the change sizes gives a hint to the reviewers about how
complex a change is and how long it will take to review it.
For contributors the visualization of the change size may be a
motivation to split large changes into smaller pieces which will speed
up the review process.
How many changed lines are considered as a large change is
configurable.
Change-Id: I88497b8aea00047d93ad7d079eecc5e1052187d2
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This tab makes use of the 'conflicts' operator which is only supported
if a secondary index is enabled.
Change-Id: I25cc023e10f10a80efce12c1a3e62a65cb8940f3
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
User preferences are held in memory in the accounts cache, but can be
stale in a multi-master configuration due to writes being handled on a
different server process. Paper over the lack of cache coherency by
reading the preferences from the database anytime they are requested
through the RPC or REST APIs.
Change-Id: I2a14e1f50e908a1d5ea5628e5a05e392be2e0d42
This method is not invoked by any UI code. Drop the method.
/accounts/self/preferences.diff provides the same data on
a supported REST API.
Change-Id: If88d8449f48e898fc84fdabad19341bd8063a737