[JENKINS-20772] Only show error message in dialog

This change removes the superfluous UI elements around the error
message if possible. Otherwise, fall back to existing behavior
of adding entire page to iframe.

Improves upon 0e8195c.