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
5f9109e5
Commit
5f9109e5
authored
Apr 20, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge conflicts in usage ping
parent
ecd2a8e0
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2 additions
and
94 deletions
+2
-94
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-6
app/models/application_setting.rb
app/models/application_setting.rb
+0
-3
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+0
-8
app/views/admin/cohorts/_usage_ping.html.haml
app/views/admin/cohorts/_usage_ping.html.haml
+0
-4
config/routes/admin.rb
config/routes/admin.rb
+0
-7
db/migrate/20160713222618_add_usage_ping_to_application_settings.rb
.../20160713222618_add_usage_ping_to_application_settings.rb
+0
-3
db/schema.rb
db/schema.rb
+0
-5
doc/user/admin_area/settings/usage_statistics.md
doc/user/admin_area/settings/usage_statistics.md
+0
-7
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+0
-20
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-31
No files found.
app/assets/javascripts/dispatcher.js
View file @
5f9109e5
...
@@ -389,14 +389,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
...
@@ -389,14 +389,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
case
'
admin
'
:
case
'
admin
'
:
new
Admin
();
new
Admin
();
switch
(
path
[
1
])
{
switch
(
path
[
1
])
{
<<<<<<<
HEAD
case
'
application_settings
'
:
case
'
cohorts
'
:
new
gl
.
ApplicationSettings
();
=======
case
'
cohorts
'
:
case
'
cohorts
'
:
new
gl
.
UsagePing
();
new
gl
.
UsagePing
();
>>>>>>>
ce
/
master
break
;
break
;
case
'
groups
'
:
case
'
groups
'
:
new
UsersSelect
();
new
UsersSelect
();
...
...
app/models/application_setting.rb
View file @
5f9109e5
...
@@ -259,7 +259,6 @@ class ApplicationSetting < ActiveRecord::Base
...
@@ -259,7 +259,6 @@ class ApplicationSetting < ActiveRecord::Base
user_default_external:
false
,
user_default_external:
false
,
polling_interval_multiplier:
1
,
polling_interval_multiplier:
1
,
usage_ping_enabled:
true
usage_ping_enabled:
true
<<<<<<<
HEAD
}
}
end
end
...
@@ -270,8 +269,6 @@ class ApplicationSetting < ActiveRecord::Base
...
@@ -270,8 +269,6 @@ class ApplicationSetting < ActiveRecord::Base
elasticsearch_aws_region:
ENV
[
'ELASTIC_REGION'
]
||
'us-east-1'
,
elasticsearch_aws_region:
ENV
[
'ELASTIC_REGION'
]
||
'us-east-1'
,
minimum_mirror_sync_time:
Gitlab
::
Mirror
::
FIFTEEN
,
minimum_mirror_sync_time:
Gitlab
::
Mirror
::
FIFTEEN
,
repository_size_limit:
0
repository_size_limit:
0
=======
>>>>>>>
ce
/
master
}
}
end
end
...
...
app/views/admin/application_settings/_form.html.haml
View file @
5f9109e5
...
@@ -515,20 +515,12 @@
...
@@ -515,20 +515,12 @@
=
f
.
check_box
:usage_ping_enabled
=
f
.
check_box
:usage_ping_enabled
Usage ping enabled
Usage ping enabled
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/usage_statistics"
,
anchor:
"usage-data"
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/usage_statistics"
,
anchor:
"usage-data"
)
<
<<<<<<
HEAD
.container
.help-block
Every
week
GitLab
will
report
license
usage
back
to
GitLab
,
Inc
.
Disable
this
option
if
you
do
not
want
this
to
occur
.
This
is
the
JSON
payload
that
will
be
sent:
%pre
.usage-data.js-syntax-highlight.code.highlight
{
"data-endpoint"
=>
usage_data_admin_application_settings_path
(
format: :html
)
}
==
=====
.help-block
.help-block
Every week GitLab will report license usage back to GitLab, Inc.
Every week GitLab will report license usage back to GitLab, Inc.
Disable this option if you do not want this to occur. To see the
Disable this option if you do not want this to occur. To see the
JSON payload that will be sent, visit the
JSON payload that will be sent, visit the
=
succeed
'.'
do
=
succeed
'.'
do
=
link_to
"Cohorts page"
,
admin_cohorts_path
(
anchor:
'usage-ping'
)
=
link_to
"Cohorts page"
,
admin_cohorts_path
(
anchor:
'usage-ping'
)
>
>>>>>> ce/master
%fieldset
%fieldset
%legend
Email
%legend
Email
...
...
app/views/admin/cohorts/_usage_ping.html.haml
View file @
5f9109e5
<
<<<<<<
HEAD
%h2
Usage
ping
==
=====
%h2
#usage-ping
Usage ping
%h2
#usage-ping
Usage ping
>
>>>>>> ce/master
.bs-callout.clearfix
.bs-callout.clearfix
%p
%p
...
...
config/routes/admin.rb
View file @
5f9109e5
...
@@ -100,15 +100,8 @@ namespace :admin do
...
@@ -100,15 +100,8 @@ namespace :admin do
resource
:application_settings
,
only:
[
:show
,
:update
]
do
resource
:application_settings
,
only:
[
:show
,
:update
]
do
resources
:services
,
only:
[
:index
,
:edit
,
:update
]
resources
:services
,
only:
[
:index
,
:edit
,
:update
]
<<<<<<<
HEAD
## EE-specific
get
:usage_data
## EE-specific
=======
get
:usage_data
get
:usage_data
>>>>>>>
ce
/
master
put
:reset_runners_token
put
:reset_runners_token
put
:reset_health_check_token
put
:reset_health_check_token
put
:clear_repository_check_states
put
:clear_repository_check_states
...
...
db/migrate/20160713222618_add_usage_ping_to_application_settings.rb
View file @
5f9109e5
class
AddUsagePingToApplicationSettings
<
ActiveRecord
::
Migration
class
AddUsagePingToApplicationSettings
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
<<<<<<<
HEAD
=======
DOWNTIME
=
false
DOWNTIME
=
false
>>>>>>>
ce
/
master
def
change
def
change
add_column
:application_settings
,
:usage_ping_enabled
,
:boolean
,
default:
true
,
null:
false
add_column
:application_settings
,
:usage_ping_enabled
,
:boolean
,
default:
true
,
null:
false
end
end
...
...
db/schema.rb
View file @
5f9109e5
...
@@ -135,7 +135,6 @@ ActiveRecord::Schema.define(version: 20170419001229) do
...
@@ -135,7 +135,6 @@ ActiveRecord::Schema.define(version: 20170419001229) do
t
.
integer
"geo_status_timeout"
,
default:
10
t
.
integer
"geo_status_timeout"
,
default:
10
t
.
string
"uuid"
t
.
string
"uuid"
t
.
decimal
"polling_interval_multiplier"
,
default:
1.0
,
null:
false
t
.
decimal
"polling_interval_multiplier"
,
default:
1.0
,
null:
false
<<<<<<<
HEAD
t
.
boolean
"elasticsearch_experimental_indexer"
t
.
boolean
"elasticsearch_experimental_indexer"
end
end
...
@@ -144,10 +143,6 @@ ActiveRecord::Schema.define(version: 20170419001229) do
...
@@ -144,10 +143,6 @@ ActiveRecord::Schema.define(version: 20170419001229) do
t
.
integer
"user_id"
,
null:
false
t
.
integer
"user_id"
,
null:
false
t
.
datetime
"created_at"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"updated_at"
=======
t
.
boolean
"usage_ping_enabled"
,
default:
true
,
null:
false
t
.
string
"uuid"
>>>>>>>
ce
/
master
end
end
create_table
"approver_groups"
,
force: :cascade
do
|
t
|
create_table
"approver_groups"
,
force: :cascade
do
|
t
|
...
...
doc/user/admin_area/settings/usage_statistics.md
View file @
5f9109e5
...
@@ -73,12 +73,9 @@ The total number of the following is sent back to GitLab Inc.:
...
@@ -73,12 +73,9 @@ The total number of the following is sent back to GitLab Inc.:
-
Protected branches
-
Protected branches
-
Releases
-
Releases
-
Remote mirrors
-
Remote mirrors
<<<<<<< HEAD
-
Service Desk projects
-
Service Desk projects
-
Service Desk issues
-
Service Desk issues
=======
-
Uploads
-
Uploads
>>>>>>> ce/master
-
Web hooks
-
Web hooks
Also, we track if you've installed Mattermost with GitLab.
Also, we track if you've installed Mattermost with GitLab.
...
@@ -100,11 +97,7 @@ GitLab Inc. does **not** collect any sensitive information, like project names
...
@@ -100,11 +97,7 @@ GitLab Inc. does **not** collect any sensitive information, like project names
or the content of the comments. GitLab Inc. does not disclose or otherwise make
or the content of the comments. GitLab Inc. does not disclose or otherwise make
available any of the data collected on a customer specific basis.
available any of the data collected on a customer specific basis.
<<<<<<< HEAD
Read more in about the [Privacy policy](https://about.gitlab.com/privacy).
=======
Read more about this in the
[
Privacy policy
](
https://about.gitlab.com/privacy
)
.
Read more about this in the
[
Privacy policy
](
https://about.gitlab.com/privacy
)
.
>>>>>>> ce/master
[
ee-557
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/557
[
ee-557
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/557
[
ee-735
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/735
[
ee-735
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/735
...
...
lib/gitlab/usage_data.rb
View file @
5f9109e5
...
@@ -26,20 +26,14 @@ module Gitlab
...
@@ -26,20 +26,14 @@ module Gitlab
deploy_keys:
DeployKey
.
count
,
deploy_keys:
DeployKey
.
count
,
deployments:
Deployment
.
count
,
deployments:
Deployment
.
count
,
environments:
Environment
.
count
,
environments:
Environment
.
count
,
<<<<<<<
HEAD
geo_nodes:
GeoNode
.
count
,
geo_nodes:
GeoNode
.
count
,
=======
>>>>>>>
ce
/
master
groups:
Group
.
count
,
groups:
Group
.
count
,
issues:
Issue
.
count
,
issues:
Issue
.
count
,
keys:
Key
.
count
,
keys:
Key
.
count
,
labels:
Label
.
count
,
labels:
Label
.
count
,
<<<<<<<
HEAD
ldap_group_links:
LdapGroupLink
.
count
,
ldap_group_links:
LdapGroupLink
.
count
,
ldap_keys:
LDAPKey
.
count
,
ldap_keys:
LDAPKey
.
count
,
ldap_users:
User
.
ldap
.
count
,
ldap_users:
User
.
ldap
.
count
,
=======
>>>>>>>
ce
/
master
lfs_objects:
LfsObject
.
count
,
lfs_objects:
LfsObject
.
count
,
merge_requests:
MergeRequest
.
count
,
merge_requests:
MergeRequest
.
count
,
milestones:
Milestone
.
count
,
milestones:
Milestone
.
count
,
...
@@ -49,16 +43,12 @@ module Gitlab
...
@@ -49,16 +43,12 @@ module Gitlab
projects_prometheus_active:
PrometheusService
.
active
.
count
,
projects_prometheus_active:
PrometheusService
.
active
.
count
,
protected_branches:
ProtectedBranch
.
count
,
protected_branches:
ProtectedBranch
.
count
,
releases:
Release
.
count
,
releases:
Release
.
count
,
<<<<<<<
HEAD
remote_mirrors:
RemoteMirror
.
count
,
remote_mirrors:
RemoteMirror
.
count
,
=======
>>>>>>>
ce
/
master
services:
Service
.
where
(
active:
true
).
count
,
services:
Service
.
where
(
active:
true
).
count
,
snippets:
Snippet
.
count
,
snippets:
Snippet
.
count
,
todos:
Todo
.
count
,
todos:
Todo
.
count
,
uploads:
Upload
.
count
,
uploads:
Upload
.
count
,
web_hooks:
WebHook
.
count
web_hooks:
WebHook
.
count
<<<<<<<
HEAD
}.
merge
(
service_desk_counts
)
}.
merge
(
service_desk_counts
)
}
}
end
end
...
@@ -73,9 +63,7 @@ module Gitlab
...
@@ -73,9 +63,7 @@ module Gitlab
service_desk_issues:
Issue
.
where
(
project:
projects_with_service_desk
,
service_desk_issues:
Issue
.
where
(
project:
projects_with_service_desk
,
author:
User
.
support_bot
,
author:
User
.
support_bot
,
confidential:
true
).
count
confidential:
true
).
count
=======
}
}
>>>>>>>
ce
/
master
}
}
end
end
...
@@ -86,7 +74,6 @@ module Gitlab
...
@@ -86,7 +74,6 @@ module Gitlab
active_user_count:
User
.
active
.
count
,
active_user_count:
User
.
active
.
count
,
recorded_at:
Time
.
now
,
recorded_at:
Time
.
now
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
<<<<<<<
HEAD
edition:
'EE'
edition:
'EE'
}
}
...
@@ -116,13 +103,6 @@ module Gitlab
...
@@ -116,13 +103,6 @@ module Gitlab
'EE'
'EE'
end
end
end
end
=======
edition:
'CE'
}
usage_data
end
>>>>>>>
ce
/
master
end
end
end
end
end
end
spec/lib/gitlab/usage_data_spec.rb
View file @
5f9109e5
...
@@ -6,17 +6,12 @@ describe Gitlab::UsageData do
...
@@ -6,17 +6,12 @@ describe Gitlab::UsageData do
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
describe
'#data'
do
describe
'#data'
do
<<<<<<<
HEAD
subject
{
described_class
.
data
}
=======
subject
{
Gitlab
::
UsageData
.
data
}
subject
{
Gitlab
::
UsageData
.
data
}
>>>>>>>
ce
/
master
it
"gathers usage data"
do
it
"gathers usage data"
do
expect
(
subject
.
keys
).
to
match_array
(
%i(
expect
(
subject
.
keys
).
to
match_array
(
%i(
active_user_count
active_user_count
counts
counts
<<<<<<< HEAD
historical_max_users
historical_max_users
license_add_ons
license_add_ons
license_expires_at
license_expires_at
...
@@ -24,8 +19,6 @@ describe Gitlab::UsageData do
...
@@ -24,8 +19,6 @@ describe Gitlab::UsageData do
license_user_count
license_user_count
licensee
licensee
license_md5
license_md5
=======
>>>>>>> ce/master
recorded_at
recorded_at
mattermost_enabled
mattermost_enabled
edition
edition
...
@@ -49,20 +42,14 @@ describe Gitlab::UsageData do
...
@@ -49,20 +42,14 @@ describe Gitlab::UsageData do
deploy_keys
deploy_keys
deployments
deployments
environments
environments
<<<<<<< HEAD
geo_nodes
geo_nodes
=======
>>>>>>> ce/master
groups
groups
issues
issues
keys
keys
labels
labels
<<<<<<< HEAD
ldap_group_links
ldap_group_links
ldap_keys
ldap_keys
ldap_users
ldap_users
=======
>>>>>>> ce/master
lfs_objects
lfs_objects
merge_requests
merge_requests
milestones
milestones
...
@@ -72,10 +59,7 @@ describe Gitlab::UsageData do
...
@@ -72,10 +59,7 @@ describe Gitlab::UsageData do
pages_domains
pages_domains
protected_branches
protected_branches
releases
releases
<<<<<<< HEAD
remote_mirrors
remote_mirrors
=======
>>>>>>> ce/master
services
services
snippets
snippets
todos
todos
...
@@ -85,9 +69,8 @@ describe Gitlab::UsageData do
...
@@ -85,9 +69,8 @@ describe Gitlab::UsageData do
end
end
end
end
<<<<<<<
HEAD
describe
'#license_usage_data'
do
describe
'.license_usage_data'
do
subject
{
Gitlab
::
UsageData
.
license_usage_data
}
subject
{
described_class
.
license_usage_data
}
it
"gathers license data"
do
it
"gathers license data"
do
license
=
::
License
.
current
license
=
::
License
.
current
...
@@ -130,16 +113,4 @@ describe Gitlab::UsageData do
...
@@ -130,16 +113,4 @@ describe Gitlab::UsageData do
end
end
end
end
end
end
=======
describe
'#license_usage_data'
do
subject
{
Gitlab
::
UsageData
.
license_usage_data
}
it
"gathers license data"
do
expect
(
subject
[
:uuid
]).
to
eq
(
current_application_settings
.
uuid
)
expect
(
subject
[
:version
]).
to
eq
(
Gitlab
::
VERSION
)
expect
(
subject
[
:active_user_count
]).
to
eq
(
User
.
active
.
count
)
expect
(
subject
[
:recorded_at
]).
to
be_a
(
Time
)
end
end
>>>>>>>
ce
/
master
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