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
To support diffing against individual parents of merge changes, teach
the get-diff and get-change-files API methods to understand parent index
base patches, as indicated by negative numbers.
Feature: Issue 4760
Change-Id: I54225e93d05e64ca223944cf3c93b09ee0a7fd70
This change removes gr-gapi-auth and merge gr-gerrit-auth into one
gr-auth static API, exposed as Gerrit.Auth to enable cross-domain
configuration for embedded scenario.
Apparently, Google Platform JS library shares state across instances,
and as a result for embedded use case PolyGerrit requesting OAuth
sequence breaks other instances. To mitigate that, this change provides
an interface similar to Gerrit.Nav for setting OAuth access tokens.
``` js
Gerrit.Auth.setup(getToken, defaultOptions)
```
Gerrit.Auth.setup takes following parameters:
- getToken takes a function that returns Promise resolving to full token
object (including `access_token` and `expires_at` properties)
- defaultOptions may contain `credentials` fetch option that will be
used for all HTTP requests if provided
With the access_token PolyGerrit uses Gerrit's "faster CORS":
- REST API endpoints are prefixed with /a/ (after base url)
- access_token is added as URL param
- all but GET requests are made as POST
- POST requests have Content-Type as text/plain
- $ct URL param presents actual Content-Type
- $m URL param presents actual Cotnent-Type
Change-Id: I860bb84b30a2259d750a2239b7713c019b89b0e0
The auth provider can be enabled with window.USE_GAPI_AUTH flag, which
is disabled by default.
gr-gapi-auth depends on oauthconfig plugin to provide auth config info.
https://developers.google.com/api-client-library/javascript/start/start-js
Feature: Issue 6489
Change-Id: I6d6da5231a766ac241b2a931076e2ae04aab03a6
Significant unnecessary code duplication existed between the two
files, most importantly an enum that existed and was mirrored in both
places. This change removes all duplicate code from the interface,
preferring the publicly accessible nature of the behavior, and changes
private function calls within the interface accordingly.
Change-Id: Ifbe10e445c03f13044b8ae07e0d3cd24cfb3284e
This updates most of polygerrit links to use the implementation added in
I2b2d704fe33c90ea2f2a2183fc79897642a48175 .
Change-Id: Ib3bb694969e903fd76a1dad13cfb642bde086142
Fetch more data with GET /change/detail instead of multiple separate
GET requests. Fetch independent resources in parallel. Fixed change
actions jumping around.
First page load to full page down by ~25% (1050ms vs 1400ms on localhost,
expect even more on prod server)
Timeline before and after:
http://imgur.com/a/oEFdD
Bug: Issue 4406
Change-Id: Ib7c3c160513cbb29aad89fedabfacbfd271abf22
Due to substring logic, files with no extension were treated as files
with no path. This change ensures that these files are properly
alphabetized in the file-list.
Also adds a behavior test to the suite.
Bug: Issue 4697
Change-Id: I41df0db4ca981919d9e435e850737115fc97b8d9
Files in the file list are sorted specially so that header files appear
before their corresponding source files. This change applies this same
sorting algorithm to the comment list.
In order to achieve this, the special file sort function was exposed
publicly -- removed from gr-rest-api-interface and put in a new file,
gr-file-path-behavior.
Bug: Issue 4586
Change-Id: I31079dcef0c3c2421b2561cedf69f68aaf653af4
If gr-diff recognizes that the file difference it's representing is
between images, it uses a different diff-builder that displays images
in a side-by-side-manner. In this case gr-diff will also make requests
for the image data itself, which it can pass down into the image-based
diff-builder.
Adds methods to gr-rest-api-interface to support rendering the data
relevant to image diffs. For images that are revisions of the current
change, provides "getChangeFileContents". For images that come from the
parent tree (i.e. if the basePatchNum is "PARENT") the interface
provides "getCommitInfo" to determine the SHA of the parent commit, and
"getCommitFileContents" which can get file contents for a given commit.
Bug: Issue 3822
Change-Id: I9be025b4e549fca97c87cdbeede6cb64dea5eac0
There is no change in functionality. Only moving things around.
+ Separate html from the js.
+ Place the unit test for a component within the same folder.
+ Organize the components in subfolders.
Change-Id: I51fdc510db75fc1b33f040ca63decbbdfd4d5513