BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ff4edf37
Commit
ff4edf37
authored
Nov 18, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this.count as only param for updatePipelineNums - [ci skip]
parent
d0a5428a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+7
-4
No files found.
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
ff4edf37
...
...
@@ -41,8 +41,11 @@
resetVueResources(); // set Vue.resources to 0
const updatePipelineNums = (total, running) => {
document.querySelector('.js-totalbuilds-count').innerHTML = total;
const updatePipelineNums = (count) => {
const { all } = count;
// cannot define non camel case, so not using destructuring for running
const running = count.running_or_pending;
document.querySelector('.js-totalbuilds-count').innerHTML = all;
document.querySelector('.js-running-count').innerHTML = running;
};
...
...
@@ -61,7 +64,7 @@
Vue.set(this, 'updatedAt', res.updated_at);
Vue.set(this, 'pipelines', res.pipelines);
Vue.set(this, 'count', res.count);
updatePipelineNums(this.count
.all, this.count.running_or_pending
);
updatePipelineNums(this.count);
this.pageRequest = false;
subtractFromVueResources();
}, () => new Flash(
...
...
@@ -76,7 +79,7 @@
Vue.set(this, 'updatedAt', res.updated_at);
Vue.set(this, 'pipelines', p.updatePipelines(res));
Vue.set(this, 'count', res.count);
updatePipelineNums(this.count
.all, this.count.running_or_pending
);
updatePipelineNums(this.count);
subtractFromVueResources();
}, () => new Flash(
'Something went wrong on our end.'
...
...
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