summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-01-06 04:11:41 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-01-06 04:11:41 +0100
commitff5124ed6ecb2f20841e535b3aaa3b0d230f920f (patch)
treeb60485f925563bbac4b91b7aad66a8a720058009
parent21a713f9c48fb0be90da61321ecb75b3f27039d2 (diff)
downloadgitlab-ce-41249-clearing-the-cache.tar.gz
Use anchor instead of form for reset caches button41249-clearing-the-cache
-rw-r--r--app/assets/javascripts/pipelines/components/nav_controls.vue10
-rw-r--r--spec/javascripts/pipelines/nav_controls_spec.js2
2 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipelines/components/nav_controls.vue b/app/assets/javascripts/pipelines/components/nav_controls.vue
index f2d5f76c0ce..f31a91c3403 100644
--- a/app/assets/javascripts/pipelines/components/nav_controls.vue
+++ b/app/assets/javascripts/pipelines/components/nav_controls.vue
@@ -50,9 +50,13 @@ export default {
Get started with Pipelines
</a>
- <form :action="resetCachePath" method="post">
- <input type="submit" class="btn btn-default" value="Clear runner caches" />
- </form>
+ <a
+ data-method="post"
+ rel="nofollow"
+ :href="resetCachePath"
+ class="btn btn-default">
+ Clear runner caches
+ </a>
<a
:href="ciLintPath"
diff --git a/spec/javascripts/pipelines/nav_controls_spec.js b/spec/javascripts/pipelines/nav_controls_spec.js
index cf9bbee2b13..09a0c14d96c 100644
--- a/spec/javascripts/pipelines/nav_controls_spec.js
+++ b/spec/javascripts/pipelines/nav_controls_spec.js
@@ -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('form').getAttribute('action')).toEqual(mockData.resetCachePath);
+ expect(component.$el.querySelectorAll('.btn-default')[0].getAttribute('href')).toEqual(mockData.resetCachePath);
});
it('should render link for CI lint', () => {