diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-21 12:15:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-21 12:15:06 +0300 |
commit | f73fa6daff38ea21d33a71f7bdcba34a86421333 (patch) | |
tree | 2efcadb09b56150b0f01209d217f167f446c02d6 /app | |
parent | cb9d96285c52d95a49782688e4ec8dd3f3942c89 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
14 files changed, 243 insertions, 296 deletions
diff --git a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue index 43d28e3d699..ea942012af3 100644 --- a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue +++ b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/ml_candidates_show.vue @@ -1,45 +1,15 @@ <script> -import { GlAvatarLabeled, GlLink, GlTableLite } from '@gitlab/ui'; -import { isEmpty, maxBy, range } from 'lodash'; import ModelExperimentsHeader from '~/ml/experiment_tracking/components/model_experiments_header.vue'; import DeleteButton from '~/ml/experiment_tracking/components/delete_button.vue'; -import { __, sprintf } from '~/locale'; -import DetailRow from './components/candidate_detail_row.vue'; - -import { - TITLE_LABEL, - INFO_LABEL, - ID_LABEL, - STATUS_LABEL, - EXPERIMENT_LABEL, - ARTIFACTS_LABEL, - PARAMETERS_LABEL, - METRICS_LABEL, - METADATA_LABEL, - DELETE_CANDIDATE_CONFIRMATION_MESSAGE, - DELETE_CANDIDATE_PRIMARY_ACTION_LABEL, - DELETE_CANDIDATE_MODAL_TITLE, - MLFLOW_ID_LABEL, - CI_SECTION_LABEL, - JOB_LABEL, - CI_USER_LABEL, - CI_MR_LABEL, - PERFORMANCE_LABEL, - NO_PARAMETERS_MESSAGE, - NO_METRICS_MESSAGE, - NO_METADATA_MESSAGE, - NO_CI_MESSAGE, -} from './translations'; +import CandidateDetail from '~/ml/model_registry/components/candidate_detail.vue'; +import { s__ } from '~/locale'; export default { name: 'MlCandidatesShow', components: { ModelExperimentsHeader, DeleteButton, - DetailRow, - GlAvatarLabeled, - GlLink, - GlTableLite, + CandidateDetail, }, props: { candidate: { @@ -47,70 +17,18 @@ export default { required: true, }, }, - i18n: { - TITLE_LABEL, - INFO_LABEL, - ID_LABEL, - STATUS_LABEL, - EXPERIMENT_LABEL, - ARTIFACTS_LABEL, - DELETE_CANDIDATE_CONFIRMATION_MESSAGE, - DELETE_CANDIDATE_PRIMARY_ACTION_LABEL, - DELETE_CANDIDATE_MODAL_TITLE, - MLFLOW_ID_LABEL, - CI_SECTION_LABEL, - JOB_LABEL, - CI_USER_LABEL, - CI_MR_LABEL, - PARAMETERS_LABEL, - METRICS_LABEL, - METADATA_LABEL, - PERFORMANCE_LABEL, - NO_PARAMETERS_MESSAGE, - NO_METRICS_MESSAGE, - NO_METADATA_MESSAGE, - NO_CI_MESSAGE, - }, computed: { info() { return Object.freeze(this.candidate.info); }, - ciJob() { - return Object.freeze(this.info.ci_job); - }, - hasMetadata() { - return !isEmpty(this.candidate.metadata); - }, - hasParameters() { - return !isEmpty(this.candidate.params); - }, - hasMetrics() { - return !isEmpty(this.candidate.metrics); - }, - metricsTableFields() { - const maxStep = maxBy(this.candidate.metrics, 'step').step; - const rowClass = 'gl-p-3!'; - - const cssClasses = { thClass: rowClass, tdClass: rowClass }; - - const fields = range(maxStep + 1).map((step) => ({ - key: step.toString(), - label: sprintf(__('Step %{step}'), { step }), - ...cssClasses, - })); - - return [{ key: 'name', label: __('Metric'), ...cssClasses }, ...fields]; - }, - metricsTableItems() { - const items = {}; - this.candidate.metrics.forEach((metric) => { - const metricRow = items[metric.name] || { name: metric.name }; - metricRow[metric.step] = metric.value; - items[metric.name] = metricRow; - }); - - return Object.values(items); - }, + }, + i18n: { + TITLE_LABEL: s__('MlExperimentTracking|Model candidate details'), + DELETE_CANDIDATE_CONFIRMATION_MESSAGE: s__( + 'MlExperimentTracking|Deleting this candidate will delete the associated parameters, metrics, and metadata.', + ), + DELETE_CANDIDATE_PRIMARY_ACTION_LABEL: s__('MlExperimentTracking|Delete candidate'), + DELETE_CANDIDATE_MODAL_TITLE: s__('MlExperimentTracking|Delete candidate?'), }, }; </script> @@ -126,106 +44,6 @@ export default { /> </model-experiments-header> - <section class="gl-mb-6"> - <table class="candidate-details"> - <tbody> - <detail-row :label="$options.i18n.ID_LABEL"> - {{ info.iid }} - </detail-row> - - <detail-row :label="$options.i18n.MLFLOW_ID_LABEL">{{ info.eid }}</detail-row> - - <detail-row :label="$options.i18n.STATUS_LABEL">{{ info.status }}</detail-row> - - <detail-row :label="$options.i18n.EXPERIMENT_LABEL"> - <gl-link :href="info.path_to_experiment"> - {{ info.experiment_name }} - </gl-link> - </detail-row> - - <detail-row v-if="info.path_to_artifact" :label="$options.i18n.ARTIFACTS_LABEL"> - <gl-link :href="info.path_to_artifact"> - {{ $options.i18n.ARTIFACTS_LABEL }} - </gl-link> - </detail-row> - </tbody> - </table> - </section> - - <section class="gl-mb-6"> - <h4>{{ $options.i18n.CI_SECTION_LABEL }}</h4> - - <table v-if="ciJob" class="candidate-details"> - <tbody> - <detail-row - :label="$options.i18n.JOB_LABEL" - :section-label="$options.i18n.CI_SECTION_LABEL" - > - <gl-link :href="ciJob.path"> - {{ ciJob.name }} - </gl-link> - </detail-row> - - <detail-row v-if="ciJob.user" :label="$options.i18n.CI_USER_LABEL"> - <gl-avatar-labeled label="" :size="24" :src="ciJob.user.avatar"> - <gl-link :href="ciJob.user.path"> - {{ ciJob.user.name }} - </gl-link> - </gl-avatar-labeled> - </detail-row> - - <detail-row v-if="ciJob.merge_request" :label="$options.i18n.CI_MR_LABEL"> - <gl-link :href="ciJob.merge_request.path"> - !{{ ciJob.merge_request.iid }} {{ ciJob.merge_request.title }} - </gl-link> - </detail-row> - </tbody> - </table> - - <div v-else class="gl-text-secondary">{{ $options.i18n.NO_CI_MESSAGE }}</div> - </section> - - <section class="gl-mb-6"> - <h4>{{ $options.i18n.PARAMETERS_LABEL }}</h4> - - <table v-if="hasParameters" class="candidate-details"> - <tbody> - <detail-row v-for="item in candidate.params" :key="item.name" :label="item.name"> - {{ item.value }} - </detail-row> - </tbody> - </table> - - <div v-else class="gl-text-secondary">{{ $options.i18n.NO_PARAMETERS_MESSAGE }}</div> - </section> - - <section class="gl-mb-6"> - <h4>{{ $options.i18n.METADATA_LABEL }}</h4> - - <table v-if="hasMetadata" class="candidate-details"> - <tbody> - <detail-row v-for="item in candidate.metadata" :key="item.name" :label="item.name"> - {{ item.value }} - </detail-row> - </tbody> - </table> - - <div v-else class="gl-text-secondary">{{ $options.i18n.NO_METADATA_MESSAGE }}</div> - </section> - - <section class="gl-mb-6"> - <h4>{{ $options.i18n.PERFORMANCE_LABEL }}</h4> - - <div v-if="hasMetrics" class="gl-overflow-x-auto"> - <gl-table-lite - :items="metricsTableItems" - :fields="metricsTableFields" - class="gl-w-auto" - hover - /> - </div> - - <div v-else class="gl-text-secondary">{{ $options.i18n.NO_METRICS_MESSAGE }}</div> - </section> + <candidate-detail :candidate="candidate" /> </div> </template> diff --git a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js b/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js deleted file mode 100644 index 98988e1db35..00000000000 --- a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/translations.js +++ /dev/null @@ -1,26 +0,0 @@ -import { __, s__ } from '~/locale'; - -export const TITLE_LABEL = s__('MlExperimentTracking|Model candidate details'); -export const INFO_LABEL = s__('MlExperimentTracking|Info'); -export const ID_LABEL = s__('MlExperimentTracking|ID'); -export const MLFLOW_ID_LABEL = s__('MlExperimentTracking|MLflow run ID'); -export const STATUS_LABEL = s__('MlExperimentTracking|Status'); -export const EXPERIMENT_LABEL = s__('MlExperimentTracking|Experiment'); -export const ARTIFACTS_LABEL = s__('MlExperimentTracking|Artifacts'); -export const PARAMETERS_LABEL = s__('MlExperimentTracking|Parameters'); -export const METRICS_LABEL = s__('MlExperimentTracking|Metrics'); -export const PERFORMANCE_LABEL = s__('MlExperimentTracking|Model performance'); -export const METADATA_LABEL = s__('MlExperimentTracking|Metadata'); -export const NO_PARAMETERS_MESSAGE = s__('MlExperimentTracking|No logged parameters'); -export const NO_METRICS_MESSAGE = s__('MlExperimentTracking|No logged metrics'); -export const NO_METADATA_MESSAGE = s__('MlExperimentTracking|No logged metadata'); -export const NO_CI_MESSAGE = s__('MlExperimentTracking|Candidate not linked to a CI build'); -export const DELETE_CANDIDATE_CONFIRMATION_MESSAGE = s__( - 'MlExperimentTracking|Deleting this candidate will delete the associated parameters, metrics, and metadata.', -); -export const DELETE_CANDIDATE_PRIMARY_ACTION_LABEL = s__('MlExperimentTracking|Delete candidate'); -export const DELETE_CANDIDATE_MODAL_TITLE = s__('MLExperimentTracking|Delete candidate?'); -export const CI_SECTION_LABEL = s__('MLExperimentTracking|CI Info'); -export const JOB_LABEL = __('Job'); -export const CI_USER_LABEL = s__('MlExperimentTracking|Triggered by'); -export const CI_MR_LABEL = __('Merge request'); diff --git a/app/assets/javascripts/ml/model_registry/components/candidate_detail.vue b/app/assets/javascripts/ml/model_registry/components/candidate_detail.vue new file mode 100644 index 00000000000..8c32fb3a2c6 --- /dev/null +++ b/app/assets/javascripts/ml/model_registry/components/candidate_detail.vue @@ -0,0 +1,207 @@ +<script> +import { GlAvatarLabeled, GlLink, GlTableLite } from '@gitlab/ui'; +import { isEmpty, maxBy, range } from 'lodash'; +import { __, sprintf } from '~/locale'; +import { + INFO_LABEL, + ID_LABEL, + STATUS_LABEL, + EXPERIMENT_LABEL, + ARTIFACTS_LABEL, + PARAMETERS_LABEL, + METADATA_LABEL, + MLFLOW_ID_LABEL, + CI_SECTION_LABEL, + JOB_LABEL, + CI_USER_LABEL, + CI_MR_LABEL, + PERFORMANCE_LABEL, + NO_PARAMETERS_MESSAGE, + NO_METRICS_MESSAGE, + NO_METADATA_MESSAGE, + NO_CI_MESSAGE, +} from '../translations'; +import DetailRow from './candidate_detail_row.vue'; + +export default { + name: 'MlCandidatesShow', + components: { + DetailRow, + GlAvatarLabeled, + GlLink, + GlTableLite, + }, + props: { + candidate: { + type: Object, + required: true, + }, + }, + i18n: { + INFO_LABEL, + ID_LABEL, + STATUS_LABEL, + EXPERIMENT_LABEL, + ARTIFACTS_LABEL, + MLFLOW_ID_LABEL, + CI_SECTION_LABEL, + JOB_LABEL, + CI_USER_LABEL, + CI_MR_LABEL, + PARAMETERS_LABEL, + METADATA_LABEL, + PERFORMANCE_LABEL, + NO_PARAMETERS_MESSAGE, + NO_METRICS_MESSAGE, + NO_METADATA_MESSAGE, + NO_CI_MESSAGE, + }, + computed: { + info() { + return Object.freeze(this.candidate.info); + }, + ciJob() { + return Object.freeze(this.info.ci_job); + }, + hasMetadata() { + return !isEmpty(this.candidate.metadata); + }, + hasParameters() { + return !isEmpty(this.candidate.params); + }, + hasMetrics() { + return !isEmpty(this.candidate.metrics); + }, + metricsTableFields() { + const maxStep = maxBy(this.candidate.metrics, 'step').step; + const rowClass = 'gl-p-3!'; + + const cssClasses = { thClass: rowClass, tdClass: rowClass }; + + const fields = range(maxStep + 1).map((step) => ({ + key: step.toString(), + label: sprintf(__('Step %{step}'), { step }), + ...cssClasses, + })); + + return [{ key: 'name', label: __('Metric'), ...cssClasses }, ...fields]; + }, + metricsTableItems() { + const items = {}; + this.candidate.metrics.forEach((metric) => { + const metricRow = items[metric.name] || { name: metric.name }; + metricRow[metric.step] = metric.value; + items[metric.name] = metricRow; + }); + + return Object.values(items); + }, + }, +}; +</script> + +<template> + <div> + <section class="gl-mb-6"> + <table class="candidate-details"> + <tbody> + <detail-row :label="$options.i18n.ID_LABEL"> + {{ info.iid }} + </detail-row> + + <detail-row :label="$options.i18n.MLFLOW_ID_LABEL">{{ info.eid }}</detail-row> + + <detail-row :label="$options.i18n.STATUS_LABEL">{{ info.status }}</detail-row> + + <detail-row :label="$options.i18n.EXPERIMENT_LABEL"> + <gl-link :href="info.path_to_experiment"> + {{ info.experiment_name }} + </gl-link> + </detail-row> + + <detail-row v-if="info.path_to_artifact" :label="$options.i18n.ARTIFACTS_LABEL"> + <gl-link :href="info.path_to_artifact"> + {{ $options.i18n.ARTIFACTS_LABEL }} + </gl-link> + </detail-row> + </tbody> + </table> + </section> + + <section class="gl-mb-6"> + <h4>{{ $options.i18n.CI_SECTION_LABEL }}</h4> + + <table v-if="ciJob" class="candidate-details"> + <tbody> + <detail-row + :label="$options.i18n.JOB_LABEL" + :section-label="$options.i18n.CI_SECTION_LABEL" + > + <gl-link :href="ciJob.path"> + {{ ciJob.name }} + </gl-link> + </detail-row> + + <detail-row v-if="ciJob.user" :label="$options.i18n.CI_USER_LABEL"> + <gl-avatar-labeled label="" :size="24" :src="ciJob.user.avatar"> + <gl-link :href="ciJob.user.path"> + {{ ciJob.user.name }} + </gl-link> + </gl-avatar-labeled> + </detail-row> + + <detail-row v-if="ciJob.merge_request" :label="$options.i18n.CI_MR_LABEL"> + <gl-link :href="ciJob.merge_request.path"> + !{{ ciJob.merge_request.iid }} {{ ciJob.merge_request.title }} + </gl-link> + </detail-row> + </tbody> + </table> + + <div v-else class="gl-text-secondary">{{ $options.i18n.NO_CI_MESSAGE }}</div> + </section> + + <section class="gl-mb-6"> + <h4>{{ $options.i18n.PARAMETERS_LABEL }}</h4> + + <table v-if="hasParameters" class="candidate-details"> + <tbody> + <detail-row v-for="item in candidate.params" :key="item.name" :label="item.name"> + {{ item.value }} + </detail-row> + </tbody> + </table> + + <div v-else class="gl-text-secondary">{{ $options.i18n.NO_PARAMETERS_MESSAGE }}</div> + </section> + + <section class="gl-mb-6"> + <h4>{{ $options.i18n.METADATA_LABEL }}</h4> + + <table v-if="hasMetadata" class="candidate-details"> + <tbody> + <detail-row v-for="item in candidate.metadata" :key="item.name" :label="item.name"> + {{ item.value }} + </detail-row> + </tbody> + </table> + + <div v-else class="gl-text-secondary">{{ $options.i18n.NO_METADATA_MESSAGE }}</div> + </section> + + <section class="gl-mb-6"> + <h4>{{ $options.i18n.PERFORMANCE_LABEL }}</h4> + + <div v-if="hasMetrics" class="gl-overflow-x-auto"> + <gl-table-lite + :items="metricsTableItems" + :fields="metricsTableFields" + class="gl-w-auto" + hover + /> + </div> + + <div v-else class="gl-text-secondary">{{ $options.i18n.NO_METRICS_MESSAGE }}</div> + </section> + </div> +</template> diff --git a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/components/candidate_detail_row.vue b/app/assets/javascripts/ml/model_registry/components/candidate_detail_row.vue index 8c7460940a0..8c7460940a0 100644 --- a/app/assets/javascripts/ml/experiment_tracking/routes/candidates/show/components/candidate_detail_row.vue +++ b/app/assets/javascripts/ml/model_registry/components/candidate_detail_row.vue diff --git a/app/assets/javascripts/ml/model_registry/translations.js b/app/assets/javascripts/ml/model_registry/translations.js index 89b3f45ed94..689eeb45b00 100644 --- a/app/assets/javascripts/ml/model_registry/translations.js +++ b/app/assets/javascripts/ml/model_registry/translations.js @@ -1,4 +1,4 @@ -import { s__, n__ } from '~/locale'; +import { __, s__, n__ } from '~/locale'; export const MODEL_DETAILS_TAB_LABEL = s__('MlModelRegistry|Details'); export const MODEL_OTHER_VERSIONS_TAB_LABEL = s__('MlModelRegistry|Versions'); @@ -14,3 +14,21 @@ export const NO_MODELS_LABEL = s__('MlModelRegistry|No models registered in this export const modelsCountLabel = (modelCount) => n__('MlModelRegistry|%d model', 'MlModelRegistry|%d models', modelCount); + +export const INFO_LABEL = s__('MlModelRegistry|Info'); +export const ID_LABEL = s__('MlModelRegistry|ID'); +export const MLFLOW_ID_LABEL = s__('MlModelRegistry|MLflow run ID'); +export const STATUS_LABEL = s__('MlModelRegistry|Status'); +export const EXPERIMENT_LABEL = s__('MlModelRegistry|Experiment'); +export const ARTIFACTS_LABEL = s__('MlModelRegistry|Artifacts'); +export const PARAMETERS_LABEL = s__('MlModelRegistry|Parameters'); +export const PERFORMANCE_LABEL = s__('MlModelRegistry|Model performance'); +export const METADATA_LABEL = s__('MlModelRegistry|Metadata'); +export const NO_PARAMETERS_MESSAGE = s__('MlModelRegistry|No logged parameters'); +export const NO_METRICS_MESSAGE = s__('MlModelRegistry|No logged metrics'); +export const NO_METADATA_MESSAGE = s__('MlModelRegistry|No logged metadata'); +export const NO_CI_MESSAGE = s__('MlModelRegistry|Candidate not linked to a CI build'); +export const CI_SECTION_LABEL = s__('MlModelRegistry|CI Info'); +export const JOB_LABEL = __('Job'); +export const CI_USER_LABEL = s__('MlModelRegistry|Triggered by'); +export const CI_MR_LABEL = __('Merge request'); diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue index 6ff48b7de95..c6d18a1328b 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue +++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue @@ -571,7 +571,7 @@ export default { :disabled="!canChangeVisibilityLevel" name="project[visibility_level]" class="form-control select-control" - data-qa-selector="project_visibility_dropdown" + data-testid="project-visibility-dropdown" > <option :value="$options.VISIBILITY_LEVEL_PRIVATE_INTEGER" @@ -1060,13 +1060,7 @@ export default { data-testid="project-features-save-button" @confirm="$emit('confirm')" /> - <gl-button - v-else - type="submit" - variant="confirm" - data-testid="project-features-save-button" - data-qa-selector="visibility_features_permissions_save_button" - > + <gl-button v-else type="submit" variant="confirm" data-testid="project-features-save-button"> {{ $options.i18n.confirmButtonText }} </gl-button> </div> diff --git a/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer_new.vue b/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer_new.vue index 7ced12952dd..bc46f11ab2d 100644 --- a/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer_new.vue +++ b/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer_new.vue @@ -148,6 +148,7 @@ export default { :class="$options.userColorScheme" data-type="simple" :data-path="blob.path" + data-testid="blob-viewer-file-content" > <codeowners-validation v-if="isCodeownersFile" diff --git a/app/helpers/ci/runners_helper.rb b/app/helpers/ci/runners_helper.rb index 7cc554bbeeb..c5d62b49a3c 100644 --- a/app/helpers/ci/runners_helper.rb +++ b/app/helpers/ci/runners_helper.rb @@ -31,7 +31,7 @@ module Ci span_class = 'gl-text-orange-500' end - content_tag(:span, class: span_class, title: title, data: { toggle: 'tooltip', container: 'body', testid: 'runner_status_icon', qa_selector: "runner_status_#{status}_content" }) do + content_tag(:span, class: span_class, title: title, data: { toggle: 'tooltip', container: 'body', testid: 'runner-status-icon', qa_status: status }) do sprite_icon(icon, size: size, css_class: icon_class) end end diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 75e89a7d7bc..aad3e07ea28 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -21,15 +21,6 @@ module NotesHelper Notes::QuickActionsService.supported?(note) end - def noteable_json(noteable) - { - id: noteable.id, - class: noteable.class.name, - resources: noteable.class.table_name, - project_id: noteable.project.id - }.to_json - end - def diff_view_data return {} unless @new_diff_note_attrs @@ -87,10 +78,6 @@ module NotesHelper end end - def note_max_access_for_user(note) - note.project.team.max_member_access(note.author_id) - end - def note_human_max_access(note) note.project.team.human_max_access(note.author_id) end diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index ddaef4652b4..b6e435986ce 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -35,42 +35,6 @@ module NotificationsHelper sprite_icon(icon) end - def notification_title(level) - # Can be anything in `NotificationSetting.level: - case level.to_sym - when :participating - s_('NotificationLevel|Participate') - when :mention - s_('NotificationLevel|On mention') - else - N_('NotificationLevel|Global') - N_('NotificationLevel|Watch') - N_('NotificationLevel|Disabled') - N_('NotificationLevel|Custom') - level = "NotificationLevel|#{level.to_s.humanize}" - s_(level) - end - end - - def notification_description(level) - case level.to_sym - when :participating - _('You will only receive notifications for threads you have participated in') - when :mention - _('You will receive notifications only for comments in which you were @mentioned') - when :watch - _('You will receive notifications for any activity') - when :disabled - _('You will not get any notifications via email') - when :global - _('Use your global notification setting') - when :custom - _('You will only receive notifications for the events you choose') - when :owner_disabled - _('Notifications have been disabled by the project or group owner') - end - end - def show_unsubscribe_title?(noteable) can?(current_user, "read_#{noteable.to_ability_name}".to_sym, noteable) end diff --git a/app/helpers/packages_helper.rb b/app/helpers/packages_helper.rb index fefc19d7c1a..887f63ce05d 100644 --- a/app/helpers/packages_helper.rb +++ b/app/helpers/packages_helper.rb @@ -3,10 +3,6 @@ module PackagesHelper include ::API::Helpers::RelatedResourcesHelpers - def package_sort_path(options = {}) - "#{request.path}?#{options.to_param}" - end - def nuget_package_registry_url(project_id) expose_url(api_v4_projects_packages_nuget_index_path(id: project_id, format: '.json')) end diff --git a/app/helpers/profiles_helper.rb b/app/helpers/profiles_helper.rb index 8d260d5e455..c115e4c594a 100644 --- a/app/helpers/profiles_helper.rb +++ b/app/helpers/profiles_helper.rb @@ -27,10 +27,6 @@ module ProfilesHelper params[:controller] == 'users' end - def availability_values - Types::AvailabilityEnum.enum - end - def middle_dot_divider_classes(stacking, breakpoint) ['gl-mb-3'].tap do |classes| if stacking diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index 137b24102e0..90f3c1e6ae6 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -171,14 +171,6 @@ module TabHelper current_controller?(c) && current_action?(a) end - def branches_tab_class - if current_controller?(:protected_branches) || - current_controller?(:branches) || - current_page?(project_repository_path(@project)) - 'active' - end - end - private def route_matches_paths?(paths) diff --git a/app/views/ci/runner/_how_to_setup_runner.html.haml b/app/views/ci/runner/_how_to_setup_runner.html.haml index c46aabf2604..29c2e364c37 100644 --- a/app/views/ci/runner/_how_to_setup_runner.html.haml +++ b/app/views/ci/runner/_how_to_setup_runner.html.haml @@ -13,7 +13,7 @@ %br = _("And this registration token:") %br - %code#registration_token{ data: {testid: 'registration_token' } }= registration_token + %code#registration_token= registration_token = deprecated_clipboard_button(target: '#registration_token', title: _("Copy token")) .gl-mt-3.gl-mb-3 |