'
}
- var ct = _closeTags[seq]
+ const ct = _closeTags[seq]
if (ct) {
// Pop sequence
ansiCodes.pop()
@@ -95,7 +95,7 @@ ansiHTML.setColors = function (colors) {
}
var _finalColors = {}
- for (var key in _defColors) {
+ for (const key in _defColors) {
var hex = Object.prototype.hasOwnProperty.call(colors, key) ? colors[key] : null
if (!hex) {
_finalColors[key] = _defColors[key]
@@ -161,12 +161,11 @@ function _setTags (colors) {
// dark grey
_openTags['90'] = 'color:#' + colors.darkgrey
- for (var code in _styles) {
- var color = _styles[code]
- var oriColor = colors[color] || '000'
+ for (const code in _styles) {
+ const color = _styles[code]
+ const oriColor = colors[color] || '000'
_openTags[code] = 'color:#' + oriColor
- code = parseInt(code)
- _openTags[(code + 10).toString()] = 'background:#' + oriColor
+ _openTags[(parseInt(code) + 10).toString()] = 'background:#' + oriColor
}
}
diff --git a/src/fireedge/src/client/components/DebugLog/message.js b/src/fireedge/src/client/components/DebugLog/message.js
index 93966128c1..59f78e4ad1 100644
--- a/src/fireedge/src/client/components/DebugLog/message.js
+++ b/src/fireedge/src/client/components/DebugLog/message.js
@@ -7,8 +7,9 @@ import ChevronRightIcon from '@material-ui/icons/ChevronRight'
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
import { DEBUG_LEVEL } from 'client/constants'
-import AnsiHtml from 'client/components/DebugLog/ansiHtml'
+import AnsiHtml, { _regANSI } from 'client/components/DebugLog/ansiHtml'
+const cleanANSI = (text = '') => text.replace(_regANSI, '')
const MAX_CHARS = 80
const useStyles = makeStyles(theme => ({
@@ -31,6 +32,9 @@ const useStyles = makeStyles(theme => ({
time: {
minWidth: '220px'
},
+ message: {
+ whiteSpace: 'pre-line'
+ },
[DEBUG_LEVEL.ERROR]: { borderLeft: `0.3em solid ${theme.palette.error.light}` },
[DEBUG_LEVEL.WARN]: { borderLeft: `0.3em solid ${theme.palette.warning.light}` },
[DEBUG_LEVEL.INFO]: { borderLeft: `0.3em solid ${theme.palette.info.light}` },
@@ -60,9 +64,12 @@ const Message = memo(({ timestamp, severity, message }) => {
{timestamp}
{(isCollapsed && isMoreThanMaxChars) ? (
- {`${message?.slice(0, MAX_CHARS)}…`}
+
+ {`${cleanANSI(message?.slice(0, MAX_CHARS))}…`}
+
) : (
-
+
)}
)
diff --git a/src/fireedge/src/client/components/List/ListCards/index.js b/src/fireedge/src/client/components/List/ListCards/index.js
index b947bdbba5..4640174fac 100644
--- a/src/fireedge/src/client/components/List/ListCards/index.js
+++ b/src/fireedge/src/client/components/List/ListCards/index.js
@@ -11,7 +11,7 @@ import { EmptyCard } from 'client/components/Cards'
import FloatingActionButton from 'client/components/Fab'
import listCardsStyles from 'client/components/List/ListCards/styles'
-const ListCards = memo(({
+const ListCards = ({
list,
keyProp,
breakpoints,
@@ -78,7 +78,7 @@ const ListCards = memo(({
)}
)
-})
+}
const gridValues = [false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]