summaryrefslogtreecommitdiff
path: root/widgets/gitlab_build_status/gitlab_build_status.coffee
blob: e501aed3bc453cf688b76cbe57e85e595580ab5d (plain)
1
2
3
4
5
6
7
8
9
10
11
class Dashing.GitlabBuildStatus extends Dashing.Widget

  onData: (data) ->
    if data.failed
      $(@node).find('div.gitlab-build-failed').show()
      $(@node).find('div.gitlab-build-succeeded').hide()
      $(@node).css("background-color", "red")
    else
      $(@node).find('div.gitlab-build-failed').hide()
      $(@node).find('div.gitlab-build-succeeded').show()
      $(@node).css("background-color", "#50BA5B")