diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-16 11:22:58 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-16 11:22:58 +0000 |
commit | 19791b65b20a21f1d12315b5b75f52a01531693b (patch) | |
tree | e9aa08936f37d15eee7d4bf11ec4b475bdc6ed9b | |
parent | ac7101364293666aaf81dfaa19ab46b148d0718c (diff) | |
download | gitlab-ce-fe-paginated-environments-api-add-pagination.tar.gz |
Changes after reviewfe-paginated-environments-api-add-pagination
-rw-r--r-- | app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 index 9e816a285e4..39935b08dc0 100644 --- a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 @@ -35,8 +35,16 @@ require('../vue_shared/components/pipelines_table'); this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope, this.apiScope); }, methods: { - change(pagenum, apiScope) { - if (!apiScope) apiScope = 'all'; + + /** + * Changes the URL according to the pagination component. + * + * If no scope is provided, 'all' is assumed. + * + * @param {Number} pagenum + * @param {String} apiScope = 'all' + */ + change(pagenum, apiScope = 'all') { gl.utils.visitUrl(`?scope=${apiScope}&p=${pagenum}`); }, }, |