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
449b0eba
Commit
449b0eba
authored
Jan 22, 2018
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored some code, add hidden class
parent
bfc2b8a3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
19 deletions
+23
-19
app/assets/javascripts/pages/projects/show/index.js
app/assets/javascripts/pages/projects/show/index.js
+0
-18
app/assets/javascripts/pages/projects/tree/show/index.js
app/assets/javascripts/pages/projects/tree/show/index.js
+5
-0
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+11
-0
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+7
-1
No files found.
app/assets/javascripts/pages/projects/show/index.js
View file @
449b0eba
import
Vue
from
'
vue
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
NotificationsForm
from
'
~/notifications_form
'
;
import
NotificationsForm
from
'
~/notifications_form
'
;
import
UserCallout
from
'
~/user_callout
'
;
import
UserCallout
from
'
~/user_callout
'
;
...
@@ -26,21 +25,4 @@ export default () => {
...
@@ -26,21 +25,4 @@ export default () => {
$
(
'
#tree-slider
'
).
waitForImages
(()
=>
{
$
(
'
#tree-slider
'
).
waitForImages
(()
=>
{
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
});
});
const
commitPipelineStatusEl
=
document
.
getElementById
(
'
commit-pipeline-status
'
);
// eslint-disable-next-line no-new
new
Vue
({
el
:
'
#commit-pipeline-status
'
,
components
:
{
commitPipelineStatus
,
},
render
(
createElement
)
{
return
createElement
(
'
commit-pipeline-status
'
,
{
props
:
{
endpoint
:
commitPipelineStatusEl
.
dataset
.
endpoint
,
realtime
:
false
,
},
});
},
});
};
};
app/assets/javascripts/pages/projects/tree/show/index.js
View file @
449b0eba
...
@@ -15,6 +15,11 @@ export default () => {
...
@@ -15,6 +15,11 @@ export default () => {
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
));
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
));
const
commitPipelineStatusEl
=
document
.
getElementById
(
'
commit-pipeline-status
'
);
const
commitPipelineStatusEl
=
document
.
getElementById
(
'
commit-pipeline-status
'
);
const
$statusLink
=
$
(
'
.ci-status-link
'
);
if
(
$statusLink
.
length
>
0
)
{
$statusLink
.
remove
();
}
commitPipelineStatusEl
.
classList
.
remove
(
'
hidden
'
);
// eslint-disable-next-line no-new
// eslint-disable-next-line no-new
new
Vue
({
new
Vue
({
el
:
'
#commit-pipeline-status
'
,
el
:
'
#commit-pipeline-status
'
,
...
...
app/helpers/ci_status_helper.rb
View file @
449b0eba
...
@@ -103,6 +103,17 @@ module CiStatusHelper
...
@@ -103,6 +103,17 @@ module CiStatusHelper
tooltip_placement:
tooltip_placement
)
tooltip_placement:
tooltip_placement
)
end
end
def
render_commit_status
(
commit
,
ref:
nil
,
tooltip_placement:
'auto left'
)
project
=
commit
.
project
path
=
pipelines_project_commit_path
(
project
,
commit
)
render_status_with_link
(
'commit'
,
commit
.
status
(
ref
),
path
,
tooltip_placement:
tooltip_placement
)
end
def
render_pipeline_status
(
pipeline
,
tooltip_placement:
'auto left'
)
def
render_pipeline_status
(
pipeline
,
tooltip_placement:
'auto left'
)
project
=
pipeline
.
project
project
=
pipeline
.
project
path
=
project_pipeline_path
(
project
,
pipeline
)
path
=
project_pipeline_path
(
project
,
pipeline
)
...
...
app/views/projects/commits/_commit.html.haml
View file @
449b0eba
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
%span
.commit-row-message.visible-xs-inline
%span
.commit-row-message.visible-xs-inline
·
·
=
commit
.
short_id
=
commit
.
short_id
-
if
commit
.
status
(
ref
)
.visible-xs-inline
=
render_commit_status
(
commit
,
ref:
ref
)
-
if
commit
.
description?
-
if
commit
.
description?
%button
.text-expander.hidden-xs.js-toggle-button
{
type:
"button"
}
...
%button
.text-expander.hidden-xs.js-toggle-button
{
type:
"button"
}
...
...
@@ -45,7 +48,10 @@
...
@@ -45,7 +48,10 @@
-
else
-
else
=
render
partial:
'projects/commit/ajax_signature'
,
locals:
{
commit:
commit
}
=
render
partial:
'projects/commit/ajax_signature'
,
locals:
{
commit:
commit
}
#commit-pipeline-status
{
data:
{
endpoint:
pipelines_project_commit_path
(
project
,
commit
.
id
)
}
}
-
if
commit
.
status
(
ref
)
=
render_commit_status
(
commit
,
ref:
ref
)
#commit-pipeline-status
.hidden
{
data:
{
endpoint:
pipelines_project_commit_path
(
project
,
commit
.
id
)
}
}
=
link_to
commit
.
short_id
,
link
,
class:
"commit-sha btn btn-transparent btn-link"
=
link_to
commit
.
short_id
,
link
,
class:
"commit-sha btn btn-transparent btn-link"
=
clipboard_button
(
text:
commit
.
id
,
title:
_
(
"Copy commit SHA to clipboard"
))
=
clipboard_button
(
text:
commit
.
id
,
title:
_
(
"Copy commit SHA to clipboard"
))
=
link_to_browse_code
(
project
,
commit
)
=
link_to_browse_code
(
project
,
commit
)
...
...
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