BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1e48b7ee
Unverified
Commit
1e48b7ee
authored
May 24, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed need for jobs component
parent
4b461893
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
71 deletions
+54
-71
list.vue
app/assets/javascripts/ide/components/jobs/list.vue
+5
-5
stage.vue
app/assets/javascripts/ide/components/jobs/stage.vue
+8
-2
jobs.vue
app/assets/javascripts/ide/components/pipelines/jobs.vue
+0
-59
list.vue
app/assets/javascripts/ide/components/pipelines/list.vue
+41
-5
No files found.
app/assets/javascripts/ide/components/jobs/list.vue
View file @
1e48b7ee
<
script
>
import
{
mapState
}
from
'vuex'
;
import
LoadingIcon
from
'../../../vue_shared/components/loading_icon.vue'
;
import
Stage
from
'./stage.vue'
;
...
...
@@ -13,9 +12,10 @@ export default {
type
:
Array
,
required
:
true
,
},
},
computed
:
{
...
mapState
(
'pipelines'
,
[
'isLoadingJobs'
]),
loading
:
{
type
:
Boolean
,
required
:
true
,
},
},
};
</
script
>
...
...
@@ -23,7 +23,7 @@ export default {
<
template
>
<div>
<loading-icon
v-if=
"
isLoadingJobs
&& !stages.length"
v-if=
"
loading
&& !stages.length"
class=
"prepend-top-default"
size=
"2"
/>
...
...
app/assets/javascripts/ide/components/jobs/stage.vue
View file @
1e48b7ee
...
...
@@ -31,6 +31,12 @@ export default {
collapseIcon
()
{
return
this
.
stage
.
isCollapsed
?
'angle-left'
:
'angle-down'
;
},
showLoadingIcon
()
{
return
this
.
stage
.
isLoading
&&
!
this
.
stage
.
jobs
.
length
;
},
jobsCount
()
{
return
this
.
stage
.
jobs
.
length
;
},
},
created
()
{
this
.
fetchJobs
(
this
.
stage
);
...
...
@@ -69,7 +75,7 @@ export default {
</strong>
<div
class=
"append-right-8"
>
<span
class=
"badge"
>
{{
stage
.
jobs
.
length
}}
{{
jobsCount
}}
</span>
</div>
<icon
...
...
@@ -82,7 +88,7 @@ export default {
v-show=
"!stage.isCollapsed"
>
<loading-icon
v-if=
"s
tage.isLoading && !stage.jobs.length
"
v-if=
"s
howLoadingIcon
"
/>
<template
v-else
>
<item
...
...
app/assets/javascripts/ide/components/pipelines/jobs.vue
deleted
100644 → 0
View file @
4b461893
<
script
>
import
{
mapActions
,
mapGetters
,
mapState
}
from
'vuex'
;
import
Tabs
from
'../../../vue_shared/components/tabs/tabs'
;
import
Tab
from
'../../../vue_shared/components/tabs/tab.vue'
;
import
JobsList
from
'../jobs/list.vue'
;
export
default
{
components
:
{
Tabs
,
Tab
,
JobsList
,
},
computed
:
{
...
mapGetters
(
'pipelines'
,
[
'jobsCount'
,
'failedJobsCount'
,
'failedStages'
]),
...
mapState
(
'pipelines'
,
[
'stages'
,
'isLoadingJobs'
]),
},
created
()
{
this
.
fetchStages
();
},
methods
:
{
...
mapActions
(
'pipelines'
,
[
'fetchStages'
]),
},
};
</
script
>
<
template
>
<div>
<tabs>
<tab
active
>
<template
slot=
"title"
>
Jobs
<span
v-if=
"!isLoadingJobs || jobsCount"
class=
"badge"
>
{{
jobsCount
}}
</span>
</
template
>
<jobs-list
:stages=
"stages"
/>
</tab>
<tab>
<
template
slot=
"title"
>
Failed Jobs
<span
v-if=
"!isLoadingJobs || failedJobsCount"
class=
"badge"
>
{{
failedJobsCount
}}
</span>
</
template
>
<jobs-list
:stages=
"failedStages"
/>
</tab>
</tabs>
</div>
</template>
app/assets/javascripts/ide/components/pipelines/list.vue
View file @
1e48b7ee
...
...
@@ -2,17 +2,22 @@
import
{
mapActions
,
mapGetters
,
mapState
}
from
'vuex'
;
import
LoadingIcon
from
'../../../vue_shared/components/loading_icon.vue'
;
import
CiIcon
from
'../../../vue_shared/components/ci_icon.vue'
;
import
JobsList
from
'./jobs.vue'
;
import
Tabs
from
'../../../vue_shared/components/tabs/tabs'
;
import
Tab
from
'../../../vue_shared/components/tabs/tab.vue'
;
import
JobsList
from
'../jobs/list.vue'
;
export
default
{
components
:
{
LoadingIcon
,
CiIcon
,
Tabs
,
Tab
,
JobsList
,
},
computed
:
{
...
mapGetters
([
'currentProject'
]),
...
mapState
(
'pipelines'
,
[
'isLoadingPipeline'
,
'latestPipeline'
]),
...
mapGetters
(
'pipelines'
,
[
'jobsCount'
,
'failedJobsCount'
,
'failedStages'
]),
...
mapState
(
'pipelines'
,
[
'isLoadingPipeline'
,
'latestPipeline'
,
'stages'
,
'isLoadingJobs'
]),
statusIcon
()
{
return
{
group
:
this
.
latestPipeline
.
status
,
...
...
@@ -21,10 +26,10 @@ export default {
},
},
created
()
{
this
.
fetchLatestPipeline
(
);
return
this
.
fetchLatestPipeline
().
then
(()
=>
this
.
fetchStages
()
);
},
methods
:
{
...
mapActions
(
'pipelines'
,
[
'fetchLatestPipeline'
]),
...
mapActions
(
'pipelines'
,
[
'fetchLatestPipeline'
,
'fetchStages'
]),
},
};
</
script
>
...
...
@@ -56,7 +61,38 @@ export default {
</a>
</span>
</header>
<jobs-list
/>
<tabs>
<tab
active
>
<template
slot=
"title"
>
Jobs
<span
v-if=
"!isLoadingJobs || jobsCount"
class=
"badge"
>
{{
jobsCount
}}
</span>
</
template
>
<jobs-list
:loading=
"isLoadingJobs"
:stages=
"stages"
/>
</tab>
<tab>
<
template
slot=
"title"
>
Failed Jobs
<span
v-if=
"!isLoadingJobs || failedJobsCount"
class=
"badge"
>
{{
failedJobsCount
}}
</span>
</
template
>
<jobs-list
:loading=
"isLoadingJobs"
:stages=
"failedStages"
/>
</tab>
</tabs>
</template>
</div>
</template>
...
...
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