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
99ba5d0d
Commit
99ba5d0d
authored
7 years ago
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove view=full_data from NotesController
parent
3ef93db5
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
20 deletions
+5
-20
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+0
-1
app/assets/javascripts/notes/components/issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+0
-1
app/assets/javascripts/notes/components/issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+0
-1
app/controllers/concerns/notes_actions.rb
app/controllers/concerns/notes_actions.rb
+2
-6
app/views/projects/issues/_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+1
-1
spec/helpers/notes_helper_spec.rb
spec/helpers/notes_helper_spec.rb
+0
-8
spec/javascripts/notes/mock_data.js
spec/javascripts/notes/mock_data.js
+2
-2
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
99ba5d0d
...
...
@@ -110,7 +110,6 @@
endpoint
:
this
.
endpoint
,
flashContainer
:
this
.
$el
,
data
:
{
view
:
'
full_data
'
,
note
:
{
noteable_type
:
constants
.
NOTEABLE_TYPE
,
noteable_id
:
this
.
getIssueData
.
id
,
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
99ba5d0d
...
...
@@ -100,7 +100,6 @@
target_type
:
'
issue
'
,
target_id
:
this
.
discussion
.
noteable_id
,
note
:
{
note
:
noteText
},
view
:
'
full_data
'
,
},
};
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/notes/components/issue_note.vue
View file @
99ba5d0d
...
...
@@ -77,7 +77,6 @@
const
data
=
{
endpoint
:
this
.
note
.
path
,
note
:
{
view
:
'
full_data
'
,
target_type
:
'
issue
'
,
target_id
:
this
.
note
.
noteable_id
,
note
:
{
note
:
noteText
},
...
...
This diff is collapsed.
Click to expand it.
app/controllers/concerns/notes_actions.rb
View file @
99ba5d0d
...
...
@@ -18,8 +18,7 @@ module NotesActions
@notes
=
prepare_notes_for_rendering
(
@notes
)
notes_json
[
:notes
]
=
case
params
[
:view
]
when
'full_data'
if
noteable
.
is_a?
(
Issue
)
note_serializer
.
represent
(
@notes
)
else
@notes
.
map
{
|
note
|
note_json
(
note
)
}
...
...
@@ -88,8 +87,7 @@ module NotesActions
if
note
.
persisted?
attrs
[
:valid
]
=
true
case
params
[
:view
]
when
'full_data'
if
noteable
.
is_a?
(
Issue
)
attrs
.
merge!
(
note_serializer
.
represent
(
note
))
else
attrs
.
merge!
(
...
...
@@ -179,8 +177,6 @@ module NotesActions
end
def
set_polling_interval_header
return
unless
noteable
.
is_a?
(
Issue
)
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
6_000
)
end
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/issues/_discussion.html.haml
View file @
99ba5d0d
...
...
@@ -10,7 +10,7 @@
new_session_path:
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
markdown_docs:
help_page_path
(
'user/markdown'
),
quick_actions_docs:
help_page_path
(
'user/project/quick_actions'
),
notes_path:
notes_url
(
view:
'full_data'
)
,
notes_path:
notes_url
,
last_fetched_at:
Time
.
now
.
to_i
,
issue_data:
serialize_issuable
(
@issue
),
current_user_data:
UserSerializer
.
new
.
represent
(
current_user
).
to_json
}
}
...
...
This diff is collapsed.
Click to expand it.
spec/helpers/notes_helper_spec.rb
View file @
99ba5d0d
...
...
@@ -205,14 +205,6 @@ describe NotesHelper do
expect
(
helper
.
notes_url
).
to
eq
(
"/nm/test/noteable/issue/
#{
@noteable
.
id
}
/notes"
)
end
it
'adds extra params'
do
namespace
=
create
(
:namespace
,
path:
'nm'
)
@project
=
create
(
:project
,
path:
'test'
,
namespace:
namespace
)
@noteable
=
create
(
:issue
,
project:
@project
)
expect
(
helper
.
notes_url
(
view:
'full_data'
)).
to
eq
(
"/nm/test/noteable/issue/
#{
@noteable
.
id
}
/notes?view=full_data"
)
end
end
describe
'#note_url'
do
...
...
This diff is collapsed.
Click to expand it.
spec/javascripts/notes/mock_data.js
View file @
99ba5d0d
...
...
@@ -4,7 +4,7 @@ export const notesDataMock = {
lastFetchedAt
:
'
1501862675
'
,
markdownDocs
:
'
/help/user/markdown
'
,
newSessionPath
:
'
/users/sign_in?redirect_to_referer=yes
'
,
notesPath
:
'
/gitlab-org/gitlab-ce/noteable/issue/98/notes
?view=full_data
'
,
notesPath
:
'
/gitlab-org/gitlab-ce/noteable/issue/98/notes
'
,
quickActionsDocs
:
'
/help/user/project/quick_actions
'
,
registerPath
:
'
/users/sign_in?redirect_to_referer=yes#register-pane
'
,
};
...
...
@@ -446,4 +446,4 @@ export const discussionNoteServerResponse = [{
"
path
"
:
"
/gitlab-org/gitlab-ce/notes/1471
"
}],
"
individual_note
"
:
false
}];
\ No newline at end of file
}];
This diff is collapsed.
Click to expand it.
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