forked from jzoldak/edx-eng-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jay Zoldak
committed
Mar 2, 2014
1 parent
c27484c
commit df172d0
Showing
13 changed files
with
82 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ gem 'dashing', "1.3.2" | |
gem 'nokogiri' | ||
gem 'execjs' | ||
gem 'therubyracer' | ||
gem 'httparty' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'httparty' | ||
|
||
github_api = 'https://status.github.com/api/last-message.json' | ||
|
||
SCHEDULER.every '1m', :first_in => 0 do | ||
send_event('github_status', HTTParty.get(github_api).parsed_response) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adapted from https://gist.github.com/dacamp/7166065 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class Dashing.GithubStatus extends Dashing.Widget | ||
ready: -> | ||
@onData(this) | ||
|
||
onData: (data) -> | ||
widget = $(@node) | ||
widget.removeClass("good minor major").addClass(data.status) | ||
widget.find('#github-logo').removeClass("good minor major").addClass(data.status) | ||
widget.find('#message').removeClass("good minor major").addClass(data.status) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="latest-message" class="wrap"> | ||
<p id="message" data-bind="body"></span> | ||
</div> | ||
<div id="github-logo"></div> | ||
<p class="updated-at" data-bind="updatedAtMessage"></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// ---------------------------------------------------------------------------- | ||
// Widget-github-status styles | ||
// ---------------------------------------------------------------------------- | ||
.widget-github-status { | ||
background: #2A455C url("/assets/github/invertocat.png") no-repeat center; | ||
position: relative; | ||
overflow: hidden; | ||
&.good {color:#396;} | ||
&.minor {color:#f29d50;} | ||
&.major {color:#c30;} | ||
|
||
div { | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
margin: 0 auto; | ||
} | ||
|
||
#latest-message{ | ||
top: 5px; | ||
margin: 0 5px; | ||
#message { | ||
&.good { | ||
} | ||
&.minor { | ||
background:#fdf5ed; | ||
border-radius:3px; | ||
border:1px solid #ccc; | ||
border-color:#f8cea7; | ||
} | ||
&.major { | ||
background:#f9eae5; | ||
border-radius:3px; | ||
border:1px solid #ccc; | ||
border-color:#e5997f; | ||
} | ||
} | ||
} | ||
|
||
#github-logo{ | ||
bottom: 30px; | ||
height: 100px; | ||
width: 200px; | ||
&.good { background: url("/assets/github/logo-good.png") no-repeat center bottom; } | ||
&.minor { background: url("/assets/github/logo-minor.png") no-repeat center bottom; } | ||
&.major { background: url("/assets/github/logo-major.png") no-repeat center bottom; } | ||
} | ||
|
||
.updated-at { | ||
color: rgba(255, 255, 255, 0.7); | ||
} | ||
} |