2387 Commits

Author SHA1 Message Date
Edwin Kempin
66fd9ffca2 Merge "Improve info message on 'My Menu' user preference" 2014-04-13 15:03:17 +00:00
Edwin Kempin
4c7d47558f Improve info message on 'My Menu' user preference
Mention that the first 'My' menu entry defines the default screen.

Change-Id: I52072f7dcba0cb917980c3fc8a65f0cb30a53b67
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-13 10:22:13 +02:00
Edwin Kempin
b57d48363c Remove 'link' prefix from WebLink field names
This prefix is unnecessary. Since the entity is called WebLink it's
clear that 'name' is the 'linkName' and 'url' is the 'linkUrl'.

Change-Id: Iae88dd9bb84addfdab3fda18c5bb14d63332b145
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-11 15:58:03 +02:00
Shawn Pearce
00a6bc5329 Merge "Keep 'My' menu selected if a 'My' menu item opens project screen" 2014-04-11 01:45:57 +00:00
Shawn Pearce
6281f365ec Merge topic 'my-menu'
* changes:
  Allow users to reset the 'My' menu entries to the server defaults
  Add REST endpoints to get/set default user preferences
2014-04-11 01:38:44 +00:00
David Pursehouse
df2227555a Merge branch 'stable-2.9'
* stable-2.9:
  SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips
  Always auto confirm adding reviewers for set-reviewers SSH command
  Improve wording of 'parents' field description in CommitInfo
  Fix 'parents' field name of CommitInfo in REST documentation
  Implement pagination in project list screen
  Add option 'S' to projects REST API to support query offset
  Fix: Failure of acceptance tests.
  Fix link behaviour inconsistencies in change info panel
  Remove message box when editing topic of change
  Update cookbook plugin to latest revision
  Update Gerrit 2.9 release notes with info about 2.8.x series
  Update GWT version to 2.6.0 in debug launcher
  Do not refresh project list if filter did not change
  Fix inconsistent behavior of diff view when viewing binary files
  Update cookbook plugin to latest revision
  Correct Javadoc of RestReadView in extension API
  Emit ref-updated event when editing project access via web UI
  Fix ChangeListener auto-registered implementations
  Fix: The email notification of review comments gets stuck.
  Fix memory leak of SubIndex.NrtFuture objects
  Use consistent grammatical tense in command descriptions
  Make skip bar more user friendly
  Bump version to 2.8.4 in plugin API and archetypes
  Helper script to update API version in plugin archetype pom files
  Serialize GWT dbg and opt compiles
  Bump GERRIT_VERSION to 2.8.4
  Update the mysql documentation concerning charsets
  By default don't allow admins to create new branches by push
  Disable commitWithin when running Reindex
  Emit ref-updated event when editing project access via web UI
  SideBySide2: Fix syntax highlighting for shell files
  ChangeScreen2: Respect comment visibility strategy
  Don't add "Patch File" download link for merge commits

Conflicts:
	gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.properties
	gerrit-server/src/main/java/com/google/gerrit/server/project/PutConfig.java

Change-Id: I3f2cb9a9f98e2c39d98fae47b0407bdf4ab8e4f4
2014-04-10 18:55:32 +09:00
David Pursehouse
ecc86e2bcb Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
  SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips
  Always auto confirm adding reviewers for set-reviewers SSH command
  Improve wording of 'parents' field description in CommitInfo
  Fix 'parents' field name of CommitInfo in REST documentation
  Implement pagination in project list screen
  Add option 'S' to projects REST API to support query offset
  Fix: Failure of acceptance tests.
  Do not refresh project list if filter did not change
  Fix inconsistent behavior of diff view when viewing binary files
  Update cookbook plugin to latest revision
  Correct Javadoc of RestReadView in extension API
  Fix memory leak of SubIndex.NrtFuture objects

Conflicts:
	gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/Header.java
	gerrit-server/src/main/java/com/google/gerrit/server/change/PostReviewers.java

Change-Id: I4d432c6ce27d3fd76dd9f86b8685be15ec8f123d
2014-04-10 17:06:45 +09:00
Shawn Pearce
b4eb7ef652 SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips
In the top right corner of a file the navigation cluster has a
tooltip on the up arrow but did not show the tooltip on the left
or right arrows. Show the key in the tooltip.

