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
2caf62d1
Commit
2caf62d1
authored
Oct 30, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor
parent
5ed18942
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
app/assets/javascripts/vue_pipelines_index/store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+10
-18
No files found.
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
2caf62d1
...
...
@@ -2,38 +2,30 @@
/* eslint-disable no-param-reassign */
((gl) => {
const goFetch = (that, vue) =>
that.$http.get(`/api/v3/projects/${that.scope}/pipelines`)
.then((response) => {
vue.set(that, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
gl.PipelineStore = class {
fetchDataLoop(Vue) {
const goFetch = vue =>
this.$http.get(`/api/v3/projects/${this.scope}/pipelines`)
.then((response) => {
vue.set(this, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
setInterval(() => {
console.log('DID IT');
goFetch(Vue);
goFetch(
this,
Vue);
}, 30000);
}
fetchCommits(vue) {
const goFetch = vueSet =>
this.$http.get(`/api/v3/projects/${this.scope}/pipelines`)
.then((response) => {
vueSet.set(this, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
this.$http.get(`/api/v3/projects/${this.scope}/repository/commits`)
.then((response) => {
vue.set(this, 'commits', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
})
.then(() => goFetch(vue));
.then(() => goFetch(
this,
vue));
}
};
})(window.gl || (window.gl = {}));
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