Skip to content

Commit

Permalink
Merge branch 'release/v3.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 2, 2022
2 parents 361a009 + 6d120e1 commit 6f215b1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 60 deletions.
5 changes: 5 additions & 0 deletions app/media/styles/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ dd {
.text-muted {
color: #777;
}
.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.inline-buttons button {
margin: 0 5px 5px 0;
Expand Down
14 changes: 2 additions & 12 deletions app/media/styles/modules/inspect.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,8 @@
}

.inspect-stats-block {
& {
width: auto;
}

td,
th {
padding: 1px 5px;
white-space: nowrap;
}

tr {
cursor: pointer;
.ant-row {
padding-top: 2px;
}
}

Expand Down
82 changes: 35 additions & 47 deletions app/modules/inspect/containers/stats-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,59 +206,47 @@ class MemoryStatisticsPage extends React.PureComponent {

renderTopFiles() {
return (
<Card title="Top 5 Files" className="block ">
<table className="inspect-stats-block">
<tbody>
{this.props.memory.topFiles.map(({ flash, path }) => (
<tr key={path} onClick={::this.handleMemoryClick}>
<td className="text-right">
<b>{formatSize(flash)}</b>
</td>
<td>
<Tooltip title={path} overlayStyle={{ maxWidth: 400 }}>
{limitPathLength(path, 35)}
</Tooltip>
</td>
</tr>
))}
</tbody>
</table>
<Card title="Top 5 Files" className="inspect-stats-block">
{this.props.memory.topFiles.map(({ flash, path }) => (
<Row gutter={10} key={path} onClick={::this.handleMemoryClick}>
<Col xs={6} lg={4} className="text-right text-nowrap">
<b>{formatSize(flash)}</b>
</Col>
<Col xs={18} lg={20} className="text-truncate">
<Tooltip title={path} overlayStyle={{ maxWidth: 400 }}>
{limitPathLength(path, 35)}
</Tooltip>
</Col>
</Row>
))}
</Card>
);
}

renderTopSymbols() {
return (
<Card title="Top 5 Symbols" className="block">
<table className="inspect-stats-block">
<tbody>
{this.props.memory.topSymbols.map((symbol) => (
<tr key={symbol.displayName} onClick={::this.handleSymbolsClick}>
<td className="text-right">
<b>{formatSize(symbol.size)}</b>
</td>
<td>
<div
style={{ overflow: 'hidden', whiteSpace: 'nowrap', width: '100%' }}
>
<Tooltip
title={`${symbol.type} -> ${
symbol.file ? `${symbol.file}:${symbol.line}` : 'unknown'
}`}
overlayStyle={{ maxWidth: 400 }}
>
<Icon
title={SYMBOL_NAME_BY_TYPE[symbol.type]}
type={SYMBOL_ICON_BY_TYPE[symbol.type]}
/>{' '}
{symbol.displayName}
</Tooltip>
</div>
</td>
</tr>
))}
</tbody>
</table>
<Card title="Top 5 Symbols" className="inspect-stats-block">
{this.props.memory.topSymbols.map((symbol) => (
<Row gutter={10} key={symbol.displayName} onClick={::this.handleSymbolsClick}>
<Col xs={6} lg={4} className="text-right text-nowrap">
<b>{formatSize(symbol.size)}</b>
</Col>
<Col xs={18} lg={20} className="text-truncate">
<Tooltip
title={`${symbol.type} -> ${
symbol.file ? `${symbol.file}:${symbol.line}` : 'unknown'
}`}
overlayStyle={{ maxWidth: 400 }}
>
<Icon
title={SYMBOL_NAME_BY_TYPE[symbol.type]}
type={SYMBOL_ICON_BY_TYPE[symbol.type]}
/>{' '}
{symbol.displayName + symbol.displayName}
</Tooltip>
</Col>
</Row>
))}
</Card>
);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-home",
"version": "3.4.0",
"version": "3.4.1",
"description": "PlatformIO Home",
"repository": {
"type": "git",
Expand Down

0 comments on commit 6f215b1

Please sign in to comment.