diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-04-10 17:31:53 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-04-10 18:30:49 +0300 |
commit | d320090f59ccc4aedaa7846742cd3b2ac2f98798 (patch) | |
tree | 56343109dd105bef5b42e2097a75bf1f2f42da79 /app/assets/javascripts/pipelines/components/stage.vue | |
parent | 9d220da84117220317ccff1421a394185fefe859 (diff) |
Update state request from vue resource to axios
Diffstat (limited to 'app/assets/javascripts/pipelines/components/stage.vue')
-rw-r--r-- | app/assets/javascripts/pipelines/components/stage.vue | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/app/assets/javascripts/pipelines/components/stage.vue b/app/assets/javascripts/pipelines/components/stage.vue index 8bc7a1f20b2..b3fcaf0ccd1 100644 --- a/app/assets/javascripts/pipelines/components/stage.vue +++ b/app/assets/javascripts/pipelines/components/stage.vue @@ -13,16 +13,16 @@ * 3. Merge request widget * 4. Commit widget */ - + import axios from '../../lib/utils/axios_utils'; import Flash from '../../flash'; - import icon from '../../vue_shared/components/icon.vue'; - import loadingIcon from '../../vue_shared/components/loading_icon.vue'; + import Icon from '../../vue_shared/components/icon.vue'; + import LoadingIcon from '../../vue_shared/components/loading_icon.vue'; import tooltip from '../../vue_shared/directives/tooltip'; export default { components: { - loadingIcon, - icon, + LoadingIcon, + Icon, }, directives: { @@ -88,9 +88,8 @@ }, fetchJobs() { - this.$http.get(this.stage.dropdown_path) - .then(response => response.json()) - .then((data) => { + axios.get(this.stage.dropdown_path) + .then(({ data }) => { this.dropdownContent = data.html; this.isLoading = false; }) @@ -98,8 +97,7 @@ this.closeDropdown(); this.isLoading = false; - const flash = new Flash('Something went wrong on our end.'); - return flash; + Flash('Something went wrong on our end.'); }); }, |