diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-15 09:10:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-15 09:10:30 +0300 |
commit | 0702e2171fd180f79ed6c8841b97ddcc0264d9da (patch) | |
tree | 3e7885c691b3c2096472e0635e63cb95517a9f55 /app | |
parent | cf77519faca7a24921def7cce66947e274195c6c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
6 files changed, 15 insertions, 10 deletions
diff --git a/app/assets/javascripts/issues_list/components/new_issue_dropdown.vue b/app/assets/javascripts/issues_list/components/new_issue_dropdown.vue index 037fd9be542..e749579af80 100644 --- a/app/assets/javascripts/issues_list/components/new_issue_dropdown.vue +++ b/app/assets/javascripts/issues_list/components/new_issue_dropdown.vue @@ -71,8 +71,11 @@ export default { hasSelectedProject() { return this.selectedProject.id; }, + projectsWithIssuesEnabled() { + return this.projects.filter((project) => project.issuesEnabled); + }, showNoSearchResultsText() { - return !this.projects.length && this.search; + return !this.projectsWithIssuesEnabled.length && this.search; }, }, methods: { @@ -110,7 +113,7 @@ export default { <gl-loading-icon v-if="$apollo.queries.projects.loading" /> <template v-else> <gl-dropdown-item - v-for="project of projects" + v-for="project of projectsWithIssuesEnabled" :key="project.id" @click="selectProject(project)" > diff --git a/app/assets/javascripts/issues_list/queries/search_projects.query.graphql b/app/assets/javascripts/issues_list/queries/search_projects.query.graphql index df1f330139a..75463f643a2 100644 --- a/app/assets/javascripts/issues_list/queries/search_projects.query.graphql +++ b/app/assets/javascripts/issues_list/queries/search_projects.query.graphql @@ -3,6 +3,7 @@ query searchProjects($fullPath: ID!, $search: String) { projects(search: $search, includeSubgroups: true) { nodes { id + issuesEnabled name nameWithNamespace webUrl diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 69257081cc9..6330a6aa107 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -63,7 +63,7 @@ class ProfilesController < Profiles::ApplicationController # rubocop: disable CodeReuse/ActiveRecord def audit_log - @events = AuditEvent.where(entity_type: "User", entity_id: current_user.id) + @events = AuthenticationEvent.where(user: current_user) .order("created_at DESC") .page(params[:page]) diff --git a/app/views/profiles/_event_table.html.haml b/app/views/profiles/_event_table.html.haml index f74902a3c3b..67c649a9fce 100644 --- a/app/views/profiles/_event_table.html.haml +++ b/app/views/profiles/_event_table.html.haml @@ -3,10 +3,11 @@ %ul.content-list - events.each do |event| - %li - %span.description - = audit_icon(event.details[:with], css_class: 'gl-mr-2') - = _('Signed in with %{authentication} authentication') % { authentication: event.details[:with]} - %span.float-right= time_ago_with_tooltip(event.created_at) + - if event.success? + %li + %span.description + = audit_icon('key', css_class: 'gl-mr-2') + = _('Signed in with %{authentication} authentication') % { authentication: event.provider } + %span.float-right= time_ago_with_tooltip(event.created_at) = paginate events, theme: "gitlab" diff --git a/app/views/profiles/audit_log.html.haml b/app/views/profiles/audit_log.html.haml index aec855c790e..4bbb4a21b39 100644 --- a/app/views/profiles/audit_log.html.haml +++ b/app/views/profiles/audit_log.html.haml @@ -6,6 +6,6 @@ %h4.gl-mt-0 = page_title %p - = _('This is a security log of important events involving your account.') + = _('This is a security log of authentication events involving your account.') .col-lg-8 = render 'event_table', events: @events diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index e049afbc40b..902a0cad483 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -36,7 +36,7 @@ .text-secondary= s_('DeployTokens|Allows read-only access to registry images.') %fieldset.form-group.form-check - = f.check_box :write_registry, class: 'form-check-input' + = f.check_box :write_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_write_registry_checkbox' } = f.label :write_registry, 'write_registry', class: 'label-bold form-check-label' .text-secondary= s_('DeployTokens|Allows read and write access to registry images.') |