Commit Graph

38 Commits

Author SHA1 Message Date
René Pfeuffer
27b9d2c78a Resolved branch revision in Source Extension Point (#1803)
This adds the "resolved revision" of the HEAD (of the current branch, if branches are supported) to the extension point repos.sources.extensions. This "resolved revision" holds the current HEAD revision of the repository (or the selected branch, if branches are supported). This means you can check, whether the release has changed since an extension has been rendered for the first time.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-10-20 13:29:47 +02:00
Konstantin Schaper
d41b293109 remove query keys when deleting individual entities (#1832)
When deleting individual entities, their query keys should be removed, not only invalidated. This is to prevent situations, where an entity is deleted via the web interface and react-query attempts a re-fetch before a redirect to the collection view can occur. This could lead to a not found error.
2021-10-20 13:15:17 +02:00
Sebastian Sdorra
92fa67e937 Fix missing encoding of useBranch hook (#1798) 2021-09-08 07:45:41 +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
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
Eduard Heimbuch
d6402ad1cb Redesign repository overview (#1740)
Change repository overview layout to use single rows instead cards. Also remove quick links and add clone action to repository entry. The default repository link now leads to the sources view.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-07-28 15:04:00 +02:00
Sebastian Sdorra
91fec0f478 Add detailed search result ui (#1738)
Add a dedicated search page with more results and different types.
Users and groups are now indexed along with repositories.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-07-28 11:19:00 +02:00
Sebastian Sdorra
39d2f12b66 Return separate links for searchable types instead of single templated link (#1733)
The search link of the index resource is now an array of links instead of single templated link.
The array contains one link for each searchable type.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-07-21 10:07:41 +02:00
Sebastian Sdorra
e75d937ee5 Prepare search api for different types (#1732)
We introduced a new annotation '@IndexedType' which gets collected by the scm-annotation-processor. All classes which are annotated are index and searchable. This opens the search api for plugins.
2021-07-19 08:48:43 +02:00
Sebastian Sdorra
e321133ff7 Add search engine and quick search for repositories (#1727)
Add a powerful search engine based on lucene to the scm-manager api.
The api can be used to index objects, simply by annotating them and add them to an index.
The first indexed object is the repository which could queried by quick search in the header.
2021-07-14 11:49:38 +02:00
Sebastian Sdorra
e5ebb78146 Fixed missing update if content of diff changes (#1714)
* Fixed missing update if content of diff changes

* Add property to disable automatic refetch in diffs

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-06-30 16:36:26 +02:00
Konstantin Schaper
e1239aff92 implement react-query for edge-cases (#1711)
When initially implementing react-query, we focussed on core features. This pull request now replaces the remaining apiClient usages in ui-components and ui-webapp with react-query hooks.
2021-06-28 13:19:03 +02:00
Eduard Heimbuch
7a3db7ee3f Include cloudogu plugins to plugin center (#1709)
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-06-25 09:22:53 +02:00
Konstantin Schaper
d6e36e7145 implement react-query for all content views (#1708)
Implements react-query and replaces direct apiClient usage for sources, annotate and history content views.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-06-23 14:14:56 +02:00
Eduard Heimbuch
ab2bd6d679 Fix single tag deletion (#1700)
Redirect to tags overview after a single tag was deleted to prevent error page.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-06-16 14:45:40 +02:00
Konstantin Schaper
17ecec03b2 tidy up suggestions api (#1699)
Streamlines the suggestions/autocomplete api and removes redundancy. All logic accessing the backend is now in hooks in ui-api.
2021-06-15 15:36:21 +02:00
Florian Scholdei
9b7da23a20 Fix administration page error for empty release feed url (#1667) 2021-05-31 08:34:26 +02:00
Sebastian Sdorra
dabc7d7e8e New configuration form (#1674)
This change introduces a new hook useConfigLink and a new component ConfigurationForm.
These combination should replace the old Configuration component, which is not typed and which could not be used with react-hook-form.
2021-05-27 15:46:08 +02:00
Florian Scholdei
42745c9e34 Notifications for health checks (#1664)
Add list of emergency contacts to global configuration. This user will receive e-mails and notification if some serious system error occurs like repository health check failed.
2021-05-20 08:30:20 +02:00
Konstantin Schaper
7286a62a80 Implement api for extension point typings (#1638)
Currently, the only way to explore available extension points is through our documentation or by browsing the source code. Once you find them, there is no guard rails and the usage is prone to user errors. This new api allows the declaration of extension points as types in code. This way, exposing an extension point is as easy as exporting it from a module. Both the implementation and the developer who uses the extension point work with the same shared type that allows auto-completion and type-checks for safety. This feature is backwards-compatible as the generic methods all have sensible defaults for the type parameters.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-05-12 16:05:30 +02:00
Sebastian Sdorra
b975fb655d Feature/global notifications (#1646)
Add global notifications
2021-05-05 14:43:16 +02:00
Eduard Heimbuch
7464baf767 Fix missing license headers 2021-04-30 16:13:19 +02:00
René Pfeuffer
1e83c34823 Enable Health Checks (#1621)
In the release of version 2.0.0 of SCM-Manager, the health checks had been neglected. This makes them visible again in the frontend and adds the ability to trigger them. In addition there are two types of health checks: The "normal" ones, now called "light checks", that are run on startup, and more intense checks run only on request.

As a change to version 1.x, health checks will no longer be persisted for repositories.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-04-21 10:09:23 +02:00
Eduard Heimbuch
73c1609d92 Add flag to global config to enable/disable api keys as additional authentication method (#1606)
Add flag to global config to enable/disable API keys as additional authentication method.

Fixes #1599
2021-03-25 12:06:22 +01:00
Konstantin Schaper
48e9986f5a fix unit tests broken after react-query upgrade 2021-03-16 17:33:40 +01:00
Sebastian Sdorra
9ef076fb2f Fix missing redirect after login (#1592)
Each unauthorized error was caught by the token expired handler, which has reset the whole query state and this leads sometimes to a missing redirect after login.
2021-03-16 16:13:43 +01:00
Sebastian Sdorra
ce0e94098e Fix navigate to detail after search (#1589)
Sometimes fails the navigation to a detail page after search.
This happens because of the OverviewPageActions which pushes the value of the filter to history.
This happens on change and on render, which could lead to a navigation back to the overview even after a click on an item in the overview.
2021-03-16 11:41:38 +01:00
Sebastian Sdorra
9b254b4a8d Fix diff for mercurial and subversion (#1588)
The useDiff hook appends the query param for the limit always with a question mark, even if the link has already query parameters.
Now we check if the url has an question mark and then we use an ampersand instead if the question mark to append the limit.
2021-03-16 09:11:19 +01:00
René Pfeuffer
84c8e02bf1 Feature Partial Diff (#1581)
With this pull request, diffs for Git are loaded in chunks. This means, that for diffs with a lot of files only a part of them are loaded. In the UI a button will be displayed to load more. In the REST API, the number of files can be specified. This only works for diffs, that are delivered as "parsed" diffs. Currently, this is only available for Git.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-03-12 13:52:17 +01:00
Konstantin Schaper
e66553705f Create api for markdown ast plugins (#1578)
Currently we only have the option to adjust rendering of the markdown output, but no option to change the generated ast tree before rendering takes place (i.e. to adjust the structure like when replacing text with links). This PR adds a new api to create ast plugins that can be integrated with the markdown view component. This is intended to be backwards-compatible and work independently from the underlying implementation.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-03-11 10:28:18 +01:00
Eduard Heimbuch
861e1d34ca Fix endless running test (#1572)
Fix endless running ui tests.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-03-05 10:10:02 +01:00
Sebastian Sdorra
89548d45bd Filepath search (#1568)
Add search for files to the sources view. The search is only for finding file paths. It does not search any file metadata nor the content. Results get a rating, where file names are rated higher than file paths. The results are sorted by the score and the first 50 results are displayed.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-03-04 10:39:58 +01:00
Sebastian Sdorra
4ec01ff4d1 Fix endless loading spinner for sources of empty repositories (#1565) 2021-03-03 11:00:26 +01:00
Eduard Heimbuch
2a425af205 Fix redirect after logout 2021-03-02 13:59:07 +01:00
René Pfeuffer
0695ca3bac Add import protocol (#1558)
Adds a protocol for repository imports (either from an URL, a dump file or a SCM-Manager repository archive).
This protocol documents single steps of an import, the time and the user and is accessible via a dedicated REST
endpoint or a simple ui.

The id of the log is added to the repository imported event, so that plugins like the landingpage or mail can link to these logs.
2021-02-26 13:52:29 +01:00
Eduard Heimbuch
db2ce98721 Feature/import export encryption (#1533)
Add option to encrypt repository exports with a password and add possibility to decrypt them on repository import. Also make the repository export asynchronous. This implies that the repository export will be created on the server and can be downloaded multiple times. The repository export will be deleted automatically 10 days after creation.
2021-02-25 13:01:03 +01:00
Sebastian Sdorra
367d7294b8 Enable refetch on focus (#1559)
During the integration of react-query we had to disable the refetch on focus option, because it has cleared our input fields on refocusing the browser tab. This problem comes mostly from a wrong use of routes. Often routes were used with the component prop and a anonymous function e.g.:

```jsx
<Route path="/my/route" component={() => <AwesomeComponent />} />
```

This triggers not only rerendering but remounting of the route component every time the parent is rerendered. With the ongoing work on the migration from redux to react-query, we have removed the usage of routes with component functions. So we can now safely enable the option refetch on mount of react-query.
2021-02-25 08:30:23 +01:00
Konstantin Schaper
3a8d031ed5 Introduce stale while revalidate pattern (#1555)
This Improves the frontend performance with stale while
revalidate pattern.

There are noticeable performance problems in the frontend that
needed addressing. While implementing the stale-while-revalidate
pattern to display cached responses while re-fetching up-to-date
data in the background, in the same vein we used the opportunity
to remove legacy code involving redux as much as possible,
cleaned up many components and converted them to functional
react components.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-02-24 08:17:40 +01:00