Change-Id: I192ef0ab8155c15b4bb35a18da33f74f15bb5537
2014-04-10 16:06:42 +09:00
Edwin Kempin
3820703d4c Merge "Fix link behaviour inconsistencies in change info panel" into stable-2.9 2014-04-10 06:59:21 +00:00
Shawn Pearce
c8133d1c62 SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips
In the top right corner of a file the navigation cluster has a
tooltip on the up arrow but did not show the tooltip on the left
or right arrows. Show the key in the tooltip.

Change-Id: I192ef0ab8155c15b4bb35a18da33f74f15bb5537
2014-04-09 12:57:12 -07:00
Edwin Kempin
50cff2eadd Merge "Merge branch 'stable-2.8' into stable-2.9" into stable-2.9 2014-04-09 11:01:01 +00:00
David Pursehouse
511a35bb6c Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
  Emit ref-updated event when editing project access via web UI
  Fix ChangeListener auto-registered implementations
  Fix: The email notification of review comments gets stuck.
  Use consistent grammatical tense in command descriptions
  Make skip bar more user friendly
  Bump version to 2.8.4 in plugin API and archetypes
  Helper script to update API version in plugin archetype pom files
  Serialize GWT dbg and opt compiles
  Bump GERRIT_VERSION to 2.8.4
  Update the mysql documentation concerning charsets
  By default don't allow admins to create new branches by push
  Disable commitWithin when running Reindex
  Emit ref-updated event when editing project access via web UI
  SideBySide2: Fix syntax highlighting for shell files
  ChangeScreen2: Respect comment visibility strategy
  Don't add "Patch File" download link for merge commits

The change 'ChangeScreen2: Respect comment visibility strategy' [1]
is dropped intentionally, see [2].

[1] https://gerrit-review.googlesource.com/55081
[2] https://gerrit-review.googlesource.com/#/c/55536/3/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/History.java

Conflicts:
	Documentation/config-gerrit.txt
	VERSION
	gerrit-gwtui/BUCK
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/DownloadBox.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/History.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SkipBar.java
	gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/project/ChangeProjectAccess.java
	gerrit-plugin-archetype/pom.xml
	gerrit-plugin-gwt-archetype/pom.xml
	gerrit-plugin-gwtui/pom.xml
	gerrit-plugin-js-archetype/pom.xml
	gerrit-server/src/main/java/com/google/gerrit/server/change/EmailReviewComments.java
	gerrit-server/src/main/java/com/google/gerrit/server/project/PutConfig.java
	gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ListMembersCommand.java

Change-Id: I16c848cb385080fd25555c983a3030e0f1cc560b
2014-04-09 10:41:52 +00:00
Edwin Kempin
d4c7abc75b Allow users to reset the 'My' menu entries to the server defaults
Change-Id: I42bbca895e29ca8825a569d0c0bff20342dcbc54
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-09 09:50:10 +02:00
Anthony Chin
20e375ddcd Implement pagination in project list screen
The project list screen was taking a long time to render over a large
amount of projects (1,000+) and with even larger number of projects
(3,000+), it could make the browser unresponsive.

Project list screen now uses pagination to resolve this issue. The
number of projects displayed is determined by the 'Maximum Page Size'
user preference.

Bug: issue 2215
Change-Id: Icd0a7d54fd5c5b3c2301c31026e7c6717a648a24
2014-04-09 09:09:14 +09:00
Khai Do
bd96abed2d feature to quickly add current user to the reviewers list.
This change adds an 'add me' button to allow the currently logged in user
to quickly add herself to the reviewers list.

Change-Id: I065634970d6afab00659b16cbf14e97c313640ea
feature: issue 2573
2014-04-08 15:01:55 -07:00
David Pursehouse
7b83f59157 Fix link behaviour inconsistencies in change info panel
In the change info panel there are links on the project name, branch
name, and topic name.  They all behave differently:

 project: opens the project admin page
 branch: opens a query for changes on the branch and topic
 topic: opens a dialog to edit the topic name

Also, next to the project is a query icon that opens the project
default dashboard which is a query for recent changes.

These inconsistent links reduce the useability of the UI.  With this
change, they are made more consistent:

 project: opens the project default dashboard
 branch: opens a query for changes on the branch (without topic)
 topic: opens a query for changes on the topic

