From ae5d1898037be4f59bf6517ad76b13cc16f595ce Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Thu, 22 Oct 2015 18:04:06 -0700
Subject: Adding analytics tab

---
 web/react/utils/client.jsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'web/react/utils/client.jsx')

diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index f92633439..eca4f4b3e 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -327,6 +327,20 @@ export function getConfig(success, error) {
     });
 }
 
+export function getAnalytics(teamId, name, success, error) {
+    $.ajax({
+        url: '/api/v1/admin/analytics/' + teamId + '/' + name,
+        dataType: 'json',
+        contentType: 'application/json',
+        type: 'GET',
+        success,
+        error: function onError(xhr, status, err) {
+            var e = handleError('getAnalytics', xhr, status, err);
+            error(e);
+        }
+    });
+}
+
 export function saveConfig(config, success, error) {
     $.ajax({
         url: '/api/v1/admin/save_config',
-- 
cgit v1.2.3-1-g7c22


From 834e1a8b58496e721f086f04612658c4a22c8d7d Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Mon, 26 Oct 2015 22:13:40 -0700
Subject: adding arrow notation

---
 web/react/utils/client.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/utils/client.jsx')

diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index fe5797769..bf117b3b3 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -335,7 +335,7 @@ export function getAnalytics(teamId, name, success, error) {
         contentType: 'application/json',
         type: 'GET',
         success,
-        error: function onError(xhr, status, err) {
+        error: (xhr, status, err) => {
             var e = handleError('getAnalytics', xhr, status, err);
             error(e);
         }
-- 
cgit v1.2.3-1-g7c22

