-  Ext.define "Muleview.view.AlertsEditor",
+Ext.define "Muleview.view.AlertsEditor",
   extend: "Ext.window.Window"
   icon: "resources/default/images/alerts.png"
   modal: true

    @alert = Ext.StoreManager.get("alertsStore").getById(alertName)
    @alert ||= @createDefaultAlert()
    @form.loadRecord(@alert)
    @formatTimeFields()
    @getForm().clearInvalid()
    @updateHeight(@alert.get("isOn"))

  formatTimeFields: ->
    for timeField in @form.query("muletimefield")

            change: (me, val) =>
              @updateHeight(val)
        ,
          xtype: "muletimefield"
          name: "period"
          fieldLabel: "Alert Period"
        ,
          html: "<hr />"
          border: false
        ,
          xtype: "container"

          layout:
            type: "table"
            columns: 3

            tableAttrs:
              style:
                width: "100%"

            trAttrs:
              style:
                height: "30px"
                "vertical-align": "middle"

          items: [
              xtype: "label"
              cls: "alerts-editor-table-header"
              text: "Alert Type"
            ,
              xtype: "label"
              cls: "alerts-editor-table-header"
              text: "Total Period"

            ,
              xtype: "label"
              cls: "alerts-editor-table-header"
              text: "Average Step"
          ].concat(@createAlertRows())
        ,
          html: "<hr />"
          border: false
        ,
          xtype: "muletimefield"
          name: "stale"
          fieldLabel: "Stale Period"
      ]

    @form = Ext.create "Ext.form.Panel",

      bodyPadding: 10
      trackResetOnLoad: true
      layout:
