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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6e5473f9
Commit
6e5473f9
authored
Jun 03, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove show actions from Admin and Project DeployKeys
parent
83e59db5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
4 additions
and
78 deletions
+4
-78
app/controllers/admin/deploy_keys_controller.rb
app/controllers/admin/deploy_keys_controller.rb
+1
-6
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/deploy_keys_controller.rb
+0
-4
app/views/admin/deploy_keys/show.html.haml
app/views/admin/deploy_keys/show.html.haml
+0
-35
app/views/projects/deploy_keys/show.html.haml
app/views/projects/deploy_keys/show.html.haml
+0
-14
config/routes.rb
config/routes.rb
+2
-2
features/admin/deploy_keys.feature
features/admin/deploy_keys.feature
+0
-5
features/steps/admin/deploy_keys.rb
features/steps/admin/deploy_keys.rb
+0
-11
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+1
-1
No files found.
app/controllers/admin/deploy_keys_controller.rb
View file @
6e5473f9
class
Admin::DeployKeysController
<
Admin
::
ApplicationController
before_action
:deploy_keys
,
only:
[
:index
]
before_action
:deploy_key
,
only:
[
:
show
,
:
destroy
]
before_action
:deploy_key
,
only:
[
:destroy
]
def
index
end
def
show
end
def
new
...
...
app/controllers/projects/deploy_keys_controller.rb
View file @
6e5473f9
...
...
@@ -18,10 +18,6 @@ class Projects::DeployKeysController < Projects::ApplicationController
@available_public_keys
-=
@available_project_keys
end
def
show
@key
=
@project
.
deploy_keys
.
find
(
params
[
:id
])
end
def
new
@key
=
@project
.
deploy_keys
.
new
...
...
app/views/admin/deploy_keys/show.html.haml
deleted
100644 → 0
View file @
83e59db5
-
page_title
@deploy_key
.
title
,
"Deploy Keys"
.row
.col-md-4
.panel.panel-default
.panel-heading
Deploy Key
%ul
.well-list
%li
%span
.light
Title:
%strong
=
@deploy_key
.
title
%li
%span
.light
Created on:
%strong
=
@deploy_key
.
created_at
.
stamp
(
"Aug 21, 2011"
)
.panel.panel-default
.panel-heading
Projects (
#{
@deploy_key
.
deploy_keys_projects
.
count
}
)
-
if
@deploy_key
.
deploy_keys_projects
.
any?
%ul
.well-list
-
@deploy_key
.
projects
.
each
do
|
project
|
%li
%span
%strong
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
.
namespace
.
becomes
(
Namespace
),
project
]
.pull-right
=
link_to
disable_namespace_project_deploy_key_path
(
project
.
namespace
,
project
,
@deploy_key
),
data:
{
confirm:
"Are you sure?"
},
method: :put
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove deploy key from project'
do
%i
.fa.fa-times.fa-inverse
.col-md-8
%p
%span
.light
Fingerprint:
%strong
=
@deploy_key
.
fingerprint
%pre
.well-pre
=
@deploy_key
.
key
.pull-right
=
link_to
'Remove'
,
admin_deploy_key_path
(
@deploy_key
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-remove delete-key"
app/views/projects/deploy_keys/show.html.haml
deleted
100644 → 0
View file @
83e59db5
-
page_title
@key
.
title
,
"Deploy Keys"
%h3
.page-title
Deploy key:
=
@key
.
title
%small
created on
=
@key
.
created_at
.
stamp
(
"Aug 21, 2011"
)
.back-link
=
link_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
)
do
←
To keys list
%hr
%pre
=
@key
.
key
.pull-right
=
link_to
'Remove'
,
namespace_project_deploy_key_path
(
@project
.
namespace
,
@project
,
@key
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn-remove btn delete-key"
config/routes.rb
View file @
6e5473f9
...
...
@@ -165,7 +165,7 @@ Gitlab::Application.routes.draw do
end
end
resources
:deploy_keys
,
only:
[
:index
,
:
show
,
:
new
,
:create
,
:destroy
]
resources
:deploy_keys
,
only:
[
:index
,
:new
,
:create
,
:destroy
]
resources
:hooks
,
only:
[
:index
,
:create
,
:destroy
]
do
get
:test
...
...
@@ -421,7 +421,7 @@ Gitlab::Application.routes.draw do
end
end
resources
:deploy_keys
,
constraints:
{
id:
/\d+/
},
only:
[
:index
,
:
show
,
:
new
,
:create
]
do
resources
:deploy_keys
,
constraints:
{
id:
/\d+/
},
only:
[
:index
,
:new
,
:create
]
do
member
do
put
:enable
put
:disable
...
...
features/admin/deploy_keys.feature
View file @
6e5473f9
...
...
@@ -8,11 +8,6 @@ Feature: Admin Deploy Keys
When
I visit admin deploy keys page
Then
I should see all public deploy keys
Scenario
:
Deploy Keys show
When
I visit admin deploy keys page
And
I click on first deploy key
Then
I should see deploy key details
Scenario
:
Deploy Keys new
When
I visit admin deploy keys page
And
I click 'New Deploy Key'
...
...
features/steps/admin/deploy_keys.rb
View file @
6e5473f9
...
...
@@ -14,17 +14,6 @@ class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
end
end
step
'I click on first deploy key'
do
click_link
DeployKey
.
are_public
.
first
.
title
end
step
'I should see deploy key details'
do
deploy_key
=
DeployKey
.
are_public
.
first
current_path
.
should
==
admin_deploy_key_path
(
deploy_key
)
page
.
should
have_content
(
deploy_key
.
title
)
page
.
should
have_content
(
deploy_key
.
key
)
end
step
'I visit admin deploy key page'
do
visit
admin_deploy_key_path
(
deploy_key
)
end
...
...
spec/routing/project_routing_spec.rb
View file @
6e5473f9
...
...
@@ -172,7 +172,7 @@ end
# DELETE /:project_id/deploy_keys/:id(.:format) deploy_keys#destroy
describe
Projects
::
DeployKeysController
,
'routing'
do
it_behaves_like
'RESTful project resources'
do
let
(
:actions
)
{
[
:index
,
:
show
,
:
new
,
:create
]
}
let
(
:actions
)
{
[
:index
,
:new
,
:create
]
}
let
(
:controller
)
{
'deploy_keys'
}
end
end
...
...
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