From 8c1e52dd13743844197318fbccb34079708e3643 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Tue, 24 Feb 2015 11:51:21 +0100 Subject: [PATCH 1/9] prepare log header --- app/styles/app/_mixins/mixins.sass | 14 +++++++++++++- app/styles/app/_mixins/vars.sass | 5 ++++- app/styles/app/main/log.sass | 13 ++++++++++++- app/templates/jobs/pre.hbs | 10 +++++++--- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/app/styles/app/_mixins/mixins.sass b/app/styles/app/_mixins/mixins.sass index f84b3b0e..0e44cb0b 100644 --- a/app/styles/app/_mixins/mixins.sass +++ b/app/styles/app/_mixins/mixins.sass @@ -24,4 +24,16 @@ @mixin border-bottom-radius($radius) border-bottom-left-radius: $radius - border-bottom-right-radius: $radius \ No newline at end of file + border-bottom-right-radius: $radius + +@mixin border-top-radius($radius) + border-top-left-radius: $radius + border-top-right-radius: $radius + +%border-top-4px + border-top-left-radius: 4px + border-top-right-radius: 4px + +%border-bottom-4px + border-bottom-left-radius: 4px + border-bottom-right-radius: 4px \ No newline at end of file diff --git a/app/styles/app/_mixins/vars.sass b/app/styles/app/_mixins/vars.sass index 2c12db49..797d8011 100644 --- a/app/styles/app/_mixins/vars.sass +++ b/app/styles/app/_mixins/vars.sass @@ -51,4 +51,7 @@ $error-sand: #dcc682 // tabs $tab-nav-inactive-bg: #f8f8f8 $tab-nav-inactive-bg-hover: $white -$tab-active-bg: $blue-grey-light \ No newline at end of file +$tab-active-bg: $blue-grey-light + +// log +$log-header-bg: #444444 \ No newline at end of file diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass index 75ebba9b..81e02054 100644 --- a/app/styles/app/main/log.sass +++ b/app/styles/app/main/log.sass @@ -13,7 +13,6 @@ pre#log white-space: pre-wrap word-wrap: break-word background-color: #2a2a2a - border-radius: 4px counter-reset: line-numbering .cut @@ -166,3 +165,15 @@ pre#log text-align: right color: #999 background: inline-image('ui/workers-close.svg') no-repeat right 6px + + +.log + +.log-header + background-color: $log-header-bg + height: 40px + @extend %border-top-4px + +.log-body + @extend %border-bottom-4px + margin: 0 diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs index ff9e1293..6ff2a2aa 100644 --- a/app/templates/jobs/pre.hbs +++ b/app/templates/jobs/pre.hbs @@ -1,4 +1,8 @@ -
+
+ + + + @@ -10,7 +14,7 @@ {{/if}} -

