Revert "Enable ANSI rendering via react-ansi"

This reverts commit 896dac877a.

The following issues have been raised:

1) This performs very slowly on large log files.
2) We should confirm that the contrast is appropriate to make
   the text easy for those without perfect vision.
3) We should have consistency between the log and console views.
4) This eliminated horizontal scrolling.  Our previous decision on
   that was that we should maintain horizontal scrolling until we
   add a toggle to switch between that and wrapping.

Change-Id: Ie5a8f4b61e641751fcc9e1c1c5aa944c2c4a5436
This commit is contained in:
James E. Blair 2020-11-19 06:12:43 -08:00
parent 5688c782a0
commit 789f419595
4 changed files with 9 additions and 30 deletions

View File

@ -19,7 +19,6 @@
"patternfly-react": "^2.39.16",
"prop-types": "^15.6.2",
"react": "^16.13.1",
"react-ansi": "^1.8.1",
"react-dom": "^16.13.1",
"react-height": "^3.0.0",
"react-json-view": "^1.19.1",

View File

@ -14,7 +14,6 @@
import * as React from 'react'
import { Fragment } from 'react'
import ReactAnsi from 'react-ansi'
import PropTypes from 'prop-types'
import {
Card,
@ -107,26 +106,26 @@ class BuildOutput extends React.Component {
{task.stdout_lines.length > max_lines && (
<details className={`${'foldable'} ${'stdout'}`}><summary></summary>
<pre key="stdout" title="stdout">
<ReactAnsi log={task.stdout_lines.slice(0, -max_lines).join('\n')}/>
{task.stdout_lines.slice(0, -max_lines).join('\n')}
</pre>
</details>)}
<pre key="stdout" title="stdout">
<ReactAnsi log={task.stdout_lines.slice(-max_lines).join('\n')}/>
<pre key="stdout" title="stdout">
{task.stdout_lines.slice(-max_lines).join('\n')}
</pre>
</Fragment>
</Fragment>
)}
{task.stderr_lines && task.stderr_lines.length > 0 && (
<Fragment>
{task.stderr_lines.length > max_lines && (
<details className={`${'foldable'} ${'stderr'}`}><summary></summary>
<pre key="stderr" title="stderr">
<ReactAnsi log={task.stderr_lines.slice(0, -max_lines).join('\n')}/>
{task.stderr_lines.slice(0, -max_lines).join('\n')}
</pre>
</details>
)}
<pre key="stderr" title="stderr">
<ReactAnsi log={task.stderr_lines.slice(-max_lines).join('\n')}/>
</pre>
<pre key="stderr" title="stderr">
{task.stderr_lines.slice(-max_lines).join('\n')}
</pre>
</Fragment>
)}
</CardBody>

View File

@ -15,7 +15,6 @@
import * as moment from 'moment'
import 'moment-duration-format'
import * as React from 'react'
import ReactAnsi from 'react-ansi'
import PropTypes from 'prop-types'
import ReactJson from 'react-json-view'
import {
@ -92,7 +91,7 @@ class TaskOutput extends React.Component {
} else if (typeof(value) === 'string') {
ret = (
<pre>
<ReactAnsi log={value}/>
{value}
</pre>
)
} else if (typeof(value) === 'object') {

View File

@ -2445,11 +2445,6 @@ alphanum-sort@^1.0.0:
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
anser@^1.4.8:
version "1.4.9"
resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.9.tgz#1f85423a5dcf8da4631a341665ff675b96845760"
integrity sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA==
ansi-align@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"
@ -5348,11 +5343,6 @@ es6-weak-map@^2.0.2:
es6-iterator "^2.0.3"
es6-symbol "^3.1.1"
escape-carriage@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/escape-carriage/-/escape-carriage-1.3.0.tgz#71006b2d4da8cb6828686addafcb094239c742f3"
integrity sha512-ATWi5MD8QlAGQOeMgI8zTp671BG8aKvAC0M7yenlxU4CRLGO/sKthxVUyjiOFKjHdIo+6dZZUNFgHFeVEaKfGQ==
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@ -11804,14 +11794,6 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.8:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
react-ansi@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/react-ansi/-/react-ansi-1.8.1.tgz#c530d9060e939489e2e3a7910b2cbd38b04517bf"
integrity sha512-a+QRlRymZTa9usVJ74gxO5HaUplJeOaKhLpONwC6SF/3u2uZkgSpV3W8OiqfgeJHnLoKlPXBtrUCcpgjlnDdWQ==
dependencies:
anser "^1.4.8"
escape-carriage "^1.3.0"
react-app-polyfill@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-1.0.6.tgz#890f8d7f2842ce6073f030b117de9130a5f385f0"