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
1e48b7ee
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
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
71 deletions
+54
-71
app/assets/javascripts/ide/components/jobs/list.vue
app/assets/javascripts/ide/components/jobs/list.vue
+5
-5
app/assets/javascripts/ide/components/jobs/stage.vue
app/assets/javascripts/ide/components/jobs/stage.vue
+8
-2
app/assets/javascripts/ide/components/pipelines/jobs.vue
app/assets/javascripts/ide/components/pipelines/jobs.vue
+0
-59
app/assets/javascripts/ide/components/pipelines/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
>
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
LoadingIcon
from
'
../../../vue_shared/components/loading_icon.vue
'
;
import
LoadingIcon
from
'
../../../vue_shared/components/loading_icon.vue
'
;
import
Stage
from
'
./stage.vue
'
;
import
Stage
from
'
./stage.vue
'
;
...
@@ -13,9 +12,10 @@ export default {
...
@@ -13,9 +12,10 @@ export default {
type
:
Array
,
type
:
Array
,
required
:
true
,
required
:
true
,
},
},
},
loading
:
{
computed
:
{
type
:
Boolean
,
...
mapState
(
'
pipelines
'
,
[
'
isLoadingJobs
'
]),
required
:
true
,
},
},
},
};
};
</
script
>
</
script
>
...
@@ -23,7 +23,7 @@ export default {
...
@@ -23,7 +23,7 @@ export default {
<
template
>
<
template
>
<div>
<div>
<loading-icon
<loading-icon
v-if=
"
isLoadingJobs
&& !stages.length"
v-if=
"
loading
&& !stages.length"
class=
"prepend-top-default"
class=
"prepend-top-default"
size=
"2"
size=
"2"
/>
/>
...
...
app/assets/javascripts/ide/components/jobs/stage.vue
View file @
1e48b7ee
...
@@ -31,6 +31,12 @@ export default {
...
@@ -31,6 +31,12 @@ export default {
collapseIcon
()
{
collapseIcon
()
{
return
this
.
stage
.
isCollapsed
?
'
angle-left
'
:
'
angle-down
'
;
return
this
.
stage
.
isCollapsed
?
'
angle-left
'
:
'
angle-down
'
;
},
},
showLoadingIcon
()
{
return
this
.
stage
.
isLoading
&&
!
this
.
stage
.
jobs
.
length
;
},
jobsCount
()
{
return
this
.
stage
.
jobs
.
length
;
},
},
},
created
()
{
created
()
{
this
.
fetchJobs
(
this
.
stage
);
this
.
fetchJobs
(
this
.
stage
);
...
@@ -69,7 +75,7 @@ export default {
...
@@ -69,7 +75,7 @@ export default {
</strong>
</strong>
<div
class=
"append-right-8"
>
<div
class=
"append-right-8"
>
<span
class=
"badge"
>
<span
class=
"badge"
>
{{
stage
.
jobs
.
length
}}
{{
jobsCount
}}
</span>
</span>
</div>
</div>
<icon
<icon
...
@@ -82,7 +88,7 @@ export default {
...
@@ -82,7 +88,7 @@ export default {
v-show=
"!stage.isCollapsed"
v-show=
"!stage.isCollapsed"
>
>
<loading-icon
<loading-icon
v-if=
"s
tage.isLoading && !stage.jobs.length
"
v-if=
"s
howLoadingIcon
"
/>
/>
<template
v-else
>
<template
v-else
>
<item
<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 @@
...
@@ -2,17 +2,22 @@
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
LoadingIcon
from
'
../../../vue_shared/components/loading_icon.vue
'
;
import
LoadingIcon
from
'
../../../vue_shared/components/loading_icon.vue
'
;
import
CiIcon
from
'
../../../vue_shared/components/ci_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
{
export
default
{
components
:
{
components
:
{
LoadingIcon
,
LoadingIcon
,
CiIcon
,
CiIcon
,
Tabs
,
Tab
,
JobsList
,
JobsList
,
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'
currentProject
'
]),
...
mapGetters
([
'
currentProject
'
]),
...
mapState
(
'
pipelines
'
,
[
'
isLoadingPipeline
'
,
'
latestPipeline
'
]),
...
mapGetters
(
'
pipelines
'
,
[
'
jobsCount
'
,
'
failedJobsCount
'
,
'
failedStages
'
]),
...
mapState
(
'
pipelines
'
,
[
'
isLoadingPipeline
'
,
'
latestPipeline
'
,
'
stages
'
,
'
isLoadingJobs
'
]),
statusIcon
()
{
statusIcon
()
{
return
{
return
{
group
:
this
.
latestPipeline
.
status
,
group
:
this
.
latestPipeline
.
status
,
...
@@ -21,10 +26,10 @@ export default {
...
@@ -21,10 +26,10 @@ export default {
},
},
},
},
created
()
{
created
()
{
this
.
fetchLatestPipeline
(
);
return
this
.
fetchLatestPipeline
().
then
(()
=>
this
.
fetchStages
()
);
},
},
methods
:
{
methods
:
{
...
mapActions
(
'
pipelines
'
,
[
'
fetchLatestPipeline
'
]),
...
mapActions
(
'
pipelines
'
,
[
'
fetchLatestPipeline
'
,
'
fetchStages
'
]),
},
},
};
};
</
script
>
</
script
>
...
@@ -56,7 +61,38 @@ export default {
...
@@ -56,7 +61,38 @@ export default {
</a>
</a>
</span>
</span>
</header>
</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>
</template>
</div>
</div>
</template>
</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