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
Tatuya Kamada
gitlab-ce
Commits
79373bdc
Commit
79373bdc
authored
Jan 16, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pipeline_index_mini_graph_fix' into 'master'
Pipeline Index Mini Graph Fix See merge request !8542
parents
55b3ee74
e99f4534
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
app/assets/javascripts/vue_pipelines_index/stage.js.es6
app/assets/javascripts/vue_pipelines_index/stage.js.es6
+6
-13
No files found.
app/assets/javascripts/vue_pipelines_index/stage.js.es6
View file @
79373bdc
/* global Vue, Flash, gl */
/* global Vue, Flash, gl */
/* eslint-disable no-param-reassign */
/* eslint-disable no-param-reassign
, no-bitwise
*/
((gl) => {
((gl) => {
gl.VueStage = Vue.extend({
gl.VueStage = Vue.extend({
data() {
data() {
return {
return {
request: false
,
count: 0
,
builds: '',
builds: '',
spinner: '<span class="fa fa-spinner fa-spin"></span>',
spinner: '<span class="fa fa-spinner fa-spin"></span>',
};
};
...
@@ -13,29 +13,23 @@
...
@@ -13,29 +13,23 @@
props: ['stage', 'svgs', 'match'],
props: ['stage', 'svgs', 'match'],
methods: {
methods: {
fetchBuilds() {
fetchBuilds() {
if (this.request) return this.clearBuilds();
if (this.count > 0) return null;
return this.$http.get(this.stage.dropdown_path)
return this.$http.get(this.stage.dropdown_path)
.then((response) => {
.then((response) => {
this.
request = true
;
this.
count += 1
;
this.builds = JSON.parse(response.body).html;
this.builds = JSON.parse(response.body).html;
}, () => {
}, () => {
const flash = new Flash('Something went wrong on our end.');
const flash = new Flash('Something went wrong on our end.');
this.request = false;
return flash;
return flash;
});
});
},
},
clearBuilds() {
this.builds = '';
this.request = false;
},
},
},
computed: {
computed: {
buildsOrSpinner() {
buildsOrSpinner() {
return this.
request
? this.builds : this.spinner;
return this.
builds
? this.builds : this.spinner;
},
},
dropdownClass() {
dropdownClass() {
if (this.
request
) return 'js-builds-dropdown-container';
if (this.
builds
) return 'js-builds-dropdown-container';
return 'js-builds-dropdown-loading builds-dropdown-loading';
return 'js-builds-dropdown-loading builds-dropdown-loading';
},
},
buildStatus() {
buildStatus() {
...
@@ -57,7 +51,6 @@
...
@@ -57,7 +51,6 @@
<div>
<div>
<button
<button
@click='fetchBuilds'
@click='fetchBuilds'
@blur='fetchBuilds'
:class="triggerButtonClass"
:class="triggerButtonClass"
:title='stage.title'
:title='stage.title'
data-placement="top"
data-placement="top"
...
...
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