Commit Graph

91 Commits

Author SHA1 Message Date
Florian Scholdei
72886bd204 Save collapse status of secondary navigation
Pushed-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Co-authored-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Co-authored-by: Konstantin Schaper<konstantin.schaper@cloudogu.com>
Committed-by: Florian Scholdei<florian.scholdei@cloudogu.com>
2023-12-12 09:18:50 +01:00
Thomas Zerr
123fc4c3d1 Invalidation of caches and search index
In the general admin settings, the user can find two button to either invalidate the cache or rebuild the search index.&#10;&#10;The endpoints are defined in the InvalidationResource class in scm-webapp.

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-11-02 10:51:32 +01:00
Konstantin Schaper
848b13f957 Implement context-based local storage
This allows re-rendering of useLocalStorage hooks whenever the value for the associated key changes. In the previous implementation, reading and writing via useLocalStorage did not cause a re-render and was therefore impossible.
2023-10-25 18:14:50 +02:00
Eduard Heimbuch
2efcbfa759 Improve repository overview
- Sort repositories alphanumerically case insensitive per namespace
- Make the namespaces collapsible and store the collapsed state in local storage

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-08-22 19:59:53 +02:00
Eduard Heimbuch
c1d7230fbd Add "enable file search" flag on global config.
Make the repository file search deactivatable
via the global config. This feature could
overwhelm the server on repositories with
millions of file therefore it now can be turned off.

Committed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-07-06 08:47:51 +02:00
Eduard Heimbuch
bc2a599b2c Introduce new combobox and make it work with chip input
We introduced a new accessible combobox component. This component is based on headless ui and made compatible with our components and forms. Also we replaced the outdated `Autocomplete` component with the new combobox.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>

Reviewed-by: Florian Scholdei <florian.scholdei@cloudogu.com>
2023-06-19 13:04:26 +02:00
Konstantin Schaper
01bff1ce95 Fix race condition with plugin bundles
There may be a race condition when loading plugin bundles with lazy dependencies:

The OpenAPI plugin depends on "redux" and "react-redux", which are bundled in the lazy "ui-legacy" module, as the usage of redux is deprecated in the scmm. The "ui-legacy" module also binds a global wrapper extension point around the whole app. Due to a bug in the plugin loader, plugin bundles were marked as successfully loaded even if a lazy dependency hadn't successfully loaded yet. This caused the extension point from the "ui-legacy" bundle to be bound after the initial render. As the process of extension point binding  doesn't trigger a re-render, the redux provider was not wrapped around the app on initial load. When the user now moved focus out of and back into the window, react-query hooks automatically refetched e.g. the index links, which caused a re-render. Now with the bound extension point applied. This caused the whole app to be unmounted and re-mounted, which in turn reset all form fields anywhere below in the tree.

Also fixes a bug where the global notifications component was executing a state update while already unmounted.

Also fixes a bug in the user creation form where an object literal was passed to the form's default values which caused a form reset whenever the component re-rendered.

Committed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-05-15 17:34:50 +02:00
Konstantin Schaper
b53f8bcf12 Improve diverse form features
- General responsiveness
- Resize select component
- Fix datepicker for dark themes
- Make success notification configurable

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>

Reviewed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-04-03 10:02:17 +02:00
Konstantin Schaper
d257c8616c Display images in diffs
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-03-22 11:17:22 +01:00
Rene Pfeuffer
e1b107849e Permission Overview
Adds an overview of the permissions of a user including its groups. To do so, a new cache is introduced that stores the groups of a user, when the user is authenticated. In doing so, SCM-Manager can also list groups assigned by external authentication plugins such as LDAP. On the other hand, the user has to have been logged in at least once to get external groups, and even then the cached groups may be out of date when the overview is created. Internal groups will always be added correctly, nonetheless.

