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
52c79bc8
Commit
52c79bc8
authored
Mar 12, 2018
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add realtime pipeline status component for files
parent
a3b85d10
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
app/assets/javascripts/pages/projects/blob/show/index.js
app/assets/javascripts/pages/projects/blob/show/index.js
+22
-0
changelogs/unreleased/jivl-realtime-update-adding-file.yml
changelogs/unreleased/jivl-realtime-update-adding-file.yml
+5
-0
spec/features/projects/blobs/blob_show_spec.rb
spec/features/projects/blobs/blob_show_spec.rb
+16
-0
No files found.
app/assets/javascripts/pages/projects/blob/show/index.js
View file @
52c79bc8
import
Vue
from
'
vue
'
;
import
commitPipelineStatus
from
'
~/projects/tree/components/commit_pipeline_status_component.vue
'
;
import
BlobViewer
from
'
~/blob/viewer/index
'
;
import
initBlob
from
'
~/pages/projects/init_blob
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
BlobViewer
();
// eslint-disable-line no-new
initBlob
();
const
CommitPipelineStatusEl
=
document
.
querySelector
(
'
.js-commit-pipeline-status
'
);
const
statusLink
=
document
.
querySelector
(
'
.commit-actions .ci-status-link
'
);
if
(
statusLink
)
{
statusLink
.
remove
();
// eslint-disable-next-line no-new
new
Vue
({
el
:
CommitPipelineStatusEl
,
components
:
{
commitPipelineStatus
,
},
render
(
createElement
)
{
return
createElement
(
'
commit-pipeline-status
'
,
{
props
:
{
endpoint
:
CommitPipelineStatusEl
.
dataset
.
endpoint
,
},
});
},
});
}
});
changelogs/unreleased/jivl-realtime-update-adding-file.yml
0 → 100644
View file @
52c79bc8
---
title
:
Add realtime pipeline status for adding/viewing files
merge_request
:
17705
author
:
type
:
other
spec/features/projects/blobs/blob_show_spec.rb
View file @
52c79bc8
...
...
@@ -509,4 +509,20 @@ feature 'File blob', :js do
end
end
end
context
'realtime pipelines'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'feature'
,
sha:
project
.
commit
.
id
,
user:
user
,
status: :success
)
}
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
visit_blob
(
'files/ruby/popen.rb'
,
ref:
'feature'
)
end
it
'should show the realtime pipeline status'
do
wait_for_requests
expect
(
find
(
'.js-commit-pipeline-status'
)).
not_to
be
nil
end
end
end
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