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
Léo-Paul Géneau
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
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
31 additions
and
14 deletions
+31
-14
app/assets/javascripts/job.js
app/assets/javascripts/job.js
+4
-4
app/assets/javascripts/notes/index.js
app/assets/javascripts/notes/index.js
+9
-1
app/helpers/builds_helper.rb
app/helpers/builds_helper.rb
+1
-2
app/views/layouts/_search.html.haml
app/views/layouts/_search.html.haml
+8
-1
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-1
app/views/projects/commits/show.html.haml
app/views/projects/commits/show.html.haml
+1
-1
app/views/projects/issues/_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+1
-1
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-1
app/views/shared/_outdated_browser.html.haml
app/views/shared/_outdated_browser.html.haml
+1
-1
lib/api/entities.rb
lib/api/entities.rb
+3
-0
spec/javascripts/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 {
...
@@ -9,7 +9,7 @@ export default class Job {
this
.
state
=
null
;
this
.
state
=
null
;
this
.
options
=
options
||
$
(
'
.js-build-options
'
).
data
();
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
.
buildStatus
=
this
.
options
.
buildStatus
;
this
.
state
=
this
.
options
.
logState
;
this
.
state
=
this
.
options
.
logState
;
this
.
buildStage
=
this
.
options
.
buildStage
;
this
.
buildStage
=
this
.
options
.
buildStage
;
...
@@ -167,11 +167,11 @@ export default class Job {
...
@@ -167,11 +167,11 @@ export default class Job {
getBuildTrace
()
{
getBuildTrace
()
{
return
$
.
ajax
({
return
$
.
ajax
({
url
:
`
${
this
.
page
Url
}
/trace.json`
,
url
:
`
${
this
.
page
Path
}
/trace.json`
,
data
:
{
state
:
this
.
state
},
data
:
{
state
:
this
.
state
},
})
})
.
done
((
log
)
=>
{
.
done
((
log
)
=>
{
setCiStatusFavicon
(
`
${
this
.
page
Url
}
/status.json`
);
setCiStatusFavicon
(
`
${
this
.
page
Path
}
/status.json`
);
if
(
log
.
state
)
{
if
(
log
.
state
)
{
this
.
state
=
log
.
state
;
this
.
state
=
log
.
state
;
...
@@ -209,7 +209,7 @@ export default class Job {
...
@@ -209,7 +209,7 @@ export default class Job {
}
}
if
(
log
.
status
!==
this
.
buildStatus
)
{
if
(
log
.
status
!==
this
.
buildStatus
)
{
gl
.
utils
.
visitUrl
(
this
.
page
Url
);
gl
.
utils
.
visitUrl
(
this
.
page
Path
);
}
}
})
})
.
fail
(()
=>
{
.
fail
(()
=>
{
...
...
app/assets/javascripts/notes/index.js
View file @
e6ac6734
...
@@ -8,10 +8,18 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
...
@@ -8,10 +8,18 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
},
},
data
()
{
data
()
{
const
notesDataset
=
document
.
getElementById
(
'
js-vue-notes
'
).
dataset
;
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
{
return
{
noteableData
:
JSON
.
parse
(
notesDataset
.
noteableData
),
noteableData
:
JSON
.
parse
(
notesDataset
.
noteableData
),
currentUserData
:
JSON
.
parse
(
notesDataset
.
currentUserData
)
,
currentUserData
,
notesData
:
{
notesData
:
{
lastFetchedAt
:
notesDataset
.
lastFetchedAt
,
lastFetchedAt
:
notesDataset
.
lastFetchedAt
,
discussionsPath
:
notesDataset
.
discussionsPath
,
discussionsPath
:
notesDataset
.
discussionsPath
,
...
...
app/helpers/builds_helper.rb
View file @
e6ac6734
...
@@ -20,8 +20,7 @@ module BuildsHelper
...
@@ -20,8 +20,7 @@ module BuildsHelper
def
javascript_build_options
def
javascript_build_options
{
{
page_url:
project_job_url
(
@project
,
@build
),
page_path:
project_job_path
(
@project
,
@build
),
build_url:
project_job_url
(
@project
,
@build
,
:json
),
build_status:
@build
.
status
,
build_status:
@build
.
status
,
build_stage:
@build
.
stage
,
build_stage:
@build
.
stage
,
log_state:
''
log_state:
''
...
...
app/views/layouts/_search.html.haml
View file @
e6ac6734
...
@@ -13,7 +13,14 @@
...
@@ -13,7 +13,14 @@
.location-badge
=
label
.location-badge
=
label
.search-input-wrap
.search-input-wrap
.dropdown
{
data:
{
url:
search_autocomplete_path
}
}
.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'
}
}
%button
.hidden.js-dropdown-search-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
.dropdown-menu.dropdown-select
.dropdown-menu.dropdown-select
=
dropdown_content
do
=
dropdown_content
do
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
e6ac6734
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
%td
.branch-commit
%td
.branch-commit
-
if
can?
(
current_user
,
:read_build
,
job
)
-
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}
%span
.build-link
##{job.id}
-
else
-
else
%span
.build-link
##{job.id}
%span
.build-link
##{job.id}
...
...
app/views/projects/commits/show.html.haml
View file @
e6ac6734
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
-
page_title
_
(
"Commits"
),
@ref
-
page_title
_
(
"Commits"
),
@ref
=
content_for
:meta_tags
do
=
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
}
.js-project-commits-show
{
'data-commits-limit'
=>
@limit
}
%div
{
class:
container_class
}
%div
{
class:
container_class
}
...
...
app/views/projects/issues/_discussion.html.haml
View file @
e6ac6734
...
@@ -14,4 +14,4 @@
...
@@ -14,4 +14,4 @@
notes_path:
notes_url
,
notes_path:
notes_url
,
last_fetched_at:
Time
.
now
.
to_i
,
last_fetched_at:
Time
.
now
.
to_i
,
noteable_data:
serialize_issuable
(
@issue
),
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 @@
...
@@ -86,7 +86,7 @@
=
icon
(
'bug'
,
text:
'Fogbugz'
)
=
icon
(
'bug'
,
text:
'Fogbugz'
)
%div
%div
-
if
gitea_import_enabled?
-
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'
)
=
custom_icon
(
'go_logo'
)
Gitea
Gitea
%div
%div
...
...
app/views/shared/_outdated_browser.html.haml
View file @
e6ac6734
...
@@ -4,5 +4,5 @@
...
@@ -4,5 +4,5 @@
GitLab may not work properly because you are using an outdated web browser.
GitLab may not work properly because you are using an outdated web browser.
%br
%br
Please install a
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.
for a better experience.
lib/api/entities.rb
View file @
e6ac6734
...
@@ -16,10 +16,13 @@ module API
...
@@ -16,10 +16,13 @@ module API
class
UserBasic
<
UserSafe
class
UserBasic
<
UserSafe
expose
:state
expose
:state
expose
:avatar_url
do
|
user
,
options
|
expose
:avatar_url
do
|
user
,
options
|
user
.
avatar_url
(
only_path:
false
)
user
.
avatar_url
(
only_path:
false
)
end
end
expose
:avatar_path
,
if:
->
(
user
,
options
)
{
options
.
fetch
(
:only_path
,
false
)
&&
user
.
avatar_path
}
expose
:web_url
do
|
user
,
options
|
expose
:web_url
do
|
user
,
options
|
Gitlab
::
Routing
.
url_helpers
.
user_url
(
user
)
Gitlab
::
Routing
.
url_helpers
.
user_url
(
user
)
end
end
...
...
spec/javascripts/job_spec.js
View file @
e6ac6734
...
@@ -28,7 +28,7 @@ describe('Job', () => {
...
@@ -28,7 +28,7 @@ describe('Job', () => {
});
});
it
(
'
copies build options
'
,
function
()
{
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
.
buildStatus
).
toBe
(
'
success
'
);
expect
(
this
.
job
.
buildStage
).
toBe
(
'
test
'
);
expect
(
this
.
job
.
buildStage
).
toBe
(
'
test
'
);
expect
(
this
.
job
.
state
).
toBe
(
''
);
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