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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
38bb3488
Commit
38bb3488
authored
Nov 10, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-wire count for pagination - refactor
parent
1a5027a0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
9 deletions
+11
-9
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+1
-1
app/assets/javascripts/vue_pipelines_index/branch_commit.js.es6
...sets/javascripts/vue_pipelines_index/branch_commit.js.es6
+1
-1
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+0
-2
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+6
-2
app/assets/javascripts/vue_pipelines_index/store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+1
-1
app/assets/javascripts/vue_pipelines_status/pending.js.es6
app/assets/javascripts/vue_pipelines_status/pending.js.es6
+1
-1
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+1
-1
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
38bb3488
...
...
@@ -10,7 +10,7 @@
],
computed: {
last() {
return Math.ceil(+this.count /
5
);
return Math.ceil(+this.count /
30
);
},
getItems() {
const total = +this.last;
...
...
app/assets/javascripts/vue_pipelines_index/branch_commit.js.es6
View file @
38bb3488
...
...
@@ -9,7 +9,7 @@
return `mailto:${this.pipeline.commit.author_email}`;
},
alt() {
return `${this.pipeline.commit.author_name}'s avatar`
return `${this.pipeline.commit.author_name}'s avatar`
;
},
},
template: `
...
...
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
38bb3488
...
...
@@ -25,7 +25,6 @@
el: '.vue-pipelines-index',
data: {
scope: project.dataset.url,
count: project.dataset.count,
store: new gl.PipelineStore(),
},
components: {
...
...
@@ -36,7 +35,6 @@
<vue-pipelines
:scope='scope'
:store='store'
:count='count'
>
</vue-pipelines>
</div>
...
...
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
View file @
38bb3488
...
...
@@ -20,12 +20,15 @@
currentPage: '',
intervalId: '',
pagenum: 1,
count: {
all: 0,
running_or_pending: 0,
},
};
},
props: [
'scope',
'store',
'count',
],
created() {
const url = window.location.toString();
...
...
@@ -65,9 +68,10 @@
</table>
</div>
<vue-gl-pagination
v-if='count.all > 0'
:pagenum='pagenum'
:changepage='changepage'
:count='count'
:count='count
.all
'
>
</vue-gl-pagination>
</div>
...
...
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
38bb3488
...
...
@@ -8,8 +8,8 @@
this.$http.get(`${url}?page=${pageNum}`)
.then((response) => {
const res = JSON.parse(response.body);
debugger
Vue.set(this, 'pipelines', res.pipelines);
Vue.set(this, 'count', res.count);
}, () => new Flash(
'Something went wrong on our end.'
));
...
...
app/assets/javascripts/vue_pipelines_status/pending.js.es6
View file @
38bb3488
...
...
@@ -20,4 +20,4 @@
</td>
`,
});
})(window.gl || (window.gl = {}));
\ No newline at end of file
})(window.gl || (window.gl = {}));
app/views/projects/pipelines/index.html.haml
View file @
38bb3488
...
...
@@ -35,7 +35,7 @@
=
link_to
ci_lint_path
,
class:
'btn btn-default'
do
%span
CI Lint
%div
.content-list.pipelines
{
data:
{
url:
namespace_project_pipelines_path
(
@project
.
namespace
,
@project
,
format: :json
)
,
"data-count"
:
"#{@pipelines_count}"
}}
%div
.content-list.pipelines
{
data:
{
url:
namespace_project_pipelines_path
(
@project
.
namespace
,
@project
,
format: :json
)}}
-
if
@pipelines
.
blank?
%div
.nothing-here-block
No pipelines to show
...
...
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