<commit_before>kd                                 = require 'kd'
AdminIntegrationsListView          = require './adminintegrationslistview'
AdminConfiguredIntegrationItemView = require './adminconfiguredintegrationitemview'

DUMMY_DATA =
  title       : 'Airbrake'
  iconPath    : 'https://koding-cdn.s3.amazonaws.com/temp-images/airbrake.png'
  summary     : 'Error monitoring and handling.'
  description : """
    <p>Airbrake captures errors generated by your team's web applications, and aggregates the results for easy review.</p>
    <p>This integration will post notifications in Slack when an error is reported in Airbrake.</p>
  """
  channels : [
    { name: '#general',   id: '123' }
    { name: '#random',    id: '124' }
    { name: '#off-topic', id: '125' }
  ]
  selectedChannel : '123'
  webhookUrl      : 'https://hooks.koding.com/services/123/abc/def'
  instructions    : """
    #### Step 1

    In your Airbrake dashboard, click on the menu button in the top navigation, and then select **Integrations** from the sub-menu.

    ![airbrake_step1.png](https://koding-cdn.s3.amazonaws.com/temp-images/airbrake_step1.png)


    #### Step 2

    Click on Slack in the list of integrations, add `https://hooks.slack.com/services/123/abc/def` as the Slack webhook, and choose your notification settings. Press the Save button when you're done.

    ![airbrake_step2.png](https://koding-cdn.s3.amazonaws.com/temp-images/airbrake_step2.png)
  """

module.exports = class AdminConfiguredIntegrationsListView extends AdminIntegrationsListView

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

    options.listItemClass     = AdminConfiguredIntegrationItemView
    options.fetcherMethodName = 'fetchChannelIntegrations'

    super options, data


  registerListItem: (item) ->

    super

    item.on 'IntegrationCustomizeRequested', (integrationData) =>

      # temp code...
      integrationData = DUMMY_DATA

      @showIntegrationDetails integrationData<commit_msg>Admin: Integrations: Removed dummy data.<commit_after>kd                                 = require 'kd'
AdminIntegrationsListView          = require './adminintegrationslistview'
AdminConfiguredIntegrationItemView = require './adminconfiguredintegrationitemview'


module.exports = class AdminConfiguredIntegrationsListView extends AdminIntegrationsListView

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

    options.listItemClass     = AdminConfiguredIntegrationItemView
    options.fetcherMethodName = 'fetchChannelIntegrations'

    super options, data


  registerListItem: (item) ->

    super

    item.on 'IntegrationCustomizeRequested', (integrationData) =>
      @showIntegrationDetails integrationData
{'fraction_non_alphanumeric': 0.10063598952487841, 'fraction_numerical': 0.010101010101010102, 'mean_word_length': 3.524534686971235, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3112624', 'n_tokens_mistral': 788, 'n_tokens_neox': 735, 'n_words': 182}