17 Commits

Author SHA1 Message Date
Dmitrii Filippov
3fd2b102e1 Convert legacy Polyemer elements to class-based
This commit converts almost all Polymer elements from Polymer-function
based components to class-based components. There are few files which
should be converted manually after this commit.

Change-Id: I9e597e79053e0a6b5d5c0f1b54676d11b9d81db7
2019-11-15 16:53:09 +00:00
Dmitrii Filippov
b82003c49a Update eslint version and eslint rules
Legacy indent rules doesn't handle all cases. As a result there are
different indents in .js files. This commit update eslint rules and add
autofix for incorrect indents. It is expected that fix should be run
after converting to class-based elements.

Change-Id: I9d37a3d4319e2af71ddb93100a6791b8ddb7de79
2019-11-06 13:00:04 +01:00
Paladox none
f55c736f72 Remove _legacyUndefinedCheck from the admin modules
Change-Id: Icca7e0bb2856b06be427a711e596ffa928b5fb22
2019-10-17 16:49:06 +00:00
Paladox none
5313a88c55 Revert "Remove all _legacyUndefinedCheck"
This reverts commit 0f8964bb628674e3671bc34fda6ed775d5c94132.

Reason for revert: Still needs more places to have undefined checks.

Notably this breaks the diff screen.

Change-Id: Ifeecb2272144a688c96e63a942b221482d4eb69d
2019-10-04 00:34:43 +00:00
Tao Zhou
0f8964bb62 Remove all _legacyUndefinedCheck
This reverts the commit 3e7f5fdd3fb29fef7312b2d5d49dd172a294237f
as undefined check added for all computed properties and
observers with more than one dependencies.

Change-Id: I8e88dfeccdfb5d7dd296a44cc9d86ca5f8c70ab9
2019-10-02 11:46:29 +02:00
Paladox none
44b3a7c433 Migrate from Polymer fire to Gerrit.FireBehavior
Polymer 2 deprecates the 'fire' method for legacy elements.

So let's use gerrit's core fire method which is almost exactly the same.

Change-Id: I59aebd29a89d26d9cb39e63e9a41afa9756b942f
2019-08-06 17:29:43 +00:00
brohlfs
3e7f5fdd3f Polymer 2: Add _legacyUndefinedCheck
When legacy-data-mixin.html is imported this will tell you on the console which observers need fixing regarding this change of behavior:

https://polymer-library.polymer-project.org/2.0/docs/upgrade#update-observers

This change was created by running this command line:

find polygerrit-ui/app/ -type f | xargs sed -i '/^    is: / a\    _legacyUndefinedCheck: true,'

Once all observers are fixed, this change will be reverted. This is tracked in https://bugs.chromium.org/p/gerrit/issues/detail?id=10723

Change-Id: Icccdfaa52bf77dfb25e949b2aa2402110f6c2276
2019-04-17 13:15:50 +00:00
Paladox none
71bc7f33d2 Hide "private" check box if private changes are disabled
Bug: Issue 9776
Change-Id: Ide3b849a9dbe1c26b7787a514c503f97bce9ef31
2018-11-13 22:14:52 +00:00
Paladox none
2aa2f3c8ce Fix creating changes through the ui
This fixes the issue by returning null which should prevent this error see [1]

[1] https://gerrit-review.googlesource.com/c/gerrit/+/174450/5/java/com/google/gerrit/server/restapi/change/CreateChange.java#228

Bug: Issue 8970
Change-Id: I848ffdbad6c2967df9d6acb622ba921511a05b4f
2018-05-09 19:43:33 +00:00
Aaron Gable
6ff48695ec Add PG UI support for new changes with base commit
This allows users to specify a non-HEAD base commit
when creating a new change from the web UI.

Bug: Issue 8857
Change-Id: Ic585fafacc4bf21cd1d8bd129e889b42180b80a7
2018-05-04 10:17:06 -07:00
Dave Borowitz
8cdc76ba4c Add @license tags to PG HTML and JS assets
These tags are preserved by the Closure compiler and vulcanize in order
to serve the license notices embedded in the outputs. In a standalone
Gerrit server, these license are also covered in the LICENSES.txt served
with the documentation. When serving PG assets from a CDN, it's less
obvious what the corresponding LICENSES.txt file is, since the CDN is
not directly linked to a running Gerrit server. Safer to embed the
licenses in the assets themselves.

Change-Id: Id1add1451fad1baa7916882a6bda02c326ccc988
2018-03-26 10:47:55 -04:00
Paladox none
d0f2bda7e8 gr-create-change-dialog: Pass private-by-defaut value
Allow to propagate private-by-defaut configuration value. It also avoids
unnecessary requests, when invoked from the change view, because the
project configuration was already retrieved and can be just re-used.

Bug: Issue 8601
Change-Id: I5cdb3f0e12c53bf656653b0821c94317ba7fbb2d
2018-03-21 21:30:07 +01:00
David Ostrovsky
067b7d5bed PolyGerrit: Add FollowUp button on change screen
Re-use create-change-dialog to create follow-up change in change
screen. There are two enhancements to the create change dialog:
branch section can be hidden and base change can be passed in.

In addition the REST API is extended to accept base change id.

Feature: Issue 8213
Change-Id: Ib39f73e6b88513ed12bba42405b6320d33f16f87
2018-03-20 23:46:11 +01:00
Paladox
985bfc48ef PolyGerrit: Update create dialog
Keeps private as a checkbox as it's optional.

Bug: Issue 7250
Change-Id: I48db44dcf469c79d8fe3a8176014140477b3f21a
2018-03-13 17:32:26 +00:00
Paladox none
2bd5c217d0 Rename projects admin interface to repo
This also includes backwards compatibility with the old /projects/ url.

This only renames it for the admin interface. It does not rename it for
changes or anything else.

Bug: Issue 7754
Change-Id: Ia31d3f26871556729fb3c5b5b28ceca12da1ec7c
2017-12-27 21:40:31 +00:00
Paladox none
6e347e8793 PolyGerrit: Update create dialog to use per project private config instead of global
Since change I6fea9f8d55c7a38ac293057681874e9b480341ed,
it has added support for per project private config instead of doing
it globally.

Change-Id: I72767ae5be0344d5275da1c41253f3284978c10a
2017-10-26 00:27:22 +01:00
Paladox none
c30b2fe981 PolyGerrit: Add support for project command
* This adds a new page called Project Command accessed by navigating to
<url>/projects/<project>,commands

* This supports creating a change through the new dialog (though note
you can't edit any files, will have to switch to gwtui to do that)

* Supports creating the change as a private and wip or one or the other.

* Supports the Run GC button allowing you to run gc on projects.

Feature: Issue 5232
Change-Id: Ibd3507c0fdb84303c8a978e3ea87f251582b13e8
2017-08-22 13:44:40 +00:00