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
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
Hide 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 @@
...
@@ -174,9 +174,9 @@
}
}
break;
break;
case 'projects:pipelines:index':
case 'projects:pipelines:index':
new gl.MiniPipelineGraph({
//
new gl.MiniPipelineGraph({
container: '.js-pipeline-table',
//
container: '.js-pipeline-table',
});
//
});
break;
break;
case 'projects:pipelines:builds':
case 'projects:pipelines:builds':
case 'projects:pipelines:show':
case 'projects:pipelines:show':
...
...
app/assets/javascripts/vue_pipelines_index/stage.js.es6
View file @
a9af423c
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
data() {
data() {
return {
return {
request: false,
request: false,
builds: '<ul></ul>',
builds: '',
spinner: '<span class="fa fa-spinner fa-spin"></span>',
};
};
},
},
props: ['stage', 'svgs', 'match'],
props: ['stage', 'svgs', 'match'],
...
@@ -14,18 +15,28 @@
...
@@ -14,18 +15,28 @@
fetchBuilds() {
fetchBuilds() {
this.$http.get(this.endpoint)
this.$http.get(this.endpoint)
.then((response) => {
.then((response) => {
this.builds = JSON.parse(response.body).html;
this.request = true;
this.request = true;
setTimeout(() => {
this.builds = JSON.parse(response.body).html;
}, 100);
}, () => new Flash(
}, () => new Flash(
'Something went wrong on our end.',
'Something went wrong on our end.',
));
));
},
},
clearState() {
clearState() {
this.re
sponse
= false;
this.re
quest
= false;
this.builds = '
<ul></ul>
';
this.builds = '';
},
},
},
},
computed: {
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() {
endpoint() {
return '/gitlab-org/gitlab-shell/pipelines/121/stage?stage=deploy';
return '/gitlab-org/gitlab-shell/pipelines/121/stage?stage=deploy';
},
},
...
@@ -53,8 +64,7 @@
...
@@ -53,8 +64,7 @@
@blur='clearState'
@blur='clearState'
class="has-tooltip builds-dropdown js-builds-dropdown-button"
class="has-tooltip builds-dropdown js-builds-dropdown-button"
data-placement="top"
data-placement="top"
data-stage-endpoint='stage.status.endpoint'
:title='stageTitle'
:data-title='stageTitle'
data-toggle="dropdown"
data-toggle="dropdown"
type="button"
type="button"
>
>
...
@@ -62,7 +72,7 @@
...
@@ -62,7 +72,7 @@
<span class="mini-pipeline-graph-icon-container">
<span class="mini-pipeline-graph-icon-container">
<span
<span
:class='spanClass'
:class='spanClass'
:
v-html='svg'
v-html='svg'
>
>
</span>
</span>
<i class="fa fa-caret-down dropdown-caret"></i>
<i class="fa fa-caret-down dropdown-caret"></i>
...
@@ -73,16 +83,10 @@
...
@@ -73,16 +83,10 @@
<div class="dropdown-menu grouped-pipeline-dropdown">
<div class="dropdown-menu grouped-pipeline-dropdown">
<div class="arrow-up"></div>
<div class="arrow-up"></div>
<div
<div
class="js-builds-dropdown-list"
:class='dropdownClass'
v-if='request'
v-if='request'
v-html='builds'
v-html='buildsOrSpinner'
>
</div>
<div
class="js-builds-dropdown-loading builds-dropdown-loading"
v-if='!request'
>
>
<span class="fa fa-spinner fa-spin"></span>
</div>
</div>
</div>
</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