           if name is 'domains'
             title   : dia.data.title
             aliases : dia.data.aliases
-          else if name is 'vms'
+          else if name is 'machines'
             obj     =
-              title : dia.data.title
-            if dia.data.meta?.initScript
+              provider : dia.data.provider
+              meta     : dia.data.meta
+            if dia.data.initScript
               obj.initScript = "[...]"
             obj
           else if name is 'rules'

    super options, data

    @bindTransitionEnd()

  viewAppended:->

    @createHeaderElements()

    # Main scene for DIA
    @addSubView @scene = new EnvironmentScene @getData().stack

    # Rules Container
    @rules = new EnvironmentRuleContainer
    @scene.addContainer @rules
    @rules.on "itemAdded", @lazyBound "updateView", yes

    # Domains Container

    @domains = new EnvironmentDomainContainer { delegate: this }
    @scene.addContainer @domains
    @domains.on 'itemAdded', @lazyBound 'updateView', yes

    # VMs / Machines Container
    stackId = @getOptions().stack.getId?()
    @vms    = new EnvironmentMachineContainer { stackId }
    @scene.addContainer @vms

    KD.getSingleton("vmController").on 'VMListChanged', =>
      EnvironmentDataProvider.get (data) => @loadContainers data

    # Extras Container
    @extras = new EnvironmentExtraContainer
    @scene.addContainer @extras

    @loadContainers()
    @emit "ready", this

  loadContainers: (data)->

    env     = data or @getData()
    orphans = domains: [], vms: []
    {stack, isDefault} = @getOptions()

    # Add rules
    @rules.removeAllItems()
    @rules.addItem rule  for rule in env.rules

    # Add domains
    @domains.removeAllItems()
    for domain in env.domains
      if domain.stack is stack.getId() or (isDefault and not domain.stack)
        @domains.addDomain domain
      else
        orphans.domains.push domain

    # Add vms
    @vms.removeAllItems()
    for vm in env.vms
      if vm.stack is stack.getId() or (isDefault and not vm.stack)
        vm.title = vm.hostnameAlias
        @vms.addItem vm
      else
        orphans.vms.push vm

    # Add extras
    @extras.removeAllItems()
    @extras.addItem extra  for extra in env.extras

    @setHeight @getProperHeight()
    KD.utils.wait 300, =>
      @_inProgress = no
      @updateView yes

  dumpStack:->
    stackRecipe  = @getStackDump yes
    editorModal  = new EditorModal
      removeOnOverlayClick : yes
      cssClass   : "recipe-editor"

      'Clone this stack'   :
        callback           : =>
          stackDump        = @getStackDump()
          stackDump.config = @stack.config or ""
          @emit "CloneStackRequested", stackDump
      'Delete stack'       :
        callback           : @bound "deleteStack"

    return items


  createHeaderElements:->

    group = KD.getGroup().title
    title = "#{@stack.title or 'a'} on #{group}"

    @addSubView title = new KDView
      cssClass : 'stack-title'
