Bug 1121763

Summary: Remove end of line code in system host names
Product: [Retired] Beaker Reporter: andrew <alemay>
Component: web UIAssignee: matt jia <mjia>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.17CC: aigao, alemay, asaha, dcallagh, mjia, rmancy, xma
Target Milestone: 0.18Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-04 05:41:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description andrew 2014-07-21 19:41:34 UTC
Description of problem: On any system page the host names now contain end of lines code. Which when copying make copy and paste difficult. Before Beaker 0.17.0  this was not the case.


Version-Release number of selected component (if applicable):


How reproducible: 100%


Steps to Reproduce:
1. Copy a name from a system page
2. Paste it in a terminal or any editor.
3.

Actual results:
~]$ echo 

~]$ deleted-01
-bash: deleted-01: command not found

in vim with :set list on


  1 $
  2 deleted-01$
  3 $


Expected results:


Additional info:

Comment 1 Nick Coghlan 2014-07-22 05:31:18 UTC
This sounds like a regression rather than an RFE to me - marked accordingly.

Comment 2 Nick Coghlan 2014-07-22 05:35:00 UTC
That said, the page source still shows "<h1>FQDN</h1>" for me.

I also don't see the behaviour of including a lineending when copying the text in Firefox 30 on Fedora 20.

Comment 3 Dan Callaghan 2014-07-24 02:25:45 UTC
Andrew, can you tell us exactly what piece of text you are copying from the system page, and how?

Is it possible this is a change in behaviour of the browser? There were no changes in the system page template from Beaker 0.16 -> 0.17 (aside from the overall theme stuff).

I do notice that if I triple-click on the system page heading, to select the FQDN, it copies it with a leading and trailing newline. I'm not sure why though (there are no newlines in the <h1/> element as Nick mentioned), and I'm not sure if that is a new behaviour or not.

Comment 4 Nick Coghlan 2014-07-24 05:21:07 UTC
I was selecting with click-and-drag and copying with Ctrl-C and didn't see any problems with spurious newlines.

Comment 8 Nick Coghlan 2014-07-29 06:33:53 UTC
Ah, yes, if I triple-click, then I get the spurious newlines. This looks relevant: https://bugzilla.mozilla.org/show_bug.cgi?id=819266

According to that, we're getting the newlines because triple-click is selecting the whole div, not just the header:

  <div class="page-header">
    <h1>deleted-01</h1>
  </div>

Changing the template to remove the newlines from the div would likely eliminate the behaviour:

  <div class="page-header"><h1>deleted-01</h1></div>

Kind of annoying that FF isn't automatically stripping the surrounding whitespace from the selection, though.

Comment 9 Nick Coghlan 2014-07-29 06:36:37 UTC
I suggest just tweaking the template as part of the new system page changes:

https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/templates/system.kid?h=new-system-page#n47

Comment 10 matt jia 2014-08-18 00:53:50 UTC
On Gerrit:

http://gerrit.beaker-project.org/#/c/3253/

Cheers, Matt Jia

Comment 14 andrew 2014-08-19 13:17:07 UTC
Thanks I just tested this on devel and it works great

Comment 16 Dan Callaghan 2014-09-04 05:41:14 UTC
Beaker 0.18.0 has been released.