Commit 8e7bd802 authored by Nick Kipling's avatar Nick Kipling

Update container registry explorer feature check

Add project and group into feature flag check
Check that explorer is active in js first
parent ba2ff63b
......@@ -3,7 +3,11 @@ import registryExplorer from '~/registry/explorer/index';
document.addEventListener('DOMContentLoaded', () => {
initRegistryImages();
const { attachMainComponent, attachBreadcrumb } = registryExplorer();
attachBreadcrumb();
attachMainComponent();
const explorer = registryExplorer();
if (explorer) {
explorer.attachBreadcrumb();
explorer.attachMainComponent();
}
});
......@@ -4,7 +4,7 @@
%section
.row.registry-placeholder.prepend-bottom-10
.col-12
- if Feature.enabled?(:vue_container_registry_explorer)
- if Feature.enabled?(:vue_container_registry_explorer, @group)
#js-container-registry{ data: { endpoint: group_container_registries_path(@group),
"help_page_path" => help_page_path('user/packages/container_registry/index'),
"two_factor_auth_help_link" => help_page_path('user/profile/account/two_factor_authentication'),
......
......@@ -4,7 +4,7 @@
%section
.row.registry-placeholder.prepend-bottom-10
.col-12
- if Feature.enabled?(:vue_container_registry_explorer)
- if Feature.enabled?(:vue_container_registry_explorer, @project)
#js-container-registry{ data: { endpoint: project_container_registry_index_path(@project),
project_path: @project.full_path,
"help_page_path" => help_page_path('user/packages/container_registry/index'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment