     { computeController } = kd.singletons
 
     computeController.ready =>
+
       computeController.fetchPlanCombo 'managed', (err, userPlanInfo) =>
 
         return @handleError err  if err

    @setClass 'error'


  createPollLoader: ->

    kd.utils.wait 20000, =>
      @addSubView new kd.LoaderView showLoader: yes, size: width: 26
      @setClass 'polling'


  destroy: ->

    super

        limit = plans[plan].managed
        used  = usage.total

        return @handleUsageLimit()  if used >= limit

        whoami().fetchOtaToken (err, token) =>
          return @handleError err  if err

          @updateContentViews token


  updateContentViews: (token) ->

    kontrolUrl = if globals.config.environment in ['dev', 'sandbox']
    then "export KONTROLURL=#{globals.config.newkontrol.url}; "
    else ''

    cmd = "#{kontrolUrl}curl -sL https://kodi.ng/s | bash -s #{token}"

    @loader.destroy()
    @code.addSubView @input = new kd.InputView
      defaultValue : cmd
      click        : =>
        @showTooltip()
        @input.selectAll()

    @code.addSubView @selectButton = new kd.CustomHTMLView
      cssClass : 'select-all'
      partial  : '<span></span>SELECT'
      click    : =>
        @showTooltip()
        @input.selectAll()

    { computeController } = kd.singletons
    computeController.managedKiteChecker.addListener @bound 'machineFoundCallback'

    kd.utils.wait 20000, =>
      @addSubView new kd.LoaderView showLoader: yes, size: width: 26
      @setClass 'polling'


  showTooltip: ->
