From 577147e0bb4cc72096f41795a3e9a226ae3aaf3c Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 24 Oct 2016 19:27:18 +0000 Subject: Merge branch '23325-pipeline-graph-hidden' into 'master' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix pipeline graph hidden on commit and mr pages ## What does this MR do? Dynamically invokes `new gl.Pipelines();` when an MR `builds` tab is clicked. Dispatches `new gl.Pipelines();` on a `commit#builds` page. ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? The pipeline graph was hidden on commit and mr pages ## Screenshots (if relevant) Commit page: ![Screen_Shot_2016-10-14_at_18.16.18](/uploads/ee11dea0825d1489dc167292e16c8f41/Screen_Shot_2016-10-14_at_18.16.18.png) MR: ![Screen_Shot_2016-10-14_at_18.16.39](/uploads/602c2fce2397c799bedb757bfd3010af/Screen_Shot_2016-10-14_at_18.16.39.png) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #23325 See merge request !6895 Signed-off-by: Rémy Coutable --- CHANGELOG.md | 5 ++--- app/assets/javascripts/dispatcher.js.es6 | 3 +++ app/assets/javascripts/merge_request_tabs.js | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 147b9bdd32d..f0effcc504d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. -## 8.14.0 (2016-11-22) - - Adds user project membership expired event to clarify why user was removed (Callum Dryden) - - Simpler arguments passed to named_route on toggle_award_url helper method +## 8.13.1 (unreleased) + - Fixed hidden pipeline graph on commit and MR page. !6895 ## 8.13.0 (2016-10-22) diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index afc0d6f8c62..a1fe57562fa 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -117,6 +117,9 @@ new ZenMode(); shortcut_handler = new ShortcutsNavigation(); break; + case 'projects:commit:builds': + new gl.Pipelines(); + break; case 'projects:commits:show': case 'projects:activity': shortcut_handler = new ShortcutsNavigation(); diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 9f28738e06b..3dde979185b 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -282,6 +282,7 @@ document.querySelector("div#builds").innerHTML = data.html; gl.utils.localTimeAgo($('.js-timeago', 'div#builds')); _this.buildsLoaded = true; + if (!this.pipelines) this.pipelines = new gl.Pipelines(); return _this.scrollToElement("#builds"); }; })(this) -- cgit v1.2.1