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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
e52de677
Commit
e52de677
authored
Oct 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Continuous Integration from project menu
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c0b79a75
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
77 deletions
+13
-77
app/controllers/ci/projects_controller.rb
app/controllers/ci/projects_controller.rb
+3
-20
app/views/ci/projects/_info.html.haml
app/views/ci/projects/_info.html.haml
+0
-0
app/views/ci/projects/show.html.haml
app/views/ci/projects/show.html.haml
+0
-44
app/views/layouts/ci/_nav_project.html.haml
app/views/layouts/ci/_nav_project.html.haml
+0
-6
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+0
-7
app/views/layouts/nav/_project_settings.html.haml
app/views/layouts/nav/_project_settings.html.haml
+10
-0
No files found.
app/controllers/ci/projects_controller.rb
View file @
e52de677
module
Ci
class
ProjectsController
<
Ci
::
ApplicationController
before_action
:authenticate_user!
,
except:
[
:build
,
:badge
,
:show
]
before_action
:authenticate_public_page!
,
only: :show
before_action
:project
,
only:
[
:build
,
:show
,
:badge
,
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authorize_access_project!
,
except:
[
:build
,
:badge
,
:show
,
:new
]
before_action
:authenticate_user!
,
except:
[
:build
,
:badge
]
before_action
:authorize_access_project!
,
except:
[
:badge
]
before_action
:authorize_manage_project!
,
only:
[
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authenticate_token!
,
only:
[
:build
]
before_action
:no_cache
,
only:
[
:badge
]
protect_from_forgery
except: :build
layout
'ci/project'
,
except:
[
:index
]
def
show
@ref
=
params
[
:ref
]
@commits
=
@project
.
commits
.
reverse_order
if
@ref
# unscope is required, because of default_scope defined in Ci::Build
builds
=
@project
.
builds
.
unscope
(
:select
,
:order
).
where
(
ref:
@ref
).
select
(
:commit_id
).
distinct
@commits
=
@commits
.
where
(
id:
builds
)
end
@commits
=
@commits
.
page
(
params
[
:page
]).
per
(
20
)
end
protect_from_forgery
# Project status badge
# Image with build status for sha or ref
...
...
app/views/ci/projects/_info.html.haml
deleted
100644 → 0
View file @
c0b79a75
app/views/ci/projects/show.html.haml
deleted
100644 → 0
View file @
c0b79a75
=
render
'ci/shared/guide'
unless
@project
.
setup_finished?
-
if
current_user
&&
can?
(
current_user
,
:manage_project
,
gl_project
)
&&
!
@project
.
any_runners?
.alert.alert-danger
Builds for this project wont be served unless you configure runners on
=
link_to
"Runners page"
,
runners_path
(
@project
.
gl_project
)
%ul
.nav.nav-tabs.append-bottom-20
%li
{
class:
ref_tab_class
}
=
link_to
'All commits'
,
ci_project_path
(
@project
)
-
@project
.
tracked_refs
.
each
do
|
ref
|
%li
{
class:
ref_tab_class
(
ref
)}
=
link_to
ref
,
ci_project_path
(
@project
,
ref:
ref
)
-
if
@ref
&&
!
@project
.
tracked_refs
.
include?
(
@ref
)
%li
{
class:
'active'
}
=
link_to
@ref
,
ci_project_path
(
@project
,
ref:
@ref
)
%li
.pull-right
=
link_to
'Go to project'
,
project_path
(
gl_project
),
class:
'btn btn-sm'
%table
.table.builds
%thead
%tr
%th
Status
%th
Commit
%th
Message
%th
Branch
%th
Total duration
%th
Finished at
-
if
@project
.
coverage_enabled?
%th
Coverage
=
render
@commits
=
paginate
@commits
-
if
@commits
.
empty?
.bs-callout
%h4
No commits yet
app/views/layouts/ci/_nav_project.html.haml
View file @
e52de677
...
...
@@ -5,12 +5,6 @@
%span
Back to project
%li
.separate-item
=
nav_link
path:
[
'projects#show'
,
'commits#show'
,
'builds#show'
]
do
=
link_to
ci_project_path
(
@project
)
do
=
icon
(
'list-alt fw'
)
%span
Commits
%span
.count
=
@project
.
commits
.
count
=
nav_link
path:
[
'services#index'
,
'services#edit'
]
do
=
link_to
ci_project_services_path
(
@project
)
do
=
icon
(
'share fw'
)
...
...
app/views/layouts/nav/_project.html.haml
View file @
e52de677
...
...
@@ -76,13 +76,6 @@
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
-
if
@project
.
gitlab_ci?
=
nav_link
(
controller:
[
:ci
,
:project
])
do
=
link_to
ci_project_path
(
@project
.
gitlab_ci_project
),
title:
'Continuous Integration'
,
data:
{
placement:
'right'
}
do
=
icon
(
'building fw'
)
%span
Continuous Integration
-
if
project_nav_tab?
:settings
=
nav_link
(
controller:
[
:project_members
,
:teams
])
do
=
link_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
title:
'Members'
,
class:
'team-tab tab'
,
data:
{
placement:
'right'
}
do
...
...
app/views/layouts/nav/_project_settings.html.haml
View file @
e52de677
...
...
@@ -60,3 +60,13 @@
=
icon
(
'building fw'
)
%span
CI Settings
=
nav_link
path:
[
'ci/services#index'
,
'ci/services#edit'
]
do
=
link_to
ci_project_services_path
(
@project
.
gitlab_ci_project
)
do
=
icon
(
'share fw'
)
%span
CI Services
=
nav_link
path:
'events#index'
do
=
link_to
ci_project_events_path
(
@project
.
gitlab_ci_project
)
do
=
icon
(
'book fw'
)
%span
CI Events
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