Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-25 15:07:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-25 15:07:15 +0300
commitdf65129ab40540728d4b391fc1a21d5a1de87b9c (patch)
tree70537d61226dcb2b330e76cbdf2b3c6f77fd6c62 /app
parentef62043981093451b8ad3113d57c227251646f9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/ci/runner/components/cells/runner_summary_cell.vue33
-rw-r--r--app/assets/javascripts/ci/runner/components/runner_created_at.vue72
-rw-r--r--app/assets/javascripts/ci/runner/components/runner_header.vue29
-rw-r--r--app/assets/javascripts/ci/runner/constants.js5
-rw-r--r--app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql5
-rw-r--r--app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql5
-rw-r--r--app/assets/javascripts/issuable/components/related_issuable_item.vue5
-rw-r--r--app/assets/javascripts/search/sidebar/components/app.vue16
-rw-r--r--app/assets/javascripts/sentry/init_sentry.js4
-rw-r--r--app/assets/javascripts/snippets/components/snippet_header.vue14
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue1
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js7
-rw-r--r--app/assets/stylesheets/themes/dark_mode_overrides.scss8
-rw-r--r--app/models/ai/service_access_token.rb10
14 files changed, 131 insertions, 83 deletions
diff --git a/app/assets/javascripts/ci/runner/components/cells/runner_summary_cell.vue b/app/assets/javascripts/ci/runner/components/cells/runner_summary_cell.vue
index a80d6207be8..8a920c85e06 100644
--- a/app/assets/javascripts/ci/runner/components/cells/runner_summary_cell.vue
+++ b/app/assets/javascripts/ci/runner/components/cells/runner_summary_cell.vue
@@ -2,9 +2,9 @@
import { GlIcon, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import { sprintf, __, formatNumber } from '~/locale';
-import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
+import RunnerCreatedAt from '../runner_created_at.vue';
import RunnerName from '../runner_name.vue';
import RunnerTags from '../runner_tags.vue';
import RunnerTypeBadge from '../runner_type_badge.vue';
@@ -15,8 +15,6 @@ import {
I18N_LOCKED_RUNNER_DESCRIPTION,
I18N_VERSION_LABEL,
I18N_LAST_CONTACT_LABEL,
- I18N_CREATED_AT_LABEL,
- I18N_CREATED_AT_BY_LABEL,
} from '../../constants';
import RunnerSummaryField from './runner_summary_field.vue';
@@ -26,13 +24,13 @@ export default {
GlSprintf,
TimeAgo,
RunnerSummaryField,
+ RunnerCreatedAt,
RunnerName,
RunnerTags,
RunnerTypeBadge,
RunnerManagersBadge,
RunnerUpgradeStatusIcon: () =>
import('ee_component/ci/runner/components/runner_upgrade_status_icon.vue'),
- UserAvatarLink,
TooltipOnTruncate,
},
directives: {
@@ -75,8 +73,6 @@ export default {
I18N_LOCKED_RUNNER_DESCRIPTION,
I18N_VERSION_LABEL,
I18N_LAST_CONTACT_LABEL,
- I18N_CREATED_AT_LABEL,
- I18N_CREATED_AT_BY_LABEL,
},
};
</script>
@@ -143,30 +139,7 @@ export default {
</runner-summary-field>
<runner-summary-field icon="calendar">
- <template v-if="createdBy">
- <gl-sprintf :message="$options.i18n.I18N_CREATED_AT_BY_LABEL">
- <template #timeAgo>
- <time-ago v-if="runner.createdAt" :time="runner.createdAt" />
- </template>
- <template #avatar>
- <user-avatar-link
- :link-href="createdBy.webUrl"
- :img-src="createdBy.avatarUrl"
- img-css-classes="gl-vertical-align-top"
- :img-size="16"
- :img-alt="createdByImgAlt"
- :tooltip-text="createdBy.username"
- />
- </template>
- </gl-sprintf>
- </template>
- <template v-else>
- <gl-sprintf :message="$options.i18n.I18N_CREATED_AT_LABEL">
- <template #timeAgo>
- <time-ago v-if="runner.createdAt" :time="runner.createdAt" />
- </template>
- </gl-sprintf>
- </template>
+ <runner-created-at :runner="runner" />
</runner-summary-field>
</div>
diff --git a/app/assets/javascripts/ci/runner/components/runner_created_at.vue b/app/assets/javascripts/ci/runner/components/runner_created_at.vue
new file mode 100644
index 00000000000..5594f4ab486
--- /dev/null
+++ b/app/assets/javascripts/ci/runner/components/runner_created_at.vue
@@ -0,0 +1,72 @@
+<script>
+import { GlSprintf, GlLink } from '@gitlab/ui';
+import { getIdFromGraphQLId } from '~/graphql_shared/utils';
+import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
+
+import {
+ I18N_CREATED_AT_LABEL,
+ I18N_CREATED_BY_LABEL,
+ I18N_CREATED_BY_AT_LABEL,
+} from '../constants';
+
+export default {
+ components: {
+ GlSprintf,
+ GlLink,
+ TimeAgo,
+ },
+ props: {
+ runner: {
+ type: Object,
+ required: true,
+ },
+ },
+ computed: {
+ createdAt() {
+ return this.runner?.createdAt;
+ },
+ createdBy() {
+ return this.runner?.createdBy;
+ },
+ createdById() {
+ if (this.createdBy?.id) {
+ return getIdFromGraphQLId(this.createdBy.id);
+ }
+ return null;
+ },
+ message() {
+ if (this.createdBy && this.createdAt) {
+ return I18N_CREATED_BY_AT_LABEL;
+ }
+ if (this.createdBy) {
+ return I18N_CREATED_BY_LABEL;
+ }
+ if (this.createdAt) {
+ return I18N_CREATED_AT_LABEL;
+ }
+
+ return null;
+ },
+ },
+};
+</script>
+<template>
+ <span v-if="message">
+ <gl-sprintf :message="message">
+ <template #timeAgo>
+ <time-ago v-if="createdAt" :time="createdAt" />
+ </template>
+ <template #user>
+ <gl-link
+ class="js-user-link gl-reset-color gl-reset-font-size gl-font-weight-bold"
+ :href="createdBy.webUrl"
+ :data-user-id="createdById"
+ :data-username="createdBy.username"
+ :data-name="createdBy.name"
+ :data-avatar-url="createdBy.avatarUrl"
+ >{{ createdBy.name }}</gl-link
+ >
+ </template>
+ </gl-sprintf>
+ </span>
+</template>
diff --git a/app/assets/javascripts/ci/runner/components/runner_header.vue b/app/assets/javascripts/ci/runner/components/runner_header.vue
index 0fa06537ed6..f8d0352e532 100644
--- a/app/assets/javascripts/ci/runner/components/runner_header.vue
+++ b/app/assets/javascripts/ci/runner/components/runner_header.vue
@@ -1,16 +1,15 @@
<script>
-import { GlIcon, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
-import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
+import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { I18N_LOCKED_RUNNER_DESCRIPTION } from '../constants';
import { formatRunnerName } from '../utils';
+import RunnerCreatedAt from './runner_created_at.vue';
import RunnerTypeBadge from './runner_type_badge.vue';
import RunnerStatusBadge from './runner_status_badge.vue';
export default {
components: {
GlIcon,
- GlSprintf,
- TimeAgo,
+ RunnerCreatedAt,
RunnerTypeBadge,
RunnerStatusBadge,
RunnerUpgradeStatusBadge: () =>
@@ -43,21 +42,13 @@ export default {
<runner-status-badge :contacted-at="runner.contactedAt" :status="runner.status" />
<runner-type-badge :type="runner.runnerType" />
<runner-upgrade-status-badge :runner="runner" />
- <span v-if="runner.createdAt">
- <gl-sprintf :message="__('%{locked} created %{timeago}')">
- <template #locked>
- <gl-icon
- v-if="runner.locked"
- v-gl-tooltip="$options.I18N_LOCKED_RUNNER_DESCRIPTION"
- name="lock"
- :aria-label="$options.I18N_LOCKED_RUNNER_DESCRIPTION"
- />
- </template>
- <template #timeago>
- <time-ago :time="runner.createdAt" />
- </template>
- </gl-sprintf>
- </span>
+ <gl-icon
+ v-if="runner.locked"
+ v-gl-tooltip="$options.I18N_LOCKED_RUNNER_DESCRIPTION"
+ name="lock"
+ :aria-label="$options.I18N_LOCKED_RUNNER_DESCRIPTION"
+ />
+ <runner-created-at :runner="runner" />
</div>
</div>
</template>
diff --git a/app/assets/javascripts/ci/runner/constants.js b/app/assets/javascripts/ci/runner/constants.js
index b3cc295f8e4..298d2530564 100644
--- a/app/assets/javascripts/ci/runner/constants.js
+++ b/app/assets/javascripts/ci/runner/constants.js
@@ -101,8 +101,11 @@ export const I18N_LOCKED_RUNNER_DESCRIPTION = s__(
);
export const I18N_VERSION_LABEL = s__('Runners|Version %{version}');
export const I18N_LAST_CONTACT_LABEL = s__('Runners|Last contact: %{timeAgo}');
+
export const I18N_CREATED_AT_LABEL = s__('Runners|Created %{timeAgo}');
-export const I18N_CREATED_AT_BY_LABEL = s__('Runners|Created %{timeAgo} by %{avatar}');
+export const I18N_CREATED_BY_LABEL = s__('Runners|Created by %{user}');
+export const I18N_CREATED_BY_AT_LABEL = s__('Runners|Created by %{user} %{timeAgo}');
+
export const I18N_SHOW_ONLY_INHERITED = s__('Runners|Show only inherited');
export const I18N_ADMIN = s__('Runners|Administrator');
diff --git a/app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql
index 41ec9967d90..5aa96f42b04 100644
--- a/app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql
+++ b/app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql
@@ -1,3 +1,5 @@
+#import "~/graphql_shared/fragments/user.fragment.graphql"
+
fragment RunnerFieldsShared on CiRunner {
id
shortSha
@@ -10,5 +12,8 @@ fragment RunnerFieldsShared on CiRunner {
maximumTimeout
tagList
createdAt
+ createdBy {
+ ...User
+ }
status
}
diff --git a/app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql
index e2c890b3834..8f998ab42fa 100644
--- a/app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql
+++ b/app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql
@@ -1,3 +1,5 @@
+#import "~/graphql_shared/fragments/user.fragment.graphql"
+
fragment RunnerDetailsShared on CiRunner {
id
shortSha
@@ -11,6 +13,9 @@ fragment RunnerDetailsShared on CiRunner {
jobCount
tagList
createdAt
+ createdBy {
+ ...User
+ }
status
contactedAt
tokenExpiresAt
diff --git a/app/assets/javascripts/issuable/components/related_issuable_item.vue b/app/assets/javascripts/issuable/components/related_issuable_item.vue
index 76518cc3adf..2ee7b604253 100644
--- a/app/assets/javascripts/issuable/components/related_issuable_item.vue
+++ b/app/assets/javascripts/issuable/components/related_issuable_item.vue
@@ -88,6 +88,9 @@ export default {
workItemIid() {
return String(this.iid);
},
+ pipelinePath() {
+ return this.pipelineStatus?.details_path || this.pipelineStatus?.detailsPath;
+ },
},
methods: {
handleTitleClick(event) {
@@ -192,7 +195,7 @@ export default {
class="item-attributes-area gl-display-flex gl-align-items-center gl-flex-wrap gl-gap-3"
>
<span v-if="hasPipeline" class="mr-ci-status order-md-last">
- <a :href="pipelineStatus.details_path">
+ <a :href="pipelinePath">
<ci-icon :status="pipelineStatus" :title="pipelineStatusTooltip" />
</a>
</span>
diff --git a/app/assets/javascripts/search/sidebar/components/app.vue b/app/assets/javascripts/search/sidebar/components/app.vue
index 2ff138cabe5..b50a82ff676 100644
--- a/app/assets/javascripts/search/sidebar/components/app.vue
+++ b/app/assets/javascripts/search/sidebar/components/app.vue
@@ -6,7 +6,6 @@ import ScopeSidebarNavigation from '~/search/sidebar/components/scope_sidebar_na
import SmallScreenDrawerNavigation from '~/search/sidebar/components/small_screen_drawer_navigation.vue';
import SidebarPortal from '~/super_sidebar/components/sidebar_portal.vue';
import { toggleSuperSidebarCollapsed } from '~/super_sidebar/super_sidebar_collapsed_state_manager';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import DomElementListener from '~/vue_shared/components/dom_element_listener.vue';
import {
SCOPE_ISSUES,
@@ -42,7 +41,6 @@ export default {
CommitsFilters,
MilestonesFilters,
},
- mixins: [glFeatureFlagsMixin()],
computed: {
// useSidebarNavigation refers to whether the new left sidebar navigation is enabled
...mapState(['useSidebarNavigation', 'searchType']),
@@ -60,21 +58,13 @@ export default {
return this.currentScope === SCOPE_PROJECTS;
},
showNotesFilters() {
- // for now, the feature flag is placed here. Since we have only one filter in notes scope
- return this.currentScope === SCOPE_NOTES && this.glFeatures.searchNotesHideArchivedProjects;
+ return this.currentScope === SCOPE_NOTES;
},
showCommitsFilters() {
- // for now, the feature flag is placed here. Since we have only one filter in commits scope
- return (
- this.currentScope === SCOPE_COMMITS && this.glFeatures.searchCommitsHideArchivedProjects
- );
+ return this.currentScope === SCOPE_COMMITS;
},
showMilestonesFilters() {
- // for now, the feature flag is placed here. Since we have only one filter in milestones scope
- return (
- this.currentScope === SCOPE_MILESTONES &&
- this.glFeatures.searchMilestonesHideArchivedProjects
- );
+ return this.currentScope === SCOPE_MILESTONES;
},
showScopeNavigation() {
// showScopeNavigation refers to whether the scope navigation should be shown
diff --git a/app/assets/javascripts/sentry/init_sentry.js b/app/assets/javascripts/sentry/init_sentry.js
index 4a38455d01f..722741b50e4 100644
--- a/app/assets/javascripts/sentry/init_sentry.js
+++ b/app/assets/javascripts/sentry/init_sentry.js
@@ -23,7 +23,7 @@ const initSentry = () => {
const client = new BrowserClient({
// Sentry.init(...) options
dsn: gon.sentry_dsn,
- release: gon.version,
+ release: gon.revision,
allowUrls:
process.env.NODE_ENV === 'production'
? [gon.gitlab_url]
@@ -56,7 +56,7 @@ const initSentry = () => {
hub.bindClient(client);
hub.setTags({
- revision: gon.revision,
+ version: gon.version,
feature_category: gon.feature_category,
page,
});
diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue
index 56ea931fc8c..8476231b5d2 100644
--- a/app/assets/javascripts/snippets/components/snippet_header.vue
+++ b/app/assets/javascripts/snippets/components/snippet_header.vue
@@ -213,7 +213,7 @@ export default {
</script>
<template>
<div class="detail-page-header">
- <div class="detail-page-header-body">
+ <div class="detail-page-header-body gl-align-items-baseline">
<div
class="snippet-box has-tooltip d-flex align-items-center gl-mr-2 mb-1"
data-testid="snippet-container"
@@ -235,7 +235,15 @@ export default {
<template #author>
<a :href="snippet.author.webUrl" class="d-inline">
<gl-avatar :size="24" :src="snippet.author.avatarUrl" />
- <span class="bold">{{ snippet.author.name }}</span>
+ <span class="bold gl-display-none gl-sm-display-inline">{{
+ snippet.author.name
+ }}</span>
+ <strong
+ v-if="snippet.author.username"
+ data-testid="authored-username"
+ class="gl-display-inline gl-sm-display-none!"
+ >@{{ snippet.author.username }}</strong
+ >
</a>
<gl-emoji
v-if="snippet.author.status"
@@ -249,7 +257,7 @@ export default {
</div>
</div>
- <div v-if="hasPersonalSnippetActions" class="detail-page-header-actions">
+ <div v-if="hasPersonalSnippetActions" class="detail-page-header-actions gl-align-self-start">
<div class="d-none d-sm-flex">
<template v-for="(action, index) in personalSnippetActions">
<div
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
index ac7e44364d8..9b9665518a9 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
@@ -739,6 +739,7 @@ export default {
</div>
</div>
<merge-immediately-confirmation-dialog
+ v-if="mr.mergeImmediatelyDocsPath"
ref="confirmationDialog"
:docs-url="mr.mergeImmediatelyDocsPath"
@mergeImmediately="onMergeImmediatelyConfirmation"
diff --git a/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js b/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
index 2f49252a06b..623b504fcc1 100644
--- a/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
+++ b/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
@@ -21,13 +21,6 @@ export default {
this.mr.preventMerge,
);
},
- mergeDisabledText() {
- if (this.pipeline?.status === PIPELINE_SKIPPED_STATUS) {
- return MERGE_DISABLED_SKIPPED_PIPELINE_TEXT;
- }
-
- return MERGE_DISABLED_TEXT;
- },
pipelineMustSucceedConflictText() {
return PIPELINE_MUST_SUCCEED_CONFLICT_TEXT;
},
diff --git a/app/assets/stylesheets/themes/dark_mode_overrides.scss b/app/assets/stylesheets/themes/dark_mode_overrides.scss
index 73877c04c46..a4a2cd28d05 100644
--- a/app/assets/stylesheets/themes/dark_mode_overrides.scss
+++ b/app/assets/stylesheets/themes/dark_mode_overrides.scss
@@ -178,6 +178,10 @@ body.gl-dark {
}
}
+.gl-label-text-light .gl-label-close.gl-button:hover {
+ background-color: $gray-900;
+}
+
.gl-label-text-dark.gl-label-text-dark {
&,
.gl-label-close .gl-icon {
@@ -194,6 +198,10 @@ body.gl-dark {
}
}
+.gl-label-text-dark .gl-label-close.gl-button:hover {
+ background-color: $gray-10;
+}
+
// duplicated class as the original .atwho-view style is added later
.atwho-view.atwho-view {
background-color: $white;
diff --git a/app/models/ai/service_access_token.rb b/app/models/ai/service_access_token.rb
index b8a2a271976..46dfbe9078c 100644
--- a/app/models/ai/service_access_token.rb
+++ b/app/models/ai/service_access_token.rb
@@ -2,11 +2,13 @@
module Ai
class ServiceAccessToken < ApplicationRecord
+ include IgnorableColumns
self.table_name = 'service_access_tokens'
+ ignore_column :category, remove_with: '16.8', remove_after: '2024-01-22'
+
scope :expired, -> { where('expires_at < :now', now: Time.current) }
scope :active, -> { where('expires_at > :now', now: Time.current) }
- scope :for_category, ->(category) { where(category: category) }
attr_encrypted :token,
mode: :per_attribute_iv,
@@ -16,11 +18,5 @@ module Ai
encode_iv: false
validates :token, :expires_at, presence: true
-
- enum category: {
- code_suggestions: 1
- }
-
- validates :category, presence: true
end
end