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
2b9a9e37
Commit
2b9a9e37
authored
Nov 15, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prep for testing - update all pipeline api response attributes
parent
fa1a99a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+1
-1
app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es6
...s/javascripts/vue_pipelines_index/pipeline_actions.js.es6
+2
-2
app/assets/javascripts/vue_pipelines_index/store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+18
-1
No files found.
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
2b9a9e37
/* global Vue, VueResource, gl */
/* eslint-disable no-bitwise*/
/* eslint-disable no-bitwise
, no-plusplus
*/
//= require vue-resource
...
...
app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es6
View file @
2b9a9e37
...
...
@@ -33,7 +33,7 @@
</a>
<ul class="dropdown-menu dropdown-menu-align-right">
<li v-for='action in pipeline.details.manual_actions'>
<a rel="nofollow" data-method="post" :href='action.url'>
<a rel="nofollow" data-method="post" :href='action.url'
title="Manual build"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 11" class="icon-play">
<path
fill-rule="evenodd"
...
...
@@ -83,7 +83,7 @@
<a
v-if='pipeline.cancel_url'
class="btn btn-remove has-tooltip"
title=""
title="
Cancel
"
rel="nofollow"
data-method="post"
:href='pipeline.cancel_url'
...
...
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
2b9a9e37
...
...
@@ -28,6 +28,15 @@
gl.PipelineStore = class {
fetchDataLoop(Vue, pageNum, url) {
Vue.activeResources = 0;
const resourceChecker = () => {
if (Vue.activeResources === 0) {
Vue.activeResources = 1;
} else {
Vue.activeResources += 1;
}
};
const goFetch = () =>
this.$http.get(`${url}?page=${pageNum}`)
.then((response) => {
...
...
@@ -36,6 +45,7 @@
Vue.set(this, 'pipelines', res.pipelines);
Vue.set(this, 'count', res.count);
this.pageRequest = false;
Vue.activeResources -= 1;
}, () => new Flash(
'Something went wrong on our end.'
));
...
...
@@ -45,15 +55,22 @@
.then((response) => {
const res = JSON.parse(response.body);
const p = new PipelineUpdater(this.pipelines);
Vue.set(this, 'updatedAt', res.updated_at);
Vue.set(this, 'pipelines', p.updatePipelines(res));
Vue.set(this, 'count', res.count);
Vue.activeResources -= 1;
}, () => new Flash(
'Something went wrong on our end.'
));
resourceChecker();
goFetch();
this.intervalId = setInterval(() => {
if (this.updatedAt) goUpdate();
if (this.updatedAt) {
resourceChecker();
goUpdate();
}
}, 3000);
window.onbeforeunload = function removePipelineInterval() {
...
...
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