blob: d2faf3eb9d12e30ac22d1c569dc97873685a250b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
class Dashing.GitlabBuildStatus extends Dashing.Widget
onData: (data) ->
color = "#50BA5B"
if data.running
color = "#DA9A30"
$(@node).find('div.gitlab-build-running').show()
else
$(@node).find('div.gitlab-build-running').hide()
if data.failed
color = "red"
$(@node).find('div.gitlab-build-failed').show()
$(@node).find('div.gitlab-build-succeeded').hide()
else
$(@node).find('div.gitlab-build-failed').hide()
$(@node).find('div.gitlab-build-succeeded').show()
$(@node).css("background-color", color)
|