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
b6e18a2f
Commit
b6e18a2f
authored
Jul 10, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Open pipeline list panel when clicking CI icon in Web IDE
Closes #47843
parent
acdac151
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
6 deletions
+49
-6
app/assets/javascripts/ide/components/ide_status_bar.vue
app/assets/javascripts/ide/components/ide_status_bar.vue
+15
-6
changelogs/unreleased/ide-pipeline-icon-open.yml
changelogs/unreleased/ide-pipeline-icon-open.yml
+5
-0
spec/javascripts/ide/components/ide_status_bar_spec.js
spec/javascripts/ide/components/ide_status_bar_spec.js
+26
-0
spec/javascripts/ide/mock_data.js
spec/javascripts/ide/mock_data.js
+3
-0
No files found.
app/assets/javascripts/ide/components/ide_status_bar.vue
View file @
b6e18a2f
...
...
@@ -5,6 +5,7 @@ import tooltip from '~/vue_shared/directives/tooltip';
import
timeAgoMixin
from
'
~/vue_shared/mixins/timeago
'
;
import
CiIcon
from
'
../../vue_shared/components/ci_icon.vue
'
;
import
userAvatarImage
from
'
../../vue_shared/components/user_avatar/user_avatar_image.vue
'
;
import
{
rightSidebarViews
}
from
'
../constants
'
;
export
default
{
components
:
{
...
...
@@ -49,6 +50,7 @@ export default {
this
.
stopPipelinePolling
();
},
methods
:
{
...
mapActions
([
'
setRightPane
'
]),
...
mapActions
(
'
pipelines
'
,
[
'
fetchLatestPipeline
'
,
'
stopPipelinePolling
'
]),
startTimer
()
{
this
.
intervalId
=
setInterval
(()
=>
{
...
...
@@ -69,24 +71,31 @@ export default {
return
`
${
this
.
currentProject
.
web_url
}
/commit/
${
shortSha
}
`
;
},
},
rightSidebarViews
,
};
</
script
>
<
template
>
<footer
class=
"ide-status-bar"
>
<div
v-if=
"lastCommit
&& lastCommitFormatedAge
"
v-if=
"lastCommit"
class=
"ide-status-branch"
>
<span
v-if=
"latestPipeline && latestPipeline.details"
class=
"ide-status-pipeline"
>
<ci-icon
v-tooltip
:status=
"latestPipeline.details.status"
:title=
"latestPipeline.details.status.text"
/>
<button
type=
"button"
class=
"p-0 border-0 h-50"
@
click=
"setRightPane($options.rightSidebarViews.pipelines)"
>
<ci-icon
v-tooltip
:status=
"latestPipeline.details.status"
:title=
"latestPipeline.details.status.text"
/>
</button>
Pipeline
<a
:href=
"latestPipeline.details.status.details_path"
...
...
changelogs/unreleased/ide-pipeline-icon-open.yml
0 → 100644
View file @
b6e18a2f
---
title
:
Clicking CI icon in Web IDE now opens up pipelines panel
merge_request
:
author
:
type
:
added
spec/javascripts/ide/components/ide_status_bar_spec.js
View file @
b6e18a2f
...
...
@@ -13,6 +13,7 @@ describe('ideStatusBar', () => {
store
.
state
.
currentProjectId
=
'
abcproject
'
;
store
.
state
.
projects
.
abcproject
=
projectData
;
store
.
state
.
currentBranchId
=
'
master
'
;
vm
=
createComponentWithStore
(
Component
,
store
).
$mount
();
});
...
...
@@ -60,4 +61,29 @@ describe('ideStatusBar', () => {
expect
(
vm
.
getCommitPath
(
'
abc123de
'
)).
toBe
(
'
/commit/abc123de
'
);
});
});
describe
(
'
pipeline status
'
,
()
=>
{
it
(
'
opens right sidebar on clicking icon
'
,
done
=>
{
spyOn
(
vm
,
'
setRightPane
'
);
Vue
.
set
(
vm
.
$store
.
state
.
pipelines
,
'
latestPipeline
'
,
{
details
:
{
status
:
{
text
:
'
success
'
,
details_path
:
'
test
'
,
icon
:
'
success
'
,
},
},
});
vm
.
$nextTick
()
.
then
(()
=>
{
vm
.
$el
.
querySelector
(
'
.ide-status-pipeline button
'
).
click
();
expect
(
vm
.
setRightPane
).
toHaveBeenCalledWith
(
'
pipelines-list
'
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
});
spec/javascripts/ide/mock_data.js
View file @
b6e18a2f
...
...
@@ -9,6 +9,9 @@ export const projectData = {
master
:
{
treeId
:
'
abcproject/master
'
,
can_push
:
true
,
commit
:
{
id
:
'
123
'
,
},
},
},
mergeRequests
:
{},
...
...
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