refactor coloring styles and work on trigger build workflow
This commit is contained in:
parent
ac8765f0f1
commit
5a35f0c1b7
|
@ -51,6 +51,10 @@ BranchRowComponent = Ember.Component.extend
|
||||||
lastBuilds
|
lastBuilds
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
|
canTrigger: (->
|
||||||
|
@get('auth.signedIn')
|
||||||
|
).property()
|
||||||
|
|
||||||
triggerBuild: (->
|
triggerBuild: (->
|
||||||
apiEndpoint = config.apiEndpoint
|
apiEndpoint = config.apiEndpoint
|
||||||
repoId = @get('build.repository.id')
|
repoId = @get('build.repository.id')
|
||||||
|
@ -71,7 +75,6 @@ BranchRowComponent = Ember.Component.extend
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
tiggerBuild: (branch) ->
|
tiggerBuild: (branch) ->
|
||||||
console.log('trigger build')
|
|
||||||
@.set('isTriggering', true)
|
@.set('isTriggering', true)
|
||||||
@triggerBuild()
|
@triggerBuild()
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
.two-line
|
.two-line
|
||||||
@extend %row-element
|
@extend %row-element
|
||||||
padding: .6em 0
|
padding: .4em 0
|
||||||
margin-left: 2em
|
margin-left: 2em
|
||||||
text-align: left
|
text-align: left
|
||||||
|
|
||||||
|
@ -269,7 +269,8 @@
|
||||||
.is-relative
|
.is-relative
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
.nobuilds-tigger
|
span.nobuilds-tigger,
|
||||||
|
a.nobuilds-tigger
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0
|
top: 0
|
||||||
left: 0
|
left: 0
|
||||||
|
@ -284,11 +285,14 @@
|
||||||
border: 1px solid #E4E6E6
|
border: 1px solid #E4E6E6
|
||||||
border-radius: 2px
|
border-radius: 2px
|
||||||
background-color: #fff
|
background-color: #fff
|
||||||
|
.icon-trigger
|
||||||
|
height: 1.4em !important
|
||||||
|
|
||||||
|
a.nobuilds-tigger
|
||||||
&:hover
|
&:hover
|
||||||
background: #A6ADAD
|
background: #A6ADAD
|
||||||
color: white
|
color: white
|
||||||
.icon-trigger svg path
|
.icon-trigger svg path
|
||||||
fill: #fff
|
fill: #fff
|
||||||
.icon-trigger
|
|
||||||
height: 1.4em !important
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
$sb-grey: #f2f2f2
|
$sb-grey: #f2f2f2
|
||||||
$sb-font-size: 14px
|
$sb-font-size: 14px
|
||||||
|
|
||||||
@mixin colorSidebarTiles($color)
|
|
||||||
border-color: $color
|
|
||||||
a
|
|
||||||
color: $color
|
|
||||||
|
|
||||||
.tile--sidebar
|
.tile--sidebar
|
||||||
height: auto
|
height: auto
|
||||||
padding: 0.6em 0.5em
|
padding: 0.6em 0.5em
|
||||||
|
@ -16,17 +11,6 @@ $sb-font-size: 14px
|
||||||
li:last-child &
|
li:last-child &
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
|
||||||
&.failed,
|
|
||||||
&.errored
|
|
||||||
@include colorSidebarTiles($fail-color)
|
|
||||||
&.passed
|
|
||||||
@include colorSidebarTiles($pass-color)
|
|
||||||
&.started,
|
|
||||||
&.created,
|
|
||||||
&.received,
|
|
||||||
&.queued
|
|
||||||
@include colorSidebarTiles($created-color)
|
|
||||||
|
|
||||||
h2, p
|
h2, p
|
||||||
margin: 0
|
margin: 0
|
||||||
font-size: $sb-font-size
|
font-size: $sb-font-size
|
||||||
|
@ -55,10 +39,6 @@ $sb-font-size: 14px
|
||||||
width: 1.3em
|
width: 1.3em
|
||||||
height: 1.4em
|
height: 1.4em
|
||||||
margin-right: .1em
|
margin-right: .1em
|
||||||
// .icon--hash
|
|
||||||
// width: 1.1em
|
|
||||||
// height: 1.3em
|
|
||||||
|
|
||||||
|
|
||||||
.tabnav--sidebar
|
.tabnav--sidebar
|
||||||
font-size: $sb-font-size
|
font-size: $sb-font-size
|
||||||
|
|
|
@ -5,14 +5,17 @@
|
||||||
|
|
||||||
@mixin colorTiles($color, $status, $extra-bg: $color)
|
@mixin colorTiles($color, $status, $extra-bg: $color)
|
||||||
&.#{$status}
|
&.#{$status}
|
||||||
|
border-color: $extra-bg
|
||||||
.tile-status
|
.tile-status
|
||||||
background-color: $color
|
background-color: $color
|
||||||
.repo-header-title a,
|
.repo-header-title a,
|
||||||
.repo-build-status a,
|
.repo-build-status a,
|
||||||
.build-status a,
|
.build-status a,
|
||||||
.tile-header,
|
.tile-header,
|
||||||
.tile-header a
|
.tile-header a,
|
||||||
|
a
|
||||||
color: $color
|
color: $color
|
||||||
|
|
||||||
@include colorStatusIcons($color, $status)
|
@include colorStatusIcons($color, $status)
|
||||||
|
|
||||||
.tile
|
.tile
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<div class="two-line">
|
<div class="two-line">
|
||||||
<div class="branch-name">
|
<div class="branch-name">
|
||||||
<h2 class="row-item">{{status-icon status=build.last_build.state}}{{build.name}}</h2>
|
<h2 class="row-item">{{status-icon status=build.last_build.state}}
|
||||||
|
<span class="label-align">{{build.name}}</span></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="branch-builds">
|
<div class="branch-builds">
|
||||||
<div class="row-item">
|
<div class="row-item">
|
||||||
|
@ -123,6 +124,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="one-line is-relative">
|
<div class="one-line is-relative">
|
||||||
{{#unless inactive}}
|
{{#unless inactive}}
|
||||||
|
{{#if canTrigger}}
|
||||||
|
|
||||||
{{#if build.last_build}}
|
{{#if build.last_build}}
|
||||||
<div class="branch-nav dropup-trigger">
|
<div class="branch-nav dropup-trigger">
|
||||||
<div class="row-item">
|
<div class="row-item">
|
||||||
|
@ -190,6 +193,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
<div class="one-line is-relative">
|
<div class="one-line is-relative">
|
||||||
|
@ -203,6 +208,25 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
{{#unless build.last_build}}
|
{{#unless build.last_build}}
|
||||||
|
{{#unless inactive}}
|
||||||
|
{{#if canTrigger}}
|
||||||
|
|
||||||
|
{{#if hasTriggered}}
|
||||||
|
<span class="nobuilds-tigger">
|
||||||
|
<span class="icon icon-trigger">
|
||||||
|
<svg version="1.1" id="Layer_1" x="0px" y="0px"
|
||||||
|
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
|
||||||
|
<g id="Passed">
|
||||||
|
<path fill="#A7AEAE" d="M9.6,14.4c-0.1,0-0.3-0.1-0.4-0.1l-4-3.3c-0.3-0.2-0.3-0.6-0.1-0.9S5.8,9.8,6.1,10l3.4,2.8l4.9-7.5
|
||||||
|
C14.6,5,15,4.9,15.3,5.1c0.3,0.2,0.4,0.6,0.2,0.9l-5.3,8.1C10.1,14.3,9.9,14.4,9.6,14.4C9.7,14.4,9.7,14.4,9.6,14.4z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
Build triggered</span>
|
||||||
|
{{else}}
|
||||||
|
{{#if isTriggering}}
|
||||||
|
<span class="nobuilds-tigger">{{loading-indicator inline=true}}</span>
|
||||||
|
{{else}}
|
||||||
<a {{action 'tiggerBuild'}} class="nobuilds-tigger">
|
<a {{action 'tiggerBuild'}} class="nobuilds-tigger">
|
||||||
<span class="icon icon-trigger">
|
<span class="icon icon-trigger">
|
||||||
<svg x="0px" y="0px" viewBox="0 0 20 20" xml:space="preserve">
|
<svg x="0px" y="0px" viewBox="0 0 20 20" xml:space="preserve">
|
||||||
|
@ -215,5 +239,9 @@
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
Trigger a build</a>
|
Trigger a build</a>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{/unless}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user