summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2016-12-16 15:37:18 -0700
committerRegis <boudinot.regis@yahoo.com>2016-12-16 15:37:18 -0700
commitdb43813aa0118852d7529b9ec856d6cca19540ad (patch)
tree167b11451af3bad23639f914f04fb219f53deb0c
parent211ee4b97c0754f30ff018d9a333e72559661a05 (diff)
downloadgitlab-ce-db43813aa0118852d7529b9ec856d6cca19540ad.tar.gz
add CONST and one line a tag in pagination - add request to false in store handler
-rw-r--r--app/assets/javascripts/vue_pagination/index.js.es69
-rw-r--r--app/assets/javascripts/vue_pipelines_index/index.js.es614
-rw-r--r--app/assets/javascripts/vue_pipelines_index/store.js.es67
3 files changed, 13 insertions, 17 deletions
diff --git a/app/assets/javascripts/vue_pagination/index.js.es6 b/app/assets/javascripts/vue_pagination/index.js.es6
index 3889e6d6d28..6aeb6d3b37b 100644
--- a/app/assets/javascripts/vue_pagination/index.js.es6
+++ b/app/assets/javascripts/vue_pagination/index.js.es6
@@ -5,6 +5,7 @@
((gl) => {
const PAGINATION_UI_BUTTON_LIMIT = 4;
+ const UI_LIMIT = 6;
const SPREAD = '...';
const PREV = 'Prev';
const NEXT = 'Next';
@@ -104,7 +105,7 @@
items.push({ title: PREV, disabled: true });
}
- if (page > 6) items.push({ title: SPREAD, separator: true });
+ if (page > UI_LIMIT) items.push({ title: SPREAD, separator: true });
const start = Math.max(page - PAGINATION_UI_BUTTON_LIMIT, 1);
const end = Math.min(page + PAGINATION_UI_BUTTON_LIMIT, total);
@@ -139,11 +140,7 @@
disabled: item.disabled
}'
>
- <a
- @click="changePage($event)"
- >
- {{item.title}}
- </a>
+ <a @click="changePage($event)">{{item.title}}</a>
</li>
</ul>
</div>
diff --git a/app/assets/javascripts/vue_pipelines_index/index.js.es6 b/app/assets/javascripts/vue_pipelines_index/index.js.es6
index 8f3e211aac8..bad24ce41d0 100644
--- a/app/assets/javascripts/vue_pipelines_index/index.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/index.js.es6
@@ -36,14 +36,12 @@
'vue-pipelines': gl.VuePipelines,
},
template: `
- <div>
- <vue-pipelines
- :scope='scope'
- :store='store'
- :svgs='svgs'
- >
- </vue-pipelines>
- </div>
+ <vue-pipelines
+ :scope='scope'
+ :store='store'
+ :svgs='svgs'
+ >
+ </vue-pipelines>
`,
});
}
diff --git a/app/assets/javascripts/vue_pipelines_index/store.js.es6 b/app/assets/javascripts/vue_pipelines_index/store.js.es6
index 619fd094996..46c27b1c38a 100644
--- a/app/assets/javascripts/vue_pipelines_index/store.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/store.js.es6
@@ -34,9 +34,10 @@
updatePipelineNums(this.count);
this.pageRequest = false;
- }, () => new Flash(
- 'Something went wrong on our end.',
- ));
+ }, () => {
+ this.pageRequest = false;
+ return new Flash('Something went wrong on our end.');
+ });
goFetch();