summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-09-06 10:06:36 +0000
committerFatih Acet <acetfatih@gmail.com>2016-09-06 10:06:36 +0000
commit52cc64a8a4dc224df9df85f7933f8922cf6cef24 (patch)
tree059e58f0784651882f1ffc3e8b4d2492c117be46
parentad599eb65c8ce483a7faaffe226ec7ce53da0f55 (diff)
parentc735c53aae8681d95584d921f12020774e4fd23c (diff)
downloadgitlab-ce-52cc64a8a4dc224df9df85f7933f8922cf6cef24.tar.gz
Merge branch 'build-cancel-spinner' into 'master'
Hide build spinner on canceled builds ## What does this MR do? If the build has canceled this correctly hides the spinner ## What are the relevant issue numbers? Closes #19651 ## Screenshots (if relevant) ![Screen_Shot_2016-07-11_at_13.51.57](/uploads/8342470cf35dae7c67168d9153592fb6/Screen_Shot_2016-07-11_at_13.51.57.png) See merge request !5182
-rw-r--r--app/assets/javascripts/build.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js
index 0d7d29bb0d0..4d066f13646 100644
--- a/app/assets/javascripts/build.js
+++ b/app/assets/javascripts/build.js
@@ -54,12 +54,14 @@
}
Build.prototype.getInitialBuildTrace = function() {
+ var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped']
+
return $.ajax({
url: this.build_url,
dataType: 'json',
success: function(build_data) {
$('.js-build-output').html(build_data.trace_html);
- if (build_data.status === 'success' || build_data.status === 'failed') {
+ if (removeRefreshStatuses.indexOf(build_data.status) >= 0) {
return $('.js-build-refresh').remove();
}
}