Skip to content

Commit

Permalink
client: remove using ?? operator
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed Jul 12, 2021
1 parent ad875f9 commit 49e4b6c
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 18 deletions.
1 change: 1 addition & 0 deletions client/js/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {processSystemInfo} from "./server-info"
import {processCPUData, processCPUTemp} from "./cpu"
import {processRamInfo} from "./ram"
Expand Down
1 change: 0 additions & 1 deletion client/js/blockchain.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"

export const processBlockchainInfo = async () => {
Expand Down
1 change: 0 additions & 1 deletion client/js/consensus.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"

export const processConsensus = async () => {
Expand Down
1 change: 0 additions & 1 deletion client/js/cpu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"
import {getFakeData} from "./helpers/get-fake-data";
import {defaultChartConfig, defaultGaugeConfig} from "./helpers/chart-config";
Expand Down
1 change: 0 additions & 1 deletion client/js/delegations.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"

export const processDelegations = async () => {
Expand Down
1 change: 0 additions & 1 deletion client/js/explorer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"

export const processBlocks = async () => {
Expand Down
1 change: 0 additions & 1 deletion client/js/net.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"
import {getFakeData} from "./helpers/get-fake-data";
import {defaultChartConfig} from "./helpers/chart-config";
Expand Down
6 changes: 2 additions & 4 deletions client/js/node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"
import {getFakeTriplets} from "./helpers/get-fake-data"
import {defaultChartConfig} from "./helpers/chart-config"
Expand All @@ -20,7 +19,6 @@ const processHealth = async () => {
el.addClass("border bd-red")
}

console.log(health)
if (health && health.length) {
elHealth.html($("<span>").addClass("fg-red").html(health.join(" ")))
}
Expand Down Expand Up @@ -122,7 +120,7 @@ export const processNodeStatus = async () => {
bottom: 10
},
height: 160,
onDrawLabelX: (v) => {
onDrawLabelX: () => {
return ""
},
onDrawLabelY: (v) => {
Expand Down Expand Up @@ -276,7 +274,7 @@ export const processNodeStatus = async () => {
const noBlockProducer = 'No running block producer'
const noSnarkWorker = 'No running snark worker'
const blockProducerName = blockProductionKeys.length ? blockProductionKeys[0] : ""
const snarkWorkerName = snarkWorker ?? ""
const snarkWorkerName = snarkWorker ? snarkWorker : ""
const shortBlockProducerName = blockProducerName.substring(0, partLength) + ' ... ' + blockProducerName.substring(blockProducerName.length - partLength)
const shortSnarkWorkerName = snarkWorkerName.substring(0, partLength) + ' ... ' + snarkWorkerName.substring(snarkWorkerName.length - partLength)
const snarkWorkerFeeValue = !snarkWorkFee ? '' : ` [ <span class="fg-gray">fee</span> ${(snarkWorkFee / 10**9).toFixed(4)} ]`
Expand Down
2 changes: 1 addition & 1 deletion client/js/price.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {getAPIData, getInfo} from "./helpers/get-info";
import {getInfo} from "./helpers/get-info";
import {imgOk, imgStop} from "./helpers/const";

export const processPrice = async () => {
Expand Down
1 change: 0 additions & 1 deletion client/js/ram.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"
import {getFakeData} from "./helpers/get-fake-data";
import {defaultChartConfig, defaultGaugeConfig} from "./helpers/chart-config";
Expand Down
1 change: 0 additions & 1 deletion client/js/server-info.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"
import {imgOk, imgStop} from "./helpers/const";

Expand Down
1 change: 0 additions & 1 deletion client/js/uptime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime' // this required for Parcel
import {getInfo} from "./helpers/get-info"
import {imgOk, imgStop} from "./helpers/const";

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
]
},
"browserslist": [
"last 2 Chrome versions",
"last 2 Firefox versions",
"last 2 Opera versions",
"last 2 Edge versions"
"last 1 Chrome versions",
"last 1 Firefox versions",
"last 1 Opera versions",
"last 1 Edge versions"
]
}

0 comments on commit 49e4b6c

Please sign in to comment.