   @defaultProps =
     className : 'ConnectedManagedVm sidebar-info-modal'
 
-  getDataBindings: ->
-    connectedManagedMachine: EnvironmentFlux.getters.connectedManagedMachine
+  onClose: ->
+
+    kd.singletons.sidebar.removeManaged @props.machine.getId()
 
 
-  onClose: ->
+  onButtonClick: ->
 
-    kd.utils.defer =>
-      actions.hideManagedMachineAddedModal @props.machine.get '_id'
-
-
-  handleButtonClick: ->
-
-    { router } = kd.singletons
-    currentPath = router.getCurrentPath()
-    newPath = "/IDE/#{@props.machine.slug}"
+    kd.singletons.router.handleRoute newPath
 
     @onClose()
-    router.handleRoute newPath  unless newPath is currentPath
 
 
   render: ->
-
-    connectedMachine = @state.connectedManagedMachine.get @props.machine.get('_id')
-
-    return null  unless connectedMachine
-
-    provider = if PROVIDERS[connectedMachine.providerName]
-    then connectedMachine.providerName
-    else 'UnknownProvider'
 
     <SidebarWidget {...@props} onClose={@bound 'onClose'}>
 

kd = require 'kd'
React = require 'app/react'
SidebarWidget = require './widget'
EnvironmentFlux = require 'app/flux/environment'
KDReactorMixin = require 'app/flux/base/reactormixin'
actions = require 'app/flux/environment/actions'


PROVIDERS         =


          <button
            className='GenericButton'
            onClick={@bound 'onButtonClick'}
            children='START CODING' />

        </div>
      </div>

    </SidebarWidget>
