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
4eaa8143
Commit
4eaa8143
authored
Aug 14, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
d6d0adcb
51f40bf9
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
59 additions
and
26 deletions
+59
-26
app/assets/stylesheets/pages/wiki.scss
app/assets/stylesheets/pages/wiki.scss
+0
-17
app/controllers/projects/cycle_analytics_controller.rb
app/controllers/projects/cycle_analytics_controller.rb
+8
-2
app/views/projects/wikis/_form.html.haml
app/views/projects/wikis/_form.html.haml
+1
-1
app/views/projects/wikis/_new.html.haml
app/views/projects/wikis/_new.html.haml
+1
-1
app/views/projects/wikis/edit.html.haml
app/views/projects/wikis/edit.html.haml
+1
-1
app/views/projects/wikis/git_access.html.haml
app/views/projects/wikis/git_access.html.haml
+1
-1
app/views/projects/wikis/history.html.haml
app/views/projects/wikis/history.html.haml
+1
-1
app/views/projects/wikis/pages.html.haml
app/views/projects/wikis/pages.html.haml
+1
-1
app/views/projects/wikis/show.html.haml
app/views/projects/wikis/show.html.haml
+1
-1
changelogs/unreleased/12502-add-view-stats-to-cycle-analytics.yml
...gs/unreleased/12502-add-view-stats-to-cycle-analytics.yml
+5
-0
changelogs/unreleased/59829-fix-style-lint-wiki.yml
changelogs/unreleased/59829-fix-style-lint-wiki.yml
+5
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
lib/gitlab/usage_data_counters/cycle_analytics_counter.rb
lib/gitlab/usage_data_counters/cycle_analytics_counter.rb
+8
-0
spec/controllers/projects/cycle_analytics_controller_spec.rb
spec/controllers/projects/cycle_analytics_controller_spec.rb
+14
-0
spec/lib/gitlab/usage_data_counters/cycle_analytics_counter_spec.rb
...itlab/usage_data_counters/cycle_analytics_counter_spec.rb
+9
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-0
No files found.
app/assets/stylesheets/pages/wiki.scss
View file @
4eaa8143
.new-wiki-page
{
.new-wiki-page-slug-tip
{
display
:
inline-block
;
max-width
:
100%
;
margin-top
:
5px
;
}
}
.wiki-form
{
.edit-wiki-page-slug-tip
{
display
:
inline-block
;
max-width
:
100%
;
margin-top
:
5px
;
}
}
.title
.edit-wiki-header
{
width
:
780px
;
margin-left
:
auto
;
...
...
@@ -22,7 +6,6 @@
}
.wiki-page-header
{
@extend
.top-area
;
position
:
relative
;
.wiki-breadcrumb
{
...
...
app/controllers/projects/cycle_analytics_controller.rb
View file @
4eaa8143
...
...
@@ -14,8 +14,14 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
@cycle_analytics_no_data
=
@cycle_analytics
.
no_stats?
respond_to
do
|
format
|
format
.
html
format
.
json
{
render
json:
cycle_analytics_json
}
format
.
html
do
Gitlab
::
UsageDataCounters
::
CycleAnalyticsCounter
.
count
(
:views
)
render
:show
end
format
.
json
do
render
json:
cycle_analytics_json
end
end
end
...
...
app/views/projects/wikis/_form.html.haml
View file @
4eaa8143
...
...
@@ -14,7 +14,7 @@
.col-sm-12
=
f
.
text_field
:title
,
class:
'form-control qa-wiki-title-textbox'
,
value:
@page
.
title
-
if
@page
.
persisted?
%span
.
edit-wiki-page-slug-tip
%span
.
d-inline-block.mw-100.prepend-top-5
=
icon
(
'lightbulb-o'
)
=
s_
(
"WikiEditPageTip|Tip: You can move this page by adding the path to the beginning of the title."
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/project/wiki/index'
,
anchor:
'moving-a-wiki-page'
),
target:
'_blank'
...
...
app/views/projects/wikis/_new.html.haml
View file @
4eaa8143
...
...
@@ -11,7 +11,7 @@
=
label_tag
:new_wiki_path
do
%span
=
s_
(
"WikiPage|Page slug"
)
=
text_field_tag
:new_wiki_path
,
nil
,
placeholder:
s_
(
"WikiNewPagePlaceholder|how-to-setup"
),
class:
'form-control'
,
required:
true
,
:'data-wikis-path'
=>
project_wikis_path
(
@project
),
autofocus:
true
%span
.
new-wiki-page-slug-tip
%span
.
d-inline-block.mw-100.prepend-top-5
=
icon
(
'lightbulb-o'
)
=
s_
(
"WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories."
)
.form-actions
...
...
app/views/projects/wikis/edit.html.haml
View file @
4eaa8143
...
...
@@ -5,7 +5,7 @@
=
wiki_page_errors
(
@error
)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.
top-area.
has-sidebar-toggle
%button
.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle
{
role:
"button"
,
type:
"button"
}
=
icon
(
'angle-double-left'
)
...
...
app/views/projects/wikis/git_access.html.haml
View file @
4eaa8143
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
page_title
s_
(
"WikiClone|Git Access"
),
_
(
"Wiki"
)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.
top-area.
has-sidebar-toggle
%button
.btn.btn-default.d-block.d-sm-block.d-md-none.float-right.sidebar-toggle.js-sidebar-wiki-toggle
{
role:
"button"
,
type:
"button"
}
=
icon
(
'angle-double-left'
)
...
...
app/views/projects/wikis/history.html.haml
View file @
4eaa8143
-
page_title
_
(
"History"
),
@page
.
human_title
,
_
(
"Wiki"
)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.
top-area.
has-sidebar-toggle
%button
.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle
{
role:
"button"
,
type:
"button"
}
=
icon
(
'angle-double-left'
)
...
...
app/views/projects/wikis/pages.html.haml
View file @
4eaa8143
...
...
@@ -5,7 +5,7 @@
-
sort_title
=
wiki_sort_title
(
params
[
:sort
])
%div
{
class:
container_class
}
.wiki-page-header
.wiki-page-header
.top-area
.nav-text.flex-fill
%h2
.wiki-page-title
...
...
app/views/projects/wikis/show.html.haml
View file @
4eaa8143
...
...
@@ -4,7 +4,7 @@
-
page_title
@page
.
human_title
,
_
(
"Wiki"
)
-
add_to_breadcrumbs
_
(
"Wiki"
),
project_wiki_path
(
@project
,
:home
)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.
top-area.
has-sidebar-toggle
%button
.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle
{
role:
"button"
,
type:
"button"
}
=
icon
(
'angle-double-left'
)
...
...
changelogs/unreleased/12502-add-view-stats-to-cycle-analytics.yml
0 → 100644
View file @
4eaa8143
---
title
:
Track page views for cycle analytics show page
merge_request
:
31717
author
:
type
:
added
changelogs/unreleased/59829-fix-style-lint-wiki.yml
0 → 100644
View file @
4eaa8143
---
title
:
Fix the style-lint errors and warnings for `app/assets/stylesheets/pages/wiki.scss`
merge_request
:
31656
author
:
type
:
other
lib/gitlab/usage_data.rb
View file @
4eaa8143
...
...
@@ -143,6 +143,7 @@ module Gitlab
Gitlab
::
UsageDataCounters
::
NoteCounter
,
Gitlab
::
UsageDataCounters
::
SnippetCounter
,
Gitlab
::
UsageDataCounters
::
SearchCounter
,
Gitlab
::
UsageDataCounters
::
CycleAnalyticsCounter
,
Gitlab
::
UsageDataCounters
::
SourceCodeCounter
]
end
...
...
lib/gitlab/usage_data_counters/cycle_analytics_counter.rb
0 → 100644
View file @
4eaa8143
# frozen_string_literal: true
module
Gitlab::UsageDataCounters
class
CycleAnalyticsCounter
<
BaseCounter
KNOWN_EVENTS
=
%w[views]
.
freeze
PREFIX
=
'cycle_analytics'
end
end
spec/controllers/projects/cycle_analytics_controller_spec.rb
View file @
4eaa8143
...
...
@@ -11,6 +11,20 @@ describe Projects::CycleAnalyticsController do
project
.
add_maintainer
(
user
)
end
context
"counting page views for 'show'"
do
it
'increases the counter'
do
expect
(
Gitlab
::
UsageDataCounters
::
CycleAnalyticsCounter
).
to
receive
(
:count
).
with
(
:views
)
get
(
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
})
expect
(
response
).
to
be_success
end
end
describe
'cycle analytics not set up flag'
do
context
'with no data'
do
it
'is true'
do
...
...
spec/lib/gitlab/usage_data_counters/cycle_analytics_counter_spec.rb
0 → 100644
View file @
4eaa8143
# frozen_string_literal: true
require
'spec_helper'
describe
Gitlab
::
UsageDataCounters
::
CycleAnalyticsCounter
do
it_behaves_like
'a redis usage counter'
,
'CycleAnalytics'
,
:views
it_behaves_like
'a redis usage counter with totals'
,
:cycle_analytics
,
views:
3
end
spec/lib/gitlab/usage_data_spec.rb
View file @
4eaa8143
...
...
@@ -59,6 +59,7 @@ describe Gitlab::UsageData do
avg_cycle_analytics
influxdb_metrics_enabled
prometheus_metrics_enabled
cycle_analytics_views
)
)
expect
(
subject
).
to
include
(
...
...
@@ -72,6 +73,7 @@ describe Gitlab::UsageData do
web_ide_commits:
a_kind_of
(
Integer
),
web_ide_merge_requests:
a_kind_of
(
Integer
),
navbar_searches:
a_kind_of
(
Integer
),
cycle_analytics_views:
a_kind_of
(
Integer
),
source_code_pushes:
a_kind_of
(
Integer
)
)
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