summaryrefslogtreecommitdiffstats
path: root/webapp
Commit message (Collapse)AuthorAgeFilesLines
* Fix running Gerrit on TomcatMatthias Sohn2018-11-151-1/+1
| | | | | | | | - WebAppInitializer moved to another package, fix that in web.xml - fix Guice bindings in WebAppInitializer Bug: Issue 10033 Change-Id: I2fafdd318f789db39b9c4a10bb3261efde30066c
* Dissolve gerrit-war top-level directoryDavid Ostrovsky2017-10-317-0/+164
| | | | Change-Id: I2eaa09545e2ac8ef8f1346ab0cb203d00f811a38
* Switch build system to use Maven 2Shawn O. Pearce2008-12-20193-14106/+0
| | | | | | | | This way we can easily depend upon other projects which also use Maven, without needing to embed all of their dependencies directly within our repository. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Insert a new comment editor when a patch line is double clickedShawn O. Pearce2008-12-197-3/+194
| | | | | | | The editor currently doesn't save state, but it does insert into the UI and the Cancel button removes it from the UI. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Open/collapse comments in patches when enter or 'o' is presed on the lineShawn O. Pearce2008-12-191-5/+20
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Deregister all widgets before resetting a table's HTMLShawn O. Pearce2008-12-191-0/+5
| | | | | | | This way we give the widgets a chance to fire their onUnload method and possibly perform state saving actions during the unload event. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Cleanup the CSS so its more reused between diff typesShawn O. Pearce2008-12-194-108/+70
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use raw HTML to create UnifiedDiffTable, like SideBySideTableShawn O. Pearce2008-12-193-158/+112
| | | | | | | | This makes the unified display quicker, but also makes it easier to abstract out some code that is common to the two classes and pull that up into a common base class. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add real side-by-side compare for 2-way diffsShawn O. Pearce2008-12-1919-32/+885
| | | | | | | | | | | | | | | | | | | | | | | The HTML for the table is built up in a string builder then shoved in as the innerHTML property of the <tbody>. This is significantly faster than creating DOM nodes from code. By this approach the rendering is almost instant; creating DOM nodes takes over 3 seconds for some simple files. In theory N-way diffs can also be drawn on the client side, but the backend for the detail RPC call doesn't create the content correctly, and hyperlinks don't exist to get into the sidebyside mode for an N-way diff. We may add support for it in the future. Sections which are ellided out by the patch (because they are common) don't render, and there's no way to increase the context. We also don't honor any sort of user context preference yet, rendering only the context that the patch itself came out of the database with. By default this is 5 lines. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Correct the off-by-one-line error with comments on unified diffsShawn O. Pearce2008-12-191-2/+3
| | | | | | | The comments were one line higher than they should be, due to the line number being incremented before the comment is looked up. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Move a lot of the state for unifiedPatchDetailAction into the baseShawn O. Pearce2008-12-182-58/+61
| | | | | | | This way we can reuse the initial patch parsing, validation, and comment indexing for all types of detailed patch actions. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Extract unifiedPatchDetail code to make it more reusableShawn O. Pearce2008-12-186-235/+301
| | | | | | | | | | Much of the code (especially related to comment handling and diff parsing) can be reuesd for different types of output, like the N-way merge diffs or the side-by-side display. By extracting this to a new top-level we can hoist some code into a common base Action class. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Highlight horziontal tab characters by showing them in patch linesShawn O. Pearce2008-12-184-1/+90
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow "open item" (enter or 'o' keys) to open a line level commentShawn O. Pearce2008-12-182-0/+14
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Abstract out common parts of a patch detail screen's dataShawn O. Pearce2008-12-182-13/+42
| | | | | | | This way we can reuse it for side-by-side display, or any other sort of detail we might come up with in the future. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Show inline comments on the unified patch viewShawn O. Pearce2008-12-1712-25/+265
| | | | | | | Comments are expanded just like on the main change screen, though we are lacking a menu to collapse, expand or hide them. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Switch PatchLineComment's side field to be a numericShawn O. Pearce2008-12-171-32/+7
| | | | | | | | | This way we can record it as the nth file in the patch, rather than as just left vs. right. This facilitates comments on an N-way diff (where N >3) such as git produces when a merge has a conflict resolution. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Display styled unified diffsShawn O. Pearce2008-12-1712-0/+513
| | | | | | | | | | The unified diffs are shown in a two-column table, giving us a line cursor position in the first column and a pre-formatted hunk text in the second column. Styles are applied based upon the rules used in a standard two-way diff, color-coding the lines to make it easier to read what is displayed quickly. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix minor Javadoc formatting error in ChangeDetailShawn O. Pearce2008-12-171-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix a minor formatting nit in GitwebLinkShawn O. Pearce2008-12-171-1/+0
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Change our no-cache headers to match gwtjsonrpcShawn O. Pearce2008-12-172-4/+6
| | | | | | | | | | | | gwtjsonrpc now uses a fixed expire date back in the past, so its quite clear that the entity shouldn't be cached by a proxy or a browser. Its also faster, as we don't have to format the date. We also now mark must-revalidate on our Cache-Control, so a proxy server doesn't try to serve stale content while waiting for a reply from Gerrit. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Show the source file path in the patch set table on copy/renamesShawn O. Pearce2008-12-174-1/+37
| | | | | | | This way its a little easier to figure out the origin of any file that has a status of R and C just by glancing at the patch table. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add ancestor revision update to PatchSetImporterShawn O. Pearce2008-12-172-3/+37
| | | | | | | | These are necessary for new PatchSet entities, where none of the parent links are in the database. But we can update them too when we build an update for an existing patch set. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use JGit's progress meter interface instead of our ownShawn O. Pearce2008-12-171-10/+11
| | | | | | | Its cleaner to just reuse the code that JGit already has for outputting progress messages to stderr than to roll our own. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Automatically resize and center dialogs when the window changesShawn O. Pearce2008-12-123-8/+82
| | | | | | | | | We resize and reposition dialogs automatically when the parent window resizes, so the iframe's scrollbars will enable if the parent window is not big enough to show the entire iframe at once, rather than making the user scroll the parent window. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix the link menu items to use a pointer/hand cursor like normal linksShawn O. Pearce2008-12-121-0/+2
| | | | | | | The user should be able to click on these, so make it look like that is the proper action by changing the cursor. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix invalid <style> tag in host page so it works in Mac OS X hosted modeShawn O. Pearce2008-12-121-1/+1
| | | | | | | | The hosted mode Safari browser doesn't recognize a <style> tag that isn't closed with </style>. It stops parsing the page and just shows nothing at all, so we have to construct the page as valid HTML. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Only show side-by-side links if the patch is a pure unified diffShawn O. Pearce2008-12-121-3/+11
| | | | | | | | Binary diffs can't show a side-by-side because we cannot show the binary content on the web page, it might be unsafe for a browser to show or simply not viewable over the web. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Import all patch data again from Git to ensure it is accurateShawn O. Pearce2008-12-126-9/+426
| | | | | | | | | | We've made some schema changes about how patch data is stored and represented in the Gerrit 2 database, so we need to import all of the patch entities over again. This change includes a CLI tool that can be run to re-import one or more patch set entities from the corresponding Git commit. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add PatchContent to store the uncompressed content of a patchShawn O. Pearce2008-12-124-0/+108
| | | | | | | This allows us to precompute patches from Git and write them into the database for efficient access. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add patch type and source file name to Patch entityShawn O. Pearce2008-12-121-3/+66
| | | | | | | | We need these in order to quickly determine what the patch for this entity looks like, so we can produce the right style of hyperlinks on its row. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Introduce RevId as an abstraction around revision stringsShawn O. Pearce2008-12-129-26/+81
| | | | | | | | This may make it easier to replace Git with some other tool like Hg or SVN, but it also offers us a convenient way to abstract the data type and improve type safety within Gerrit's code tree. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add the default project path for our Git RepositoryCache to SystemConfigShawn O. Pearce2008-12-122-0/+17
| | | | | | | | We need a base directory that all projects live below. If the project exists here as a Git repository then it is available for changes to be reviewed in. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Import RepositoryCache from Gerrit 1 mgrappShawn O. Pearce2008-12-123-0/+160
| | | | | | | | | | This is the exact code used by Gerrit 1 in its mgrapp to cache JGit Repository handles, only I've moved its package name to conform better with Gerrit 2's conventions. Taken from b4a05fbced23d75525b9f349a70e681887c04767. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add JGit to the build path so we can access Git repositoriesShawn O. Pearce2008-12-122-0/+4
| | | | | | | This gives us server-side access to Git repositories, without forking external processes. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Show the depends on and needed by lists on a change pageShawn O. Pearce2008-12-087-3/+181
| | | | | | | The lists are automatically expanded open if there is a dependency which is not yet merged and we are still open. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Handle NotSignedIn errors gracefully during module loadShawn O. Pearce2008-12-082-3/+6
| | | | | | | | | If we get back a NotSignedIn exception we should whack the cookie that lead us to believe we might be signed in, and not log error. This fix really only matters in the hosted debug console, where the error is somewhat common if you reinitialize your data store. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Simplify formatting of whoAmI in GerritShawn O. Pearce2008-12-081-3/+2
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use StringBuilder instead of StringBuffer when possibleShawn O. Pearce2008-12-083-10/+10
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Request that overflowing change subjects use "..." when possibleShawn O. Pearce2008-12-082-0/+10
| | | | | | | | | If a subject line overflows what the browser can accept for the field we want it to clip the value and optionally insert "..." at the end of the text, if the browser supports that CSS mode (IE does). Signed-off-by: Shawn O. Pearce <sop@google.com>
* Misc. stylesheet formatting cleanupsShawn O. Pearce2008-12-081-3/+0
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't allow user names to be wrapped in account linksShawn O. Pearce2008-12-082-4/+5
| | | | | | | | | Breaking someone's name in the middle looks pretty bad, even if the line wrapping is what the browser wants. This is because in nearly all cases the name is shown in a table cell where we really want one line per account. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add messages to the change detail screenShawn O. Pearce2008-12-0832-165/+858
| | | | | | The message content is an overall remark about the change. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix ComplexDisclosurePanel widget containment to be proper GWT styleShawn O. Pearce2008-12-082-9/+22
| | | | | | | | | | | | | | We need to make sure our widgets are contained in their parent, and so on up the graph. Just connecting things in DOM may not be enough for GWT widgets to be completely happy. Also fixed layout problems related to the 2nd header column moving back and forth when the width of the content panel changed as it was expanded and populated. By forcing the width of the first column to be a fixed width we can ensure the 2nd header column gets any extra table width when the disclose panel expands to show its full content. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Mark all servlets as load-on-startupShawn O. Pearce2008-12-081-0/+6
| | | | | | | | This way the database is initialized during web application context startup and not during the first query, reducing the latency of the first incoming request. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix the primary key declaration for AccountAccessShawn O. Pearce2008-12-081-2/+2
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Cleanup formatting on Firefox 2, 3 and SafariShawn O. Pearce2008-12-045-10/+39
| | | | | | | | | | | | The sign in dialog wasn't quite tall enough, now it is. But its far too large for the Android web browser. The change info block is now folded up with the description, fixing the layout problems it was having on Firefox 3 where it forced the description down lower on the page, and on Firefox 2 when the window was too narrow. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Define a basic display of the patches in a patch setShawn O. Pearce2008-12-0422-27/+441
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor ChangeTable so much of its UI is reusableShawn O. Pearce2008-12-043-224/+296
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Move generic link types into client.uiShawn O. Pearce2008-12-045-9/+8
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>