From 94e3b2ba1fe499dcb0e8e7ee10e1d2caaa806091 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 17 Jul 2017 19:06:53 +0200 Subject: cleanup: jenkins - we don't use anymore --- .../jenkins_build_status.coffee | 28 ----------- .../jenkins_build_status/jenkins_build_status.html | 16 ------- .../jenkins_build_status/jenkins_build_status.scss | 56 ---------------------- 3 files changed, 100 deletions(-) delete mode 100644 widgets/jenkins_build_status/jenkins_build_status.coffee delete mode 100644 widgets/jenkins_build_status/jenkins_build_status.html delete mode 100644 widgets/jenkins_build_status/jenkins_build_status.scss (limited to 'widgets') diff --git a/widgets/jenkins_build_status/jenkins_build_status.coffee b/widgets/jenkins_build_status/jenkins_build_status.coffee deleted file mode 100644 index d7d8630..0000000 --- a/widgets/jenkins_build_status/jenkins_build_status.coffee +++ /dev/null @@ -1,28 +0,0 @@ -class Dashing.JenkinsBuildStatus extends Dashing.Widget - - lastPlayed: 0 - timeBetweenSounds: 300000 - - onData: (data) -> - if data.failed - $(@node).find('div.build-failed').show() - $(@node).find('div.build-succeeded').hide() - $(@node).css("background-color", "red") - - if 'speechSynthesis' of window - @playSoundForUser data.failedJobs[0].value if Date.now() - @lastPlayed > @timeBetweenSounds - else - $(@node).find('div.build-failed').hide() - $(@node).find('div.build-succeeded').show() - $(@node).css("background-color", "#12b0c5") - - playSoundForUser: (user) -> - @lastPlayed = Date.now() - texts = ["#{user} has broken the build.", "The build is broken by #{user}", "#{user} is great, but lacks some programming skills", "Oops, I did it again."] - textNr = Math.floor((Math.random() * texts.length)); - @playSound texts[textNr] - - playSound: (text) -> - msg = new SpeechSynthesisUtterance(text) - msg.voice = speechSynthesis.getVoices()[0] - speechSynthesis.speak msg \ No newline at end of file diff --git a/widgets/jenkins_build_status/jenkins_build_status.html b/widgets/jenkins_build_status/jenkins_build_status.html deleted file mode 100644 index 472bc73..0000000 --- a/widgets/jenkins_build_status/jenkins_build_status.html +++ /dev/null @@ -1,16 +0,0 @@ -
-

FAILED

- -
- -
-

All builds are successful

- -
- -

diff --git a/widgets/jenkins_build_status/jenkins_build_status.scss b/widgets/jenkins_build_status/jenkins_build_status.scss deleted file mode 100644 index 2e475b0..0000000 --- a/widgets/jenkins_build_status/jenkins_build_status.scss +++ /dev/null @@ -1,56 +0,0 @@ -// ---------------------------------------------------------------------------- -// Sass declarations -// ---------------------------------------------------------------------------- -$background-color: #ec663c; -$title-color: rgba(255, 255, 255, 0.7); -$label-color: rgba(255, 255, 255, 0.7); -$value-color: #fff; - -// ---------------------------------------------------------------------------- -// Widget-text styles -// ---------------------------------------------------------------------------- -.widget-jenkins-build-status { - - background-color: $background-color; - - .title { - color: $title-color; - } - .updated-at { - color: rgba(255, 255, 255, 0.7); - } - - ol, ul { - margin: 0 15px; - text-align: left; - color: $label-color; - } - - li { - margin-bottom: 5px; - font-size: 20px; - } - - .label { - color: $label-color; - } - - .value { - margin-left: 12px; - font-weight: 600; - color: $value-color; - } - - .updated-at { - color: rgba(0, 0, 0, 0.3); - } - - .build-failed { - display: none; - } - - .fa { - font-size: 10em; - color: $label-color; - } -} -- cgit v1.2.3