The project query icon is replaced with a settings icon that opens
the project admin page.  The topic can still be edited by clicking
on the edit icon.

Change-Id: I09c36bf80949efd8a6237669c8284275c3372d9c
2014-04-08 13:14:31 +00:00
Shawn Pearce
f1d8cfbe98 Remove message box when editing topic of change
I do not recall why I added this message box below the topic name
field in ChangeScreen2.  I suspect the original idea was to permit
more notes to be added, for example why the topic is being assigned.

At the recent Gerrit hackathon it sounded like nobody ever uses this
box.  Remove it to simplify the UI.

Also remove message from the PutTopic REST API.  We suspect nobody
will notice the missing field.

Change-Id: I8d32287ee3b08d9409dd7d58688cd9effdfd380f
2014-04-08 17:17:08 +09:00
Hugo Arès
f79fd10f3b Do not refresh project list if filter did not change
Every time key up event is raised in the project list filter text box,
the project list was getting refreshed even if the filter did not
change (e.g. moving the cursor was refreshing the list).

Only call the refresh if the filter changed or if enter key is pressed.

Change-Id: I2e608d89e16dbef0cfe1e503ac2feb4639c27f5d
2014-04-08 13:18:52 +09:00
Bruce Zu
72bced0061 Fix inconsistent behavior of diff view when viewing binary files
In the new change screen, if the user clicks on a binary file in
the file list, the unified view is used.  Then when navigating to
a previous or next file that is not binary, the diff view stays in
the old unified setting.  It is only possible to get back to the
new side-by-side view by going back to the change screen and then
opening the non-binary file from there.

To keep consistent behavior of diff view, always use unified diff
for binary files.  Use the user's preference setting for non-binary
files.

Change-Id: Ie4ece4cb740df8a69cbf3d2d42e4b0fb05461520
2014-04-08 12:59:26 +09:00
Edwin Kempin
5304e69ca2 The first 'My' menu item defines the default screen
The screen that is configured to load from the first 'My' menu item is
now loaded as default screen when '/' is accessed.

With this users can use the 'g' -> 'i' keys to navigate to their
favourite screen.

Change-Id: I431ee5ffe8c0043de4ef7976a84a6f9b463351db
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-07 15:49:27 +02:00
Edwin Kempin
c1fe0a63e8 Fix internal storage of 'My' menu bar
A wrong menu bar was stored as 'My' menu bar.

Change-Id: I598c33f085c2be238fe813ca65d822d36a168071
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-07 15:38:02 +02:00
Edwin Kempin
12adc00874 Keep 'My' menu selected if a 'My' menu item opens project screen
If a project screen is shown the 'Projects' menu is automatically
selected. This is bad for custom 'My' menu items that link to a
project screen because in this case the user expects that the 'My'
menu stays selected.

Change-Id: I894853392bd8b0efa6ad5708c101c0be3132eda9
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-03 16:28:36 +02:00
Shawn Pearce
6b9159abe7 Remove message box when editing topic of change
I do not recall why I added this message box below the topic name
field in ChangeScreen2.  I suspect the original idea was to permit
more notes to be added, for example why the topic is being assigned.

At the recent Gerrit hackathon it sounded like nobody ever uses this
box.  Remove it to simplify the UI.

Also remove message from the PutTopic REST API.  We suspect nobody
will notice the missing field.

Change-Id: I8d32287ee3b08d9409dd7d58688cd9effdfd380f
2014-04-03 17:26:23 +09:00
Edwin Kempin
61cc430957 Merge "My menu table: update arrows on add/delete" 2014-04-03 06:48:07 +00:00
Edwin Kempin
f0e7430c0c Provide the own user dashboard under '/dashboard/self'.
The own user dashboard is normally available under '/', but there is
the idea to bind '/' to the screen which the user has configured as
first menu entry in the 'My' menu [1]. In this case it is good to have
the user dashboard still accessible under a different URL, e.g. the
user wants to customize the 'My' menu and keep the user dashboard but
not as the first menu entry. The user dashboard is actually also
available under '/dashboard/<account-id>' which works for a single
user but then couldn't be configured as default for all users.

[1] https://gerrit-review.googlesource.com/55594

