Commit 5f9109e5 authored by Nick Thomas's avatar Nick Thomas

Fix merge conflicts in usage ping

parent ecd2a8e0
......@@ -389,14 +389,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
case 'admin':
new Admin();
switch (path[1]) {
<<<<<<< HEAD
case 'application_settings':
case 'cohorts':
new gl.ApplicationSettings();
=======
case 'cohorts':
new gl.UsagePing();
>>>>>>> ce/master
break;
case 'groups':
new UsersSelect();
......
......@@ -259,7 +259,6 @@ class ApplicationSetting < ActiveRecord::Base
user_default_external: false,
polling_interval_multiplier: 1,
usage_ping_enabled: true
<<<<<<< HEAD
}
end
......@@ -270,8 +269,6 @@ class ApplicationSetting < ActiveRecord::Base
elasticsearch_aws_region: ENV['ELASTIC_REGION'] || 'us-east-1',
minimum_mirror_sync_time: Gitlab::Mirror::FIFTEEN,
repository_size_limit: 0
=======
>>>>>>> ce/master
}
end
......
......@@ -515,20 +515,12 @@
= f.check_box :usage_ping_enabled
Usage ping enabled
= 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
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
JSON payload that will be sent, visit the
= succeed '.' do
= link_to "Cohorts page", admin_cohorts_path(anchor: 'usage-ping')
>>>>>>> ce/master
%fieldset
%legend Email
......
<<<<<<< HEAD
%h2 Usage ping
=======
%h2#usage-ping Usage ping
>>>>>>> ce/master
.bs-callout.clearfix
%p
......
......@@ -100,15 +100,8 @@ namespace :admin do
resource :application_settings, only: [:show, :update] do
resources :services, only: [:index, :edit, :update]
<<<<<<< HEAD
## EE-specific
get :usage_data
## EE-specific
=======
get :usage_data
>>>>>>> ce/master
put :reset_runners_token
put :reset_health_check_token
put :clear_repository_check_states
......
class AddUsagePingToApplicationSettings < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
<<<<<<< HEAD
=======
DOWNTIME = false
>>>>>>> ce/master
def change
add_column :application_settings, :usage_ping_enabled, :boolean, default: true, null: false
end
......
......@@ -135,7 +135,6 @@ ActiveRecord::Schema.define(version: 20170419001229) do
t.integer "geo_status_timeout", default: 10
t.string "uuid"
t.decimal "polling_interval_multiplier", default: 1.0, null: false
<<<<<<< HEAD
t.boolean "elasticsearch_experimental_indexer"
end
......@@ -144,10 +143,6 @@ ActiveRecord::Schema.define(version: 20170419001229) do
t.integer "user_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
=======
t.boolean "usage_ping_enabled", default: true, null: false
t.string "uuid"
>>>>>>> ce/master
end
create_table "approver_groups", force: :cascade do |t|
......
......@@ -73,12 +73,9 @@ The total number of the following is sent back to GitLab Inc.:
- Protected branches
- Releases
- Remote mirrors
<<<<<<< HEAD
- Service Desk projects
- Service Desk issues
=======
- Uploads
>>>>>>> ce/master
- Web hooks
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
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.
<<<<<<< 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).
>>>>>>> ce/master
[ee-557]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/557
[ee-735]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/735
......
......@@ -26,20 +26,14 @@ module Gitlab
deploy_keys: DeployKey.count,
deployments: Deployment.count,
environments: Environment.count,
<<<<<<< HEAD
geo_nodes: GeoNode.count,
=======
>>>>>>> ce/master
groups: Group.count,
issues: Issue.count,
keys: Key.count,
labels: Label.count,
<<<<<<< HEAD
ldap_group_links: LdapGroupLink.count,
ldap_keys: LDAPKey.count,
ldap_users: User.ldap.count,
=======
>>>>>>> ce/master
lfs_objects: LfsObject.count,
merge_requests: MergeRequest.count,
milestones: Milestone.count,
......@@ -49,16 +43,12 @@ module Gitlab
projects_prometheus_active: PrometheusService.active.count,
protected_branches: ProtectedBranch.count,
releases: Release.count,
<<<<<<< HEAD
remote_mirrors: RemoteMirror.count,
=======
>>>>>>> ce/master
services: Service.where(active: true).count,
snippets: Snippet.count,
todos: Todo.count,
uploads: Upload.count,
web_hooks: WebHook.count
<<<<<<< HEAD
}.merge(service_desk_counts)
}
end
......@@ -73,9 +63,7 @@ module Gitlab
service_desk_issues: Issue.where(project: projects_with_service_desk,
author: User.support_bot,
confidential: true).count
=======
}
>>>>>>> ce/master
}
end
......@@ -86,7 +74,6 @@ module Gitlab
active_user_count: User.active.count,
recorded_at: Time.now,
mattermost_enabled: Gitlab.config.mattermost.enabled,
<<<<<<< HEAD
edition: 'EE'
}
......@@ -116,13 +103,6 @@ module Gitlab
'EE'
end
end
=======
edition: 'CE'
}
usage_data
end
>>>>>>> ce/master
end
end
end
......@@ -6,17 +6,12 @@ describe Gitlab::UsageData do
let!(:board) { create(:board, project: project) }
describe '#data' do
<<<<<<< HEAD
subject { described_class.data }
=======
subject { Gitlab::UsageData.data }
>>>>>>> ce/master
it "gathers usage data" do
expect(subject.keys).to match_array(%i(
active_user_count
counts
<<<<<<< HEAD
historical_max_users
license_add_ons
license_expires_at
......@@ -24,8 +19,6 @@ describe Gitlab::UsageData do
license_user_count
licensee
license_md5
=======
>>>>>>> ce/master
recorded_at
mattermost_enabled
edition
......@@ -49,20 +42,14 @@ describe Gitlab::UsageData do
deploy_keys
deployments
environments
<<<<<<< HEAD
geo_nodes
=======
>>>>>>> ce/master
groups
issues
keys
labels
<<<<<<< HEAD
ldap_group_links
ldap_keys
ldap_users
=======
>>>>>>> ce/master
lfs_objects
merge_requests
milestones
......@@ -72,10 +59,7 @@ describe Gitlab::UsageData do
pages_domains
protected_branches
releases
<<<<<<< HEAD
remote_mirrors
=======
>>>>>>> ce/master
services
snippets
todos
......@@ -85,9 +69,8 @@ describe Gitlab::UsageData do
end
end
<<<<<<< HEAD
describe '.license_usage_data' do
subject { described_class.license_usage_data }
describe '#license_usage_data' do
subject { Gitlab::UsageData.license_usage_data }
it "gathers license data" do
license = ::License.current
......@@ -130,16 +113,4 @@ describe Gitlab::UsageData do
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment