From 788fc4373b8d22930b3420f7906e626e2bd63394 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 15 Sep 2015 14:20:25 -0700 Subject: removing loggly --- web/react/utils/client.jsx | 3 --- web/react/utils/config.js | 4 ---- 2 files changed, 7 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 75ffdb274..ebd6640d7 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -14,8 +14,6 @@ export function trackPage() { } function handleError(methodName, xhr, status, err) { - var LTracker = global.window.LTracker || []; - var e = null; try { e = JSON.parse(xhr.responseText); @@ -39,7 +37,6 @@ function handleError(methodName, xhr, status, err) { console.error(msg); //eslint-disable-line no-console console.error(e); //eslint-disable-line no-console - LTracker.push(msg); track('api', 'api_weberror', methodName, 'message', msg); diff --git a/web/react/utils/config.js b/web/react/utils/config.js index c7d1aa2bc..823d71894 100644 --- a/web/react/utils/config.js +++ b/web/react/utils/config.js @@ -3,10 +3,6 @@ export var config = { - // Loggly configs - LogglyWriteKey: '', - LogglyConsoleErrors: true, - // Segment configs SegmentWriteKey: '', -- cgit v1.2.3-1-g7c22 From b2a679c25da42c4665059965830858da4f0ec238 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 15 Sep 2015 18:59:14 -0700 Subject: PLT-93 cleaing up client side configs --- web/react/utils/config.js | 31 +------------------------------ web/react/utils/utils.jsx | 5 ++--- 2 files changed, 3 insertions(+), 33 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/config.js b/web/react/utils/config.js index 823d71894..92e8e678a 100644 --- a/web/react/utils/config.js +++ b/web/react/utils/config.js @@ -3,42 +3,13 @@ export var config = { - // Segment configs - SegmentWriteKey: '', - - // Feature switches - AllowPublicLink: true, - AllowInviteNames: true, - RequireInviteNames: false, AllowSignupDomainsWizard: false, - // Google Developer Key (for Youtube API links) - // Leave blank to disable - GoogleDeveloperKey: '', - // Privacy switches ShowEmail: true, - // Links - TermsLink: '/static/help/configure_links.html', - PrivacyLink: '/static/help/configure_links.html', - AboutLink: '/static/help/configure_links.html', - HelpLink: '/static/help/configure_links.html', - ReportProblemLink: '/static/help/configure_links.html', - HomeLink: '', - // Toggle whether or not users are shown a message about agreeing to the Terms of Service during the signup process - ShowTermsDuringSignup: false, - - ThemeColors: ['#2389d7', '#008a17', '#dc4fad', '#ac193d', '#0072c6', '#d24726', '#ff8f32', '#82ba00', '#03b3b2', '#008299', '#4617b4', '#8c0095', '#004b8b', '#004b8b', '#570000', '#380000', '#585858', '#000000'] -}; - -// Flavor strings -export var strings = { - Team: 'team', - TeamPlural: 'teams', - Company: 'company', - CompanyPlural: 'companies' + ShowTermsDuringSignup: false }; global.window.config = config; diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index c2307f5e9..032cf4ff4 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -9,7 +9,6 @@ var ActionTypes = Constants.ActionTypes; var AsyncClient = require('./async_client.jsx'); var client = require('./client.jsx'); var Autolinker = require('autolinker'); -import {config} from '../utils/config.js'; export function isEmail(email) { var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; @@ -295,12 +294,12 @@ function getYoutubeEmbed(link) { $('.post-list-holder-by-time').scrollTop($('.post-list-holder-by-time')[0].scrollHeight); } - if (config.GoogleDeveloperKey) { + if (global.window.config.GoogleDeveloperKey) { $.ajax({ async: true, url: 'https://www.googleapis.com/youtube/v3/videos', type: 'GET', - data: {part: 'snippet', id: youtubeId, key: config.GoogleDeveloperKey}, + data: {part: 'snippet', id: youtubeId, key: global.window.config.GoogleDeveloperKey}, success: success }); } -- cgit v1.2.3-1-g7c22 From 5e2f701e6c6c8bfa87b2913100365b45264470c3 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 15 Sep 2015 19:09:50 -0700 Subject: Removing old config stuff --- web/react/utils/config.js | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 web/react/utils/config.js (limited to 'web/react/utils') diff --git a/web/react/utils/config.js b/web/react/utils/config.js deleted file mode 100644 index 92e8e678a..000000000 --- a/web/react/utils/config.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -// See License.txt for license information. - -export var config = { - - AllowSignupDomainsWizard: false, - - // Privacy switches - ShowEmail: true, - - // Toggle whether or not users are shown a message about agreeing to the Terms of Service during the signup process - ShowTermsDuringSignup: false -}; - -global.window.config = config; -- cgit v1.2.3-1-g7c22 From d625e62d96197daac73feff0ce353b0e86ab4e60 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 15 Sep 2015 19:29:00 -0700 Subject: Finished removing some of the last bits of client side config --- web/react/utils/async_client.jsx | 26 +------------------------- web/react/utils/client.jsx | 14 -------------- 2 files changed, 1 insertion(+), 39 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index 6b8e73c5a..3e23e5c33 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -582,28 +582,4 @@ export function getMyTeam() { dispatchError(err, 'getMyTeam'); } ); -} - -export function getConfig() { - if (isCallInProgress('getConfig')) { - return; - } - - callTracker.getConfig = utils.getTimestamp(); - client.getConfig( - function getConfigSuccess(data, textStatus, xhr) { - callTracker.getConfig = 0; - - if (data && xhr.status !== 304) { - AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_CONFIG, - settings: data - }); - } - }, - function getConfigFailure(err) { - callTracker.getConfig = 0; - dispatchError(err, 'getConfig'); - } - ); -} +} \ No newline at end of file diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index ebd6640d7..902eb1642 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -987,17 +987,3 @@ export function updateValetFeature(data, success, error) { track('api', 'api_teams_update_valet_feature'); } - -export function getConfig(success, error) { - $.ajax({ - url: '/api/v1/config/get_all', - dataType: 'json', - type: 'GET', - ifModified: true, - success: success, - error: function onError(xhr, status, err) { - var e = handleError('getConfig', xhr, status, err); - error(e); - } - }); -} -- cgit v1.2.3-1-g7c22