summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-02-16 11:22:58 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-02-16 11:22:58 +0000
commit19791b65b20a21f1d12315b5b75f52a01531693b (patch)
treee9aa08936f37d15eee7d4bf11ec4b475bdc6ed9b
parentac7101364293666aaf81dfaa19ab46b148d0718c (diff)
downloadgitlab-ce-fe-paginated-environments-api-add-pagination.tar.gz
-rw-r--r--app/assets/javascripts/vue_pipelines_index/pipelines.js.es612
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}`);
},
},