Skip to content

Commit

Permalink
Revert "feat: update to node 16 and fix deprecations"
Browse files Browse the repository at this point in the history
This reverts commit ddcdd61.
  • Loading branch information
josephgregoryii committed Feb 15, 2022
1 parent ddcdd61 commit a55fdbb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 3,582 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 10.x

- name: Cache node_modules
id: cache-node-modules
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 10.x

- name: Cache node_modules
id: cache-node-modules
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 10.x

- name: Cache node_modules
id: cache-node-modules
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 10.x

- name: Cache node_modules
id: cache-node-modules
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 10.x

- name: Download Cached Deps
id: cache-node-modules
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 14

- name: Install dependencies
run: npm ci
Expand Down
6 changes: 3 additions & 3 deletions nerdlets/top-nerdlet/process-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class ProcessDetails extends React.PureComponent {
WHERE entityGuid = '${entity.guid}' AND parentProcessId = ${pid}`;

return (
<NrqlQuery accountIds={[entity.accountId]} query={nrql} formatType="raw">
<NrqlQuery accountId={entity.accountId} query={nrql} formatType="raw">
{({ loading, data }) => {
if (loading) return '';
const { members } = data.results[0];
Expand Down Expand Up @@ -186,7 +186,7 @@ export default class ProcessDetails extends React.PureComponent {
<h3>{title}</h3>
<ChartType
className="chart"
accountIds={[entity.accountId]}
accountId={entity.accountId}
query={this.metricQuery(select)}
/>
</StackItem>
Expand All @@ -210,7 +210,7 @@ export default class ProcessDetails extends React.PureComponent {
'CPU',
"average(cpuSystemPercent) as 'System CPU %', average(cpuUserPercent) AS 'User CPU %'"
)}
{this.render(
{this.renderChart(
LineChart,
'I/O',
"average(ioReadBytesPerSecond/1024/1024) AS 'Read MB/s', average(ioWriteBytesPerSecond/1024/1024) AS 'Write MB/s'"
Expand Down
8 changes: 3 additions & 5 deletions nerdlets/top-nerdlet/process-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ export default class ProcessTable extends React.PureComponent {
SINCE ${Math.round(new Date().getTime() / 1000) - 60}`;

const { data } = await NrqlQuery.query({
accountIds: [entity.accountId],
accountId: entity.accountId,
query: nrql,
formatType: 'raw',
});
const { facets } = data;
const { facets } = data.raw;
const tableData = facets.map((facet) => {
return {
pid: parseInt(facet.name),
Expand Down Expand Up @@ -168,9 +168,7 @@ export default class ProcessTable extends React.PureComponent {
<Icon
style={{ marginLeft: '6px' }}
color="#aaaaaa"
type={
Icon.TYPE.INTERFACE__CARET__CARET_BOTTOM__WEIGHT_BOLD
}
type="interface_caret_caret-bottom_weight-bold"
/>
)}
</th>
Expand Down
8 changes: 4 additions & 4 deletions nerdlets/top-nerdlet/top.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class Top extends React.PureComponent {
<p className="subtitle">Refreshes every 15 seconds</p>
</header>
<div className="primary-column-main">
<PlatformStateContext.Consumer>
<PlatformStateContext>
{(platformUrlState) => (
<ProcessTable
entity={entity}
Expand All @@ -43,12 +43,12 @@ export default class Top extends React.PureComponent {
{...this.props}
/>
)}
</PlatformStateContext.Consumer>
</PlatformStateContext>
</div>
</GridItem>
<GridItem columnSpan={5} className="column secondary-column">
{selectedPid ? (
<PlatformStateContext.Consumer>
<PlatformStateContext>
{(platformUrlState) => (
<ProcessDetails
entity={entity}
Expand All @@ -58,7 +58,7 @@ export default class Top extends React.PureComponent {
{...this.props}
/>
)}
</PlatformStateContext.Consumer>
</PlatformStateContext>
) : (
<Spinner />
)}
Expand Down
4 changes: 2 additions & 2 deletions nr1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaType": "NERDPACK",
"id": "fd71c932-0d45-4439-bffd-2dcee2076b69",
"displayName": "Task",
"id": "b9616a2a-9543-4162-8e9f-30dbb50c5cba",
"displayName": "Top",
"description": "Display and inspect the top processes of your hosts, including CPU, I/O and memory"
}
Loading

0 comments on commit a55fdbb

Please sign in to comment.