brohlfs | 51deae1 | 2019-03-28 09:40:22 +0100 | [diff] [blame^] | 1 | <dom-module id="build-result-status"> |
| 2 | <template> |
| 3 | <style> |
| 4 | :host { |
| 5 | display: inline-block; |
| 6 | } |
| 7 | i { |
| 8 | border-radius: 50%; |
| 9 | color: white; |
| 10 | display: inline-block; |
| 11 | font-style: normal; |
| 12 | height: 16px; |
| 13 | margin-right: 4px; |
| 14 | text-align: center; |
| 15 | width: 16px; |
| 16 | } |
| 17 | .successful > i { |
| 18 | background-color: #00C752; |
| 19 | } |
| 20 | .failed > i { |
| 21 | background-color: #DA4236; |
| 22 | } |
| 23 | .in-progress > i { |
| 24 | background-color: #ddd; |
| 25 | } |
| 26 | .unevaluated > i { |
| 27 | background-color: black; |
| 28 | } |
| 29 | </style> |
| 30 | <span class$="[[_className]]"> |
| 31 | <template is="dom-if" if="[[_isUnevaluated(status)]]"> |
| 32 | <i>⏹</i> |
| 33 | <template is="dom-if" if="[[showText]]"> |
| 34 | <span> |
| 35 | Unevaluated |
| 36 | </span> |
| 37 | </template> |
| 38 | </template> |
| 39 | <template is="dom-if" if="[[_isInProgress(status)]]"> |
| 40 | <i>…</i> |
| 41 | <template is="dom-if" if="[[showText]]"> |
| 42 | <span> |
| 43 | In progress |
| 44 | </span> |
| 45 | </template> |
| 46 | </template> |
| 47 | <template is="dom-if" if="[[_isSuccessful(status)]]"> |
| 48 | <i>✓</i> |
| 49 | <template is="dom-if" if="[[showText]]"> |
| 50 | <span> |
| 51 | Successful |
| 52 | </span> |
| 53 | </template> |
| 54 | </template> |
| 55 | <template is="dom-if" if="[[_isFailed(status)]]"> |
| 56 | <i>!</i> |
| 57 | <template is="dom-if" if="[[showText]]"> |
| 58 | <span> |
| 59 | Failed |
| 60 | </span> |
| 61 | </template> |
| 62 | </template> |
| 63 | </span> |
| 64 | </template> |
| 65 | <script src="all-statuses.js"></script> |
| 66 | <script src="build-result-status.js"></script> |
| 67 | </dom-module> |