Change-Id: I9583a3edd56b687ab24162e03381e75dc99b2134
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-31 14:47:11 +02:00
Edwin Kempin
7b24099320 My menu table: update arrows on add/delete
The arrows in the My menu table that allow to move menu items up and
down need to be updated when entries are appended or deleted.

Change-Id: I6ed45ec09b24396aacdfab46a738632f0f5b0203
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-28 19:24:39 +01:00
Shawn Pearce
931562c2ab Merge topic 'my-menu'
* changes:
  Handle internal extension menu items like built in items
  My menu targets should be null not empty string
2014-03-28 17:05:42 +00:00
Shawn Pearce
6115dc1c2c ChangeScreen2: Simplify creation of weblink anchors
A widget is overkill here as the object gets discarded and no
listeners are installed.  Instead use a simple anchor element.

Change-Id: Ia341965a60d90ceca0b05724ad7db30c187844ff
2014-03-27 18:01:19 -07:00
Shawn Pearce
bc31c47ced ChangeScreen2: Fix ((gitweb)) link title
Wrap the text in only one group of parens not two.  The existing
legacy code for old ChangeScreen already adds parens.

Change-Id: I380b6d246067f6533074536a984e5729789ceaae
2014-03-27 17:59:49 -07:00
Shawn Pearce
edb2e7d85c Handle internal extension menu items like built in items
If the URL starts with "#" and the target window is null or the empty
string it is reasonable to assume the menu item was registered to be
handled in this GWT application session.

Use LinkMenuItem like the other internal core menus to pass the
history token into the dispatcher. Plugins can contribute screens
using "#/x/${plugin}/" namespace so it is very reasonable to see
additional links of this format.

Change-Id: Ie2505bdc6ba6b4a318de0564ed05d40ee96fa026
2014-03-27 17:54:40 -07:00
Shawn Pearce
c548fac493 Merge "Limit archives to only enabled formats" 2014-03-27 14:10:24 +00:00
Shawn Pearce
6edde31009 Limit archives to only enabled formats
Refactor the configuration of enabled archives to be known to the
GetArchive REST API handler so it can allow only formats that have
been enabled by the administrator.

Use the order listed in download.archive to configure the web
interface, with no formats enabled if the list is empty.

Default to all archive formats enabled, matching the schemes.

Change-Id: I29436f13bbc6fd4a20a7d9151e7f47186f5fbf4b
2014-03-27 13:52:42 +00:00
Dariusz Luksza
48c1f20ef7 Make skip bar more user friendly
It is odd to put block expansion link only on number of skipped lines.
This change puts link on whole sentence "... skipped XX common lines
...".

Change-Id: I5c48a26fa7fa8758e35386994b80ef741e3ffa50
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2014-03-27 05:11:41 +01:00
Shawn Pearce
6cf78d50c3 SideBySide2: Bind Shift-N to search-prev in vim mode
Shift-N is find previous search result.  With no search active
this should stay as next comment.

Change-Id: Ia7ab1417a121b3d7b3a9f8b44d49dbb335f1f330
2014-03-26 19:42:07 -07:00
Shawn Pearce
3c63cb8463 Merge "Add config option to select supported archive formats" 2014-03-27 01:35:56 +00:00
Shawn Pearce
b547ca9d7b Serialize GWT dbg and opt compiles
The GWT compiler swamps a system when it builds, using multiple
threads to build each permutation in parallel. It also requires
a lot of RAM. Buck is not aware of the cost of the genrule and
currently schedules both to build at the same time.

Make ui_opt depend on ui_dbg so Buck is forced to serialize these
build steps, reducing the load on average systems while possibly
extending build time on very powerful (e.g.  16 core) systems.

Change-Id: Icc1856c9c4e7919c28dc533e792fa25aadcdf801
2014-03-26 18:01:32 -07:00
David Ostrovsky
fc9cdf02e7 Add config option to select supported archive formats
Change-Id: I076e0a6cf038b72c6403e03fe9b9187ba2aa63fc
2014-03-26 17:29:00 -07:00
Edwin Kempin
a90042cc79 Make cells for up/down navigation for 'My' menu items accept clicks
The icons are very tiny and hard to hit. Allow users to click on the
cell to move menu items up and down.

