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
21a713f9
Commit
21a713f9
authored
Jan 05, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change reset_cache action from get to post
parent
d66c48b3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
app/assets/javascripts/pipelines/components/nav_controls.vue
app/assets/javascripts/pipelines/components/nav_controls.vue
+3
-4
config/routes/project.rb
config/routes/project.rb
+1
-1
spec/controllers/projects/settings/ci_cd_controller_spec.rb
spec/controllers/projects/settings/ci_cd_controller_spec.rb
+1
-1
spec/javascripts/pipelines/nav_controls_spec.js
spec/javascripts/pipelines/nav_controls_spec.js
+1
-1
No files found.
app/assets/javascripts/pipelines/components/nav_controls.vue
View file @
21a713f9
...
...
@@ -50,10 +50,9 @@ export default {
Get started with Pipelines
</a>
<a
:href=
"resetCachePath"
class=
"btn btn-default"
>
Clear runner caches
</a>
<form
:action=
"resetCachePath"
method=
"post"
>
<input
type=
"submit"
class=
"btn btn-default"
value=
"Clear runner caches"
/>
</form>
<a
:href=
"ciLintPath"
...
...
config/routes/project.rb
View file @
21a713f9
...
...
@@ -409,7 +409,7 @@ constraints(ProjectUrlConstrainer.new) do
namespace
:settings
do
get
:members
,
to:
redirect
(
"%{namespace_id}/%{project_id}/project_members"
)
resource
:ci_cd
,
only:
[
:show
],
controller:
'ci_cd'
do
ge
t
:reset_cache
pos
t
:reset_cache
end
resource
:integrations
,
only:
[
:show
]
resource
:repository
,
only:
[
:show
],
controller: :repository
...
...
spec/controllers/projects/settings/ci_cd_controller_spec.rb
View file @
21a713f9
...
...
@@ -27,7 +27,7 @@ describe Projects::Settings::CiCdController do
allow
(
ResetProjectCacheService
).
to
receive_message_chain
(
:new
,
:execute
).
and_return
(
true
)
end
subject
{
ge
t
:reset_cache
,
namespace_id:
project
.
namespace
,
project_id:
project
}
subject
{
pos
t
:reset_cache
,
namespace_id:
project
.
namespace
,
project_id:
project
}
it
'calls reset project cache service'
do
expect
(
ResetProjectCacheService
).
to
receive_message_chain
(
:new
,
:execute
)
...
...
spec/javascripts/pipelines/nav_controls_spec.js
View file @
21a713f9
...
...
@@ -58,7 +58,7 @@ describe('Pipelines Nav Controls', () => {
}).
$mount
();
expect
(
component
.
$el
.
querySelectorAll
(
'
.btn-default
'
)[
0
].
textContent
).
toContain
(
'
Clear runner caches
'
);
expect
(
component
.
$el
.
querySelector
All
(
'
.btn-default
'
)[
0
].
getAttribute
(
'
href
'
)).
toEqual
(
mockData
.
resetCachePath
);
expect
(
component
.
$el
.
querySelector
(
'
form
'
).
getAttribute
(
'
action
'
)).
toEqual
(
mockData
.
resetCachePath
);
});
it
(
'
should render link for CI lint
'
,
()
=>
{
...
...
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