Commit Graph

3079 Commits

Author SHA1 Message Date
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
Eduard Heimbuch
89e938c6d7 Encode revision for extension point to fix breaking change (#1585)
Encode revision on extension points to fix a breaking change which slipped through with release 2.14.0.
2021-03-16 08:39:31 +01:00
CES Marvin
ddac6b1e50 Prepare for next development iteration 2021-03-12 13:43:05 +00:00
CES Marvin
6b90e3efe4 Release version 2.15.0 2021-03-12 13:07:53 +00: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
Florian Scholdei
692c71c192 Small typo 2021-03-06 14:26:18 +01:00
Sebastian Sdorra
cff00b363d Upgrade to react 17.0.1 (#1570)
* Upgrade react to 17.0.1

* Remove unused dependencies

* Use version 17.0.1 of react-test-renderer

* Use fixed react type for core plugins

* Fix enzyme on react 17
2021-03-05 15:09:35 +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
Florian Scholdei
bafe84b79a Fix wrapping of title and actions in source view (#1569)
The title of a file and the action buttons had to share the space. Now the title takes it needs and the actions move down if necessary. This behavior is similar to the list of files in changeset view (content component).
2021-03-04 09:54:08 +01:00
CES Marvin
087c7f3712 Prepare for next development iteration 2021-03-03 15:16:52 +00:00
CES Marvin
396789efa4 Release version 2.14.1 2021-03-03 14:21:12 +00:00
Sebastian Sdorra
0072808c7d Upgrade react-markdown to prevent xss from stored markdown (#1567)
Prevent XSS attacks from stored markdown, by updating react-markdown to v5 which sanitizes html.
2021-03-03 15:06:34 +01:00
Sebastian Sdorra
4ec01ff4d1 Fix endless loading spinner for sources of empty repositories (#1565) 2021-03-03 11:00:26 +01:00
Florian Scholdei
8e2c2aaa5e Prevent breadcrumb overflow and shrink large elements (#1563)
- Restore left margin on copy permalink
- Move slash to the right to make it resemble the console
- Shrink large elements
- Add new storyshot
- Fix separation of toggle icon and file title
2021-03-03 10:57:15 +01:00
Florian Scholdei
61814a5027 Clarify that FileUpload component does not upload directly (#1566)
Clarify that FileUpload component does not upload directly:
Changed label from “Upload” to “Select File” and icon from direct to a kind of upload.
2021-03-03 10:01:29 +01:00
Konstantin Schaper
311528fd45 Add permalink button to markdown headings (#1564)
* add permalink button to markdown headings
2021-03-03 09:52:18 +01:00
Eduard Heimbuch
2a425af205 Fix redirect after logout 2021-03-02 13:59:07 +01:00
Eduard Heimbuch
bac8ee246c Add publish config to ui-api package 2021-03-01 14:21:03 +01:00
CES Marvin
fe73d46e08 Prepare for next development iteration 2021-03-01 13:01:50 +00:00
CES Marvin
a25fd7acbb Release version 2.14.0 2021-03-01 12:32:32 +00:00
René Pfeuffer
c3a5dd4ffb Add page for import logs 2021-02-26 11:04:50 +01:00
Eduard Heimbuch
972cfd312b Small improvements on export information 2021-02-25 14:17:08 +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
Eduard Heimbuch
1e1b73ace5 Feature/import navigation lock (#1536)
Use navigation lock on repository import to prevent that the current user accidentally leaves the page and aborts the running import.
2021-02-16 11:35:06 +01:00
Eduard Heimbuch
fa46440960 Fix filter redirect on paginated overview page (#1535)
Fix unnecessary redirect on paginated overview pages which cuts the page number from url.
2021-02-16 08:05:09 +01:00
Eduard Heimbuch
dc06bb799d Change output location for cypress e2e tests to build directory 2021-02-10 09:59:21 +01:00
René Pfeuffer
e0d2630a08 Feature repository specific data migration (#1526)
This adds a new migration mechanism for repository data. Instead of using UpdateSteps for all data migrations, repository data shall from now on be implemented with RepositoryUpdateSteps. The general logic stays the same. Executed updates are stored with the repository. Doing this, we can now execute updates on imported repositories without touching other data. This way we can import repositories even though they were exported with older versions of SCM-Manager or a plugin.
2021-02-10 08:12:48 +01:00
Eduard Heimbuch
ac5d145266 Repository export read-only lock (#1519)
* Lock repository for read-only access only while exporting
* Create read-only check api

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-04 15:29:49 +01:00
CES Marvin
0cd7fdcec5 Prepare for next development iteration 2021-01-29 11:25:23 +00:00
CES Marvin
6e54f19dc9 Release version 2.13.0 2021-01-29 10:04:49 +00:00
Florian Scholdei
57c9484d41 Enrich styleguide with new features, rules and changes
The styleguide for usage of visual elements has not been updated for a long time. In the course of this story it should be adapted to the current standards and rules. In addition, heavy violations were rectified directly.
2021-01-28 12:46:42 +01:00
Eduard Heimbuch
d91c71ace1 Add the repository import and export with metadata for Subversion repositories (#1501)
* Add store exporter to collect the repository metadata
* Add EnvironmentInformationXmlGenerator
* Collect export data and put into compressed tar archive output stream
* Create full repository export endpoint.
* Add full repository export to ui
* Ignore irrelevant files from config store directory
* write metadata stores to file since a baos could teardown the server memory
* Migrate store name for git lfs files (#1504)

Changes the directory name for the git LFS blob store by
removing the repository id from the store name.

This is necessary for im- and exports of lfs blob stores,
because the original name had the repository id as a part
of it and therefore the old store would not be found when
the repository is imported with another id.

Existing blob files will be moved to the new store location
by an update step.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>

* Introduce util for migrations (#1505)

With this util it is more simple to rename
or delete stores.

* Rename files in export

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-28 11:40:35 +01:00
Florian Scholdei
a35c227a55 Repository contact information is editable
The RepositoryForm is called within the creation and editing of a repository. It contains a validator, which is supposed to check, among other things, whether the namespace and name were specified when the repository is created. This information is missing in the edit mode. I therefore initially set valid.namespaceAndName to true. It is changed to false again before the creation mask becomes active.
2021-01-28 11:31:16 +01:00
Konstantin Schaper
94304f96a3 migrate integration tests to bdd (#1497)
Migrates the existing e2e tests towards a cucumber bdd-style and utilizes the integration-test-runner package.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-26 12:58:48 +01:00
Konstantin Schaper
c8b167b4ec refactor table component so that it can be styled by styled-components
Applying styles to table elements like tr or td is currently very cumbersome because they are encapsulated in the Table component itself. We need to apply a word break to table cells so that for example long branch names properly fit into the layout. This PR changes the Table component to allow it to be styled with styled-components.
2021-01-26 10:52:14 +01:00
René Pfeuffer
e7d79835c6 Remove test for old behaviour 2021-01-25 16:18:46 +01:00
René Pfeuffer
6b5781144e Fix storyshots for test ids 2021-01-25 15:43:48 +01:00
Konstantin Schaper
36b4a849e2 Apply test ids to production builds for usage in e2e tests (#1499)
Our e2e tests get executed against production builds and therefore need access to the test-ids. Prior to this change, test-ids were removed in prod builds.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-01-25 12:49:19 +01:00
René Pfeuffer
01fd83fd6b Order proxy settings in frontend (#1502)
Group the single settings for proxies more meaningful.
2021-01-22 14:50:15 +01:00
Florian Scholdei
06161c616d Remove breadcrumb ending slash 2021-01-19 11:31:54 +01:00
Sebastian Sdorra
0ccbc34ccb Use jest-preset version 2.12.4 to fix ui coverage 2021-01-14 12:01:34 +01:00
Sebastian Sdorra
0c66e26c0d Remove unecessary extra sonarqube task from scm-ui 2021-01-14 12:01:34 +01:00
Sebastian Sdorra
18e841b0e8 Start sonarqube integration 2021-01-14 12:01:34 +01:00