diff --git a/app/assets/javascripts/pipelines/components/pipelines_table.vue b/app/assets/javascripts/pipelines/components/pipelines_table.vue index 03d332cd430d3904e1840593b57b8d2cd1e2ae97..d3ba0c97f6b1e658d1a08edbed862e73f2f78b4b 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_table.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_table.vue @@ -44,6 +44,11 @@ export default { cancelingPipeline: null, }; }, + watch: { + pipelines() { + this.cancelingPipeline = null; + }, + }, created() { eventHub.$on('openConfirmationModal', this.setModalData); }, diff --git a/app/assets/javascripts/pipelines/components/pipelines_table_row.vue b/app/assets/javascripts/pipelines/components/pipelines_table_row.vue index e32e2f785bd41881a23df76e6f751c03788991bc..5275de3bc8b5449ec64db08150f286c281a3de74 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_table_row.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_table_row.vue @@ -241,7 +241,11 @@ export default { return this.cancelingPipeline === this.pipeline.id; }, }, - + watch: { + pipeline() { + this.isRetrying = false; + }, + }, methods: { handleCancelClick() { eventHub.$emit('openConfirmationModal', { diff --git a/app/assets/javascripts/pipelines/mixins/pipelines.js b/app/assets/javascripts/pipelines/mixins/pipelines.js index 3cc9d0a3a4ed78358274c271cc6c84f78945a3a2..a6243366375009ae60239e23e58e3bc9b13e5aa3 100644 --- a/app/assets/javascripts/pipelines/mixins/pipelines.js +++ b/app/assets/javascripts/pipelines/mixins/pipelines.js @@ -107,8 +107,8 @@ export default { } // Stop polling this.poll.stop(); - // Update the table - return this.getPipelines().then(() => this.poll.restart()); + // Restarting the poll also makes an initial request + this.poll.restart(); }, fetchPipelines() { if (!this.isMakingRequest) { @@ -153,7 +153,7 @@ export default { postAction(endpoint) { this.service .postAction(endpoint) - .then(() => this.fetchPipelines()) + .then(() => this.updateTable()) .catch(() => Flash(__('An error occurred while making the request.'))); }, }, diff --git a/app/views/shared/boards/components/_board.html.haml b/app/views/shared/boards/components/_board.html.haml index fdb2a0a18436fedce68b414ddfe887767aca19dd..6c0613605ebbb3dab9a9f07150e30c74eed70677 100644 --- a/app/views/shared/boards/components/_board.html.haml +++ b/app/views/shared/boards/components/_board.html.haml @@ -19,8 +19,10 @@ %img.avatar.s20.has-tooltip{ height: "20", width: "20", ":src": "list.assignee.avatar", ":alt": "list.assignee.name" } .board-title-text - %span.board-title-main-text.has-tooltip.block-truncated{ "v-if": "list.type !== \"label\"", - ":title" => '((list.label && list.label.description) || list.title || "")', data: { container: "body" } } + %span.board-title-main-text.block-truncated{ "v-if": "list.type !== \"label\"", + ":title" => '((list.label && list.label.description) || list.title || "")', + data: { container: "body" }, + ":class": "{ 'has-tooltip': !['backlog', 'closed'].includes(list.type) }" } {{ list.title }} %span.board-title-sub-text.prepend-left-5.has-tooltip{ "v-if": "list.type === \"assignee\"", diff --git a/changelogs/unreleased/63590-pipeline-actions-cause-full-refresh.yml b/changelogs/unreleased/63590-pipeline-actions-cause-full-refresh.yml new file mode 100644 index 0000000000000000000000000000000000000000..a1e7d4679d84fc03cf99db507915c3bb7d6b617e --- /dev/null +++ b/changelogs/unreleased/63590-pipeline-actions-cause-full-refresh.yml @@ -0,0 +1,5 @@ +--- +title: Fix pipelines table to update without refreshing after action +merge_request: 30190 +author: +type: fixed diff --git a/changelogs/unreleased/mh-board-tooltips.yml b/changelogs/unreleased/mh-board-tooltips.yml new file mode 100644 index 0000000000000000000000000000000000000000..06fc64c52a7993616c7bb781fc8e35769bfcc46e --- /dev/null +++ b/changelogs/unreleased/mh-board-tooltips.yml @@ -0,0 +1,5 @@ +--- +title: "'Open' and 'Closed' issue board lists no longer display a redundant tooltip" +merge_request: 30187 +author: +type: fixed diff --git a/db/fixtures/development/24_forks.rb b/db/fixtures/development/24_forks.rb index 5eb5956ec744395bf410281aca396f3949fd6668..d05d27c3ed5dd61252a5bd39a279e1c23b6a401a 100644 --- a/db/fixtures/development/24_forks.rb +++ b/db/fixtures/development/24_forks.rb @@ -13,9 +13,9 @@ Sidekiq::Testing.inline! do fork_project = Projects::ForkService.new(source_project, user, namespace: user.namespace).execute if fork_project.valid? - puts '.' + print '.' else - puts 'F' + print 'F' end end end diff --git a/spec/javascripts/pipelines/pipelines_spec.js b/spec/javascripts/pipelines/pipelines_spec.js index 78187b69563d8949eb5e8b7520dbf0291de635b0..daa898ca6871b9fb151c9fd204803c4b455b7eae 100644 --- a/spec/javascripts/pipelines/pipelines_spec.js +++ b/spec/javascripts/pipelines/pipelines_spec.js @@ -736,10 +736,9 @@ describe('Pipelines', () => { }); describe('when a request is being made', () => { - it('stops polling, cancels the request, fetches pipelines & restarts polling', done => { + it('stops polling, cancels the request, & restarts polling', done => { spyOn(vm.poll, 'stop'); spyOn(vm.poll, 'restart'); - spyOn(vm, 'getPipelines').and.returnValue(Promise.resolve()); spyOn(vm.service.cancelationSource, 'cancel').and.callThrough(); setTimeout(() => { @@ -754,7 +753,6 @@ describe('Pipelines', () => { expect(vm.poll.stop).toHaveBeenCalled(); setTimeout(() => { - expect(vm.getPipelines).toHaveBeenCalled(); expect(vm.poll.restart).toHaveBeenCalled(); done(); }, 0); @@ -765,10 +763,9 @@ describe('Pipelines', () => { }); describe('when no request is being made', () => { - it('stops polling, fetches pipelines & restarts polling', done => { + it('stops polling & restarts polling', done => { spyOn(vm.poll, 'stop'); spyOn(vm.poll, 'restart'); - spyOn(vm, 'getPipelines').and.returnValue(Promise.resolve()); setTimeout(() => { vm.$el.querySelector('.js-builds-dropdown-button').click(); @@ -776,7 +773,6 @@ describe('Pipelines', () => { expect(vm.poll.stop).toHaveBeenCalled(); setTimeout(() => { - expect(vm.getPipelines).toHaveBeenCalled(); expect(vm.poll.restart).toHaveBeenCalled(); done(); }, 0);