Skip to content

Commit

Permalink
feat(frontend/settings): add os.release to about page and sentry logg…
Browse files Browse the repository at this point in the history
…er (#560)

* feat(frontend/settings): add os.release to about page

fix #365

* feat(backend): add os.release to sentry logger
  • Loading branch information
bhajneet authored May 29, 2020
1 parent 719b072 commit 3bcf985
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/frontend/src/Settings/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const aboutFields = [
[ 'databaseVersion', 'Shabad OS Database Version' ],
[ 'hostname', 'Shabad OS Host' ],
[ 'platform', 'Platform' ],
[ 'release', 'Release' ],
[ 'arch', 'Architecture' ],
[ 'cpus', 'CPU(s)' ],
]
Expand Down
3 changes: 2 additions & 1 deletion app/lib/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* eslint-disable class-methods-use-this */
import * as Sentry from '@sentry/node'
import { cpus, freemem, totalmem, platform, networkInterfaces } from 'os'
import { cpus, freemem, totalmem, platform, release, networkInterfaces } from 'os'

import { version } from '../package.json'

Expand Down Expand Up @@ -51,6 +51,7 @@ class Analytics {
freeMemory: freemem(),
totalMemory: totalmem(),
platform: platform(),
release: release(),
networkInterfaces: networkInterfaces(),
} )

Expand Down
3 changes: 2 additions & 1 deletion app/lib/api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Router } from 'express'
import { basename, join } from 'path'
import { hostname, platform, arch, cpus } from 'os'
import { hostname, platform, release, arch, cpus } from 'os'
import { readJSON } from 'fs-extra'

import { CUSTOM_THEMES_FOLDER, APP_FOLDER, FRONTEND_THEMES_FOLDER, DATABASE_FOLDER, CUSTOM_OVERLAY_THEMES_FOLDER, FRONTEND_OVERLAY_THEMES_FOLDER } from './consts'
Expand Down Expand Up @@ -33,6 +33,7 @@ api.get( '/about', ( _, res ) => Promise.all( [
arch: arch(),
cpus: `${cpus().length}x ${cpus()[ 0 ].model}`,
platform: platform(),
release: release(),
addresses: getNetworkedAddresses(),
} ) ) )

Expand Down

0 comments on commit 3bcf985

Please sign in to comment.