Merge pull request #889 from SiIky/feat/AkV9XoBg/reenable-pings
feat: send ping and speedtest URLs to machine
This commit is contained in:
commit
1e749c3f4f
2 changed files with 20 additions and 4 deletions
|
|
@ -51,6 +51,20 @@ const settingsCache = {}
|
||||||
|
|
||||||
const devMode = argv.dev || options.http
|
const devMode = argv.dev || options.http
|
||||||
|
|
||||||
|
const urlsToPing = [
|
||||||
|
`us.archive.ubuntu.com`,
|
||||||
|
`uk.archive.ubuntu.com`,
|
||||||
|
`za.archive.ubuntu.com`,
|
||||||
|
`cn.archive.ubuntu.com`
|
||||||
|
]
|
||||||
|
|
||||||
|
const speedtestFiles = [
|
||||||
|
{
|
||||||
|
url: 'https://github.com/lamassu/speed-test-assets/raw/main/python-defaults_2.7.18-3.tar.gz',
|
||||||
|
size: 44668
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
function checkHasLightning (settings) {
|
function checkHasLightning (settings) {
|
||||||
return configManager.getWalletSettings('BTC', settings.config).layer2 !== 'no-layer2'
|
return configManager.getWalletSettings('BTC', settings.config).layer2 !== 'no-layer2'
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +125,9 @@ function poll (req, res, next) {
|
||||||
receipt,
|
receipt,
|
||||||
operatorInfo,
|
operatorInfo,
|
||||||
machineInfo,
|
machineInfo,
|
||||||
triggers
|
triggers,
|
||||||
|
speedtestFiles,
|
||||||
|
urlsToPing
|
||||||
}
|
}
|
||||||
// BACKWARDS_COMPATIBILITY 7.5
|
// BACKWARDS_COMPATIBILITY 7.5
|
||||||
// machines before 7.5 expect old compliance
|
// machines before 7.5 expect old compliance
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Grid /*, Divider */ } from '@material-ui/core'
|
import { Grid /*, Divider */ } from '@material-ui/core'
|
||||||
import { makeStyles } from '@material-ui/core/styles'
|
import { makeStyles } from '@material-ui/core/styles'
|
||||||
// import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => {
|
||||||
machine={machine}
|
machine={machine}
|
||||||
onActionSuccess={onActionSuccess}></MachineActions>
|
onActionSuccess={onActionSuccess}></MachineActions>
|
||||||
</Item>
|
</Item>
|
||||||
{/* <Item xs={2}>
|
<Item xs={2}>
|
||||||
<Label>Network speed</Label>
|
<Label>Network speed</Label>
|
||||||
<span>
|
<span>
|
||||||
{machine.downloadSpeed
|
{machine.downloadSpeed
|
||||||
|
|
@ -132,7 +132,7 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => {
|
||||||
' %'
|
' %'
|
||||||
: 'unavailable'}
|
: 'unavailable'}
|
||||||
</span>
|
</span>
|
||||||
</Item> */}
|
</Item>
|
||||||
</Container>
|
</Container>
|
||||||
</Item>
|
</Item>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue