summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_pipelines_index
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2017-01-15 09:48:40 -0500
committerRegis <boudinot.regis@yahoo.com>2017-01-15 09:48:40 -0500
commit88c3c8a8150ff0a1acdaf676f07171a50906c2c9 (patch)
tree2e3cba200e45e5b5dc0833a1566ed51189bc1034 /app/assets/javascripts/vue_pipelines_index
parent18774f65a19bdd1be08c3d36916bbca36dfcd2ae (diff)
parentb56e57ec3b131e48030574251175afe311bcf51b (diff)
downloadgitlab-ce-88c3c8a8150ff0a1acdaf676f07171a50906c2c9.tar.gz
Merge branch 'master' into pipeline_index_mini_graph_fix
Diffstat (limited to 'app/assets/javascripts/vue_pipelines_index')
-rw-r--r--app/assets/javascripts/vue_pipelines_index/index.js.es61
-rw-r--r--app/assets/javascripts/vue_pipelines_index/pipelines.js.es612
-rw-r--r--app/assets/javascripts/vue_pipelines_index/store.js.es626
3 files changed, 25 insertions, 14 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/index.js.es6 b/app/assets/javascripts/vue_pipelines_index/index.js.es6
index 9dfbedd73ab..edd01f17a97 100644
--- a/app/assets/javascripts/vue_pipelines_index/index.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/index.js.es6
@@ -1,5 +1,6 @@
/* global Vue, VueResource, gl */
/*= require vue_common_component/commit */
+/*= require vue_pagination/index */
/*= require vue-resource
/*= require boards/vue_resource_interceptor */
/*= require ./status.js.es6 */
diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
index 73627e9ba50..b2ed05503c9 100644
--- a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
@@ -73,12 +73,12 @@
<table class="table ci-table">
<thead>
<tr>
- <th>Status</th>
- <th>Pipeline</th>
- <th>Commit</th>
- <th>Stages</th>
- <th></th>
- <th class="hidden-xs"></th>
+ <th class="pipeline-status">Status</th>
+ <th class="pipeline-info">Pipeline</th>
+ <th class="pipeline-commit">Commit</th>
+ <th class="pipeline-stages">Stages</th>
+ <th class="pipeline-date"></th>
+ <th class="pipeline-actions hidden-xs"></th>
</tr>
</thead>
<tbody>
diff --git a/app/assets/javascripts/vue_pipelines_index/store.js.es6 b/app/assets/javascripts/vue_pipelines_index/store.js.es6
index 6b34839b030..1982142853a 100644
--- a/app/assets/javascripts/vue_pipelines_index/store.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/store.js.es6
@@ -3,14 +3,24 @@
/*= require vue_realtime_listener/index.js */
((gl) => {
- const pageValues = headers => ({
- perPage: +headers['X-Per-Page'],
- page: +headers['X-Page'],
- total: +headers['X-Total'],
- totalPages: +headers['X-Total-Pages'],
- nextPage: +headers['X-Next-Page'],
- previousPage: +headers['X-Prev-Page'],
- });
+ const pageValues = (headers) => {
+ const normalizedHeaders = {};
+
+ Object.keys(headers).forEach((e) => {
+ normalizedHeaders[e.toUpperCase()] = headers[e];
+ });
+
+ const paginationInfo = {
+ perPage: +normalizedHeaders['X-PER-PAGE'],
+ page: +normalizedHeaders['X-PAGE'],
+ total: +normalizedHeaders['X-TOTAL'],
+ totalPages: +normalizedHeaders['X-TOTAL-PAGES'],
+ nextPage: +normalizedHeaders['X-NEXT-PAGE'],
+ previousPage: +normalizedHeaders['X-PREV-PAGE'],
+ };
+
+ return paginationInfo;
+ };
gl.PipelineStore = class {
fetchDataLoop(Vue, pageNum, url, apiScope) {