From fd53e3b7868234af328cd73150318fc8e7a26b89 Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Tue, 17 May 2016 07:21:39 -0400
Subject: PLT-2257 Reorganized System Console  (#3003)

* Reorganized system console

* Fixed the names of some components

* Fixed timestamp for BrandImageSetting

* Fixed merge issues

* Updated push notification settings to match master branch

* Removed top level setting pages and moved enable Gitlab/LDAP settings onto their respective pages

* Re-added restrictDirectMessage setting to system console

* Re-added email connection test and fixed some margins

* Fixed ESLint errors

* Renamed Authentication > Onboarding to Authentication > Email in the system console

* Renamed Customization > Whitelabeling to Customization > Custom Branding in System Console

* Re-added EnableOpenServer to system console
---
 webapp/root.jsx | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 187 insertions(+), 2 deletions(-)

(limited to 'webapp/root.jsx')

diff --git a/webapp/root.jsx b/webapp/root.jsx
index f53109cdd..aef2607ef 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -34,7 +34,6 @@ import * as GlobalActions from 'action_creators/global_actions.jsx';
 import SignupUserComplete from 'components/signup_user_complete.jsx';
 import ShouldVerifyEmail from 'components/should_verify_email.jsx';
 import DoVerifyEmail from 'components/do_verify_email.jsx';
-import AdminConsole from 'components/admin_console/admin_controller.jsx';
 import TutorialView from 'components/tutorial/tutorial_view.jsx';
 import BackstageNavbar from 'components/backstage/backstage_navbar.jsx';
 import BackstageSidebar from 'components/backstage/backstage_sidebar.jsx';
@@ -51,6 +50,38 @@ import AppDispatcher from './dispatcher/app_dispatcher.jsx';
 import Constants from './utils/constants.jsx';
 const ActionTypes = Constants.ActionTypes;
 
+import AdminConsole from 'components/admin_console/admin_console.jsx';
+import SystemAnalytics from 'components/analytics/system_analytics.jsx';
+import ConfigurationSettings from 'components/admin_console/configuration_settings.jsx';
+import UsersAndTeamsSettings from 'components/admin_console/users_and_teams_settings.jsx';
+import PrivacySettings from 'components/admin_console/privacy_settings.jsx';
+import LogSettings from 'components/admin_console/log_settings.jsx';
+import EmailAuthenticationSettings from 'components/admin_console/email_authentication_settings.jsx';
+import GitLabSettings from 'components/admin_console/gitlab_settings.jsx';
+import LdapSettings from 'components/admin_console/ldap_settings.jsx';
+import SignupSettings from 'components/admin_console/signup_settings.jsx';
+import LoginSettings from 'components/admin_console/login_settings.jsx';
+import PublicLinkSettings from 'components/admin_console/public_link_settings.jsx';
+import SessionSettings from 'components/admin_console/session_settings.jsx';
+import ConnectionSettings from 'components/admin_console/connection_settings.jsx';
+import EmailSettings from 'components/admin_console/email_settings.jsx';
+import PushSettings from 'components/admin_console/push_settings.jsx';
+import WebhookSettings from 'components/admin_console/webhook_settings.jsx';
+import ExternalServiceSettings from 'components/admin_console/external_service_settings.jsx';
+import DatabaseSettings from 'components/admin_console/database_settings.jsx';
+import StorageSettings from 'components/admin_console/storage_settings.jsx';
+import ImageSettings from 'components/admin_console/image_settings.jsx';
+import CustomBrandSettings from 'components/admin_console/custom_brand_settings.jsx';
+import LegalAndSupportSettings from 'components/admin_console/legal_and_support_settings.jsx';
+import ComplianceSettings from 'components/admin_console/compliance_settings.jsx';
+import RateSettings from 'components/admin_console/rate_settings.jsx';
+import DeveloperSettings from 'components/admin_console/developer_settings.jsx';
+import TeamUsers from 'components/admin_console/team_users.jsx';
+import TeamAnalytics from 'components/analytics/team_analytics.jsx';
+import LicenseSettings from 'components/admin_console/license_settings.jsx';
+import Audits from 'components/admin_console/audits.jsx';
+import Logs from 'components/admin_console/logs.jsx';
+
 import Claim from 'components/claim/claim.jsx';
 import EmailToOAuth from 'components/claim/components/email_to_oauth.jsx';
 import OAuthToEmail from 'components/claim/components/oauth_to_email.jsx';
@@ -319,7 +350,161 @@ function renderRootComponent() {
                     <Route
                         path='admin_console'
                         component={AdminConsole}
-                    />
+                    >
+                        <IndexRedirect to='system_analytics'/>
+                        <Route
+                            path='system_analytics'
+                            component={SystemAnalytics}
+                        />
+                        <Route path='general'>
+                            <IndexRedirect to='configuration'/>
+                            <Route
+                                path='configuration'
+                                component={ConfigurationSettings}
+                            />
+                            <Route
+                                path='users_and_teams'
+                                component={UsersAndTeamsSettings}
+                            />
+                            <Route
+                                path='privacy'
+                                component={PrivacySettings}
+                            />
+                            <Route
+                                path='logging'
+                                component={LogSettings}
+                            />
+                        </Route>
+                        <Route path='authentication'>
+                            <IndexRedirect to='email'/>
+                            <Route
+                                path='email'
+                                component={EmailAuthenticationSettings}
+                            />
+                            <Route
+                                path='gitlab'
+                                component={GitLabSettings}
+                            />
+                            <Route
+                                path='ldap'
+                                component={LdapSettings}
+                            />
+                        </Route>
+                        <Route path='security'>
+                            <IndexRedirect to='sign_up'/>
+                            <Route
+                                path='sign_up'
+                                component={SignupSettings}
+                            />
+                            <Route
+                                path='login'
+                                component={LoginSettings}
+                            />
+                            <Route
+                                path='public_links'
+                                component={PublicLinkSettings}
+                            />
+                            <Route
+                                path='sessions'
+                                component={SessionSettings}
+                            />
+                            <Route
+                                path='connections'
+                                component={ConnectionSettings}
+                            />
+                        </Route>
+                        <Route path='notifications'>
+                            <IndexRedirect to='email'/>
+                            <Route
+                                path='email'
+                                component={EmailSettings}
+                            />
+                            <Route
+                                path='push'
+                                component={PushSettings}
+                            />
+                        </Route>
+                        <Route path='integrations'>
+                            <IndexRedirect to='webhooks'/>
+                            <Route
+                                path='webhooks'
+                                component={WebhookSettings}
+                            />
+                            <Route
+                                path='external'
+                                component={ExternalServiceSettings}
+                            />
+                        </Route>
+                        <Route
+                            path='database'
+                            component={DatabaseSettings}
+                        />
+                        <Route path='files'>
+                            <IndexRedirect to='storage'/>
+                            <Route
+                                path='storage'
+                                component={StorageSettings}
+                            />
+                            <Route
+                                path='images'
+                                component={ImageSettings}
+                            />
+                        </Route>
+                        <Route path='customization'>
+                            <IndexRedirect to='custom_brand'/>
+                            <Route
+                                path='custom_brand'
+                                component={CustomBrandSettings}
+                            />
+                            <Route
+                                path='legal_and_support'
+                                component={LegalAndSupportSettings}
+                            />
+                        </Route>
+                        <Route
+                            path='compliance'
+                            component={ComplianceSettings}
+                        />
+                        <Route
+                            path='rate'
+                            component={RateSettings}
+                        />
+                        <Route
+                            path='developer'
+                            component={DeveloperSettings}
+                        />
+                        <Route path='team'>
+                            <Redirect
+                                from=':team'
+                                to=':team/users'
+                            />
+                            <Route
+                                path=':team/users'
+                                component={TeamUsers}
+                            />
+                            <Route
+                                path=':team/analytics'
+                                component={TeamAnalytics}
+                            />
+                            <Redirect
+                                from='*'
+                                to='/error'
+                                query={notFoundParams}
+                            />
+                        </Route>
+                        <Route
+                            path='license'
+                            component={LicenseSettings}
+                        />
+                        <Route
+                            path='audits'
+                            component={Audits}
+                        />
+                        <Route
+                            path='logs'
+                            component={Logs}
+                        />
+                    </Route>
                     <Route
                         path=':team'
                         component={NeedsTeam}
-- 
cgit v1.2.3-1-g7c22

