 
       @setData stackTemplate
 
+
+  buildLabels: ->
+
+    { isDefault, inUse, accessLevel, config } = @getData()
 
     @isDefaultView = new kd.CustomHTMLView
       cssClass   : 'custom-tag'

    @notReadyView.hide()  if config.verified


  generateStackFromTemplate: ->

    stackTemplate = @getData()
    stackTemplate.generateStack (err, stack) =>

      unless showError err
        kd.singletons.computeController.reset yes, => @getDelegate().emit 'StackGenerated'
        new kd.NotificationView { title: 'Stack generated successfully' }


  _itemSelected: (data) ->


    @setAttribute 'testpath', "#{accessLevel}StackListItem"

    @buildLabels()

    kd.singletons.groupsController.on 'StackTemplateChanged', (params) =>
      if params.contents is _id
