 'use strict'
 
 class DomainCtrl
-  constructor: (@scope, @DomainsFcty, @domainName) ->
+  constructor: (@scope, @DomainsFcty, @domainName, @WebSocketFcty) ->
     @selectedCategory = null
     @numberOfPages = 0
     @reviewCount = 0

    @scope.$watch('model.reviewFilter', updateReviewData)

angular.module('holmesApp')
  .controller 'DomainCtrl', ($scope, DomainsFcty, $routeParams) ->
    $scope.model = new DomainCtrl($scope, DomainsFcty, $routeParams.domainName)

    @getReviewsData()
    @getDomainDetails()
    @watchScope()

    @WebSocketFcty.on((message) =>
      if message.type == 'new-page' or message.type == 'new-review'
        @getDomainDetails()
        @getReviewsData()
    )

    @domainCategories = [
      { id: 1, label: 'SEO Violations', value: 31.79, pageCount: 198542, color: 'color1' },
