class Dashboard constructor: () -> getCpuProc: () -> $.get "/top_cpu", (data) -> total = data.length return_data = '' i = 0 while i <= total return_data += "
  • " + data[i] + "
  • " unless typeof data[i] is "undefined" i++ $('#cpu_list').html return_data return dashboard = new Dashboard dashboard.getCpuProc()