     @progress  = new KDProgressBarView
       cssClass : 'hidden'
 
-    if @getData().isMine()
+    if @machine.isMine()
       @settingsIcon = new KDCustomHTMLView
         tagName     : 'span'
         click       : @bound 'handleMachineSettingsClick'


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

    machine      = data
    @alias       = machine.slug or machine.label
    ideRoute     = "/IDE/#{@alias}/my-workspace"
    machineOwner = machine.getOwner()
    isMyMachine  = machine.isMine()
    channelId    = ''

    if not isMyMachine and globals.userWorkspaces
      globals.userWorkspaces.forEach (ws) ->
        return if channelId

        if ws.machineUId is machine.uid and ws.channelId
          channelId = ws.channelId

      ideRoute = if channelId
        "/IDE/#{channelId}"
      else
        "/IDE/#{machine.uid}/my-workspace"

    options.tagName    = 'a'
    options.cssClass   = "vm #{machine.status.state.toLowerCase()} #{machine.provider}"
    options.attributes =
      href             : groupifyLink ideRoute
      title            : "Open IDE for #{@alias}"

    unless machineOwner is nick()
      options.attributes.title += " (shared by @#{htmlencode.htmlDecode machineOwner})"

    super options, data

    @machine   = @getData()

    labelPartial = machine.label or @alias

    unless isMyMachine


  handleMachineSettingsClick: (event) ->

    { status } = @machine
    { Building, Running } = Machine.State

    kd.utils.stopDOMEvent event

    if status?.state is Running
      kd.singletons.mainView.openMachineModal @machine, this
    else return