+  

 
   {{#if view.log.hasContent}}
     Top
@@ -22,4 +26,4 @@
       build or download the raw log.
     

{{/if}} -
+ From 101fbc3021a66645613278036f9897d2ab12222e Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Tue, 24 Feb 2015 12:08:55 +0100 Subject: [PATCH 2/9] cleanup log styles a bit, remove ids form css --- app/styles/app/main/log.sass | 187 +++++++++++++++++------------------ app/templates/jobs/pre.hbs | 42 ++++---- 2 files changed, 112 insertions(+), 117 deletions(-) diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass index 81e02054..be32a1f5 100644 --- a/app/styles/app/main/log.sass +++ b/app/styles/app/main/log.sass @@ -1,19 +1,93 @@ -pre#log +.log position: relative - clear: left - min-height: 42px - margin-top: 25px - margin-top: 1em - padding: 15px 0 - color: $color-text-log - font-family: monospace - font-size: $font-size-log - line-height: $line-height-log - white-space: pre-wrap - word-wrap: break-word - background-color: #2a2a2a - counter-reset: line-numbering + margin-top: 35px + + .log-tail + z-index: 99 + position: absolute + display: block + top: 0 + right: 2px + margin: 13px 10px 0 0 + padding: 0 2px 0 3px + color: #666 + text-shadow: 0px 1px 0px #fff + font-family: "Source Sans Pro", Helvetica, sans-serif + font-size: $font-size-tiny + line-height: 14px + text-decoration: none + white-space: nowrap + border: 1px solid #bbb + border-top-color: #ddd + border-bottom-color: #bbb + border-radius: 8px + background: linear-gradient(#fff, #e0e0e0) + + label + display: none + cursor: pointer + + &:hover + padding: 1px 4px 1px 6px + label + display: inline + + &.scrolling + position: fixed + right: 32px + + &.bottom + bottom: 45px + top: inherit + + .status + display: inline-block + margin-right: 1px + width: 8px + height: 8px + background-color: #aaa + border-radius: 4px + box-shadow: $white 1px 1px 2px + + &.active .status + background-color: #6b0 + + .to-top + z-index: 99 + position: absolute + display: block + bottom: 2px + right: 2px + + margin-right: 2px + padding-right: 16px + text-align: right + color: #999 + background: inline-image('ui/workers-close.svg') no-repeat right 6px + +.log-header + height: 40px + margin: 0 + background-color: $log-header-bg + @extend %border-top-4px + +.log-body + position: relative + pre + clear: left + min-height: 42px + padding: 15px 0 + color: $color-text-log + font-family: monospace + font-size: $font-size-log + line-height: $line-height-log + white-space: pre-wrap + word-wrap: break-word + background-color: #2a2a2a + counter-reset: line-numbering + margin-top: 0 + @extend %border-bottom-4px .cut padding: 20px 15px 0 55px @@ -94,86 +168,5 @@ pre#log border-radius: 6px color: #bbb - -#log.loading - padding: 25px 0 0 10px - -#log-container - position: relative - margin-top: 35px - -#log-container - #tail - z-index: 99 - position: absolute - display: block - top: 0 - right: 2px - margin: 13px 10px 0 0 - padding: 0 2px 0 3px - color: #666 - text-shadow: 0px 1px 0px #fff - font-family: "Source Sans Pro", Helvetica, sans-serif - font-size: $font-size-tiny - line-height: 14px - text-decoration: none - white-space: nowrap - border: 1px solid #bbb - border-top-color: #ddd - border-bottom-color: #bbb - border-radius: 8px - background: linear-gradient(#fff, #e0e0e0) - - label - display: none - cursor: pointer - - &:hover - padding: 1px 4px 1px 6px - label - display: inline - - &.scrolling - position: fixed - right: 32px - - &.bottom - bottom: 45px - top: inherit - - .status - display: inline-block - margin-right: 1px - width: 8px - height: 8px - background-color: #aaa - border-radius: 4px - box-shadow: $white 1px 1px 2px - - &.active .status - background-color: #6b0 - - .to-top - z-index: 99 - position: absolute - display: block - bottom: 2px - right: 2px - - margin-right: 2px - padding-right: 16px - text-align: right - color: #999 - background: inline-image('ui/workers-close.svg') no-repeat right 6px - - -.log - -.log-header - background-color: $log-header-bg - height: 40px - @extend %border-top-4px - -.log-body - @extend %border-bottom-4px - margin: 0 + .loading + padding: 25px 0 0 10px diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs index 6ff2a2aa..9c2d06cc 100644 --- a/app/templates/jobs/pre.hbs +++ b/app/templates/jobs/pre.hbs @@ -3,27 +3,29 @@ - - +
+ + - - -

+      
+    
+    

 
-  {{#if view.log.hasContent}}
-    Top
-  {{/if}}
+    {{#if view.log.hasContent}}
+      Top
+    {{/if}}
 
-  {{#if view.limited}}
-    

- This log is too long to be displayed. Please reduce the verbosity of your - build or download the raw log. -

- {{/if}} + {{#if view.limited}} +

+ This log is too long to be displayed. Please reduce the verbosity of your + build or download the raw log. +

+ {{/if}} +
From e4a58787f411e62af6a57fcbd7858f5b5ca4b230 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Tue, 24 Feb 2015 13:29:27 +0100 Subject: [PATCH 3/9] trying to add actions --- app/styles/app/_mixins/mixins.sass | 3 ++ app/styles/app/components/buttons.sass | 11 ++++++++ app/styles/app/main/log.sass | 20 ++++++++++++- app/styles/app/main/tools.sass | 6 ---- app/templates/jobs/pre.hbs | 6 ++-- app/views/pre.coffee | 34 ++++++++++++++++++++++- public/images/icons/delete-log.svg | 14 ---------- public/images/icons/download-log-icon.svg | 15 ++++++++++ public/images/icons/download-log.svg | 14 ---------- public/images/icons/remove-log-icon.svg | 16 +++++++++++ 10 files changed, 101 insertions(+), 38 deletions(-) delete mode 100644 public/images/icons/delete-log.svg create mode 100644 public/images/icons/download-log-icon.svg delete mode 100644 public/images/icons/download-log.svg create mode 100644 public/images/icons/remove-log-icon.svg diff --git a/app/styles/app/_mixins/mixins.sass b/app/styles/app/_mixins/mixins.sass index 0e44cb0b..443d540a 100644 --- a/app/styles/app/_mixins/mixins.sass +++ b/app/styles/app/_mixins/mixins.sass @@ -30,6 +30,9 @@ border-top-left-radius: $radius border-top-right-radius: $radius +%border-radius-4px + border-radius: 4px + %border-top-4px border-top-left-radius: 4px border-top-right-radius: 4px diff --git a/app/styles/app/components/buttons.sass b/app/styles/app/components/buttons.sass index 87772870..bde80e4e 100644 --- a/app/styles/app/components/buttons.sass +++ b/app/styles/app/components/buttons.sass @@ -83,3 +83,14 @@ $button-border-color: #d4d4d4 #auth #navigation .button--signin display: none +.button--grey + height: 24px + padding: 0 10px 0 10px + background-color: #696867 + color: #f2f2f2 + font-size: $font-size-small + border: none + @extend %border-radius-4px + &:hover, + &:active + background-color: lighten(#696867, 10) diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass index be32a1f5..bbe0986b 100644 --- a/app/styles/app/main/log.sass +++ b/app/styles/app/main/log.sass @@ -67,10 +67,28 @@ background: inline-image('ui/workers-close.svg') no-repeat right 6px .log-header - height: 40px + height: 44px margin: 0 + padding: .8em + text-align: right background-color: $log-header-bg @extend %border-top-4px + .icon + display: inline-block + background: + size: 100% + repeat: no-repeat + width: 1.3em + height: 1.2em + margin-right: 6px + vertical-align: middle + .icon--downloadLog + background-image: inline-image('icons/download-log-icon.svg') + .icon--removeLog + background-image: inline-image('icons/remove-log-icon.svg') + button + margin-left: .4em + .log-body position: relative diff --git a/app/styles/app/main/tools.sass b/app/styles/app/main/tools.sass index 15062e94..6e3ccefe 100644 --- a/app/styles/app/main/tools.sass +++ b/app/styles/app/main/tools.sass @@ -88,12 +88,6 @@ li.cancel-build a, li.cancel-job a background-image: inline-image('icons/off.svg') - li.download-log a - background-image: inline-image('icons/download-log.svg') - - li.remove-log a - background-image: inline-image('icons/delete-log.svg') - li.code-climate a background-image: inline-image('icons/code-climate-icon.svg') diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs index 9c2d06cc..2435ddce 100644 --- a/app/templates/jobs/pre.hbs +++ b/app/templates/jobs/pre.hbs @@ -1,7 +1,9 @@
- - + {{#if view.canRemoveLog}} + + {{/if}} + Download Log
diff --git a/app/views/pre.coffee b/app/views/pre.coffee index 5f86af96..de867224 100644 --- a/app/views/pre.coffee +++ b/app/views/pre.coffee @@ -2,6 +2,7 @@ `import LogFolder from 'travis/utils/log-folder'` `import config from 'travis/config/environment'` `import { plainTextLog as plainTextLogUrl } from 'travis/utils/urls'` +`import BasicView from 'travis/views/basic'` Log.DEBUG = false Log.LIMIT = 10000 @@ -22,8 +23,9 @@ Log.Scroll.prototype = $.extend new Log.Listener, $('#main').scrollTop(0) $('html, body').scrollTop(element.offset()?.top - (window.innerHeight / 3)) # weird, html works in chrome, body in firefox -View = Ember.View.extend +View = BasicView.extend templateName: 'jobs/pre' + currentUserBinding: 'controller.currentUser' logWillChange: (-> console.log 'log view: log will change' if Log.DEBUG @@ -99,6 +101,16 @@ View = Ember.View.extend url ).property('job.log.id', 'job.log.token') + hasPermission: (-> + if permissions = @get('currentUser.permissions') + permissions.contains parseInt(@get('job.repo.id')) + ).property('currentUser.permissions.length', 'job.repo.id') + + canRemoveLog: (-> + if job = @get('job') + job.get('canRemoveLog') && @get('hasPermission') + ).property('job.canRemoveLog', 'hasPermission') + actions: toTop: () -> $(window).scrollTop(0) @@ -108,6 +120,26 @@ View = Ember.View.extend @engine.autoCloseFold = !Travis.tailing.isActive() event.preventDefault() + removeLog: -> + @popupCloseAll() + if @get('canRemoveLog') + job = @get('_job') || @get('build.jobs.firstObject') + job.removeLog().then -> + Travis.flash(success: 'Log has been successfully removed.') + , (xhr) -> + if xhr.status == 409 + Travis.flash(error: 'Log can\'t be removed') + else if xhr.status == 401 + Travis.flash(error: 'You don\'t have sufficient access to remove the log') + else + Travis.flash(error: 'An error occured when removing the log') + + removeLogPopup: -> + # if @get('canRemoveLog') + @set('active', true) + @popup('remove-log-popup') + return false + noop: -> # TODO required? `export default View` diff --git a/public/images/icons/delete-log.svg b/public/images/icons/delete-log.svg deleted file mode 100644 index ae4f5553..00000000 --- a/public/images/icons/delete-log.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/public/images/icons/download-log-icon.svg b/public/images/icons/download-log-icon.svg new file mode 100644 index 00000000..1df8b979 --- /dev/null +++ b/public/images/icons/download-log-icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/public/images/icons/download-log.svg b/public/images/icons/download-log.svg deleted file mode 100644 index 2d4ff02b..00000000 --- a/public/images/icons/download-log.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/public/images/icons/remove-log-icon.svg b/public/images/icons/remove-log-icon.svg new file mode 100644 index 00000000..a75c8bd8 --- /dev/null +++ b/public/images/icons/remove-log-icon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + From 203302bd63bd747133ed4d2015a14bd402afeab3 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 24 Feb 2015 13:51:51 +0100 Subject: [PATCH 4/9] Fix remove log button popup --- app/templates/jobs/pre.hbs | 2 +- app/views/pre.coffee | 8 ++++---- app/views/repo-actions.coffee | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs index 2435ddce..bda35c8e 100644 --- a/app/templates/jobs/pre.hbs +++ b/app/templates/jobs/pre.hbs @@ -1,7 +1,7 @@
{{#if view.canRemoveLog}} - + {{/if}} Download Log diff --git a/app/views/pre.coffee b/app/views/pre.coffee index de867224..222ba7f5 100644 --- a/app/views/pre.coffee +++ b/app/views/pre.coffee @@ -135,10 +135,10 @@ View = BasicView.extend Travis.flash(error: 'An error occured when removing the log') removeLogPopup: -> - # if @get('canRemoveLog') - @set('active', true) - @popup('remove-log-popup') - return false + if @get('canRemoveLog') + @set('active', true) + @popup('remove-log-popup') + return false noop: -> # TODO required? diff --git a/app/views/repo-actions.coffee b/app/views/repo-actions.coffee index ff8fece9..f40f5942 100644 --- a/app/views/repo-actions.coffee +++ b/app/views/repo-actions.coffee @@ -68,12 +68,6 @@ View = BasicView.extend @popup('code-climate') return false - removeLogPopup: -> - if @get('canRemoveLog') - @set('active', true) - @popup('remove-log-popup') - return false - hasPermission: (-> if permissions = @get('currentUser.permissions') permissions.contains parseInt(@get('repo.id')) From f599723bf2b8bfb9b09ee647b6382959c810ad99 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Tue, 24 Feb 2015 15:49:41 +0100 Subject: [PATCH 5/9] finish new buttons add :focus styles cleanup log styles a bit, remove ids form css trying to add actions finish new buttons --- app/styles/app/components/buttons.sass | 5 ++++- app/styles/app/main/log.sass | 7 +++---- app/templates/jobs/pre.hbs | 2 +- app/templates/repos/show/actions.hbs | 16 ---------------- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/app/styles/app/components/buttons.sass b/app/styles/app/components/buttons.sass index bde80e4e..14192d8c 100644 --- a/app/styles/app/components/buttons.sass +++ b/app/styles/app/components/buttons.sass @@ -84,13 +84,16 @@ $button-border-color: #d4d4d4 display: none .button--grey - height: 24px + height: 22px padding: 0 10px 0 10px background-color: #696867 color: #f2f2f2 + // line-height: 1.45 font-size: $font-size-small border: none @extend %border-radius-4px &:hover, &:active background-color: lighten(#696867, 10) + &:focus + background-color: #696867 diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass index bbe0986b..70893a44 100644 --- a/app/styles/app/main/log.sass +++ b/app/styles/app/main/log.sass @@ -69,7 +69,7 @@ .log-header height: 44px margin: 0 - padding: .8em + padding: .9em .8em .6em text-align: right background-color: $log-header-bg @extend %border-top-4px @@ -79,17 +79,16 @@ size: 100% repeat: no-repeat width: 1.3em - height: 1.2em + height: 1.1em margin-right: 6px vertical-align: middle .icon--downloadLog background-image: inline-image('icons/download-log-icon.svg') .icon--removeLog background-image: inline-image('icons/remove-log-icon.svg') - button + a margin-left: .4em - .log-body position: relative pre diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs index bda35c8e..15cc5ac4 100644 --- a/app/templates/jobs/pre.hbs +++ b/app/templates/jobs/pre.hbs @@ -1,7 +1,7 @@
{{#if view.canRemoveLog}} - + Remove Log {{/if}} Download Log diff --git a/app/templates/repos/show/actions.hbs b/app/templates/repos/show/actions.hbs index c262912b..ba47ed3c 100644 --- a/app/templates/repos/show/actions.hbs +++ b/app/templates/repos/show/actions.hbs @@ -32,22 +32,6 @@ {{/if}} {{/if}} - {{#if view.jobIdForLog}} - {{#if view.showDownloadLog}} -
  • - -
  • - {{/if}} - {{/if}} - {{! the next if is a hack for refreshing displayRemoveLog when we change - views, it sometimes doesn't work properly }} - {{#if view.jobIdForLog}} - {{#if view.displayRemoveLog}} -
  • - -
  • - {{/if}} - {{/if}} {{#if view.displayCodeClimate}}
  • Date: Wed, 25 Feb 2015 12:43:49 +0100 Subject: [PATCH 6/9] add new styles to log-scroll-btn --- app/styles/app/_mixins/mixins.sass | 10 +++- app/styles/app/main/log.sass | 80 +++++++++++++------------ app/templates/jobs/pre.hbs | 7 +-- public/images/icons/end-of-log-icon.svg | 7 +++ 4 files changed, 60 insertions(+), 44 deletions(-) create mode 100644 public/images/icons/end-of-log-icon.svg diff --git a/app/styles/app/_mixins/mixins.sass b/app/styles/app/_mixins/mixins.sass index 443d540a..8286d9d5 100644 --- a/app/styles/app/_mixins/mixins.sass +++ b/app/styles/app/_mixins/mixins.sass @@ -39,4 +39,12 @@ %border-bottom-4px border-bottom-left-radius: 4px - border-bottom-right-radius: 4px \ No newline at end of file + border-bottom-right-radius: 4px + +%absolute-center + position: absolute + top: 0 + right: 0 + left: 0 + bottom: 0 + margin: auto \ No newline at end of file diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass index 70893a44..b36bee03 100644 --- a/app/styles/app/main/log.sass +++ b/app/styles/app/main/log.sass @@ -8,30 +8,18 @@ position: absolute display: block top: 0 - right: 2px + right: 0 margin: 13px 10px 0 0 - padding: 0 2px 0 3px - color: #666 - text-shadow: 0px 1px 0px #fff - font-family: "Source Sans Pro", Helvetica, sans-serif - font-size: $font-size-tiny - line-height: 14px - text-decoration: none - white-space: nowrap - border: 1px solid #bbb - border-top-color: #ddd - border-bottom-color: #bbb - border-radius: 8px - background: linear-gradient(#fff, #e0e0e0) - label + .tail-label display: none cursor: pointer &:hover - padding: 1px 4px 1px 6px - label - display: inline + .tail-label + display: inline-block + .tail-status + display: none &.scrolling position: fixed @@ -41,16 +29,24 @@ bottom: 45px top: inherit - .status + .tail-status + position: relative display: inline-block - margin-right: 1px - width: 8px - height: 8px - background-color: #aaa - border-radius: 4px - box-shadow: $white 1px 1px 2px + height: 20px; + width: 20px; + vertical-align: middle + background-color: #696867; + border-radius: 50%; + &:after + content: "" + display: block + height: 10px; + width: 10px; + background: #F2F2F2; + border-radius: 50%; + @extend %absolute-center - &.active .status + &.active .tail-status background-color: #6b0 .to-top @@ -73,22 +69,28 @@ text-align: right background-color: $log-header-bg @extend %border-top-4px - .icon - display: inline-block - background: - size: 100% - repeat: no-repeat - width: 1.3em - height: 1.1em - margin-right: 6px - vertical-align: middle - .icon--downloadLog - background-image: inline-image('icons/download-log-icon.svg') - .icon--removeLog - background-image: inline-image('icons/remove-log-icon.svg') a margin-left: .4em +.icon + display: inline-block + background: + size: 100% + repeat: no-repeat + width: 1.3em + height: 1.1em + margin-right: 6px + vertical-align: middle +.icon--downloadLog + background-image: inline-image('icons/download-log-icon.svg') +.icon--removeLog + background-image: inline-image('icons/remove-log-icon.svg') +.icon--down + width: 0.7em + height: 0.9em + margin-right: 4px + background-image: inline-image('icons/end-of-log-icon.svg') + .log-body position: relative pre diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs index 15cc5ac4..501d897c 100644 --- a/app/templates/jobs/pre.hbs +++ b/app/templates/jobs/pre.hbs @@ -7,15 +7,14 @@
    - - - +
    
     
    diff --git a/public/images/icons/end-of-log-icon.svg b/public/images/icons/end-of-log-icon.svg
    new file mode 100644
    index 00000000..a044c7f5
    --- /dev/null
    +++ b/public/images/icons/end-of-log-icon.svg
    @@ -0,0 +1,7 @@
    +
    +
    +
    +
    +
    +
    
    From a9155287c570aecc6c1817b5115be2ca2565e03d Mon Sep 17 00:00:00 2001
    From: Lisa Passing 
    Date: Wed, 25 Feb 2015 13:12:44 +0100
    Subject: [PATCH 7/9] shift scroll log btn around a bit
    
    ---
     app/styles/app/main/log.sass | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass
    index b36bee03..1c017fc3 100644
    --- a/app/styles/app/main/log.sass
    +++ b/app/styles/app/main/log.sass
    @@ -9,7 +9,7 @@
         display: block
         top: 0
         right: 0
    -    margin: 13px 10px 0 0
    +    margin: 10px 10px 0 0
     
         .tail-label
           display: none
    
    From ae7586c12150fe4247aa33fd4da64f831d4415ab Mon Sep 17 00:00:00 2001
    From: Lisa Passing 
    Date: Wed, 25 Feb 2015 15:39:51 +0100
    Subject: [PATCH 8/9] add custom message in log
    
    ---
     app/styles/app/main/log.sass | 11 +++++++
     app/templates/jobs/pre.hbs   | 59 +++++++++++++++++++-----------------
     2 files changed, 43 insertions(+), 27 deletions(-)
    
    diff --git a/app/styles/app/main/log.sass b/app/styles/app/main/log.sass
    index 1c017fc3..bf266c2b 100644
    --- a/app/styles/app/main/log.sass
    +++ b/app/styles/app/main/log.sass
    @@ -189,3 +189,14 @@
     
       .loading
         padding: 25px 0 0 10px
    +
    +.log-notice
    +  background-color: #A6ADAD
    +  color: $white
    +  min-height: 70px
    +  line-height: 35px
    +  text-align: center
    +  @extend %border-radius-4px
    +  @media #{$medium-up}
    +    height: 70px
    +    line-height: 70px
    diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs
    index 501d897c..ca8c1769 100644
    --- a/app/templates/jobs/pre.hbs
    +++ b/app/templates/jobs/pre.hbs
    @@ -1,32 +1,37 @@
     
    - - {{#if view.canRemoveLog}} - Remove Log - {{/if}} - Download Log - -
    - - - - {{#if view.job.isFinished}} - Scroll to End of Log - {{else}} - Follow Log - {{/if}} - - -
    
    +  {{#if view.job.notStarted}}
    +    
    Hang tight, the log cannot be shown until the build has started.
    + {{/if}} +
    + + {{#if view.canRemoveLog}} + Remove Log + {{/if}} + Download Log + +
    + + + + {{#if view.job.isFinished}} + Scroll to End of Log + {{else}} + Follow Log + {{/if}} + + +
    
     
    -    {{#if view.log.hasContent}}
    -      Top
    -    {{/if}}
    +      {{#if view.log.hasContent}}
    +        Top
    +      {{/if}}
     
    -    {{#if view.limited}}
    -      

    - This log is too long to be displayed. Please reduce the verbosity of your - build or download the raw log. -

    - {{/if}} + {{#if view.limited}} +

    + This log is too long to be displayed. Please reduce the verbosity of your + build or download the raw log. +

    + {{/if}} +
    From 405cdd3dae3c73b9dcf66fcdcf389ac1eae4f2dd Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 25 Feb 2015 16:50:49 +0100 Subject: [PATCH 9/9] Received state should also indicate not started build --- app/models/build.coffee | 2 +- app/models/job.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/build.coffee b/app/models/build.coffee index 5f3c3c4a..63cddee0 100644 --- a/app/models/build.coffee +++ b/app/models/build.coffee @@ -51,7 +51,7 @@ Build = Model.extend DurationCalculations, ).property('state') notStarted: (-> - @get('state') in ['queued', 'created'] + @get('state') in ['queued', 'created', 'received'] ).property('state') startedAt: (-> diff --git a/app/models/job.coffee b/app/models/job.coffee index fadea741..ca252075 100644 --- a/app/models/job.coffee +++ b/app/models/job.coffee @@ -62,7 +62,7 @@ Job = Model.extend DurationCalculations, ).property('state') notStarted: (-> - @get('state') in ['queued', 'created'] + @get('state') in ['queued', 'created', 'received'] ).property('state') clearLog: ->