Due to the cache, another problem arised: On some logins, the xml dao for the cache failed to be read, because it was read and written at the same time. To fix this, a more thorough synchronization of the stores has been implemented.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-02-09 10:29:05 +01:00
Eduard Heimbuch
ac419daa3f Add ConfigurationAdapterBase and extension points for trash bin
Adds the new abstract class ConfigurationAdapterBase to simplify the creation of global configuration views. In addition there is some cleanup, interfaces and extension points for the repository trash bin plugin.

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-01-13 13:08:51 +01:00
Rene Pfeuffer
f2f2f29791 Render images from repository correctly
This adds a markdown renderer for images, so that images
that are referenced by their repository path are resolved
correctly. In this case, the content rest endpoint is
rendered as source url. For this, two new contexts
(RepositoryContext and RepositoryRevisionContext)
have been added, that make the repository and the
current revision available, so that the content url can
be resolved properly. These new contexts may be used
by plugins like the scm-readme-plugin.

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

Reviewed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-12-19 10:12:01 +01:00
Rene Pfeuffer
6ba792e5bc Adds a new extension point repository.overview.listOptions that can be used to set the page size, whether to list archived repositories or not and potentially other options for the repository overview. If no extension is bound, the default values will be used.
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-12-15 11:16:01 +01:00
Konstantin Schaper
7b933c6821 Improve plugin center error feedback and cache invalidation (#2147)
The plugin center cache was not invalidated when the proxy configuration was changed in the global settings. This caused stale and inconsistent state to be displayed to the user while there was no feedback that something was wrong.
2022-11-04 11:49:08 +01:00
Konstantin Schaper
74702591ed Revert "Add feedback form (#1967)"
This reverts commit 4407dc6d8a.

# Conflicts:
#	scm-ui/ui-api/src/config.ts
#	scm-ui/ui-api/src/index.ts
#	scm-ui/ui-webapp/public/locales/en/commons.json
#	scm-ui/ui-webapp/src/containers/App.tsx
#	scm-ui/ui-webapp/src/containers/Feedback.tsx
2022-09-27 10:27:08 +02:00
Konstantin Schaper
af9aaec095 Add keyboard shortcut for global search (#2118)
Enable users to jump to the global search bar by pressing the "/" key from anywhere. Open modals block this shortcut. This PR also introduces a generic system for declaring global shortcuts by utilizing the third-party library mousetrap.
2022-09-15 14:16:22 +02:00
Matthias Thieroff
54b7b96ac8 Fix encoding in global search (#2116)
Using plus symbol in global search led to a space in the query parameter of the URL. We now encode the query string properly in global search and additionally fixed the expert search documentation.
2022-09-14 08:05:31 +02:00
Konstantin Schaper
61676c6dd4 Handle missing encoding of square brackets in filenames (#2117)
Due to unexpected and largely unchangeable behavior by both react-router and the browser, square brackets are not correctly encoded in the url when clicking a file link in the source view where the filename contains either of these characters. The source view then tries to use the useSources hook to get the file content but fails, because the path param for the file path it gets from the url has unencoded square brackets in them which are illegal in urls except for declaring IPv6 addresses. We have created a catch for exactly this scenario at the latest possible point before the actual http request is fired, which is in the useSources hook. It seems like the square brackets are the only affected special characters so we force encoding on them specifically. Only the path portion of the URL is checked so the host portion of the url may still contain unencoded square brackets which are left untouched.
2022-09-09 08:19:04 +02:00
Eduard Heimbuch
9ea76073b2 Show warning for search requests without valid search context (#2114) 2022-09-06 18:24:34 +02:00
Konstantin Schaper
56ace2811b Implement reindex mechanism for search (#2104)
Adds a new button to repository settings to allow users to manually delete and re-create search indices. The actual re-indexing is happening in plugins that subscribe to the newly created event.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-08-17 13:22:34 +02:00
Eduard Heimbuch
550ebefd93 Context sensitive search (#2102)
Extend global search to search context-sensitive in repositories and namespaces.
2022-08-04 12:14:46 +02:00
Konstantin Schaper
27dbcbf28d Integrate tailwind css and create new button library (#2098)
Introduce tailwind as new frontend styling library to replace bulma in the longer run. Also create the first new ui library `ui-buttons` which will be the new standard for buttons ins SCM-Manager. In this library we reconsidered which types of buttons should be used to create a clean and consistent ui.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-08-02 08:39:37 +02:00
Konstantin Schaper
84f220e5b2 Replace lerna with turborepo (#2073)
This change allows our ui libraries to be built separately. It is therefore to utilize different build tools for individual projects, as well as using build caches for the local build.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2022-06-22 11:49:26 +02:00
Florian Scholdei
d1c355b213 Calling search results without parameters (#2056)
Calling search results without parameters leads to "Cannot read properties of undefined (reading 'length')" error. It does not matter which search mask is called.
2022-06-08 13:43:45 +02:00
Konstantin Schaper
1b18191c57 Add plugin wizard initialization step (#2045)
Adds a new initialization step after setting up the initial administration account that allows administrators to initialize the instance with a selection of plugin sets.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2022-05-31 15:15:30 +02:00
Matthias Thieroff
a0737a2c90 Fix freezing browser if syntax highlighting large files (#2010)
We unified syntax highlighting and extracted it into a low level module. Syntax highlighting from now on takes place in a web worker, so that the user interface stays responsive. The web worker stops automatically if the number of nodes which should be highlighted exceeds the defined limit we believe the browser can handle.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-04-25 16:34:40 +02:00
Eduard Heimbuch
c8207d89da Fix routing for entity names with parenthesis (#1998)
If entities like users, groups or repository namespaces contains parenthesis the frontend router gets confused and doesn't work properly. To fix this issue we escape the chars in the url which may cause such problems because they are reserved by the http url schema.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Florian Scholdei <florian.scholdei@cloudogu.com>
2022-04-13 13:06:02 +02:00
René Pfeuffer
4bba593714 Remove plugin center login without url (#1978)
This removes the "login" button for the plugin center, when the authentication url is not set.
2022-03-21 08:21:36 +01:00
Eduard Heimbuch
8cafb9e38f Branch details invalidation (#1973)
Fix branch details invalidation
2022-03-14 09:46:11 +01:00
Eduard Heimbuch
4407dc6d8a Add feedback form (#1967)
Add feedback button and form. This feedback form can be used to provide direct feedback to the SCM-Manager Team.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2022-03-10 09:39:17 +01:00
Phil-Ah
390384b723 Fix escape character for search syntax (#1972)
Replace escaped characters to display automatically escaped characters in search syntax and examples.
2022-03-08 16:41:11 +01:00
Eduard Heimbuch
151c7bf772 Fix frontend tests and story shots after code splitting was enabled 2022-03-02 09:27:55 +01:00
Eduard Heimbuch
b85dc8f0e6 Split frontend code by routes (#1955)
Split large frontend components into own bundles. This way we decrease loading times and load the bundles right as they are used. We replace SystemJS with our own implementation to load the lazy modules right as there are required.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2022-02-18 14:47:37 +01:00
Matthias Thieroff
44f0046f25 Collapse folders with only one child folder (#1951)
Collapses a folder in code view which only has another folder as its only child. This lets you access a sub-folder which has content directly instead of navigating down the folder tree by clicking every folder separately.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2022-02-15 10:59:32 +01:00
Sebastian Sdorra
dff5d3aa5b Do not fail on error 502 during restart actions (#1941)
In some rare cases a reverse proxy stops forwarding traffic to scm,
before the response is returned to scm.
In such a case the reverse proxy returns 502 (bad gateway),
so we treat 502 not as error for restart actions.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2022-02-02 10:02:46 +01:00
Sebastian Sdorra
c74e9984f6 Handle Plugin Center Authentication failures (#1940)
If the plugin center authentication fails,
the plugins are fetched without authentication
and a warning is displayed on the plugin page.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-01-31 15:41:12 +01:00
Eduard Heimbuch
49844d1595 Compare branches, tags and revisions (#1920)
Add branch/tag/revision compare to see diffs and changesets between the source and target revisions. This feature is reachable from the branch/tag detail page and also the source code view.

Co-authored-by: Florian Scholdei <florian.scholdei@cloudogu.com>
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2022-01-20 11:00:49 +01:00
Eduard Heimbuch
63ec4e6172 Add security notifications to inform about vulnerabilities (#1924)
Add security notifications in SCM-Manager to inform running instances about known security issues. These alerts can be core or plugin specific and will be shown to every user in the header.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
Co-authored-by: Philipp Ahrendt <philipp.ahrendt@cloudogu.com>
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2022-01-19 11:58:55 +01:00
René Pfeuffer
f2a1effc77 Sorted autocomplete (#1918)
Users, groups, repositories and repository roles have been sorted in the rest layer by default if no other sort option was given. In the layers "below" (aka the manager classes or the dao), the collections have been unsorted. This led to the effect, that the autocomplete resource, which did not sort all values beforehand, returned unsorted results. As a sideeffect, direct matches for an input could occur at a random position or not at all (as reported in #1695), when there were enough other matches.

With this pull request the databases for users, groups, repositories and repository roles will use instances of TreeMap instead of LinkedHashMap internally, so that these values are sorted implicitly (by id respectively name for users, groups and repository roles and namespace/name for repositories).

Due to this change the default sort applied in the rest layer could be removed.
2022-01-18 09:46:10 +01:00
René Pfeuffer
e9f22e89ec Autocomplete for namespaces (#1916)
Changes the "namespace" input in the repository creation form or the "rename repository" dialog to an
autocomplete input. Of course this is only available for the "custom" namespace strategy.
2022-01-11 16:17:57 +01:00
René Pfeuffer
1118ddd146 Ahead/behind in branch details (#1893)
Adds the ahead/behind count to the branch details view.
2021-12-15 15:03:40 +01:00
Sebastian Sdorra
e2d63cc2a1 Use more accurate language detection for syntax highlighting (#1891)
Updated spotter to version 4 in order to get prism syntax mode for detected coding languages.
Expose syntax modes of coding languages as headers on content endpoint and as fields on diff dto.
Remove leading line break on search result fragments.
Use mark instead of span or strong for highlighted search results.
Add option to use syntax highlighting in TextHitField component.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2021-12-13 17:03:08 +01:00
Sebastian Sdorra
6eba01161f Integrate Plugin Center myCloudogu Authentication (#1884)
Allows scm-manager instances to authenticate with the configured plugin center. If the default plugin center is used, a myCloudogu account is used for authentication which in turn enables downloading special myCloudogu plugins directly through the plugin administration page.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: Matthias Thieroff <93515444+mthieroff@users.noreply.github.com>
Co-authored-by: Philipp Ahrendt <philipp.ahrendt@cloudogu.com>
2021-12-13 15:15:57 +01:00
Eduard Heimbuch
b8d6c219ee Add extension point to branches overview (#1888)
Prepare branches overview to show additional branch details.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-12-10 11:04:59 +01:00
Eduard Heimbuch
289175331f Fix es lint errors and warnings and enforce es lint as build breaker. (#1878)
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-12-09 09:12:02 +01:00
Eduard Heimbuch
4aee350c02 Fix undefined check on branches details query hook 2021-12-02 14:21:46 +01:00
Eduard Heimbuch
9cc134f5a8 Feature/branch details (#1876)
Enrich branch overview with more details like last committer and ahead/behind commits. Since calculating this information is pretty intense, we request it in chunks to prevent very long loading times. Also we cache the results in frontend and backend.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-12-01 14:19:18 +01:00
Konstantin Schaper
9fc10c0bdb implement hook & fix build (#1877) 2021-11-30 09:49:16 +01:00
Konstantin Schaper
542a5aac59 upgrade query-string dependency version (#1875)
* upgrade query-string dependency version

* fix typings and implementation for getQueryStringFromLocation
2021-11-29 11:21:45 +01:00
Sebastian Sdorra
2938074e1a Update to webpack v5 (#1848)
Update webpack in the following components to version 5:

ui-styles (StyleGuide)
ui-components (Storybook)
ui-scripts (gradle run/build)
This change will also fix a circular dependency between ui-api and ui-components.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-11-10 10:10:17 +01:00