mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-25 17:46:18 +00:00
show more builds button added
This commit is contained in:
parent
cbbf1db699
commit
3b87f50f3e
@ -49,7 +49,7 @@ unknown revision or path not in the working tree.~~
|
||||
* ~~should write at the end of build console out that build is done (or error)~~
|
||||
* ~~share workspace files at static~~
|
||||
* "clear workspace" button
|
||||
* show more builds button (or infinity scroll) on start page
|
||||
* ~~show more builds button (or infinity scroll) on start page~~
|
||||
* ~~hide console output by default (when go on completed build page you scroll
|
||||
down to the output which could be very long)~~
|
||||
* speed up build points animation at ff (maybe borrow something from animate.css?)
|
||||
|
@ -6,3 +6,10 @@ if itemsCount
|
||||
Item(build=build, key=build.id)
|
||||
else
|
||||
p Build history is empty
|
||||
|
||||
if itemsCount && itemsCount % 20 === 0
|
||||
.text-center
|
||||
a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onShowMoreBuilds(this.props.projectName))
|
||||
i.fa.fa-fw.fa-plus(title="Show more builds")
|
||||
|
|
||||
| Show more builds
|
||||
|
@ -5,9 +5,10 @@ define([
|
||||
'reflux',
|
||||
'underscore',
|
||||
'./item',
|
||||
'app/actions/build',
|
||||
'app/stores/builds',
|
||||
'templates/app/components/builds/list'
|
||||
], function(React, Reflux, _, Item, buildsStore, template) {
|
||||
], function(React, Reflux, _, Item, BuildActions, buildsStore, template) {
|
||||
template = template.locals({
|
||||
Item: Item
|
||||
});
|
||||
@ -25,6 +26,12 @@ define([
|
||||
}
|
||||
})
|
||||
],
|
||||
onShowMoreBuilds: function(projectName) {
|
||||
BuildActions.readAll({
|
||||
projectName: projectName,
|
||||
limit: this.state.items.length + 20
|
||||
});
|
||||
},
|
||||
render: template
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user