BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e6ac6734
Commit
e6ac6734
authored
Dec 04, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use relative _path helper URLs in the GitLab UI
Fix
https://gitlab.com/gitlab-org/gitlab-ce/issues/40825
parent
9dffd0ab
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
31 additions
and
14 deletions
+31
-14
job.js
app/assets/javascripts/job.js
+4
-4
index.js
app/assets/javascripts/notes/index.js
+9
-1
builds_helper.rb
app/helpers/builds_helper.rb
+1
-2
_search.html.haml
app/views/layouts/_search.html.haml
+8
-1
_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-1
show.html.haml
app/views/projects/commits/show.html.haml
+1
-1
_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+1
-1
new.html.haml
app/views/projects/new.html.haml
+1
-1
_outdated_browser.html.haml
app/views/shared/_outdated_browser.html.haml
+1
-1
entities.rb
lib/api/entities.rb
+3
-0
job_spec.js
spec/javascripts/job_spec.js
+1
-1
No files found.
app/assets/javascripts/job.js
View file @
e6ac6734
...
...
@@ -9,7 +9,7 @@ export default class Job {
this
.
state
=
null
;
this
.
options
=
options
||
$
(
'.js-build-options'
).
data
();
this
.
page
Url
=
this
.
options
.
pageUrl
;
this
.
page
Path
=
this
.
options
.
pagePath
;
this
.
buildStatus
=
this
.
options
.
buildStatus
;
this
.
state
=
this
.
options
.
logState
;
this
.
buildStage
=
this
.
options
.
buildStage
;
...
...
@@ -167,11 +167,11 @@ export default class Job {
getBuildTrace
()
{
return
$
.
ajax
({
url
:
`
${
this
.
page
Url
}
/trace.json`
,
url
:
`
${
this
.
page
Path
}
/trace.json`
,
data
:
{
state
:
this
.
state
},
})
.
done
((
log
)
=>
{
setCiStatusFavicon
(
`
${
this
.
page
Url
}
/status.json`
);
setCiStatusFavicon
(
`
${
this
.
page
Path
}
/status.json`
);
if
(
log
.
state
)
{
this
.
state
=
log
.
state
;
...
...
@@ -209,7 +209,7 @@ export default class Job {
}
if
(
log
.
status
!==
this
.
buildStatus
)
{
gl
.
utils
.
visitUrl
(
this
.
page
Url
);
gl
.
utils
.
visitUrl
(
this
.
page
Path
);
}
})
.
fail
(()
=>
{
...
...
app/assets/javascripts/notes/index.js
View file @
e6ac6734
...
...
@@ -8,10 +8,18 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
},
data
()
{
const
notesDataset
=
document
.
getElementById
(
'js-vue-notes'
).
dataset
;
const
parsedUserData
=
JSON
.
parse
(
notesDataset
.
currentUserData
);
const
currentUserData
=
parsedUserData
?
{
id
:
parsedUserData
.
id
,
name
:
parsedUserData
.
name
,
username
:
parsedUserData
.
username
,
avatar_url
:
parsedUserData
.
avatar_path
||
parsedUserData
.
avatar_url
,
path
:
parsedUserData
.
path
,
}
:
{};
return
{
noteableData
:
JSON
.
parse
(
notesDataset
.
noteableData
),
currentUserData
:
JSON
.
parse
(
notesDataset
.
currentUserData
)
,
currentUserData
,
notesData
:
{
lastFetchedAt
:
notesDataset
.
lastFetchedAt
,
discussionsPath
:
notesDataset
.
discussionsPath
,
...
...
app/helpers/builds_helper.rb
View file @
e6ac6734
...
...
@@ -20,8 +20,7 @@ module BuildsHelper
def
javascript_build_options
{
page_url:
project_job_url
(
@project
,
@build
),
build_url:
project_job_url
(
@project
,
@build
,
:json
),
page_path:
project_job_path
(
@project
,
@build
),
build_status:
@build
.
status
,
build_stage:
@build
.
stage
,
log_state:
''
...
...
app/views/layouts/_search.html.haml
View file @
e6ac6734
...
...
@@ -13,7 +13,14 @@
.location-badge
=
label
.search-input-wrap
.dropdown
{
data:
{
url:
search_autocomplete_path
}
}
=
search_field_tag
'search'
,
nil
,
placeholder:
'Search'
,
class:
'search-input dropdown-menu-toggle no-outline js-search-dashboard-options'
,
spellcheck:
false
,
tabindex:
'1'
,
autocomplete:
'off'
,
data:
{
issues_path:
issues_dashboard_url
,
mr_path:
merge_requests_dashboard_url
},
aria:
{
label:
'Search'
}
=
search_field_tag
'search'
,
nil
,
placeholder:
'Search'
,
class:
'search-input dropdown-menu-toggle no-outline js-search-dashboard-options'
,
spellcheck:
false
,
tabindex:
'1'
,
autocomplete:
'off'
,
data:
{
issues_path:
issues_dashboard_path
,
mr_path:
merge_requests_dashboard_path
},
aria:
{
label:
'Search'
}
%button
.hidden.js-dropdown-search-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
.dropdown-menu.dropdown-select
=
dropdown_content
do
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
e6ac6734
...
...
@@ -14,7 +14,7 @@
%td
.branch-commit
-
if
can?
(
current_user
,
:read_build
,
job
)
=
link_to
project_job_
url
(
job
.
project
,
job
)
do
=
link_to
project_job_
path
(
job
.
project
,
job
)
do
%span
.build-link
##{job.id}
-
else
%span
.build-link
##{job.id}
...
...
app/views/projects/commits/show.html.haml
View file @
e6ac6734
...
...
@@ -3,7 +3,7 @@
-
page_title
_
(
"Commits"
),
@ref
=
content_for
:meta_tags
do
=
auto_discovery_link_tag
(
:atom
,
project_commits_
url
(
@project
,
@ref
,
rss_url_options
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
=
auto_discovery_link_tag
(
:atom
,
project_commits_
path
(
@project
,
@ref
,
rss_url_options
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
.js-project-commits-show
{
'data-commits-limit'
=>
@limit
}
%div
{
class:
container_class
}
...
...
app/views/projects/issues/_discussion.html.haml
View file @
e6ac6734
...
...
@@ -14,4 +14,4 @@
notes_path:
notes_url
,
last_fetched_at:
Time
.
now
.
to_i
,
noteable_data:
serialize_issuable
(
@issue
),
current_user_data:
UserSerializer
.
new
.
represent
(
current_user
).
to_json
}
}
current_user_data:
UserSerializer
.
new
.
represent
(
current_user
,
only_path:
true
).
to_json
}
}
app/views/projects/new.html.haml
View file @
e6ac6734
...
...
@@ -86,7 +86,7 @@
=
icon
(
'bug'
,
text:
'Fogbugz'
)
%div
-
if
gitea_import_enabled?
=
link_to
new_import_gitea_
url
,
class:
'btn import_gitea'
do
=
link_to
new_import_gitea_
path
,
class:
'btn import_gitea'
do
=
custom_icon
(
'go_logo'
)
Gitea
%div
...
...
app/views/shared/_outdated_browser.html.haml
View file @
e6ac6734
...
...
@@ -4,5 +4,5 @@
GitLab may not work properly because you are using an outdated web browser.
%br
Please install a
=
link_to
'supported web browser'
,
help_page_
url
(
'install/requirements'
,
anchor:
'supported-web-browsers'
)
=
link_to
'supported web browser'
,
help_page_
path
(
'install/requirements'
,
anchor:
'supported-web-browsers'
)
for a better experience.
lib/api/entities.rb
View file @
e6ac6734
...
...
@@ -16,10 +16,13 @@ module API
class
UserBasic
<
UserSafe
expose
:state
expose
:avatar_url
do
|
user
,
options
|
user
.
avatar_url
(
only_path:
false
)
end
expose
:avatar_path
,
if:
->
(
user
,
options
)
{
options
.
fetch
(
:only_path
,
false
)
&&
user
.
avatar_path
}
expose
:web_url
do
|
user
,
options
|
Gitlab
::
Routing
.
url_helpers
.
user_url
(
user
)
end
...
...
spec/javascripts/job_spec.js
View file @
e6ac6734
...
...
@@ -28,7 +28,7 @@ describe('Job', () => {
});
it
(
'copies build options'
,
function
()
{
expect
(
this
.
job
.
page
Url
).
toBe
(
JOB_URL
);
expect
(
this
.
job
.
page
Path
).
toBe
(
JOB_URL
);
expect
(
this
.
job
.
buildStatus
).
toBe
(
'success'
);
expect
(
this
.
job
.
buildStage
).
toBe
(
'test'
);
expect
(
this
.
job
.
state
).
toBe
(
''
);
...
...
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