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
87d4d235
Commit
87d4d235
authored
Oct 31, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove commit endpoint callprep for backend api to be updated or new endpoint to be built
parent
a42140d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
25 deletions
+13
-25
app/assets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
...sets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
+0
-2
app/assets/javascripts/vue_pipelines_index/store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+13
-23
No files found.
app/assets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
View file @
87d4d235
...
...
@@ -9,7 +9,6 @@
data() {
return {
pipelines: [],
commits: [],
currentPage: '',
intervalId: '',
};
...
...
@@ -19,7 +18,6 @@
'store',
],
created() {
this.store.fetchCommits.call(this, Vue);
this.store.fetchDataLoop.call(this, Vue);
},
methods: {
...
...
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
87d4d235
...
...
@@ -4,35 +4,25 @@
((gl) => {
const api = '/api/v3/projects';
const goFetch = (that, vue) =>
that.$http.get(
`${api}/${that.scope}/pipelines?per_page=5&page=1`
)
.then((response) => {
vue.set(that, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
gl.PipelineStore = class {
fetchDataLoop(Vue) {
const goFetch = () =>
this.$http.get(
`${api}/${this.scope}/pipelines?per_page=5&page=1`
)
.then((response) => {
Vue.set(this, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
goFetch();
// eventually clearInterval(this.intervalId)
this.intervalId = setInterval(() => {
console.log('DID IT');
goFetch(
this, Vue
);
goFetch();
}, 30000);
}
fetchCommits(vue) {
this.$http.get(
`${api}/${this.scope}/repository/commits?per_page=5&page=1`
)
.then((response) => {
vue.set(this, 'commits', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
})
.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