Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
de50e147
Commit
de50e147
authored
Feb 14, 2020
by
George Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove CI status from Projects Dashboard
parent
e06090d7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
72 deletions
+7
-72
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+0
-8
app/views/dashboard/projects/_projects.html.haml
app/views/dashboard/projects/_projects.html.haml
+1
-1
app/views/explore/projects/_projects.html.haml
app/views/explore/projects/_projects.html.haml
+1
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+0
-7
changelogs/unreleased/205248-remove-ci-status-from-project-dashboard.yml
...leased/205248-remove-ci-status-from-project-dashboard.yml
+5
-0
spec/features/dashboard/projects_spec.rb
spec/features/dashboard/projects_spec.rb
+0
-55
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
de50e147
...
...
@@ -1006,14 +1006,6 @@ pre.light-well {
}
}
&
:not
(
.with-pipeline-status
)
{
.icon-wrapper
:first-of-type
{
@include
media-breakpoint-up
(
lg
)
{
margin-left
:
$gl-padding-32
;
}
}
}
.ci-status-link
{
display
:
inline-flex
;
}
...
...
app/views/dashboard/projects/_projects.html.haml
View file @
de50e147
=
render
'shared/projects/list'
,
projects:
@projects
,
pipeline_status:
Feature
.
enabled?
(
:dashboard_pipeline_status
,
default_enabled:
true
),
user:
current_user
=
render
'shared/projects/list'
,
projects:
@projects
,
user:
current_user
app/views/explore/projects/_projects.html.haml
View file @
de50e147
-
is_explore_page
=
defined?
(
explore_page
)
&&
explore_page
=
render
'shared/projects/list'
,
projects:
projects
,
user:
current_user
,
explore_page:
is_explore_page
,
pipeline_status:
Feature
.
enabled?
(
:dashboard_pipeline_status
,
default_enabled:
true
)
=
render
'shared/projects/list'
,
projects:
projects
,
user:
current_user
,
explore_page:
is_explore_page
app/views/shared/projects/_project.html.haml
View file @
de50e147
...
...
@@ -12,9 +12,7 @@
-
css_class
+=
" no-description"
if
project
.
description
.
blank?
&&
!
show_last_commit_as_description
-
cache_key
=
project_list_cache_key
(
project
,
pipeline_status:
pipeline_status
)
-
updated_tooltip
=
time_ago_with_tooltip
(
project
.
last_activity_date
)
-
show_pipeline_status_icon
=
pipeline_status
&&
can?
(
current_user
,
:read_cross_project
)
&&
project
.
pipeline_status
.
has_status?
&&
can?
(
current_user
,
:read_build
,
project
)
-
css_controls_class
=
compact_mode
?
[]
:
[
"flex-lg-row"
,
"justify-content-lg-between"
]
-
css_controls_class
<<
"with-pipeline-status"
if
show_pipeline_status_icon
-
avatar_container_class
=
project
.
creator
&&
use_creator_avatar
?
''
:
'rect-avatar'
%li
.project-row.d-flex
{
class:
css_class
}
...
...
@@ -62,11 +60,6 @@
.controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary
{
class:
css_controls_class
.
join
(
" "
)
}
.icon-container.d-flex.align-items-center
-
if
show_pipeline_status_icon
-
pipeline_path
=
pipelines_project_commit_path
(
project
.
pipeline_status
.
project
,
project
.
pipeline_status
.
sha
,
ref:
project
.
pipeline_status
.
ref
)
%span
.icon-wrapper.pipeline-status
=
render
'ci/status/icon'
,
status:
project
.
last_pipeline
.
detailed_status
(
current_user
),
tooltip_placement:
'top'
,
path:
pipeline_path
=
render_if_exists
'shared/projects/archived'
,
project:
project
-
if
stars
=
link_to
project_starrers_path
(
project
),
...
...
changelogs/unreleased/205248-remove-ci-status-from-project-dashboard.yml
0 → 100644
View file @
de50e147
---
title
:
Remove CI status from Projects Dashboard
merge_request
:
25225
author
:
George Thomas @thegeorgeous
type
:
removed
spec/features/dashboard/projects_spec.rb
View file @
de50e147
...
...
@@ -152,61 +152,6 @@ describe 'Dashboard Projects' do
end
end
describe
'with a pipeline'
,
:clean_gitlab_redis_shared_state
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
project
.
default_branch
)
}
before
do
# Since the cache isn't updated when a new pipeline is created
# we need the pipeline to advance in the pipeline since the cache was created
# by visiting the login page.
pipeline
.
succeed
end
it
'shows that the last pipeline passed'
do
visit
dashboard_projects_path
page
.
within
(
'.controls'
)
do
expect
(
page
).
to
have_xpath
(
"//a[@href='
#{
pipelines_project_commit_path
(
project
,
project
.
commit
,
ref:
pipeline
.
ref
)
}
']"
)
expect
(
page
).
to
have_css
(
'.ci-status-link'
)
expect
(
page
).
to
have_css
(
'.ci-status-icon-success'
)
expect
(
page
).
to
have_link
(
'Pipeline: passed'
)
end
end
shared_examples
'hidden pipeline status'
do
it
'does not show the pipeline status'
do
visit
dashboard_projects_path
page
.
within
(
'.controls'
)
do
expect
(
page
).
not_to
have_xpath
(
"//a[@href='
#{
pipelines_project_commit_path
(
project
,
project
.
commit
,
ref:
pipeline
.
ref
)
}
']"
)
expect
(
page
).
not_to
have_css
(
'.ci-status-link'
)
expect
(
page
).
not_to
have_css
(
'.ci-status-icon-success'
)
expect
(
page
).
not_to
have_link
(
'Pipeline: passed'
)
end
end
end
context
'guest user of project and project has private pipelines'
do
let
(
:guest_user
)
{
create
(
:user
)
}
before
do
project
.
update
(
public_builds:
false
)
project
.
add_guest
(
guest_user
)
sign_in
(
guest_user
)
end
it_behaves_like
'hidden pipeline status'
end
context
'when dashboard_pipeline_status is disabled'
do
before
do
stub_feature_flags
(
dashboard_pipeline_status:
false
)
end
it_behaves_like
'hidden pipeline status'
end
end
context
'last push widget'
,
:use_clean_rails_memory_store_caching
do
before
do
event
=
create
(
:push_event
,
project:
project
,
author:
user
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment