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
703019de
Commit
703019de
authored
Mar 06, 2020
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add group activity analytics skeleton
- Render app with empty container
parent
da570c09
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
0 deletions
+79
-0
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+2
-0
ee/app/assets/javascripts/analytics/group_analytics/components/group_activity_card.vue
...lytics/group_analytics/components/group_activity_card.vue
+15
-0
ee/app/assets/javascripts/analytics/group_analytics/group_analytics_bundle.js
...ripts/analytics/group_analytics/group_analytics_bundle.js
+22
-0
ee/app/assets/javascripts/pages/groups/show/index.js
ee/app/assets/javascripts/pages/groups/show/index.js
+3
-0
ee/app/views/groups/_group_activity_analytics.html.haml
ee/app/views/groups/_group_activity_analytics.html.haml
+2
-0
ee/spec/features/analytics/group_analytics_spec.rb
ee/spec/features/analytics/group_analytics_spec.rb
+35
-0
No files found.
app/views/groups/show.html.haml
View file @
703019de
...
...
@@ -11,6 +11,8 @@
=
render_if_exists
'groups/self_or_ancestor_marked_for_deletion_notice'
,
group:
@group
=
render_if_exists
'groups/group_activity_analytics'
,
group:
@group
.groups-listing
{
data:
{
endpoints:
{
default:
group_children_path
(
@group
,
format: :json
),
shared:
group_shared_projects_path
(
@group
,
format: :json
)
}
}
}
.top-area.group-nav-container.justify-content-between
.scrolling-tabs-container.inner-page-scroll-tabs
...
...
ee/app/assets/javascripts/analytics/group_analytics/components/group_activity_card.vue
0 → 100644
View file @
703019de
<
script
>
export
default
{
name
:
'
GroupActivityCard
'
,
props
:
{
groupFullPath
:
{
type
:
String
,
required
:
true
,
},
},
};
</
script
>
<
template
>
<div></div>
</
template
>
ee/app/assets/javascripts/analytics/group_analytics/group_analytics_bundle.js
0 → 100644
View file @
703019de
import
Vue
from
'
vue
'
;
import
GroupActivityCard
from
'
./components/group_activity_card.vue
'
;
export
default
()
=>
{
const
container
=
document
.
getElementById
(
'
js-group-activity
'
);
if
(
!
container
)
return
;
const
{
groupFullPath
}
=
container
.
dataset
;
// eslint-disable-next-line no-new
new
Vue
({
el
:
container
,
render
(
h
)
{
return
h
(
GroupActivityCard
,
{
props
:
{
groupFullPath
,
},
});
},
});
};
ee/app/assets/javascripts/pages/groups/show/index.js
View file @
703019de
import
initSecurityDashboard
from
'
ee/security_dashboard/index
'
;
import
leaveByUrl
from
'
~/namespaces/leave_by_url
'
;
import
initGroupDetails
from
'
~/pages/groups/shared/group_details
'
;
import
initGroupAnalytics
from
'
ee/analytics/group_analytics/group_analytics_bundle
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
leaveByUrl
(
'
group
'
);
...
...
@@ -10,4 +11,6 @@ document.addEventListener('DOMContentLoaded', () => {
}
else
{
initGroupDetails
();
}
initGroupAnalytics
();
});
ee/app/views/groups/_group_activity_analytics.html.haml
0 → 100644
View file @
703019de
-
return
unless
show_group_activity_analytics?
#js-group-activity
{
data:
{
group_full_path:
@group
.
full_path
}
}
ee/spec/features/analytics/group_analytics_spec.rb
0 → 100644
View file @
703019de
# frozen_string_literal: true
require
'spec_helper'
describe
'GroupAnalytics'
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let
(
:path
)
{
group_path
(
group
)
}
before
do
stub_licensed_features
(
group_activity_analytics:
true
)
sign_in
(
user
)
end
context
'when the feature is enabled'
do
it
'renders the container'
do
visit
path
expect
(
page
).
to
have_css
(
'#js-group-activity'
)
end
end
context
'when the feature is disabled'
do
before
do
stub_feature_flags
(
group_activity_analytics:
false
)
end
it
'does not render the container'
do
visit
path
expect
(
page
).
not_to
have_css
(
'#js-group-activity'
)
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