<commit_before>kd    = require 'kd'
JView = require 'app/jview'

ServerConfigurationView    = require './serverconfigurationview'
ApplicationTabHandleHolder = require 'app/commonviews/applicationview/applicationtabhandleholder'


module.exports = class ConfigurationView extends JView

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

    options.cssClass = kd.utils.curry options.cssClass, 'configuration'

    super options, data

    @createTabView()


  createTabView: ->

    @tabHandleContainer   = new ApplicationTabHandleHolder
      delegate            : this
      addCloseHandle      : no
      addFullscreenHandle : no

    @tabView = new kd.TabView
      enableMoveTabHandle : no
      tabHandleContainer  : @tabHandleContainer

    @on 'PlusHandleClicked', @bound 'addPane'

    @addPane no


  addPane: (closable = yes) ->

    tabLength = @tabView.handles.length

    if tabLength is 2
      return new kd.NotificationView
        title    : 'This is a preview mode. You can add more servers manually in the next steps.'
        duration : 3663

    name = "Server #{tabLength + 1}"

    @tabView.addPane pane = new kd.TabPaneView { name, closable }
<commit_msg>client: stackwizard: removed scrollview class from config view<commit_after>kd    = require 'kd'
JView = require 'app/jview'

ServerConfigurationView    = require './serverconfigurationview'
ApplicationTabHandleHolder = require 'app/commonviews/applicationview/applicationtabhandleholder'


module.exports = class ConfigurationView extends JView

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

    options.cssClass = kd.utils.curry options.cssClass, 'configuration'

    super options, data

    @createTabView()


  createTabView: ->

    @tabHandleContainer   = new ApplicationTabHandleHolder
      delegate            : this
      addCloseHandle      : no
      addFullscreenHandle : no

    @tabView = new kd.TabView
      enableMoveTabHandle : no
      tabHandleContainer  : @tabHandleContainer

    @tabView.unsetClass 'kdscrollview'

    @on 'PlusHandleClicked', @bound 'addPane'

    @addPane no


  addPane: (closable = yes) ->

    tabLength = @tabView.handles.length

    if tabLength is 2
      return new kd.NotificationView
        title    : 'This is a preview mode. You can add more servers manually in the next steps.'
        duration : 3663

    name = "Server #{tabLength + 1}"

    @tabView.addPane pane = new kd.TabPaneView { name, closable }

{'fraction_non_alphanumeric': 0.08240626287597858, 'fraction_numerical': 0.004944375772558714, 'mean_word_length': 3.0875420875420874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5831680', 'n_tokens_mistral': 717, 'n_tokens_neox': 669, 'n_words': 191}