Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-12-14 09:10:42 +00:00
parent 2556bfddbc
commit a58667ab4b
11 changed files with 251 additions and 226 deletions

View File

@ -1 +1 @@
bba495c8c929b75f8cbcdc6d07d07431736aa8d1 125f0fc0e49db4dd46f2e905f34178ce880dd79e

View File

@ -113,8 +113,9 @@ export function initLabelIndex() {
} }
export function initAdminLabels() { export function initAdminLabels() {
const pagination = document.querySelector('.labels .gl-pagination'); const labelsContainer = document.querySelector('.js-admin-labels-container');
const emptyState = document.querySelector('.labels .nothing-here-block.hidden'); const pagination = labelsContainer?.querySelector('.gl-pagination');
const emptyState = document.querySelector('.js-admin-labels-empty-state');
function removeLabelSuccessCallback() { function removeLabelSuccessCallback() {
this.closest('li').classList.add('gl-display-none!'); this.closest('li').classList.add('gl-display-none!');
@ -125,7 +126,8 @@ export function initAdminLabels() {
// display the empty state if there are no more labels // display the empty state if there are no more labels
if (labelsCount < 1 && !pagination && emptyState) { if (labelsCount < 1 && !pagination && emptyState) {
emptyState.classList.remove('hidden'); emptyState.classList.remove('gl-display-none');
labelsContainer.classList.add('gl-display-none');
} }
} }

View File

@ -166,7 +166,6 @@ export default {
class="issue gl-display-flex! gl-px-5!" class="issue gl-display-flex! gl-px-5!"
:class="{ closed: issuable.closedAt, today: createdInPastDay }" :class="{ closed: issuable.closedAt, today: createdInPastDay }"
:data-labels="labelIdsString" :data-labels="labelIdsString"
data-qa-selector="issuable_item_container"
:data-qa-issue-id="issuableId" :data-qa-issue-id="issuableId"
> >
<gl-form-checkbox <gl-form-checkbox

View File

@ -6,13 +6,27 @@
%h3.page-title %h3.page-title
= _('Labels') = _('Labels')
%hr %hr
- if @labels.present?
.labels.labels-container.admin-labels.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100 .labels.labels-container.admin-labels.js-admin-labels-container.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100
- if @labels.present?
%ul.manage-labels-list %ul.manage-labels-list
= render @labels = render @labels
= paginate @labels, theme: 'gitlab' = paginate @labels, theme: 'gitlab'
.nothing-here-block{ class: ('hidden' if @labels.present?) } .js-admin-labels-empty-state{ class: ('gl-display-none' if @labels.present?) }
= _('There are no labels yet') %section.row.empty-state.gl-text-center
.col-12
.svg-content
= image_tag 'illustrations/labels.svg'
.col-12
.gl-mx-auto.gl-my-0.gl-p-5
%h1.gl-font-size-h-display.gl-line-height-36.h4
= s_('AdminLabels|Define your default set of project labels')
%p.gl-mb-0
= s_('AdminLabels|Labels created here will be automatically added to new projects.')
%p
= s_('AdminLabels|They can be used to categorize issues and merge requests.')
.gl-display-flex.gl-flex-wrap.gl-justify-content-center
= link_to new_admin_label_path, class: "btn gl-mb-3 btn-confirm btn-md gl-button gl-mx-2" do
%span.gl-button-text
= _('New label')

View File

@ -22,159 +22,159 @@ See also:
The following API resources are available in the project context: The following API resources are available in the project context:
| Resource | Available endpoints | | Resource | Available endpoints |
|:--------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------------------------------------------------|:--------------------|
| [Access requests](access_requests.md) | `/projects/:id/access_requests` (also available for groups) | | [Access requests](access_requests.md) | `/projects/:id/access_requests` (also available for groups) |
| [Access tokens](resource_access_tokens.md) | `/projects/:id/access_tokens` | | [Access tokens](resource_access_tokens.md) | `/projects/:id/access_tokens` |
| [Award emoji](award_emoji.md) | `/projects/:id/issues/.../award_emoji`, `/projects/:id/merge_requests/.../award_emoji`, `/projects/:id/snippets/.../award_emoji` | | [Award emoji](award_emoji.md) | `/projects/:id/issues/.../award_emoji`, `/projects/:id/merge_requests/.../award_emoji`, `/projects/:id/snippets/.../award_emoji` |
| [Branches](branches.md) | `/projects/:id/repository/branches/`, `/projects/:id/repository/merged_branches` | | [Branches](branches.md) | `/projects/:id/repository/branches/`, `/projects/:id/repository/merged_branches` |
| [Commits](commits.md) | `/projects/:id/repository/commits`, `/projects/:id/statuses` | | [Commits](commits.md) | `/projects/:id/repository/commits`, `/projects/:id/statuses` |
| [Container Registry](container_registry.md) | `/projects/:id/registry/repositories` | | [Container Registry](container_registry.md) | `/projects/:id/registry/repositories` |
| [Custom attributes](custom_attributes.md) | `/projects/:id/custom_attributes` (also available for groups and users) | | [Custom attributes](custom_attributes.md) | `/projects/:id/custom_attributes` (also available for groups and users) |
| [Dependencies](dependencies.md) **(ULTIMATE)** | `/projects/:id/dependencies` | | [Debian distributions](packages/debian_project_distributions.md) | `/projects/:id/debian_distributions` (also available for groups) |
| [Deploy keys](deploy_keys.md) | `/projects/:id/deploy_keys` (also available standalone) | | [Dependencies](dependencies.md) **(ULTIMATE)** | `/projects/:id/dependencies` |
| [Freeze Periods](freeze_periods.md) | `/projects/:id/freeze_periods` | | [Deploy keys](deploy_keys.md) | `/projects/:id/deploy_keys` (also available standalone) |
| [Debian distributions](packages/debian_project_distributions.md) | `/projects/:id/debian_distributions` (also available for groups) | | [Deployments](deployments.md) | `/projects/:id/deployments` |
| [Deployments](deployments.md) | `/projects/:id/deployments` | | [Discussions](discussions.md) (threaded comments) | `/projects/:id/issues/.../discussions`, `/projects/:id/snippets/.../discussions`, `/projects/:id/merge_requests/.../discussions`, `/projects/:id/commits/.../discussions` (also available for groups) |
| [Discussions](discussions.md) (threaded comments) | `/projects/:id/issues/.../discussions`, `/projects/:id/snippets/.../discussions`, `/projects/:id/merge_requests/.../discussions`, `/projects/:id/commits/.../discussions` (also available for groups) | | [Environments](environments.md) | `/projects/:id/environments` |
| [Environments](environments.md) | `/projects/:id/environments` | | [Error Tracking](error_tracking.md) | `/projects/:id/error_tracking/settings` |
| [Error Tracking](error_tracking.md) | `/projects/:id/error_tracking/settings` | | [Events](events.md) | `/projects/:id/events` (also available for users and standalone) |
| [Events](events.md) | `/projects/:id/events` (also available for users and standalone) | | [Feature Flag User Lists](feature_flag_user_lists.md) | `/projects/:id/feature_flags_user_lists` |
| [Feature Flags](feature_flags.md) | `/projects/:id/feature_flags` | | [Feature Flags](feature_flags.md) | `/projects/:id/feature_flags` |
| [Feature Flag User Lists](feature_flag_user_lists.md) | `/projects/:id/feature_flags_user_lists` | | [Freeze Periods](freeze_periods.md) | `/projects/:id/freeze_periods` |
| [Integrations](integrations.md) (Formerly "services") | `/projects/:id/integrations` | | [Integrations](integrations.md) (Formerly "services") | `/projects/:id/integrations` |
| [Invitations](invitations.md) | `/projects/:id/invitations` (also available for groups) | | [Invitations](invitations.md) | `/projects/:id/invitations` (also available for groups) |
| [Issues](issues.md) | `/projects/:id/issues` (also available for groups and standalone) | | [Issue boards](boards.md) | `/projects/:id/boards` |
| [Issues Statistics](issues_statistics.md) | `/projects/:id/issues_statistics` (also available for groups and standalone) | | [Issue links](issue_links.md) | `/projects/:id/issues/.../links` |
| [Issue boards](boards.md) | `/projects/:id/boards` | | [Issues Statistics](issues_statistics.md) | `/projects/:id/issues_statistics` (also available for groups and standalone) |
| [Issue links](issue_links.md). | `/projects/:id/issues/.../links` | | [Issues](issues.md) | `/projects/:id/issues` (also available for groups and standalone) |
| [Iterations](iterations.md) **(PREMIUM)** | `/projects/:id/iterations` (also available for groups) | | [Iterations](iterations.md) **(PREMIUM)** | `/projects/:id/iterations` (also available for groups) |
| [Jobs](jobs.md) | `/projects/:id/jobs`, `/projects/:id/pipelines/.../jobs` | | [Jobs](jobs.md) | `/projects/:id/jobs`, `/projects/:id/pipelines/.../jobs` |
| [Labels](labels.md) | `/projects/:id/labels` | | [Labels](labels.md) | `/projects/:id/labels` |
| [Managed licenses](managed_licenses.md) **(ULTIMATE)** | `/projects/:id/managed_licenses` | | [Managed licenses](managed_licenses.md) **(ULTIMATE)** | `/projects/:id/managed_licenses` |
| [Members](members.md) | `/projects/:id/members` (also available for groups) | | [Members](members.md) | `/projects/:id/members` (also available for groups) |
| [Merge request approvals](merge_request_approvals.md) **(PREMIUM)** | `/projects/:id/approvals`, `/projects/:id/merge_requests/.../approvals` | | [Merge request approvals](merge_request_approvals.md) **(PREMIUM)** | `/projects/:id/approvals`, `/projects/:id/merge_requests/.../approvals` |
| [Merge requests](merge_requests.md) | `/projects/:id/merge_requests` (also available for groups and standalone) | | [Merge requests](merge_requests.md) | `/projects/:id/merge_requests` (also available for groups and standalone) |
| [Merge trains](merge_trains.md) | `/projects/:id/merge_trains` | | [Merge trains](merge_trains.md) | `/projects/:id/merge_trains` |
| [Notes](notes.md) (comments) | `/projects/:id/issues/.../notes`, `/projects/:id/snippets/.../notes`, `/projects/:id/merge_requests/.../notes` (also available for groups) | | [Notes](notes.md) (comments) | `/projects/:id/issues/.../notes`, `/projects/:id/snippets/.../notes`, `/projects/:id/merge_requests/.../notes` (also available for groups) |
| [Notification settings](notification_settings.md) | `/projects/:id/notification_settings` (also available for groups and standalone) | | [Notification settings](notification_settings.md) | `/projects/:id/notification_settings` (also available for groups and standalone) |
| [Packages](packages.md) | `/projects/:id/packages` | | [Packages](packages.md) | `/projects/:id/packages` |
| [Pages domains](pages_domains.md) | `/projects/:id/pages` (also available standalone) | | [Pages domains](pages_domains.md) | `/projects/:id/pages` (also available standalone) |
| [Pipelines](pipelines.md) | `/projects/:id/pipelines` | | [Pipeline schedules](pipeline_schedules.md) | `/projects/:id/pipeline_schedules` |
| [Pipeline schedules](pipeline_schedules.md) | `/projects/:id/pipeline_schedules` | | [Pipeline triggers](pipeline_triggers.md) | `/projects/:id/triggers` |
| [Pipeline triggers](pipeline_triggers.md) | `/projects/:id/triggers` | | [Pipelines](pipelines.md) | `/projects/:id/pipelines` |
| [Projects](projects.md) including setting Webhooks | `/projects`, `/projects/:id/hooks` (also available for users) | | [Project badges](project_badges.md) | `/projects/:id/badges` |
| [Project badges](project_badges.md) | `/projects/:id/badges` | | [Project clusters](project_clusters.md) | `/projects/:id/clusters` |
| [Project clusters](project_clusters.md) | `/projects/:id/clusters` | | [Project import/export](project_import_export.md) | `/projects/:id/export`, `/projects/import`, `/projects/:id/import` |
| [Project-level variables](project_level_variables.md) | `/projects/:id/variables` | | [Project milestones](milestones.md) | `/projects/:id/milestones` |
| [Project import/export](project_import_export.md) | `/projects/:id/export`, `/projects/import`, `/projects/:id/import` | | [Project snippets](project_snippets.md) | `/projects/:id/snippets` |
| [Project milestones](milestones.md) | `/projects/:id/milestones` | | [Project templates](project_templates.md) | `/projects/:id/templates` |
| [Project snippets](project_snippets.md) | `/projects/:id/snippets` | | [Project vulnerabilities](project_vulnerabilities.md) **(ULTIMATE)** | `/projects/:id/templates` |
| [Project templates](project_templates.md) | `/projects/:id/templates` | | [Project wikis](wikis.md) | `/projects/:id/wikis` |
| [Project vulnerabilities](project_vulnerabilities.md) **(ULTIMATE)** | `/projects/:id/templates` | | [Project-level variables](project_level_variables.md) | `/projects/:id/variables` |
| [Protected environments](protected_environments.md) | `/projects/:id/protected_environments` | | [Projects](projects.md) including setting Webhooks | `/projects`, `/projects/:id/hooks` (also available for users) |
| [Protected branches](protected_branches.md) | `/projects/:id/protected_branches` | | [Protected branches](protected_branches.md) | `/projects/:id/protected_branches` |
| [Protected tags](protected_tags.md) | `/projects/:id/protected_tags` | | [Protected environments](protected_environments.md) | `/projects/:id/protected_environments` |
| [Releases](releases/index.md) | `/projects/:id/releases` | | [Protected tags](protected_tags.md) | `/projects/:id/protected_tags` |
| [Release links](releases/links.md) | `/projects/:id/releases/.../assets/links` | | [Release links](releases/links.md) | `/projects/:id/releases/.../assets/links` |
| [Remote mirrors](remote_mirrors.md) | `/projects/:id/remote_mirrors` | | [Releases](releases/index.md) | `/projects/:id/releases` |
| [Repositories](repositories.md) | `/projects/:id/repository` | | [Remote mirrors](remote_mirrors.md) | `/projects/:id/remote_mirrors` |
| [Repository files](repository_files.md) | `/projects/:id/repository/files` | | [Repositories](repositories.md) | `/projects/:id/repository` |
| [Repository submodules](repository_submodules.md) | `/projects/:id/repository/submodules` | | [Repository files](repository_files.md) | `/projects/:id/repository/files` |
| [Resource label events](resource_label_events.md) | `/projects/:id/issues/.../resource_label_events`, `/projects/:id/merge_requests/.../resource_label_events` (also available for groups) | | [Repository submodules](repository_submodules.md) | `/projects/:id/repository/submodules` |
| [Runners](runners.md) | `/projects/:id/runners` (also available standalone) | | [Resource label events](resource_label_events.md) | `/projects/:id/issues/.../resource_label_events`, `/projects/:id/merge_requests/.../resource_label_events` (also available for groups) |
| [Search](search.md) | `/projects/:id/search` (also available for groups and standalone) | | [Runners](runners.md) | `/projects/:id/runners` (also available standalone) |
| [Tags](tags.md) | `/projects/:id/repository/tags` | | [Search](search.md) | `/projects/:id/search` (also available for groups and standalone) |
| [User-starred metrics dashboards](metrics_user_starred_dashboards.md ) | `/projects/:id/metrics/user_starred_dashboards` | | [Tags](tags.md) | `/projects/:id/repository/tags` |
| [Visual Review discussions](visual_review_discussions.md) **(PREMIUM)** | `/projects/:id/merge_requests/:merge_request_id/visual_review_discussions` | | [User-starred metrics dashboards](metrics_user_starred_dashboards.md ) | `/projects/:id/metrics/user_starred_dashboards` |
| [Vulnerabilities](vulnerabilities.md) **(ULTIMATE)** | `/vulnerabilities/:id` | | [Visual Review discussions](visual_review_discussions.md) **(PREMIUM)** | `/projects/:id/merge_requests/:merge_request_id/visual_review_discussions` |
| [Vulnerability exports](vulnerability_exports.md) **(ULTIMATE)** | `/projects/:id/vulnerability_exports` | | [Vulnerabilities](vulnerabilities.md) **(ULTIMATE)** | `/vulnerabilities/:id` |
| [Vulnerability findings](vulnerability_findings.md) **(ULTIMATE)** | `/projects/:id/vulnerability_findings` | | [Vulnerability exports](vulnerability_exports.md) **(ULTIMATE)** | `/projects/:id/vulnerability_exports` |
| [Project wikis](wikis.md) | `/projects/:id/wikis` | | [Vulnerability findings](vulnerability_findings.md) **(ULTIMATE)** | `/projects/:id/vulnerability_findings` |
## Group resources ## Group resources
The following API resources are available in the group context: The following API resources are available in the group context:
| Resource | Available endpoints | | Resource | Available endpoints |
|:-----------------------------------------------------------------|:---------------------------------------------------------------------------------| |:-----------------------------------------------------------------|:--------------------|
| [Access requests](access_requests.md) | `/groups/:id/access_requests/` (also available for projects) | | [Access requests](access_requests.md) | `/groups/:id/access_requests/` (also available for projects) |
| [Custom attributes](custom_attributes.md) | `/groups/:id/custom_attributes` (also available for projects and users) | | [Custom attributes](custom_attributes.md) | `/groups/:id/custom_attributes` (also available for projects and users) |
| [Debian distributions](packages/debian_group_distributions.md) | `/groups/:id/-/packages/debian` (also available for projects) | | [Debian distributions](packages/debian_group_distributions.md) | `/groups/:id/-/packages/debian` (also available for projects) |
| [Discussions](discussions.md) (threaded comments) **(ULTIMATE)** | `/groups/:id/epics/.../discussions` (also available for projects) | | [Discussions](discussions.md) (threaded comments) **(ULTIMATE)** | `/groups/:id/epics/.../discussions` (also available for projects) |
| [Epic issues](epic_issues.md) **(ULTIMATE)** | `/groups/:id/epics/.../issues` | | [Epic issues](epic_issues.md) **(ULTIMATE)** | `/groups/:id/epics/.../issues` |
| [Epic links](epic_links.md) **(ULTIMATE)** | `/groups/:id/epics/.../epics` | | [Epic links](epic_links.md) **(ULTIMATE)** | `/groups/:id/epics/.../epics` |
| [Epics](epics.md) **(ULTIMATE)** | `/groups/:id/epics` | | [Epics](epics.md) **(ULTIMATE)** | `/groups/:id/epics` |
| [Groups](groups.md) | `/groups`, `/groups/.../subgroups` | | [Groups](groups.md) | `/groups`, `/groups/.../subgroups` |
| [Group badges](group_badges.md) | `/groups/:id/badges` | | [Group badges](group_badges.md) | `/groups/:id/badges` |
| [Group issue boards](group_boards.md) | `/groups/:id/boards` | | [Group issue boards](group_boards.md) | `/groups/:id/boards` |
| [Group iterations](group_iterations.md) **(PREMIUM)** | `/groups/:id/iterations` (also available for projects) | | [Group iterations](group_iterations.md) **(PREMIUM)** | `/groups/:id/iterations` (also available for projects) |
| [Group labels](group_labels.md) | `/groups/:id/labels` | | [Group labels](group_labels.md) | `/groups/:id/labels` |
| [Group-level variables](group_level_variables.md) | `/groups/:id/variables` | | [Group-level variables](group_level_variables.md) | `/groups/:id/variables` |
| [Group milestones](group_milestones.md) | `/groups/:id/milestones` | | [Group milestones](group_milestones.md) | `/groups/:id/milestones` |
| [Invitations](invitations.md) | `/groups/:id/invitations` (also available for projects) | | [Group wikis](group_wikis.md) **(PREMIUM)** | `/groups/:id/wikis` |
| [Issues](issues.md) | `/groups/:id/issues` (also available for projects and standalone) | | [Invitations](invitations.md) | `/groups/:id/invitations` (also available for projects) |
| [Issues Statistics](issues_statistics.md) | `/groups/:id/issues_statistics` (also available for projects and standalone) | | [Issues](issues.md) | `/groups/:id/issues` (also available for projects and standalone) |
| [Members](members.md) | `/groups/:id/members` (also available for projects) | | [Issues Statistics](issues_statistics.md) | `/groups/:id/issues_statistics` (also available for projects and standalone) |
| [Merge requests](merge_requests.md) | `/groups/:id/merge_requests` (also available for projects and standalone) | | [Members](members.md) | `/groups/:id/members` (also available for projects) |
| [Notes](notes.md) (comments) | `/groups/:id/epics/.../notes` (also available for projects) | | [Merge requests](merge_requests.md) | `/groups/:id/merge_requests` (also available for projects and standalone) |
| [Notes](notes.md) (comments) | `/groups/:id/epics/.../notes` (also available for projects) |
| [Notification settings](notification_settings.md) | `/groups/:id/notification_settings` (also available for projects and standalone) | | [Notification settings](notification_settings.md) | `/groups/:id/notification_settings` (also available for projects and standalone) |
| [Resource label events](resource_label_events.md) | `/groups/:id/epics/.../resource_label_events` (also available for projects) | | [Resource label events](resource_label_events.md) | `/groups/:id/epics/.../resource_label_events` (also available for projects) |
| [Search](search.md) | `/groups/:id/search` (also available for projects and standalone) | | [Search](search.md) | `/groups/:id/search` (also available for projects and standalone) |
| [Group wikis](group_wikis.md) **(PREMIUM)** | `/groups/:id/wikis` |
## Standalone resources ## Standalone resources
The following API resources are available outside of project and group contexts (including `/users`): The following API resources are available outside of project and group contexts (including `/users`):
| Resource | Available endpoints | | Resource | Available endpoints |
|:---------------------------------------------------|:------------------------------------------------------------------------| |:----------------------------------------------------------------------------------------|:--------------------|
| [Instance-level CI/CD variables](instance_level_ci_variables.md) **(FREE SELF)** | `/admin/ci/variables` | | [Appearance](appearance.md) **(FREE SELF)** | `/application/appearance` |
| [Sidekiq queues administration](admin_sidekiq_queues.md) **(FREE SELF)** | `/admin/sidekiq/queues/:queue_name` | | [Applications](applications.md) | `/applications` |
| [Appearance](appearance.md) **(FREE SELF)** | `/application/appearance` | | [Audit Events](audit_events.md) **(PREMIUM SELF)** | `/audit_events` |
| [Applications](applications.md) | `/applications` | | [Avatar](avatar.md) | `/avatar` |
| [Audit Events](audit_events.md) **(PREMIUM SELF)** | `/audit_events` | | [Broadcast messages](broadcast_messages.md) | `/broadcast_messages` |
| [Avatar](avatar.md) | `/avatar` | | [Code snippets](snippets.md) | `/snippets` |
| [Broadcast messages](broadcast_messages.md) | `/broadcast_messages` | | [Custom attributes](custom_attributes.md) | `/users/:id/custom_attributes` (also available for groups and projects) |
| [Code snippets](snippets.md) | `/snippets` | | [Deploy keys](deploy_keys.md) | `/deploy_keys` (also available for projects) |
| [Custom attributes](custom_attributes.md) | `/users/:id/custom_attributes` (also available for groups and projects) | | [Events](events.md) | `/events`, `/users/:id/events` (also available for projects) |
| [Deploy keys](deploy_keys.md) | `/deploy_keys` (also available for projects) | | [Feature flags](features.md) | `/features` |
| [Events](events.md) | `/events`, `/users/:id/events` (also available for projects) | | [Geo Nodes](geo_nodes.md) **(PREMIUM SELF)** | `/geo_nodes` |
| [Feature flags](features.md) | `/features` | | [Group Activity Analytics](group_activity_analytics.md) | `/analytics/group_activity/{issues_count}` |
| [Geo Nodes](geo_nodes.md) **(PREMIUM SELF)** | `/geo_nodes` | | [Group repository storage moves](group_repository_storage_moves.md) **(PREMIUM SELF)** | `/group_repository_storage_moves` |
| [Group Activity Analytics](group_activity_analytics.md) | `/analytics/group_activity/{issues_count | merge_requests_count | new_members_count }` | | [Import repository from GitHub](import.md) | `/import/github` |
| [Group repository storage moves](group_repository_storage_moves.md) **(PREMIUM SELF)** | `/group_repository_storage_moves` | | [Instance clusters](instance_clusters.md) **(FREE SELF)** | `/admin/clusters` |
| [Import repository from GitHub](import.md) | `/import/github` | | [Instance-level CI/CD variables](instance_level_ci_variables.md) **(FREE SELF)** | `/admin/ci/variables` |
| [Instance clusters](instance_clusters.md) **(FREE SELF)** | `/admin/clusters` | | [Issues Statistics](issues_statistics.md) | `/issues_statistics` (also available for groups and projects) |
| [Issues](issues.md) | `/issues` (also available for groups and projects) | | [Issues](issues.md) | `/issues` (also available for groups and projects) |
| [Issues Statistics](issues_statistics.md) | `/issues_statistics` (also available for groups and projects) | | [Jobs](jobs.md) | `/job` |
| [Jobs](jobs.md) | `/job` | | [Keys](keys.md) | `/keys` |
| [Keys](keys.md) | `/keys` | | [License](license.md) **(FREE SELF)** | `/license` |
| [License](license.md) **(FREE SELF)** | `/license` | | [Markdown](markdown.md) | `/markdown` |
| [Markdown](markdown.md) | `/markdown` | | [Merge requests](merge_requests.md) | `/merge_requests` (also available for groups and projects) |
| [Merge requests](merge_requests.md) | `/merge_requests` (also available for groups and projects) | | [Metrics dashboard annotations](metrics_dashboard_annotations.md) | `/environments/:id/metrics_dashboard/annotations`, `/clusters/:id/metrics_dashboard/annotations` |
| [Metrics dashboard annotations](metrics_dashboard_annotations.md) | `/environments/:id/metrics_dashboard/annotations`, `/clusters/:id/metrics_dashboard/annotations` | | [Namespaces](namespaces.md) | `/namespaces` |
| [Namespaces](namespaces.md) | `/namespaces` | | [Notification settings](notification_settings.md) | `/notification_settings` (also available for groups and projects) |
| [Notification settings](notification_settings.md) | `/notification_settings` (also available for groups and projects) | | [Pages domains](pages_domains.md) | `/pages/domains` (also available for projects) |
| [Pages domains](pages_domains.md) | `/pages/domains` (also available for projects) | | [Personal access tokens](personal_access_tokens.md) | `/personal_access_tokens` |
| [Plan limits](plan_limits.md) | `/application/plan_limits` | | [Plan limits](plan_limits.md) | `/application/plan_limits` |
| [Personal access tokens](personal_access_tokens.md) | `/personal_access_tokens` |
| [Projects](projects.md) | `/users/:id/projects` (also available for projects) |
| [Project repository storage moves](project_repository_storage_moves.md) **(FREE SELF)** | `/project_repository_storage_moves` | | [Project repository storage moves](project_repository_storage_moves.md) **(FREE SELF)** | `/project_repository_storage_moves` |
| [Runners](runners.md) | `/runners` (also available for projects) | | [Projects](projects.md) | `/users/:id/projects` (also available for projects) |
| [Search](search.md) | `/search` (also available for groups and projects) | | [Runners](runners.md) | `/runners` (also available for projects) |
| [Settings](settings.md) **(FREE SELF)** | `/application/settings` | | [Search](search.md) | `/search` (also available for groups and projects) |
| [Service Data](usage_data.md) | `/usage_data` (For GitLab instance [Administrator](../user/permissions.md) users only) |
| [Settings](settings.md) **(FREE SELF)** | `/application/settings` |
| [Sidekiq metrics](sidekiq_metrics.md) **(FREE SELF)** | `/sidekiq` |
| [Sidekiq queues administration](admin_sidekiq_queues.md) **(FREE SELF)** | `/admin/sidekiq/queues/:queue_name` |
| [Snippet repository storage moves](snippet_repository_storage_moves.md) **(FREE SELF)** | `/snippet_repository_storage_moves` | | [Snippet repository storage moves](snippet_repository_storage_moves.md) **(FREE SELF)** | `/snippet_repository_storage_moves` |
| [Statistics](statistics.md) | `/application/statistics` | | [Statistics](statistics.md) | `/application/statistics` |
| [Sidekiq metrics](sidekiq_metrics.md) **(FREE SELF)** | `/sidekiq` | | [Suggestions](suggestions.md) | `/suggestions` |
| [Suggestions](suggestions.md) | `/suggestions` | | [System hooks](system_hooks.md) | `/hooks` |
| [System hooks](system_hooks.md) | `/hooks` | | [To-dos](todos.md) | `/todos` |
| [To-dos](todos.md) | `/todos` | | [Topics](topics.md) | `/topics` |
| [Topics](topics.md) | `/topics` | | [Users](users.md) | `/users` |
| [Service Data](usage_data.md) | `/usage_data` (For GitLab instance [Administrator](../user/permissions.md) users only) | | [Validate `.gitlab-ci.yml` file](lint.md) | `/lint` |
| [Users](users.md) | `/users` | | [Version](version.md) | `/version` |
| [Validate `.gitlab-ci.yml` file](lint.md) | `/lint` |
| [Version](version.md) | `/version` |
## Templates API resources ## Templates API resources

View File

@ -226,11 +226,11 @@ These kind of tests ensure that individual parts of the application work well
together, without the overhead of the actual app environment (such as the browser). together, without the overhead of the actual app environment (such as the browser).
These tests should assert at the request/response level: status code, headers, These tests should assert at the request/response level: status code, headers,
body. body.
They're useful to test permissions, redirections, what view is rendered etc. They're useful, for example, to test permissions, redirections, API endpoints, what view is rendered, and so forth.
| Code path | Tests path | Testing engine | Notes | | Code path | Tests path | Testing engine | Notes |
| --------- | ---------- | -------------- | ----- | | --------- | ---------- | -------------- | ----- |
| `app/controllers/` | `spec/requests/`, `spec/controllers` | RSpec | Request specs are preferred over legacy controller specs. | | `app/controllers/` | `spec/requests/`, `spec/controllers` | RSpec | Request specs are preferred over legacy controller specs. Request specs are encouraged for API endpoints. |
| `app/mailers/` | `spec/mailers/` | RSpec | | | `app/mailers/` | `spec/mailers/` | RSpec | |
| `lib/api/` | `spec/requests/api/` | RSpec | | | `lib/api/` | `spec/requests/api/` | RSpec | |
| `app/assets/javascripts/` | `spec/frontend/` | Jest | [More details below](#frontend-integration-tests) | | `app/assets/javascripts/` | `spec/frontend/` | Jest | [More details below](#frontend-integration-tests) |

View File

@ -561,8 +561,9 @@ You should consider these security implications before configuring IP address re
- **Administrators and group owners**: Users with these permission levels can always - **Administrators and group owners**: Users with these permission levels can always
access the group settings, regardless of IP restriction, but they cannot access projects access the group settings, regardless of IP restriction, but they cannot access projects
belonging to the group when accessing from a disallowed IP address. belonging to the group when accessing from a disallowed IP address.
- **GitLab API and runner activities**: Only the [Groups](../../api/groups.md) - **GitLab API and runner activities**: Only the [group](../../api/groups.md) (including all
and [Projects](../../api/projects.md) APIs are protected by IP address restrictions. [group resources](../../api/api_resources.md#group-resources)) APIs and [project](../../api/api_resources.md#project-resources)
(including all [project resources](../../api/api_resources.md#project-resources)) APIs are protected by IP address restrictions.
When you register a runner, it is not bound by the IP restrictions. When the runner When you register a runner, it is not bound by the IP restrictions. When the runner
requests a new job or an update to a job's state, it is also not bound by requests a new job or an update to a job's state, it is also not bound by
the IP restrictions. But when the running CI/CD job sends Git requests from a the IP restrictions. But when the running CI/CD job sends Git requests from a

View File

@ -147,7 +147,7 @@ The Package Registry supports the following formats:
| [Go](../go_proxy/index.md) | 13.1+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/3043) | | [Go](../go_proxy/index.md) | 13.1+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/3043) |
| [Ruby gems](../rubygems_registry/index.md) | 13.10+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/3200) | | [Ruby gems](../rubygems_registry/index.md) | 13.10+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/3200) |
[Status](https://about.gitlab.com/handbook/product/gitlab-the-product/#generally-available-ga): [Status](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha-beta-ga):
- Alpha: behind a feature flag and not officially supported. - Alpha: behind a feature flag and not officially supported.
- Beta: several known issues that may prevent expected use. - Beta: several known issues that may prevent expected use.

View File

@ -2462,6 +2462,15 @@ msgstr ""
msgid "AdminDashboard|Error loading the statistics. Please try again" msgid "AdminDashboard|Error loading the statistics. Please try again"
msgstr "" msgstr ""
msgid "AdminLabels|Define your default set of project labels"
msgstr ""
msgid "AdminLabels|Labels created here will be automatically added to new projects."
msgstr ""
msgid "AdminLabels|They can be used to categorize issues and merge requests."
msgstr ""
msgid "AdminProjects| Youre about to permanently delete the project %{projectName}, its repository, and all related resources, including issues and merge requests. After you confirm and press %{strong_start}Delete project%{strong_end}, it cannot be undone or recovered." msgid "AdminProjects| Youre about to permanently delete the project %{projectName}, its repository, and all related resources, including issues and merge requests. After you confirm and press %{strong_start}Delete project%{strong_end}, it cannot be undone or recovered."
msgstr "" msgstr ""
@ -35282,9 +35291,6 @@ msgstr ""
msgid "There are no issues with the selected labels" msgid "There are no issues with the selected labels"
msgstr "" msgstr ""
msgid "There are no labels yet"
msgstr ""
msgid "There are no matching files" msgid "There are no matching files"
msgstr "" msgstr ""

View File

@ -48,84 +48,87 @@ module QA
project.remove_via_api! project.remove_via_api!
end end
where(:authentication_token_type, :token_name) do context "when tls is disabled" do
:personal_access_token | 'Personal Access Token' where(:authentication_token_type, :token_name) do
:project_deploy_token | 'Deploy Token' :personal_access_token | 'Personal Access Token'
:ci_job_token | 'Job Token' :project_deploy_token | 'Deploy Token'
end :ci_job_token | 'Job Token'
with_them do
let(:auth_token) do
case authentication_token_type
when :personal_access_token
"\"#{personal_access_token}\""
when :project_deploy_token
"\"#{project_deploy_token.token}\""
when :ci_job_token
'$CI_JOB_TOKEN'
end
end end
let(:auth_user) do with_them do
case authentication_token_type let(:auth_token) do
when :personal_access_token case authentication_token_type
"$CI_REGISTRY_USER" when :personal_access_token
when :project_deploy_token "\"#{personal_access_token}\""
"\"#{project_deploy_token.username}\"" when :project_deploy_token
when :ci_job_token "\"#{project_deploy_token.token}\""
'gitlab-ci-token' when :ci_job_token
'$CI_JOB_TOKEN'
end
end end
end
context "when tls is disabled" do let(:auth_user) do
it "using a #{params[:token_name]}, pushes image and deletes tag", :registry do case authentication_token_type
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do when :personal_access_token
Resource::Repository::Commit.fabricate_via_api! do |commit| "$CI_REGISTRY_USER"
commit.project = project when :project_deploy_token
commit.commit_message = 'Add .gitlab-ci.yml' "\"#{project_deploy_token.username}\""
commit.add_files([{ when :ci_job_token
file_path: '.gitlab-ci.yml', 'gitlab-ci-token'
content: end
<<~YAML end
build:
image: docker:19.03.12 where(:docker_client_version) do
stage: build %w[docker:18.09.9 docker:19.03.12 docker:20.10]
services: end
- name: docker:19.03.12-dind
command: ["--insecure-registry=gitlab.test:5050"] with_them do
variables: it "pushes image and deletes tag", :registry do
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
script: Resource::Repository::Commit.fabricate_via_api! do |commit|
- docker login -u #{auth_user} -p #{auth_token} gitlab.test:5050 commit.project = project
- docker build -t $IMAGE_TAG . commit.commit_message = 'Add .gitlab-ci.yml'
- docker push $IMAGE_TAG commit.add_files([{
tags: file_path: '.gitlab-ci.yml',
- "runner-for-#{project.name}" content:
YAML <<~YAML
}]) build:
image: "#{docker_client_version}"
stage: build
services:
- name: "#{docker_client_version}-dind"
command: ["--insecure-registry=gitlab.test:5050"]
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
script:
- docker login -u #{auth_user} -p #{auth_token} gitlab.test:5050
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
tags:
- "runner-for-#{project.name}"
YAML
}])
end
end end
end
Flow::Pipeline.visit_latest_pipeline Flow::Pipeline.visit_latest_pipeline
Page::Project::Pipeline::Show.perform do |pipeline| Page::Project::Pipeline::Show.perform do |pipeline|
pipeline.click_job('build') pipeline.click_job('build')
end end
Page::Project::Job::Show.perform do |job| Page::Project::Job::Show.perform do |job|
expect(job).to be_successful(timeout: 800) expect(job).to be_successful(timeout: 800)
end end
Page::Project::Menu.perform(&:go_to_container_registry) Page::Project::Menu.perform(&:go_to_container_registry)
Page::Project::Registry::Show.perform do |registry| Page::Project::Registry::Show.perform do |registry|
expect(registry).to have_registry_repository(project.path_with_namespace) expect(registry).to have_registry_repository(project.path_with_namespace)
registry.click_on_image(project.path_with_namespace) registry.click_on_image(project.path_with_namespace)
expect(registry).to have_tag('master') expect(registry).to have_tag('master')
end
registry.click_delete
expect(registry).not_to have_tag('master')
end end
end end
end end

View File

@ -45,7 +45,7 @@ RSpec.describe 'admin issues labels' do
wait_for_requests wait_for_requests
expect(page).to have_content("There are no labels yet") expect(page).to have_content("Define your default set of project labels")
expect(page).not_to have_content('bug') expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label') expect(page).not_to have_content('feature_label')
end end