diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-13 17:49:19 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-15 22:57:47 +0300 |
commit | 73accafe430f56cd3065774c6118de3db0a45734 (patch) | |
tree | 7081189f2d6caad521683a35d3432f91a4fff1dc /app/assets/javascripts/environments/folder | |
parent | 17897c37f806e593359239ba09667081b88cb24b (diff) |
Use common util to get parameter name
Diffstat (limited to 'app/assets/javascripts/environments/folder')
-rw-r--r-- | app/assets/javascripts/environments/folder/environments_folder_view.js.es6 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/environments/folder/environments_folder_view.js.es6 b/app/assets/javascripts/environments/folder/environments_folder_view.js.es6 index 83643161056..c5d1e2d4d9f 100644 --- a/app/assets/javascripts/environments/folder/environments_folder_view.js.es6 +++ b/app/assets/javascripts/environments/folder/environments_folder_view.js.es6 @@ -6,6 +6,7 @@ Vue.use(require('vue-resource')); const EnvironmentsService = require('../services/environments_service'); const EnvironmentTable = require('../components/environments_table'); const Store = require('../stores/environments_store'); +require('../../lib/utils/common_utils'); module.exports = Vue.component('environment-folder-view', { @@ -42,7 +43,7 @@ module.exports = Vue.component('environment-folder-view', { computed: { scope() { - return this.$options.getQueryParameter('scope'); + return gl.utils.getParameterByName('scope'); }, canReadEnvironmentParsed() { @@ -68,8 +69,8 @@ module.exports = Vue.component('environment-folder-view', { * Toggles loading property. */ created() { - const scope = this.$options.getQueryParameter('scope') || this.visibility; - const pageNumber = this.$options.getQueryParameter('page') || this.pageNumber; + const scope = gl.utils.getParameterByName('scope') || this.visibility; + const pageNumber = gl.utils.getParameterByName('page') || this.pageNumber; const endpoint = `${this.endpoint}?scope=${scope}&page=${pageNumber}`; |