diff --git a/endpoints/api/build.py b/endpoints/api/build.py index 95e9f4607..75be9ffcc 100644 --- a/endpoints/api/build.py +++ b/endpoints/api/build.py @@ -112,13 +112,13 @@ def _get_build_status(build_obj): if datetime.datetime.utcnow() - heartbeat > datetime.timedelta(minutes=1): phase = database.BUILD_PHASE.INTERNAL_ERROR - # If the phase is internal error, return 'error' instead if the number of retries - # on the queue item is 0. - if phase == database.BUILD_PHASE.INTERNAL_ERROR: - retry = (build_obj.queue_id and - dockerfile_build_queue.has_retries_remaining(build_obj.queue_id)) - if not retry: - phase = database.BUILD_PHASE.ERROR + # If the phase is internal error, return 'expired' instead if the number of retries + # on the queue item is 0. + if phase == database.BUILD_PHASE.INTERNAL_ERROR: + retry = (build_obj.queue_id and + dockerfile_build_queue.has_retries_remaining(build_obj.queue_id)) + if not retry: + phase = 'expired' return (phase, status, error) diff --git a/static/css/directives/ui/build-state-icon.css b/static/css/directives/ui/build-state-icon.css index 31b4adb8a..125b0723e 100644 --- a/static/css/directives/ui/build-state-icon.css +++ b/static/css/directives/ui/build-state-icon.css @@ -7,11 +7,15 @@ } .build-state-icon .error { - color: red; + color: #D64456; +} + +.build-state-icon .expired { + color: #FCA657; } .build-state-icon .internalerror { - color: #DFFF00; + color: #99BA45; } .build-state-icon .complete { diff --git a/static/css/directives/ui/build-status.css b/static/css/directives/ui/build-status.css new file mode 100644 index 000000000..04bc04a92 --- /dev/null +++ b/static/css/directives/ui/build-status.css @@ -0,0 +1,38 @@ +.build-status { + display: inline-block; +} + +.build-status-container { + padding: 4px; + margin-bottom: 10px; + border-bottom: 1px solid #eee; + width: 350px; +} + +.build-status-container .build-message { + display: block; + white-space: nowrap; + font-size: 14px; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #eee; + margin-left: 20px; +} + +.build-status-container .progress { + height: 10px; + margin: 0px; + margin-top: 10px; + margin-left: 20px; + width: 310px; +} + +.build-status-container .timing { + margin-left: 20px; + margin-top: 6px; +} + +.build-status-container:last-child { + margin-bottom: 0px; + border-bottom: 0px solid white; +} \ No newline at end of file diff --git a/static/css/directives/ui/phase-icon.css b/static/css/directives/ui/phase-icon.css new file mode 100644 index 000000000..2f095b60c --- /dev/null +++ b/static/css/directives/ui/phase-icon.css @@ -0,0 +1,48 @@ +.phase-icon { + border-radius: 50%; + display: inline-block; + width: 12px; + height: 12px; + margin-right: 6px; +} + +.active .build-tab-link .phase-icon { + box-shadow: 0px 0px 10px #FFFFFF, 0px 0px 10px #FFFFFF; +} + +.build-status .phase-icon { + margin-top: 4px; + float: left; +} + +.phase-icon.error { + background-color: #D64456; +} + +.phase-icon.expired { + background-color: #FCA657; +} + +.phase-icon.internalerror { + background-color: #99BA45; +} + +.phase-icon.waiting, .phase-icon.build-scheduled { + background-color: rgba(66, 139, 202, 0.2); +} + +.phase-icon.unpacking, .phase-icon.starting, .phase-icon.initializing { + background-color: rgba(66, 139, 202, 0.4); +} + +.phase-icon.pulling, .phase-icon.priming-cache, .phase-icon.checking-cache { + background-color: rgba(66, 139, 202, 0.6); +} + +.phase-icon.pushing, .phase-icon.building { + background-color: rgba(66, 139, 202, 0.8); +} + +.phase-icon.complete { + background-color: #2fcc66; +} diff --git a/static/css/quay.css b/static/css/quay.css index c5832945e..fa9fb3d91 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -565,90 +565,6 @@ i.toggle-icon:hover { border-bottom: 0px; } -.phase-icon { - border-radius: 50%; - display: inline-block; - width: 12px; - height: 12px; - margin-right: 6px; -} - -.active .build-tab-link .phase-icon { - box-shadow: 0px 0px 10px #FFFFFF, 0px 0px 10px #FFFFFF; -} - -.build-status .phase-icon { - margin-top: 4px; - float: left; -} - -.phase-icon.error { - background-color: red; -} - -.phase-icon.internalerror { - background-color: #DFFF00; -} - -.phase-icon.waiting, .phase-icon.build-scheduled { - background-color: rgba(66, 139, 202, 0.2); -} - -.phase-icon.unpacking, .phase-icon.starting, .phase-icon.initializing { - background-color: rgba(66, 139, 202, 0.4); -} - -.phase-icon.pulling, .phase-icon.priming-cache, .phase-icon.checking-cache { - background-color: rgba(66, 139, 202, 0.6); -} - -.phase-icon.pushing, .phase-icon.building { - background-color: rgba(66, 139, 202, 0.8); -} - -.phase-icon.complete { - background-color: #2fcc66; -} - -.build-status { - display: inline-block; -} - -.build-status-container { - padding: 4px; - margin-bottom: 10px; - border-bottom: 1px solid #eee; - width: 350px; -} - -.build-status-container .build-message { - display: block; - white-space: nowrap; - font-size: 14px; - margin-bottom: 10px; - padding-bottom: 10px; - border-bottom: 1px solid #eee; - margin-left: 20px; -} - -.build-status-container .progress { - height: 10px; - margin: 0px; - margin-top: 10px; - margin-left: 20px; - width: 310px; -} - -.build-status-container .timing { - margin-left: 20px; - margin-top: 6px; -} - -.build-status-container:last-child { - margin-bottom: 0px; - border-bottom: 0px solid white; -} - .repo-circle { position: relative; background: #eee; diff --git a/static/directives/build-logs-view.html b/static/directives/build-logs-view.html index 44a5d05ac..e5f0d2915 100644 --- a/static/directives/build-logs-view.html +++ b/static/directives/build-logs-view.html @@ -34,7 +34,7 @@ -