summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-04-17 16:40:34 +0100
committerSean McGivern <sean@gitlab.com>2017-04-17 16:40:34 +0100
commite072806ac2e170e7638df1def47f6380b4e5b63b (patch)
tree792c1ac8fd04686ce8cf3a0f835fe27139333850
parent8d10add4a504079c00bea3284cb8a7ab71cc8aaf (diff)
downloadgitlab-ce-e072806ac2e170e7638df1def47f6380b4e5b63b.tar.gz
Make ESLint happy
-rw-r--r--app/assets/javascripts/usage_ping.js27
1 files changed, 13 insertions, 14 deletions
diff --git a/app/assets/javascripts/usage_ping.js b/app/assets/javascripts/usage_ping.js
index 4c8ca345778..fd3af7d7ab6 100644
--- a/app/assets/javascripts/usage_ping.js
+++ b/app/assets/javascripts/usage_ping.js
@@ -1,16 +1,15 @@
-(global => {
- global.gl = global.gl || {};
+function UsagePing() {
+ const usageDataUrl = $('.usage-data').data('endpoint');
- gl.UsagePing = function() {
- var usage_data_url = $('.usage-data').data('endpoint');
+ $.ajax({
+ type: 'GET',
+ url: usageDataUrl,
+ dataType: 'html',
+ success(html) {
+ $('.usage-data').html(html);
+ },
+ });
+}
- $.ajax({
- type: "GET",
- url: usage_data_url,
- dataType: "html",
- success: function (html) {
- $(".usage-data").html(html);
- }
- });
- };
-})(window);
+window.gl = window.gl || {};
+window.gl.UsagePing = UsagePing;