diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-12 00:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-12 00:09:48 +0300 |
commit | c77ce73fa85c128dfeb90a45c4eb306b8c1fe0c9 (patch) | |
tree | 095d7aea5d0817382f947f9d2c04e45fcfad47c9 /app | |
parent | 11c2b8eff6ca5360fb0f732b23b764d2a0b81be5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/commit/_ci_menu.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/pipeline_schedules/_tabs.html.haml | 26 | ||||
-rw-r--r-- | app/workers/loose_foreign_keys/cleanup_worker.rb | 3 |
3 files changed, 19 insertions, 26 deletions
diff --git a/app/views/projects/commit/_ci_menu.html.haml b/app/views/projects/commit/_ci_menu.html.haml index 41f5fb3dcbd..60a79456c36 100644 --- a/app/views/projects/commit/_ci_menu.html.haml +++ b/app/views/projects/commit/_ci_menu.html.haml @@ -1,12 +1,10 @@ - any_pipelines = @commit.present(current_user: current_user).any_pipelines? -%ul.nav-links.no-top.no-bottom.commit-ci-menu.nav.nav-tabs - = nav_link(path: 'commit#show') do - = link_to project_commit_path(@project, @commit.id) do - = _('Changes') - %span.badge.badge-pill= @diffs.size += gl_tabs_nav({ class: 'commit-ci-menu gl-display-flex gl-flex-grow-1'}) do + = gl_tab_link_to project_commit_path(@project, @commit.id) do + = _('Changes') + = gl_tab_counter_badge(@diffs.size) - if any_pipelines - = nav_link(path: 'commit#pipelines') do - = link_to pipelines_project_commit_path(@project, @commit.id) do - = _('Pipelines') - %span.badge.badge-pill.js-pipelines-mr-count= @commit.pipelines.size + = gl_tab_link_to pipelines_project_commit_path(@project, @commit.id) do + = _('Pipelines') + = gl_tab_counter_badge(@commit.pipelines.size, { class: 'js-pipelines-mr-count' }) diff --git a/app/views/projects/pipeline_schedules/_tabs.html.haml b/app/views/projects/pipeline_schedules/_tabs.html.haml index f69041e1eb1..f825ef35902 100644 --- a/app/views/projects/pipeline_schedules/_tabs.html.haml +++ b/app/views/projects/pipeline_schedules/_tabs.html.haml @@ -1,18 +1,12 @@ -%ul.nav-links.mobile-separator.nav.nav-tabs - %li{ class: active_when(scope.nil?) }> - = link_to schedule_path_proc.call(nil) do - = s_("PipelineSchedules|All") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm.js-totalbuilds-count - = number_with_delimiter(all_schedules.count(:id)) += gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-0' }) do + = gl_tab_link_to schedule_path_proc.call(nil), { item_active: active_when(scope.nil?) } do + = s_("PipelineSchedules|All") + = gl_tab_counter_badge(number_with_delimiter(all_schedules.count(:id)), { class: 'js-totalbuilds-count' }) - %li{ class: active_when(scope == 'active') }> - = link_to schedule_path_proc.call('active') do - = s_("PipelineSchedules|Active") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = number_with_delimiter(all_schedules.active.count(:id)) + = gl_tab_link_to schedule_path_proc.call('active'), { item_active: active_when(scope == 'active') } do + = s_("PipelineSchedules|Active") + = gl_tab_counter_badge(number_with_delimiter(all_schedules.active.count(:id))) - %li{ class: active_when(scope == 'inactive') }> - = link_to schedule_path_proc.call('inactive') do - = s_("PipelineSchedules|Inactive") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = number_with_delimiter(all_schedules.inactive.count(:id)) + = gl_tab_link_to schedule_path_proc.call('inactive'), { item_active: active_when(scope == 'inactive') } do + = s_("PipelineSchedules|Inactive") + = gl_tab_counter_badge(number_with_delimiter(all_schedules.inactive.count(:id))) diff --git a/app/workers/loose_foreign_keys/cleanup_worker.rb b/app/workers/loose_foreign_keys/cleanup_worker.rb index 4df2d26ed16..b4565dbf624 100644 --- a/app/workers/loose_foreign_keys/cleanup_worker.rb +++ b/app/workers/loose_foreign_keys/cleanup_worker.rb @@ -13,7 +13,8 @@ module LooseForeignKeys def perform return if Feature.disabled?(:loose_foreign_key_cleanup, default_enabled: :yaml) - in_lock(self.class.name.underscore, ttl: 1.hour, retries: 0) do + ttl = ModificationTracker::MAX_RUNTIME + 1.minute + in_lock(self.class.name.underscore, ttl: ttl, retries: 0) do # TODO: Iterate over the connections # https://gitlab.com/gitlab-org/gitlab/-/issues/341513 stats = ProcessDeletedRecordsService.new(connection: ApplicationRecord.connection).execute |