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
c5e98d69
Commit
c5e98d69
authored
Sep 05, 2019
by
Giorgenes Gelatti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds tracking to registry UI
Add hooks to UI to track user events related to package
parent
97d0bf88
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
app/assets/javascripts/registry/components/collapsible_container.vue
...javascripts/registry/components/collapsible_container.vue
+2
-0
app/assets/javascripts/registry/components/table_registry.vue
...assets/javascripts/registry/components/table_registry.vue
+4
-0
spec/controllers/projects/registry/repositories_controller_spec.rb
...rollers/projects/registry/repositories_controller_spec.rb
+2
-0
spec/controllers/projects/registry/tags_controller_spec.rb
spec/controllers/projects/registry/tags_controller_spec.rb
+4
-2
No files found.
app/assets/javascripts/registry/components/collapsible_container.vue
View file @
c5e98d69
...
...
@@ -85,6 +85,8 @@ export default {
v-gl-modal=
"modalId"
:title=
"s__('ContainerRegistry|Remove repository')"
:aria-label=
"s__('ContainerRegistry|Remove repository')"
data-track-event=
"click_button"
data-track-label=
"registry_repository_delete"
class=
"js-remove-repo btn-inverted"
variant=
"danger"
>
...
...
app/assets/javascripts/registry/components/table_registry.vue
View file @
c5e98d69
...
...
@@ -192,6 +192,8 @@ export default {
v-gl-modal=
"modalId"
:disabled=
"!itemsToBeDeleted || itemsToBeDeleted.length === 0"
class=
"js-delete-registry float-right"
data-track-event=
"click_button"
data-track-label=
"bulk_registry_tag_delete"
variant=
"danger"
:title=
"s__('ContainerRegistry|Remove selected tags')"
:aria-label=
"s__('ContainerRegistry|Remove selected tags')"
...
...
@@ -246,6 +248,8 @@ export default {
v-gl-modal=
"modalId"
:title=
"s__('ContainerRegistry|Remove tag')"
:aria-label=
"s__('ContainerRegistry|Remove tag')"
data-track-event=
"click_button"
data-track-label=
"registry_tag_delete"
variant=
"danger"
class=
"js-delete-registry-row float-right btn-inverted btn-border-color btn-icon"
@
click=
"deleteSingleItem(index)"
...
...
spec/controllers/projects/registry/repositories_controller_spec.rb
View file @
c5e98d69
...
...
@@ -42,6 +42,7 @@ describe Projects::Registry::RepositoriesController do
it
'tracks the event'
do
expect
(
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
anything
,
'list_repositories'
,
{})
go_to_index
end
...
...
@@ -97,6 +98,7 @@ describe Projects::Registry::RepositoriesController do
expect
(
DeleteContainerRepositoryWorker
).
to
receive
(
:perform_async
).
with
(
user
.
id
,
repository
.
id
)
delete_repository
(
repository
)
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
end
...
...
spec/controllers/projects/registry/tags_controller_spec.rb
View file @
c5e98d69
...
...
@@ -41,6 +41,7 @@ describe Projects::Registry::TagsController do
it
'tracks the event'
do
expect
(
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
anything
,
'list_tags'
,
{})
get_tags
end
end
...
...
@@ -107,8 +108,9 @@ describe Projects::Registry::TagsController do
end
it
'tracks the event'
do
allow_any_instance_of
(
ContainerRegistry
::
Tag
).
to
receive
(
:delete
)
{
true
}
expect
(
Gitlab
::
Tracking
).
to
receive
(
:event
).
with
(
anything
,
'delete_tag'
,
{})
expect_delete_tags
(
%w[test.]
)
expect
(
controller
).
to
receive
(
:track_event
).
with
(
:delete_tag
)
destroy_tag
(
'test.'
)
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