Skip to content

web: Conditionally remove enable/disable from repo list

Warren Gifford requested to merge core/ui-repository-list into master

Created by: keegancsmith

If an instance has any repositories which are managed by the old syncer, we allow the enable actions and filters. To support this use case we add a temporary internal graphql query. It is grouped under a new field called internal in the hopes that future needs such as this also use this type.

There is a corner case. If an instance has both new syncer and old syncer repos, we allow the actions on the new syncer repos. The behaviour in this case is:

Enable: never shown. Already enabled if in list.

Disable: works. We support this use case for a customer who directly uses the graphql API.

Enable all: noop. Already enabled if in list.

Disable all: noop. We haven't implemented batch disabling. This would be surprising behaviour. However, the engineering effort to support this rare use case isn't worth it for the single milestone we will have this case.

Test plan: Loaded page in two cases: new syncer only repositories and old syncer repositories. The old syncer repositories the page was the same. In the case of new syncer only it looked like this:

screencapture-localhost-3080-site-admin-repositories-2019-04-12-13_03_33

Part #2025 (closed)

Merge request reports

Loading