Change-Id: I27a9dd8bc1334237b76a9458294e28c37f43e73f
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-26 19:28:58 +01:00
Edwin Kempin
8c6bfdfed4 Fix style of 'My' menu items preference table
Some cell borders were missing.

Change-Id: Iedf34ae43664e804bb3b2a012dacace724fb892b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-26 06:58:01 +01:00
Shawn Pearce
fb49157951 Merge topic 'user-dashboards'
* changes:
  Allow users to sort 'My' menu items of preference screen
  Allow admins to configure the default 'My' menus for all users
  Allow users to configure the 'My' menu from the preferences screen
  Use REST API for loading/saving general account preferences
  Extend REST API for user preferences to set My menu items
  Add All-Users project to store meta data for all users
2014-03-26 05:05:10 +00:00
David Ostrovsky
f56a8c687f SideBySide2: Fix syntax highlighting for shell files
Change-Id: I7b209eaeeb131d5e9c7a6d8417acca91bcb699cc
(cherry picked from commit 866c8e92a402a28427097e17285f6c179c98933c)
2014-03-26 04:32:14 +00:00
Edwin Kempin
dfe46232d0 Allow users to sort 'My' menu items of preference screen
Change-Id: I153da15b5ace9a1aa7ec85f0d11dcb2dccff0260
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-26 03:51:25 +01:00
David Ostrovsky
866c8e92a4 SideBySide2: Fix syntax highlighting for shell files
Change-Id: I7b209eaeeb131d5e9c7a6d8417acca91bcb699cc
2014-03-25 18:33:55 -07:00
Edwin Kempin
21afc92de4 Allow users to configure the 'My' menu from the preferences screen
Users can now configure in the preferences UI which menu items they
want to see in the 'My' menu. With this change users can't control the
order of the menu items yet. This will be done in a follow up change.

The listAdd icon is taken from the Tango Icon Library [1].

[1] http://tango.freedesktop.org/Tango_Icon_Library

Change-Id: If945cf33fc95430fbd381ae9dd22ce231573e4da
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-26 02:16:09 +01:00
Edwin Kempin
6b0894dd44 Use REST API for loading/saving general account preferences
This migrates the MyPreferencesScreen to the REST API.

Change-Id: I3ba3130d97e342507aa705b51ca8e159da91870b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-26 02:05:12 +01:00
David Ostrovsky
fc5a2b8ef4 ChangeScreen2: Respect comment visibility strategy
Bug: Issue 2456
Change-Id: I71f9ae2664a8f8c7f4eb8e019696764982781f58
2014-03-26 00:07:58 +00:00
Dave Borowitz
4aed07b7ce Add a "projects" field for searching projects by prefix
Index alongside the "project" field, which is an exact match field,
since we do not assume index implementations can search exact match
and prefix on the same field. We do not want to modify the existing
"project" to return prefixes.

Upgrade Lucene to 4.7.0, as this was released since the last schema
change.

Change-Id: I7c3379c087fc54af3e5790cb875a5e676e674338
2014-03-25 16:38:59 -07:00
Edwin Kempin
19eda2f94c Merge "SecurityFix: enforce HTTP password checking on gitBasicAuth" 2014-03-25 19:33:58 +00:00
David Ostrovsky
99dea4bfba Move some project classes to extension to expose them in Project API
Change-Id: I25a8d463b50fd3cd016c7d182790ae54883b7401
2014-03-25 06:15:06 +00:00
Luca Milanesio
b281cd402b SecurityFix: enforce HTTP password checking on gitBasicAuth
When using auth.gitBasicAuth option in gerrit.config, the git
over HTTP authentication was using *ONLY* the Gerrit realm
for validating the user's credentials.

However only the LDAP realm did a real full checking of the
user's password, whilst with other realms (i.e. HTTP and HTTP_LDAP)
there was only a check on the existence of the user's account.

This created a potential security hole when a non-LDAP auth realm
was used in conjunction with gitBasicAuth.

The fix is to check, for non-LDAP authentication realms, the
HTTP Password in the Gerrit external access ids and deny
unauthenticated access if password do not match or has not
been generated in the user's settings HTTP tab.

Change-Id: I620eb780e6d77b45f6bc8a3af42f8b7b1caf821d
2014-03-25 02:53:02 +00:00