<commit_before>kd                         = require 'kd'
AppController              = require 'app/appcontroller'

AdminAPIView               = require './views/api/adminapiview'
AdminAppView               = require './views/customviews/adminappview'
TeamInviteView             = require './views/koding-admin/teaminviteview'
AdminMembersView           = require './views/members/adminmembersview'
AdministrationView         = require './views/koding-admin/administrationview'
CustomViewsManager         = require './views/customviews/customviewsmanager'
TopicModerationView        = require './views/moderation/topicmoderationview'
GroupStackSettings         = require './views/stacks/groupstacksettings'
OnboardingAdminView        = require './views/onboarding/onboardingadminview'
AdminInvitationsView       = require './views/invitations/admininvitationsview'
GroupPermissionsView       = require './views/permissions/grouppermissionsview'
GroupsBlockedUserView      = require './views/members/groupsblockeduserview'
AdminIntegrationsView      = require './views/integrations/adminintegrationsview'
GroupGeneralSettingsView   = require './views/general/groupgeneralsettingsview'
AdminIntegrationParentView = require './views/integrations/adminintegrationparentview'


require('./routehandler')()


module.exports = class AdminAppController extends AppController

  @options     =
    name       : 'Admin'
    background : yes

  NAV_ITEMS    =
    teams      :
      title    : 'Team Settings'
      items    : [
        { slug : 'General',        title : 'General',           viewClass : GroupGeneralSettingsView }
        { slug : 'Members',        title : 'Members',           viewClass : AdminMembersView         }
        { slug : 'Invitations',    title : 'Invitations',       viewClass : AdminInvitationsView     }
        # { slug : 'Permissions',    title : 'Permissions',       viewClass : GroupPermissionsView     }
        {
          slug      : 'Integrations'
          title     : 'Integrations'
          viewClass : AdminIntegrationsView,
          subTabs   : [
            { title : 'Add',        action: 'Add',              viewClass : AdminIntegrationParentView }
            { title : 'Configure',  action: 'Configure',        viewClass : AdminIntegrationParentView }
          ]
        }
        { slug : 'Stacks',         title : 'Compute Stacks',    viewClass : GroupStackSettings       }
        { slug : 'API Access',     title : 'API Access',        viewClass : AdminAPIView             }      ]
    koding     :
      title    : 'Koding Administration'
      items    : [
        { slug : 'Blocked',        title : 'Blocked Users',     viewClass : GroupsBlockedUserView    }
        { slug : 'Widgets',        title : 'Custom Views',      viewClass : CustomViewsManager       }
        { slug : 'Onboarding',     title : 'Onboarding',        viewClass : OnboardingAdminView      }
        { slug : 'Moderation',     title : 'Topic Moderation',  viewClass : TopicModerationView      }
        { slug : 'Administration', title : 'Administration',    viewClass : AdministrationView       }
        { slug : 'TeamInvite',     title : 'Invite teams',      viewClass : TeamInviteView           }
      ]


  constructor: (options = {}, data) ->

    data         or= kd.singletons.groupsController.getCurrentGroup()
    options.view   = new AdminAppView
      title        : 'Team Settings'
      cssClass     : 'AppModal AppModal--admin team-settings'
      width        : 1000
      height       : '90%'
      overlay      : yes
      overlayClick : no
      tabData      : NAV_ITEMS
    , data
<commit_msg>Client: remove whitespace from slug<commit_after>kd                         = require 'kd'
AppController              = require 'app/appcontroller'

AdminAPIView               = require './views/api/adminapiview'
AdminAppView               = require './views/customviews/adminappview'
TeamInviteView             = require './views/koding-admin/teaminviteview'
AdminMembersView           = require './views/members/adminmembersview'
AdministrationView         = require './views/koding-admin/administrationview'
CustomViewsManager         = require './views/customviews/customviewsmanager'
TopicModerationView        = require './views/moderation/topicmoderationview'
GroupStackSettings         = require './views/stacks/groupstacksettings'
OnboardingAdminView        = require './views/onboarding/onboardingadminview'
AdminInvitationsView       = require './views/invitations/admininvitationsview'
GroupPermissionsView       = require './views/permissions/grouppermissionsview'
GroupsBlockedUserView      = require './views/members/groupsblockeduserview'
AdminIntegrationsView      = require './views/integrations/adminintegrationsview'
GroupGeneralSettingsView   = require './views/general/groupgeneralsettingsview'
AdminIntegrationParentView = require './views/integrations/adminintegrationparentview'


require('./routehandler')()


module.exports = class AdminAppController extends AppController

  @options     =
    name       : 'Admin'
    background : yes

  NAV_ITEMS    =
    teams      :
      title    : 'Team Settings'
      items    : [
        { slug : 'General',        title : 'General',           viewClass : GroupGeneralSettingsView }
        { slug : 'Members',        title : 'Members',           viewClass : AdminMembersView         }
        { slug : 'Invitations',    title : 'Invitations',       viewClass : AdminInvitationsView     }
        # { slug : 'Permissions',    title : 'Permissions',       viewClass : GroupPermissionsView     }
        {
          slug      : 'Integrations'
          title     : 'Integrations'
          viewClass : AdminIntegrationsView,
          subTabs   : [
            { title : 'Add',        action: 'Add',              viewClass : AdminIntegrationParentView }
            { title : 'Configure',  action: 'Configure',        viewClass : AdminIntegrationParentView }
          ]
        }
        { slug : 'Stacks',         title : 'Compute Stacks',    viewClass : GroupStackSettings       }
        { slug : 'APIAccess',      title : 'API Access',        viewClass : AdminAPIView             }      ]
    koding     :
      title    : 'Koding Administration'
      items    : [
        { slug : 'Blocked',        title : 'Blocked Users',     viewClass : GroupsBlockedUserView    }
        { slug : 'Widgets',        title : 'Custom Views',      viewClass : CustomViewsManager       }
        { slug : 'Onboarding',     title : 'Onboarding',        viewClass : OnboardingAdminView      }
        { slug : 'Moderation',     title : 'Topic Moderation',  viewClass : TopicModerationView      }
        { slug : 'Administration', title : 'Administration',    viewClass : AdministrationView       }
        { slug : 'TeamInvite',     title : 'Invite teams',      viewClass : TeamInviteView           }
      ]


  constructor: (options = {}, data) ->

    data         or= kd.singletons.groupsController.getCurrentGroup()
    options.view   = new AdminAppView
      title        : 'Team Settings'
      cssClass     : 'AppModal AppModal--admin team-settings'
      width        : 1000
      height       : '90%'
      overlay      : yes
      overlayClick : no
      tabData      : NAV_ITEMS
    , data

{'fraction_non_alphanumeric': 0.09635416666666667, 'fraction_numerical': 0.001644736842105263, 'mean_word_length': 2.138494623655914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5805010', 'n_tokens_mistral': 1926, 'n_tokens_neox': 1849, 'n_words': 399}