Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
77b0d605
Commit
77b0d605
authored
Nov 02, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
count passing through - last page known
parent
c249fb2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+7
-2
app/assets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
...sets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
+2
-0
app/assets/javascripts/vue_pipelines_index/vue_gl_pagination.vue.js.es6
...ascripts/vue_pipelines_index/vue_gl_pagination.vue.js.es6
+8
-1
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+1
-1
No files found.
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
77b0d605
...
@@ -18,12 +18,12 @@
...
@@ -18,12 +18,12 @@
const project = document.querySelector('.pipelines');
const project = document.querySelector('.pipelines');
Vue.use(VueResource);
Vue.use(VueResource);
// Vue.config.silent = true;
return new Vue({
return new Vue({
el: '.vue-pipelines-index',
el: '.vue-pipelines-index',
data: {
data: {
scope: project.dataset.projectId,
scope: project.dataset.projectId,
count: project.dataset.count,
store: new gl.PipelineStore(),
store: new gl.PipelineStore(),
},
},
components: {
components: {
...
@@ -31,7 +31,12 @@
...
@@ -31,7 +31,12 @@
},
},
template: `
template: `
<div>
<div>
<vue-pipelines :scope='scope' :store='store'></vue-pipelines>
<vue-pipelines
:scope='scope'
:store='store'
:count='count'
>
</vue-pipelines>
</div>
</div>
`,
`,
});
});
...
...
app/assets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
View file @
77b0d605
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
props: [
props: [
'scope',
'scope',
'store',
'store',
'count',
],
],
created() {
created() {
const url = window.location.toString();
const url = window.location.toString();
...
@@ -78,6 +79,7 @@
...
@@ -78,6 +79,7 @@
<vue-gl-pagination
<vue-gl-pagination
:changepage='changepage'
:changepage='changepage'
:pages='pipelines.length'
:pages='pipelines.length'
:count='count'
>
>
</vue-gl-pagination>
</vue-gl-pagination>
</div>
</div>
...
...
app/assets/javascripts/vue_pipelines_index/vue_gl_pagination.vue.js.es6
View file @
77b0d605
...
@@ -6,7 +6,14 @@
...
@@ -6,7 +6,14 @@
props: [
props: [
'changepage',
'changepage',
'pages',
'pages',
'count',
],
],
computed: {
lastpage() {
const lastPage = Math.ceil(+this.count / 5);
return `pipelines?page=${lastPage}`;
},
},
template: `
template: `
<div class="gl-pagination">
<div class="gl-pagination">
<ul class="pagination clearfix">
<ul class="pagination clearfix">
...
@@ -45,7 +52,7 @@
...
@@ -45,7 +52,7 @@
</a>
</a>
</li>
</li>
<li class="last">
<li class="last">
<a
href="pipelines?page=936"
>Last »</a>
<a
:href='lastpage'
>Last »</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
...
app/views/projects/pipelines/index.html.haml
View file @
77b0d605
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
=
link_to
ci_lint_path
,
class:
'btn btn-default'
do
=
link_to
ci_lint_path
,
class:
'btn btn-default'
do
%span
CI Lint
%span
CI Lint
%div
.content-list.pipelines
{
"data-project-id"
:
"#{@project.id}"
}
%div
.content-list.pipelines
{
"data-project-id"
:
"#{@project.id}"
,
"data-count"
:
"#{@pipelines_count}"
}
-
stages
=
@pipelines
.
stages
-
stages
=
@pipelines
.
stages
-
if
@pipelines
.
blank?
-
if
@pipelines
.
blank?
%div
%div
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment