diff --git a/app/components/travis-status.coffee b/app/components/travis-status.coffee new file mode 100644 index 00000000..3ae86598 --- /dev/null +++ b/app/components/travis-status.coffee @@ -0,0 +1,22 @@ +`import Ember from 'ember'` +`import Ajax from 'travis/utils/ajax'` +`import config from 'travis/config/environment'` + +TravisStatusComponent = Ember.Component.extend + status: null + + statusPageStatusUrl: (-> + config.statusPageStatusUrl + ).property() + + didInsertElement: -> + if url = @get('statusPageStatusUrl') + self = this + @getStatus(url).then (response) -> + if response.status and response.status.indicator + self.set('status', response.status.indicator) + + getStatus: (url) -> + $.ajax(url) + +`export default TravisStatusComponent` diff --git a/app/styles/app/landing.sass b/app/styles/app/landing.sass index 51ecca7c..70520f63 100644 --- a/app/styles/app/landing.sass +++ b/app/styles/app/landing.sass @@ -13,7 +13,7 @@ background-color: #eff0ec #landing - margin: 0 auto + margin: 0 auto 170px auto max-width: 1200px font-weight: 300 diff --git a/app/styles/app/layout.sass b/app/styles/app/layout.sass index 5d455793..f1b6a6a8 100644 --- a/app/styles/app/layout.sass +++ b/app/styles/app/layout.sass @@ -52,6 +52,9 @@ margin-bottom: -99999px padding-bottom: 100034px + #left + z-index: -1 + @media #{$large-up} #left, #right, .wrapper-main diff --git a/app/styles/app/layouts/footer.sass b/app/styles/app/layouts/footer.sass index 59d02b94..2cf55092 100644 --- a/app/styles/app/layouts/footer.sass +++ b/app/styles/app/layouts/footer.sass @@ -62,7 +62,6 @@ footer a:active text-decoration : underline .status-circle - background : $pass-color display : inline-block height : 11px width : 11px @@ -72,3 +71,15 @@ footer a:active -webkit-border-radius : 100px -moz-border-radius : 100px vertical-align: middle + +.status-circle.none + background: #2fcc66 + +.status-circle.degraded + background: #f1c40f + +.status-circle.minor + background: #e67e22 + +.status-circle.major + background: #e74c3c diff --git a/app/templates/components/travis-status.hbs b/app/templates/components/travis-status.hbs new file mode 100644 index 00000000..a599939b --- /dev/null +++ b/app/templates/components/travis-status.hbs @@ -0,0 +1,8 @@ +{{#if statusPageStatusUrl}} +