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
Léo-Paul Géneau
gitlab-ce
Commits
6c76e81b
Commit
6c76e81b
authored
Apr 09, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Updates table when stage is clicked
parent
ab98308d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
app/assets/javascripts/pipelines/components/stage.vue
app/assets/javascripts/pipelines/components/stage.vue
+5
-2
app/assets/javascripts/pipelines/mixins/pipelines.js
app/assets/javascripts/pipelines/mixins/pipelines.js
+15
-0
No files found.
app/assets/javascripts/pipelines/components/stage.vue
View file @
6c76e81b
<
script
>
import
$
from
'
jquery
'
;
/**
* Renders each stage of the pipeline mini graph.
...
...
@@ -13,8 +12,11 @@
* 3. Merge request widget
* 4. Commit widget
*/
import
axios
from
'
../../lib/utils/axios_utils
'
;
import
$
from
'
jquery
'
;
import
Flash
from
'
../../flash
'
;
import
axios
from
'
../../lib/utils/axios_utils
'
;
import
eventHub
from
'
../event_hub
'
;
import
Icon
from
'
../../vue_shared/components/icon.vue
'
;
import
LoadingIcon
from
'
../../vue_shared/components/loading_icon.vue
'
;
import
tooltip
from
'
../../vue_shared/directives/tooltip
'
;
...
...
@@ -82,6 +84,7 @@
methods
:
{
onClickStage
()
{
if
(
!
this
.
isDropdownOpen
())
{
eventHub
.
$emit
(
'
clickedDropdown
'
);
this
.
isLoading
=
true
;
this
.
fetchJobs
();
}
...
...
app/assets/javascripts/pipelines/mixins/pipelines.js
View file @
6c76e81b
...
...
@@ -52,14 +52,29 @@ export default {
});
eventHub
.
$on
(
'
postAction
'
,
this
.
postAction
);
eventHub
.
$on
(
'
clickedDropdown
'
,
this
.
updateTable
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
postAction
'
,
this
.
postAction
);
eventHub
.
$off
(
'
clickedDropdown
'
,
this
.
updateTable
);
},
destroyed
()
{
this
.
poll
.
stop
();
},
methods
:
{
updateTable
()
{
// Cancel ongoing request
if
(
this
.
isMakingRequest
)
{
}
// Stop polling
this
.
poll
.
stop
();
// make new request
this
.
fetchPipelines
();
// restart polling
this
.
poll
.
restart
();
},
fetchPipelines
()
{
if
(
!
this
.
isMakingRequest
)
{
this
.
isLoading
=
true
;
...
...
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