Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1516032 - Rest api model doc: wrong indentation of code snippets
Summary: Rest api model doc: wrong indentation of code snippets
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: future
Hardware: Unspecified
OS: Unspecified
low vote
Target Milestone: ---
: ---
Assignee: Juan Hernández
QA Contact: Pavel Stehlik
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-21 20:54 UTC by jniederm
Modified: 2017-11-22 13:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-11-22 13:40:54 UTC
oVirt Team: Infra

Attachments (Terms of Use)
screenshot.png (deleted)
2017-11-21 20:54 UTC, jniederm
no flags Details
firefox-57-screenshot.png (deleted)
2017-11-22 13:11 UTC, jniederm
no flags Details
Screenshort of working Firefox 57 (deleted)
2017-11-22 13:36 UTC, Juan Hernández
no flags Details

Description jniederm 2017-11-21 20:54:47 UTC
Created attachment 1356985 [details]

Description of problem:
First line of all code snippets seems to be shifted to the right in html rendering.

Version-Release number of selected component (if applicable):
currnet master, commit 8547131

How reproducible:

Steps to Reproduce:
1. View any code snippet, e.g.

Actual results:

Expected results:

Additional info:

Comment 1 Juan Hernández 2017-11-22 08:34:14 UTC
That happens only in Jenkins, because the Jenkins web server uses the "Content Security Mechanism" to specify the stylesheets can only be loaded from the same web server, using an HTTP header like this:
  X-Content-Security-Policy: "sandbox; default-src 'none'; img-src 'self'; style-src 'self';"
One of the effects of this header in most modern browsers is that stylesheets and scripts from sources other than the Jenkins server aren't loaded. In particular the stylesheets and scripts that implement the source code highlighting aren't loaded. As a result there are some glitches in the rendered document.

This isn't a problem for other servers, for example the one that you mention:

Check that and you will see that it displays correctly, at least it does in the browsers I tested (Firefox and Chrome).

The documentation should also be rendered correctly if you get it from a live oVirt server:

We could try to find a way to make this work, even in Jenkins, but I think it isn't worth.

As this only affects Jenkins, I am lowering the severity, and I think that if it works correctly in other places, specially in the live server, we should close this as WONTFIX. Can you check and close the bug?

Comment 2 jniederm 2017-11-22 13:11:16 UTC
Created attachment 1357491 [details]

I works for me in Chrome and doesn't work in current Firefox (57.0), see attached screenshot.
In Firefox the problem is in
* locally generated target/generated-html/model.html
It works ok in Firefox at
* engine-domain/ovirt-engine/apidoc/model.html

I'm definitely for closing if it were Jenkins only problem.

Comment 3 Juan Hernández 2017-11-22 13:36:13 UTC
Created attachment 1357510 [details]
Screenshort of working Firefox 57

This screen shot is what I see, using Firefox 57 also.

In your latest screen shot I see that it failed to download the "highlightjs" script. May it be that you have some extension that prevents loading it?

Comment 4 jniederm 2017-11-22 13:40:54 UTC
I'm sorry. The extension is called uMatrix. When disabled, highlighting works ok event at

* locally generated target/generated-html/model.html

Note You need to log in before you can comment on or make changes to this bug.