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
f59b9778
Commit
f59b9778
authored
May 25, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved the collapsing method into a store action
normalized the data into a nicer format
parent
aca0d610
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
30 deletions
+41
-30
app/assets/javascripts/ide/components/jobs/item.vue
app/assets/javascripts/ide/components/jobs/item.vue
+1
-1
app/assets/javascripts/ide/components/jobs/stage.vue
app/assets/javascripts/ide/components/jobs/stage.vue
+2
-2
app/assets/javascripts/ide/stores/modules/pipelines/actions.js
...ssets/javascripts/ide/stores/modules/pipelines/actions.js
+4
-1
app/assets/javascripts/ide/stores/modules/pipelines/mutation_types.js
...avascripts/ide/stores/modules/pipelines/mutation_types.js
+2
-0
app/assets/javascripts/ide/stores/modules/pipelines/mutations.js
...ets/javascripts/ide/stores/modules/pipelines/mutations.js
+29
-26
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+3
-0
No files found.
app/assets/javascripts/ide/components/jobs/item.vue
View file @
f59b9778
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
<span
class=
"prepend-left-8"
>
<span
class=
"prepend-left-8"
>
{{
job
.
name
}}
{{
job
.
name
}}
<a
<a
:href=
"job.
build_
path"
:href=
"job.path"
target=
"_blank"
target=
"_blank"
v-text=
"jobId"
v-text=
"jobId"
>
>
...
...
app/assets/javascripts/ide/components/jobs/stage.vue
View file @
f59b9778
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
this
.
showTooltip
=
stageTitle
.
scrollWidth
>
stageTitle
.
offsetWidth
;
this
.
showTooltip
=
stageTitle
.
scrollWidth
>
stageTitle
.
offsetWidth
;
},
},
methods
:
{
methods
:
{
...
mapActions
(
'
pipelines
'
,
[
'
fetchJobs
'
]),
...
mapActions
(
'
pipelines
'
,
[
'
fetchJobs
'
,
'
toggleStageCollapsed
'
]),
},
},
};
};
</
script
>
</
script
>
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
>
>
<div
<div
class=
"panel-heading"
class=
"panel-heading"
@
click=
"
() => stage.isCollapsed = !stage.isCollapsed
"
@
click=
"
toggleStageCollapsed(stage.id)
"
>
>
<ci-icon
<ci-icon
:status=
"stage.status"
:status=
"stage.status"
...
...
app/assets/javascripts/ide/stores/modules/pipelines/actions.js
View file @
f59b9778
...
@@ -65,9 +65,12 @@ export const fetchJobs = ({ dispatch }, stage) => {
...
@@ -65,9 +65,12 @@ export const fetchJobs = ({ dispatch }, stage) => {
dispatch
(
'
requestJobs
'
,
stage
.
id
);
dispatch
(
'
requestJobs
'
,
stage
.
id
);
axios
axios
.
get
(
stage
.
dropdown
_p
ath
)
.
get
(
stage
.
dropdown
P
ath
)
.
then
(({
data
})
=>
dispatch
(
'
receiveJobsSuccess
'
,
{
id
:
stage
.
id
,
data
}))
.
then
(({
data
})
=>
dispatch
(
'
receiveJobsSuccess
'
,
{
id
:
stage
.
id
,
data
}))
.
catch
(()
=>
dispatch
(
'
receiveJobsError
'
,
stage
.
id
));
.
catch
(()
=>
dispatch
(
'
receiveJobsError
'
,
stage
.
id
));
};
};
export
const
toggleStageCollapsed
=
({
commit
},
stageId
)
=>
commit
(
types
.
TOGGLE_STAGE_COLLAPSE
,
stageId
);
export
default
()
=>
{};
export
default
()
=>
{};
app/assets/javascripts/ide/stores/modules/pipelines/mutation_types.js
View file @
f59b9778
...
@@ -5,3 +5,5 @@ export const RECEIVE_LASTEST_PIPELINE_SUCCESS = 'RECEIVE_LASTEST_PIPELINE_SUCCES
...
@@ -5,3 +5,5 @@ export const RECEIVE_LASTEST_PIPELINE_SUCCESS = 'RECEIVE_LASTEST_PIPELINE_SUCCES
export
const
REQUEST_JOBS
=
'
REQUEST_JOBS
'
;
export
const
REQUEST_JOBS
=
'
REQUEST_JOBS
'
;
export
const
RECEIVE_JOBS_ERROR
=
'
RECEIVE_JOBS_ERROR
'
;
export
const
RECEIVE_JOBS_ERROR
=
'
RECEIVE_JOBS_ERROR
'
;
export
const
RECEIVE_JOBS_SUCCESS
=
'
RECEIVE_JOBS_SUCCESS
'
;
export
const
RECEIVE_JOBS_SUCCESS
=
'
RECEIVE_JOBS_SUCCESS
'
;
export
const
TOGGLE_STAGE_COLLAPSE
=
'
TOGGLE_STAGE_COLLAPSE
'
;
app/assets/javascripts/ide/stores/modules/pipelines/mutations.js
View file @
f59b9778
...
@@ -23,8 +23,10 @@ export default {
...
@@ -23,8 +23,10 @@ export default {
state
.
stages
=
pipeline
.
details
.
stages
.
map
((
stage
,
i
)
=>
{
state
.
stages
=
pipeline
.
details
.
stages
.
map
((
stage
,
i
)
=>
{
const
foundStage
=
state
.
stages
.
find
(
s
=>
s
.
id
===
i
);
const
foundStage
=
state
.
stages
.
find
(
s
=>
s
.
id
===
i
);
return
{
return
{
...
stage
,
id
:
i
,
id
:
i
,
dropdownPath
:
stage
.
dropdown_path
,
name
:
stage
.
name
,
status
:
stage
.
status
,
isCollapsed
:
foundStage
?
foundStage
.
isCollapsed
:
false
,
isCollapsed
:
foundStage
?
foundStage
.
isCollapsed
:
false
,
isLoading
:
foundStage
?
foundStage
.
isLoading
:
false
,
isLoading
:
foundStage
?
foundStage
.
isLoading
:
false
,
jobs
:
foundStage
?
foundStage
.
jobs
:
[],
jobs
:
foundStage
?
foundStage
.
jobs
:
[],
...
@@ -33,34 +35,35 @@ export default {
...
@@ -33,34 +35,35 @@ export default {
}
}
},
},
[
types
.
REQUEST_JOBS
](
state
,
id
)
{
[
types
.
REQUEST_JOBS
](
state
,
id
)
{
state
.
stages
=
state
.
stages
.
reduce
(
state
.
stages
=
state
.
stages
.
map
(
stage
=>
({
(
acc
,
stage
)
=>
acc
.
concat
({
...
stage
,
...
stage
,
isLoading
:
id
===
stage
.
id
?
true
:
stage
.
isLoading
,
isLoading
:
id
===
stage
.
id
?
true
:
stage
.
isLoading
,
}),
}));
[],
);
},
},
[
types
.
RECEIVE_JOBS_ERROR
](
state
,
id
)
{
[
types
.
RECEIVE_JOBS_ERROR
](
state
,
id
)
{
state
.
stages
=
state
.
stages
.
reduce
(
state
.
stages
=
state
.
stages
.
map
(
stage
=>
({
(
acc
,
stage
)
=>
acc
.
concat
({
...
stage
,
...
stage
,
isLoading
:
id
===
stage
.
id
?
false
:
stage
.
isLoading
,
isLoading
:
id
===
stage
.
id
?
true
:
stage
.
isLoading
,
}),
}));
[],
);
},
},
[
types
.
RECEIVE_JOBS_SUCCESS
](
state
,
{
id
,
data
})
{
[
types
.
RECEIVE_JOBS_SUCCESS
](
state
,
{
id
,
data
})
{
state
.
stages
=
state
.
stages
.
reduce
(
const
normalizeData
=
job
=>
({
(
acc
,
stage
)
=>
id
:
job
.
id
,
acc
.
concat
({
name
:
job
.
name
,
status
:
job
.
status
,
path
:
job
.
build_path
,
});
state
.
stages
=
state
.
stages
.
map
(
stage
=>
({
...
stage
,
...
stage
,
isLoading
:
id
===
stage
.
id
?
false
:
stage
.
isLoading
,
isLoading
:
id
===
stage
.
id
?
false
:
stage
.
isLoading
,
jobs
:
id
===
stage
.
id
?
data
.
latest_statuses
:
stage
.
jobs
,
jobs
:
id
===
stage
.
id
?
data
.
latest_statuses
.
map
(
normalizeData
)
:
stage
.
jobs
,
}),
}));
[],
},
);
[
types
.
TOGGLE_STAGE_COLLAPSE
](
state
,
id
)
{
state
.
stages
=
state
.
stages
.
map
(
stage
=>
({
...
stage
,
isCollapsed
:
stage
.
id
===
id
?
!
stage
.
isCollapsed
:
stage
.
isCollapsed
,
}));
},
},
};
};
app/assets/stylesheets/pages/repo.scss
View file @
f59b9778
...
@@ -911,6 +911,9 @@
...
@@ -911,6 +911,9 @@
}
}
&
.is-right
{
&
.is-right
{
padding-right
:
$gl-padding
;
padding-left
:
$gl-padding
+
1px
;
&
:
:
after
{
&
:
:
after
{
right
:
auto
;
right
:
auto
;
left
:
-1px
;
left
:
-1px
;
...
...
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