summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/dispatcher.js3
-rw-r--r--app/assets/javascripts/main.js1
-rw-r--r--app/assets/javascripts/usage_ping.js (renamed from app/assets/javascripts/application_settings.js.es6)2
-rw-r--r--app/views/admin/application_settings/_form.html.haml11
-rw-r--r--app/views/admin/cohorts/_usage_ping.html.haml2
5 files changed, 10 insertions, 9 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index a0afffb6635..9d41556653f 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -365,9 +365,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
case 'admin':
new Admin();
switch (path[1]) {
- case 'application_settings':
case 'cohorts':
- new gl.ApplicationSettings();
+ new gl.UsagePing();
break;
case 'groups':
new UsersSelect();
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index c50ec24c818..36616d02bf6 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -165,6 +165,7 @@ import './syntax_highlight';
import './task_list';
import './todos';
import './tree';
+import './usage_ping';
import './user';
import './user_tabs';
import './username_validator';
diff --git a/app/assets/javascripts/application_settings.js.es6 b/app/assets/javascripts/usage_ping.js
index ce7d5129d8d..4c8ca345778 100644
--- a/app/assets/javascripts/application_settings.js.es6
+++ b/app/assets/javascripts/usage_ping.js
@@ -1,7 +1,7 @@
(global => {
global.gl = global.gl || {};
- gl.ApplicationSettings = function() {
+ gl.UsagePing = function() {
var usage_data_url = $('.usage-data').data('endpoint');
$.ajax({
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml
index 13e9faa9642..0dc1103eece 100644
--- a/app/views/admin/application_settings/_form.html.haml
+++ b/app/views/admin/application_settings/_form.html.haml
@@ -493,11 +493,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")
- .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')
%fieldset
%legend Email
diff --git a/app/views/admin/cohorts/_usage_ping.html.haml b/app/views/admin/cohorts/_usage_ping.html.haml
index a95f81a7f49..73aa95d84f1 100644
--- a/app/views/admin/cohorts/_usage_ping.html.haml
+++ b/app/views/admin/cohorts/_usage_ping.html.haml
@@ -1,4 +1,4 @@
-%h2 Usage ping
+%h2#usage-ping Usage ping
.bs-callout.clearfix
%p