Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
ce03865c9770
Commit
14546757
authored
Mar 12, 2018
by
Jose Ivan Vargas
Browse files
Add realtime pipeline status component for files
parent
445717f28391
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/pages/projects/blob/show/index.js
View file @
ce03865c
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 @
ce03865c
---
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 @
ce03865c
...
...
@@ -509,4 +509,20 @@ def visit_blob(path, anchor: nil, ref: 'master')
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