Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e91d3e5c
Commit
e91d3e5c
authored
Jan 18, 2021
by
Nicolò Maria Mezzopera
Committed by
Dmytro Zaporozhets (DZ)
Jan 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new setting page for packages and registries
- controller - view file - group routes
parent
6a0199bd
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
143 additions
and
1 deletion
+143
-1
app/assets/javascripts/packages_and_registries/settings/group/bundle.js
...ascripts/packages_and_registries/settings/group/bundle.js
+20
-0
app/assets/javascripts/packages_and_registries/settings/group/components/group_settings_app.vue
...gistries/settings/group/components/group_settings_app.vue
+9
-0
app/assets/javascripts/packages_and_registries/settings/group/graphql/index.js
...s/packages_and_registries/settings/group/graphql/index.js
+14
-0
app/assets/javascripts/pages/groups/settings/packages_and_registries/index.js
...ts/pages/groups/settings/packages_and_registries/index.js
+3
-0
app/controllers/groups/settings/packages_and_registries_controller.rb
...ers/groups/settings/packages_and_registries_controller.rb
+14
-0
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+1
-0
app/views/groups/settings/packages_and_registries/index.html.haml
...s/groups/settings/packages_and_registries/index.html.haml
+5
-0
app/views/layouts/nav/sidebar/_group.html.haml
app/views/layouts/nav/sidebar/_group.html.haml
+7
-1
config/feature_flags/development/packages_and_registries_group_settings.yml
...gs/development/packages_and_registries_group_settings.yml
+8
-0
config/routes/group.rb
config/routes/group.rb
+2
-0
spec/features/groups/settings/packages_and_registries_spec.rb
.../features/groups/settings/packages_and_registries_spec.rb
+59
-0
spec/support/shared_contexts/navbar_structure_context.rb
spec/support/shared_contexts/navbar_structure_context.rb
+1
-0
No files found.
app/assets/javascripts/packages_and_registries/settings/group/bundle.js
0 → 100644
View file @
e91d3e5c
import
Vue
from
'
vue
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
SettingsApp
from
'
./components/group_settings_app.vue
'
;
import
{
apolloProvider
}
from
'
./graphql
'
;
Vue
.
use
(
Translate
);
export
default
()
=>
{
const
el
=
document
.
getElementById
(
'
js-packages-and-registries-settings
'
);
if
(
!
el
)
{
return
null
;
}
return
new
Vue
({
el
,
apolloProvider
,
render
(
createElement
)
{
return
createElement
(
SettingsApp
);
},
});
};
app/assets/javascripts/packages_and_registries/settings/group/components/group_settings_app.vue
0 → 100644
View file @
e91d3e5c
<
script
>
export
default
{
name
:
'
GroupSettingsApp
'
,
};
</
script
>
<
template
>
<section></section>
</
template
>
app/assets/javascripts/packages_and_registries/settings/group/graphql/index.js
0 → 100644
View file @
e91d3e5c
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
Vue
.
use
(
VueApollo
);
export
const
apolloProvider
=
new
VueApollo
({
defaultClient
:
createDefaultClient
(
{},
{
assumeImmutableResults
:
true
,
},
),
});
app/assets/javascripts/pages/groups/settings/packages_and_registries/index.js
0 → 100644
View file @
e91d3e5c
import
bundle
from
'
~/packages_and_registries/settings/group/bundle
'
;
bundle
();
app/controllers/groups/settings/packages_and_registries_controller.rb
0 → 100644
View file @
e91d3e5c
# frozen_string_literal: true
module
Groups
module
Settings
class
PackagesAndRegistriesController
<
Groups
::
ApplicationController
before_action
:authorize_admin_group!
feature_category
:package_registry
def
index
end
end
end
end
app/helpers/groups_helper.rb
View file @
e91d3e5c
...
...
@@ -22,6 +22,7 @@ module GroupsHelper
ldap_group_links#index
hooks#index
pipeline_quota#index
packages_and_registries#index
]
end
...
...
app/views/groups/settings/packages_and_registries/index.html.haml
0 → 100644
View file @
e91d3e5c
-
breadcrumb_title
_
(
'Packages & Registries'
)
-
page_title
_
(
'Packages & Registries'
)
-
@content_class
=
'limit-container-width'
unless
fluid_layout
%section
#js-packages-and-registries-settings
app/views/layouts/nav/sidebar/_group.html.haml
View file @
e91d3e5c
...
...
@@ -150,7 +150,7 @@
=
sprite_icon
(
'settings'
)
%span
.nav-item-name.qa-group-settings-item
=
_
(
'Settings'
)
%ul
.sidebar-sub-level-items.qa-group-sidebar-submenu
%ul
.sidebar-sub-level-items.qa-group-sidebar-submenu
{
data:
{
testid:
'group-settings-menu'
}
}
=
nav_link
(
path:
%w[groups#projects groups#edit badges#index ci_cd#show]
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
edit_group_path
(
@group
)
do
%strong
.fly-out-top-item-name
...
...
@@ -181,6 +181,12 @@
%span
=
_
(
'CI / CD'
)
-
if
Feature
.
enabled?
(
:packages_and_registries_group_settings
,
@group
)
=
nav_link
(
controller: :packages_and_registries
)
do
=
link_to
group_settings_packages_and_registries_path
(
@group
),
title:
_
(
'Packages & Registries'
)
do
%span
=
_
(
'Packages & Registries'
)
=
render_if_exists
"groups/ee/settings_nav"
=
render_if_exists
"groups/ee/administration_nav"
...
...
config/feature_flags/development/packages_and_registries_group_settings.yml
0 → 100644
View file @
e91d3e5c
---
name
:
packages_and_registries_group_settings
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51460
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/297371
milestone
:
'
13.8'
type
:
development
group
:
group::package
default_enabled
:
false
config/routes/group.rb
View file @
e91d3e5c
...
...
@@ -49,6 +49,8 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
post
:reset
end
end
resources
:packages_and_registries
,
only:
[
:index
]
end
resource
:variables
,
only:
[
:show
,
:update
]
...
...
spec/features/groups/settings/packages_and_registries_spec.rb
0 → 100644
View file @
e91d3e5c
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'Group Packages & Registries settings'
do
include
WaitForRequests
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
before
do
group
.
add_owner
(
user
)
sign_in
(
user
)
end
context
'when the feature flag is off'
do
before
do
stub_feature_flags
(
packages_and_registries_group_settings:
false
)
end
it
'the menu item is not visible'
do
visit
group_path
(
group
)
settings_menu
=
find_settings_menu
expect
(
settings_menu
).
not_to
have_content
'Packages & Registries'
end
end
context
'when the feature flag is on'
do
it
'the menu item is visible'
do
visit
group_path
(
group
)
settings_menu
=
find_settings_menu
expect
(
settings_menu
).
to
have_content
'Packages & Registries'
end
it
'has a page title set'
do
visit_settings_page
expect
(
page
).
to
have_title
_
(
'Packages & Registries'
)
end
it
'sidebar menu is open'
do
visit_settings_page
sidebar
=
find
(
'.nav-sidebar'
)
expect
(
sidebar
).
to
have_link
_
(
'Packages & Registries'
)
end
end
def
find_settings_menu
find
(
'ul[data-testid="group-settings-menu"]'
)
end
def
visit_settings_page
visit
group_settings_packages_and_registries_path
(
group
)
end
end
spec/support/shared_contexts/navbar_structure_context.rb
View file @
e91d3e5c
...
...
@@ -137,6 +137,7 @@ RSpec.shared_context 'group navbar structure' do
_
(
'Projects'
),
_
(
'Repository'
),
_
(
'CI / CD'
),
_
(
'Packages & Registries'
),
_
(
'Webhooks'
)
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment