<commit_before>"use strict"

app = angular.module("cloudStorm.settings", [])

###############################################################################

app.provider 'csSettings', ['csLocalizationProvider', (csLocalizationProvider) ->

  states = () =>
    return [{
      name: @settings['router-path-prefix'] + 'index'
      url: '/{resourceType}'
      component: 'csPageRouter'
      resolve:
        resourceType: ['$transition$', ($transition$) ->
          $transition$.params().resourceType
        ]
        pageType: ['$transition$', ($transition$) ->
          'index'
        ]
    },{
      name: @settings['router-path-prefix'] + 'show'
      url: '/{resourceType}/{id}'
      component: 'csPageRouter'
      resolve:
        resourceType: ['$transition$', ($transition$) ->
          $transition$.params().resourceType
        ]
        id: ['$transition$', ($transition$) ->
          $transition$.params().id
        ]
        pageType: ['$transition$', ($transition$) ->
          'show'
        ]
    },{
      name: @settings['router-path-prefix'] + 'cmd'
      url: '/{resourceType}/{id}/{cmd}'
      component: 'csPageRouter'
      resolve:
        resourceType: ['$transition$', ($transition$) ->
          $transition$.params().resourceType
        ]
        id: ['$transition$', ($transition$) ->
          $transition$.params().id
        ]
        cmd: ['$transition$', ($transition$) ->
          $transition$.params().cmd
        ]
        pageType: ['$transition$', ($transition$) ->
          'cmd'
        ]
    }]

  defaultSettings = {
    'i18n-engine': csLocalizationProvider.$get()
    'date-format': 'yyyy-MM-dd'
    'datetime-format': 'yyyy-MM-ddThh:mm:ss.sss'
    'time-zone-offset': 'utc',
    'router-path-prefix': '',
    'router-states': states,
    'app-title': 'CloudStorm Sample App'
  }

  @settings = defaultSettings

  @set = (option, value) ->
    @settings[option] = value
    return

  @$get = ->
    @

  return

]
<commit_msg>The settings provider sets the csIndex component for the /{resourceType} pattern.<commit_after>"use strict"

app = angular.module("cloudStorm.settings", [])

###############################################################################

app.provider 'csSettings', ['csLocalizationProvider', (csLocalizationProvider) ->

  states = () =>
    return [{
      name: @settings['router-path-prefix'] + 'index'
      url: '/{resourceType}'
      component: 'csIndex'
      resolve:
        resourceType: ['$transition$', ($transition$) ->
          $transition$.params().resourceType
        ]
    },{
      name: @settings['router-path-prefix'] + 'show'
      url: '/{resourceType}/{id}'
      component: 'csPageRouter'
      resolve:
        resourceType: ['$transition$', ($transition$) ->
          $transition$.params().resourceType
        ]
        id: ['$transition$', ($transition$) ->
          $transition$.params().id
        ]
        pageType: ['$transition$', ($transition$) ->
          'show'
        ]
    },{
      name: @settings['router-path-prefix'] + 'cmd'
      url: '/{resourceType}/{id}/{cmd}'
      component: 'csPageRouter'
      resolve:
        resourceType: ['$transition$', ($transition$) ->
          $transition$.params().resourceType
        ]
        id: ['$transition$', ($transition$) ->
          $transition$.params().id
        ]
        cmd: ['$transition$', ($transition$) ->
          $transition$.params().cmd
        ]
        pageType: ['$transition$', ($transition$) ->
          'cmd'
        ]
    }]

  defaultSettings = {
    'i18n-engine': csLocalizationProvider.$get()
    'date-format': 'yyyy-MM-dd'
    'datetime-format': 'yyyy-MM-ddThh:mm:ss.sss'
    'time-zone-offset': 'utc',
    'router-path-prefix': '',
    'router-states': states,
    'app-title': 'CloudStorm Sample App'
  }

  @settings = defaultSettings

  @set = (option, value) ->
    @settings[option] = value
    return

  @$get = ->
    @

  return

]

{'fraction_non_alphanumeric': 0.21840242669362994, 'fraction_numerical': 0.0010111223458038423, 'mean_word_length': 2.471052631578947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, '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': '1367976', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1138, 'n_words': 198}