Commit Graph

12075 Commits

Author SHA1 Message Date
Sebastian Sdorra
49dfd66a4f Disable chromatic (#1801) 2021-09-08 09:59:51 +02:00
Sebastian Sdorra
92fa67e937 Fix missing encoding of useBranch hook (#1798) 2021-09-08 07:45:41 +02:00
Eduard Heimbuch
059f1aeab0 Add community link to README.md (#1796) 2021-09-07 09:54:17 +02:00
Eduard Heimbuch
64b03d6ded Fix illegal access from plugin to core api. 2021-09-06 15:21:53 +02:00
René Pfeuffer
13d72d45c6 Prevent multiple instances of working copy pool (#1797)
The working copy pool has to be a singleton, because
otherwise there could be multiple instances with their
own caches and therefore no reuse and maybe more relevant
working directories that will never be deleted.
2021-09-06 08:40:22 +02:00
Sebastian Sdorra
856315a15f Fix broken login page if login info response could not be parsed (#1795) 2021-09-06 08:33:24 +02:00
Eduard Heimbuch
43e1ea06c8 Fix HalRepresentationWithEmbedded type (#1793)
Fix HalRepresentationWithEmbedded type since _embedded can be null.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-09-02 15:47:15 +02:00
Sebastian Sdorra
0ba8300051 Fix duplicate entries in branch selector (#1794) 2021-09-02 15:09:45 +02:00
René Pfeuffer
c408b38f10 Fix repository index
The index was missing the repository itself. This lead
to no repositories in the search detail page.
2021-09-02 11:14:12 +02:00
Sebastian Sdorra
70fba6c990 More flexible delete and query api (#1790)
Replaces the filter and delete by repository api's with a more flexible api, which allows to filter and delete by any id part.
2021-09-01 16:19:19 +02:00
Sebastian Sdorra
ea7964d224 Add support for enum fields during indexing (#1792)
* Add support for enum fields during indexing

* Add missing value extractor for enums
2021-09-01 15:40:38 +02:00
Konstantin Schaper
9ad501b4c6 fix redundant git repo closing (#1789)
Both the GitLogCommand and the GitModificationsCommand incorrectly closed the underlying git repository. This caused the git repository to be opened once but closed twice, which in turn flooded the logs with avoidable warnings and affected performance. The redundant closing of the git repo has been removed from both commands.
2021-09-01 09:44:11 +02:00
Sebastian Sdorra
765a39e4ce Remove unsafe index options api (#1787)
The IndexOptions api has several problems:
- It is possible to open the same index with different options, which could lead to scoring problems
- If the index is already opened from another task, the options are ignored and the one from the opening task are used
- The analyzer which is derived from the options is used for every field which has not configured a specific analyzer
- This change removes the options api completely.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-08-31 14:03:16 +02:00
Sebastian Sdorra
61c2ebe80e Keep quick search input on page reload (#1788) 2021-08-31 13:30:15 +02:00
Sebastian Sdorra
571025032c Create a more flexible and typesafe id for indexed objects (#1785)
Id's can now be combined with more than just a repository. It is now possible to build a more complex Id such as Comment -> Pull request -> Repository. The id's now bound to a specific type. This makes it harder to accidentally use a id within an index of the wrong type.
2021-08-31 11:27:49 +02:00
Eduard Heimbuch
58f792a285 Fetch clone modal data on first opening (#1784)
Get the data of the clone modal the first time it is opened. This way, we display a loading spinner for a fraction of a second when the modal is first opened. But we also prevent fetching a lot of data that is probably not needed.
2021-08-31 07:39:02 +02:00
Sebastian Sdorra
cf55b15d21 Refactor SvnMirrorCommand
Extracted authentication logic into its own class.
Use source url instead of target url for authenticators and proxy excludes.
Use error code instead of complete message to detect a missing initialisation on update.
2021-08-26 12:20:44 +02:00
Sebastian Sdorra
0a26741ebd One index per type and parallel indexing (#1781)
Before this change the search uses a single index which distinguishes types (repositories, users, etc.) with a field (_type).
But it has turned out that this could lead to problems, in particular if different types have the same field and uses different analyzers for those fields. The following links show even more problems of a combined index:

    https://www.elastic.co/blog/index-vs-type
    https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html

With this change every type becomes its own index and the SearchEngine gets an api to modify multiple indices at once to remove all documents from all indices, which are related to a specific repository, for example.

The search uses another new api to coordinate the indexing, the central work queue.
The central work queue is able to coordinate long-running or resource intensive tasks. It is able to run tasks in parallel, but can also run tasks which targets the same resources in sequence. The queue is also persistent and can restore queued tasks after restart.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-08-25 15:40:11 +02:00
Konstantin Schaper
44f25d6b15 Fix disabled local proxy configuration being used over global config (#1780)
The original proxy configuration implementation only used the global configuration if the local proxy configuration was not provided (i.e. null). This PR adds the corner case where a local configuration is provided, but disabled. In this case, the global proxy configuration will be used as a fallback as well.
2021-08-25 08:19:52 +02:00
Florian Scholdei
7e94f434dd Update faq for initial administration user 2021-08-24 15:05:23 +02:00
Florian Scholdei
5c9b270e6e Remove deletion of modalRoot node (#1779)
Remove deletion of empty modalRoot node to allow a different modal to continue to exist
2021-08-24 11:26:16 +02:00
Sebastian Sdorra
1d80ecd976 Fix changelog generation 2021-08-24 07:54:55 +02:00
Sebastian Sdorra
519748106e Fix too heavy logging of SchemeBasedWebTokenGenerator (#1777)
Reduce log level of `could not create token from authentication header from warn to debug, because it is normal that these message is logged if multiple SchemeBasedWebTokenGenerator are registered.

Fixes #1772
2021-08-23 20:07:52 +02:00
Sebastian Sdorra
03449de238 Fix repository viewer for filenames which contains a hash (#1776)
Add missing url encoding for file links in the repository viewer.

Fixes #1766
2021-08-23 20:05:10 +02:00
Sebastian Sdorra
da2b34e528 Preserve request method on force base url (#1778)
The redirect which is used to force base url uses now 307 instead of 302 in order to preserve the request method.

Closes #1771
2021-08-23 20:02:12 +02:00
Sebastian Sdorra
7f9f4e566c Proxy support for pull, push and mirror commands (#1773)
Apply proxy support for jGit by extracting the required functionality from the DefaultAdvancedHttpClient into its own class HttpURLConnectionFactory. This new class is now used by the DefaultAdvancedHttpClient and jGit.
The HttpURLConnection also fixes proxy server authentication, which was non functional in DefaultAdvancedHttpClient.
The proxy support for SVNKit is implemented by using the provided method of the BasicAuthenticationManager.
For mercurial the support is configured by writing the required settings to a temporary hgrc file.
2021-08-19 11:27:51 +02:00
Sebastian Sdorra
a7bb67f36b Fix branch selector display revision if selected instead of first branch (#1767)
The select component displays the first option if the value is not part of the options. This behaviour breaks the BranchSelector which uses Select since version 2.22.0 (before it used the deprecated DropDown component). The BranchSelector has to display the revision if one is selected, which is not part of the options.
This change will add a addValueToOptions property to the Select component and restore the old behaviour.
2021-08-16 14:54:50 +02:00
Sebastian Sdorra
c03a9f6fcb Fix error message for parse error on search result page (#1768)
Show same parse error on detail page as on omni search.
2021-08-16 13:19:03 +02:00
Sebastian Sdorra
d1ea249539 Improve search syntax page (#1770)
Remove non-searchable fields from syntax site, do no translate field names, use field name for title if no translation is available, refactor syntax page to respect error states
2021-08-16 13:17:25 +02:00
Sebastian Sdorra
8330f8fddd Fix submission of empty search queries (#1769)
Fixes submission of OmniSearch with an empty query or one which contains only a single character.
2021-08-16 13:11:44 +02:00
Sebastian Sdorra
928439b4d5 Fix helm documentation generation 2021-08-11 11:17:38 +02:00
Sebastian Sdorra
fe6235f4da Add image pull secret to helm values documentation 2021-08-11 11:17:05 +02:00
Sebastian Sdorra
1b280e0aa4 Keep search result type if searched from result page (#1764)
Whenever OmniSearch was used, the user was redirected to the repository results. However, if you are looking for a different type and want to refine your search after the first results, it makes sense to stay on the same type when searching again.
So whenever a search is started from the search result page the selected type keeps selected.
2021-08-11 09:41:10 +02:00
Sebastian Sdorra
3e6ce4e814 Add DefaultBranchChangedEvent (#1763)
The DefaultBranchChangedEvent is fired whenever the default branch of repository changes.
2021-08-11 09:28:00 +02:00
pmarkiewka
5aae743053 Adds pullSecret option and simplifies image usage (#1765)
Adds a value field to set a Secret to pull the image from an image registry with authentication, in case you need to host the image yourself and your registry has authentication.

To simplify the configuration we set the initContainers to use the same image as the application itself.
This has the following advantages:
- No additional configuration for image and pull Secret in values needed
- The used image is always up-to-date now. No need to maintain an extra alpine image.
- Faster startup times. No extra images have to be pulled.

Signed-off-by: pmarkiewka <philipp.markiewka@cloudogu.com>
2021-08-11 08:45:20 +02:00
René Pfeuffer
8558572c99 Modifications command between two revisions (#1761)
Adds the option to compute the modifications between two revisions unsing the modifications command.
2021-08-09 12:13:41 +02:00
Konstantin Schaper
ddd2fc1055 Add additional help to quick search and an advanced search documentation page (#1757)
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-08-09 12:07:28 +02:00
René Pfeuffer
f2249cea73 Update to eslint-plugin 2.13.0 2021-08-06 10:34:30 +02:00
Eduard Heimbuch
842b0b7698 Show empty file (#1762)
Show empty file instead of an endless loading spinner.
2021-08-06 08:31:36 +02:00
Sebastian Sdorra
8ce69d9848 Allow enrichment of embedded repositories on search hits (#1760)
* Introduce RepositoryCoordinates

RepositoryCoordinates will be used for the enrichment of the embedded repositories of search result hits. This is required, because if we used the normal repository for the enrichment, we would get a lot of unrelated enrichers would be applied.

* Add builder method to HalEnricherContext

With the new builder method it is possible to add an object to the context with an interface as key.

* Add enricher support for embedded repository by applying enricher for RepositoryCoordinates

* Use embedded repository for avatars
2021-08-05 15:12:48 +02:00
Sebastian Sdorra
21a6943980 Refactor Search API and allow analyzer per field (#1755)
The Search api is now simpler, because it provides useful defaults. Only if you want to deviate from the defaults, you can set these values. This is mostly reached by using the builder pattern. Furthermore it is now possible to configure an analyzer per field. The default analyzer is still the one which is derived from the index options, but it is possible to configure a new indexer with the analyzer attribute of the indexed annotation. The attribute allows the configuration for code, identifiers and path. The current implementation uses the same analyzer code, identifiers and path. The new implemented splits tokens on more delimiters as the default analyzer e.g.: dots, underscores etc.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-08-05 08:21:46 +02:00
Florian Scholdei
4fa5ad1f0d Show repository avatar in quick search (#1759) 2021-08-05 07:47:38 +02:00
Sebastian Sdorra
7c10926244 Add embedded repository to search result hit (#1756)
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-08-04 16:29:23 +02:00
Eduard Heimbuch
7dd61953ac Update SCM-Manager plugin creation guide 2021-08-04 10:37:12 +02:00
René Pfeuffer
c3f3778295 Fire post receive hook after import (#1754)
The repository import did not post any PostReceiveRepositoryHookEvent, only an ImportRepositoryHookEvent. With this fix, both events are posted.
2021-08-03 14:31:12 +02:00
Sebastian Sdorra
e492a30eea Expose content type resolver api to plugins (#1752)
Expose an api which makes it easy to detect the content type of files. The api is based on the spotter api, but does not expose spotter classes.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-08-03 10:41:38 +02:00
Florian Scholdei
2a481a75b3 Add bounding box for plugin avatar (#1749)
* Add bounding box for plugin avatar

* Add changelog entry
2021-08-03 10:11:48 +02:00
Sebastian Sdorra
6a5d56244c Fix search with best guess query containing hyphen (#1753)
Split searched best guess query into single wildcard query terms.
2021-08-02 13:43:48 +02:00
CES Marvin
124e7f1b18 Prepare for next development iteration 2021-07-30 13:02:59 +00:00
CES Marvin
ed953b6209 Release version 2.22.0 2.22.0 2021-07-30 12:35:36 +00:00