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
efaa8bb1
Commit
efaa8bb1
authored
Jan 30, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pick a sugroup to hold the Insights config
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
fbf4d185
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
2 deletions
+56
-2
ee/app/views/groups/_insights.html.haml
ee/app/views/groups/_insights.html.haml
+2
-2
ee/changelogs/unreleased/11268-make-it-able-to-pick-a-project-under-a-subgroup-for-insights-config.yml
...o-pick-a-project-under-a-subgroup-for-insights-config.yml
+5
-0
ee/spec/features/groups/settings/user_configures_insights_spec.rb
...features/groups/settings/user_configures_insights_spec.rb
+49
-0
No files found.
ee/app/views/groups/_insights.html.haml
View file @
efaa8bb1
-
return
unless
@group
.
insights_available?
%section
.settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.
insights-settings.
no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Insights'
)
...
...
@@ -22,5 +22,5 @@
=
_
(
'Select a repository'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/group/index.md'
,
anchor:
'insights-ultimate'
),
target:
'_blank'
=
project_select_tag
(
'group[insight_attributes][project_id]'
,
class:
'project-item-select hidden-filter-value'
,
toggle_class:
'js-project-search js-project-filter js-filter-submit'
,
dropdown_class:
'dropdown-menu-selectable dropdown-menu-project js-filter-submit'
,
placeholder:
_
(
'Search projects'
),
idAttribute:
'id'
,
data:
{
order_by:
'last_activity_at'
,
idattribute:
'id'
,
simple_filter:
true
,
allow_clear:
true
},
value:
insight
.
project_id
)
placeholder:
_
(
'Search projects'
),
idAttribute:
'id'
,
data:
{
order_by:
'last_activity_at'
,
idattribute:
'id'
,
simple_filter:
true
,
allow_clear:
true
,
include_projects_in_subgroups:
true
},
value:
insight
.
project_id
)
=
form
.
submit
_
(
'Save changes'
),
class:
"btn btn-success"
ee/changelogs/unreleased/11268-make-it-able-to-pick-a-project-under-a-subgroup-for-insights-config.yml
0 → 100644
View file @
efaa8bb1
---
title
:
Allow to pick a subgroup to hold the Insights config
merge_request
:
24053
author
:
type
:
added
ee/spec/features/groups/settings/user_configures_insights_spec.rb
0 → 100644
View file @
efaa8bb1
# frozen_string_literal: true
require
'spec_helper'
describe
'Groups > Settings > User configures Insights'
,
:js
do
include
Select2Helper
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
subgroup
)
}
before
do
group
.
add_owner
(
user
)
sign_in
(
user
)
end
context
'without correct license'
do
before
do
stub_licensed_features
(
insights:
false
)
visit
edit_group_path
(
group
)
end
it
'does not show the Insight config'
do
expect
(
page
).
not_to
have_content
'Insights'
end
end
context
'with correct license'
do
before
do
stub_licensed_features
(
insights:
true
)
visit
edit_group_path
(
group
)
end
it
'allows to select a project in a subgroup for the Insights config'
do
expect
(
page
).
to
have_content
'Insights'
page
.
within
'.insights-settings form'
do
select2
(
project
.
id
,
from:
'#group_insight_attributes_project_id'
)
click_button
'Save changes'
expect
(
page
).
to
have_content
(
project
.
full_name
)
end
end
end
end
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