Skip to content

Commit

Permalink
Don't shorten request source path text in webui2
Browse files Browse the repository at this point in the history
Looking at the shortend/trimmed source path of a request
makes it sometimes difficult to identify the source, especially
if its through an interconnect (since its not a link to the source
in this case). Bootstrap handles long text quite well in this case.
So trimming the text after 40 characters is not necessary.
  • Loading branch information
krauselukas committed Aug 13, 2019
1 parent b4bd0e2 commit e138ee5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/app/helpers/webui/request_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def hidden_review_payload(review)

# rubocop:disable Style/FormatStringToken, Style/FormatString
def request_action_header(action, creator)
source_project_hash = { project: action[:sprj], package: action[:spkg] }
source_project_hash = { project: action[:sprj], package: action[:spkg], trim_to: nil }

case action[:type]
when :submit
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui2/shared/bs_requests/index.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"<%= escape_javascript(fuzzy_time(row.created_at, false)) %>",
<% cache "request-table-row-#{row.id}-#{row.updated_at.to_i}" do %>
"<%= escape_javascript(project_or_package_link(project: row.source_project, package: row.source_package, creator: row.creator, trim_to: 40, short: true)) %>",
"<%= escape_javascript(project_or_package_link(project: row.source_project, package: row.source_package, creator: row.creator, trim_to: nil, short: true)) %>",
"<%= escape_javascript(target_project_link(row)) %>",
"<%= escape_javascript(user_with_realname_and_icon(row.creator, short: true)) %>",
"<%= escape_javascript(new_or_update_request(row)) %>",
Expand Down

0 comments on commit e138ee5

Please sign in to comment.