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
a9af423c
Commit
a9af423c
authored
Dec 26, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
almost close to svgs - fixed bug for API call
parent
8a7f58d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
app/assets/javascripts/dispatcher.js.es6
app/assets/javascripts/dispatcher.js.es6
+3
-3
app/assets/javascripts/vue_pipelines_index/stage.js.es6
app/assets/javascripts/vue_pipelines_index/stage.js.es6
+19
-15
No files found.
app/assets/javascripts/dispatcher.js.es6
View file @
a9af423c
...
...
@@ -174,9 +174,9 @@
}
break;
case 'projects:pipelines:index':
new gl.MiniPipelineGraph({
container: '.js-pipeline-table',
});
//
new gl.MiniPipelineGraph({
//
container: '.js-pipeline-table',
//
});
break;
case 'projects:pipelines:builds':
case 'projects:pipelines:show':
...
...
app/assets/javascripts/vue_pipelines_index/stage.js.es6
View file @
a9af423c
...
...
@@ -6,7 +6,8 @@
data() {
return {
request: false,
builds: '<ul></ul>',
builds: '',
spinner: '<span class="fa fa-spinner fa-spin"></span>',
};
},
props: ['stage', 'svgs', 'match'],
...
...
@@ -14,18 +15,28 @@
fetchBuilds() {
this.$http.get(this.endpoint)
.then((response) => {
this.builds = JSON.parse(response.body).html;
this.request = true;
setTimeout(() => {
this.builds = JSON.parse(response.body).html;
}, 100);
}, () => new Flash(
'Something went wrong on our end.',
));
},
clearState() {
this.re
sponse
= false;
this.builds = '
<ul></ul>
';
this.re
quest
= false;
this.builds = '';
},
},
computed: {
buildsOrSpinner() {
if (this.request) return this.builds;
return this.spinner;
},
dropdownClass() {
if (this.request) return 'js-builds-dropdown-container';
return 'js-builds-dropdown-loading builds-dropdown-loading';
},
endpoint() {
return '/gitlab-org/gitlab-shell/pipelines/121/stage?stage=deploy';
},
...
...
@@ -53,8 +64,7 @@
@blur='clearState'
class="has-tooltip builds-dropdown js-builds-dropdown-button"
data-placement="top"
data-stage-endpoint='stage.status.endpoint'
:data-title='stageTitle'
:title='stageTitle'
data-toggle="dropdown"
type="button"
>
...
...
@@ -62,7 +72,7 @@
<span class="mini-pipeline-graph-icon-container">
<span
:class='spanClass'
:
v-html='svg'
v-html='svg'
>
</span>
<i class="fa fa-caret-down dropdown-caret"></i>
...
...
@@ -73,16 +83,10 @@
<div class="dropdown-menu grouped-pipeline-dropdown">
<div class="arrow-up"></div>
<div
class="js-builds-dropdown-list"
:class='dropdownClass'
v-if='request'
v-html='builds'
>
</div>
<div
class="js-builds-dropdown-loading builds-dropdown-loading"
v-if='!request'
v-html='buildsOrSpinner'
>
<span class="fa fa-spinner fa-spin"></span>
</div>
</div>
</div>
...
...
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