graphics() added deviceName (windows)
This commit is contained in:
parent
e85de74870
commit
4d2c684eac
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 4.28.0 | 2020-11-04 | `graphics()` added deviceName (windows) |
|
||||||
| 4.27.11 | 2020-10-26 | `inetChecksite()` fixed vulnerability: command injection |
|
| 4.27.11 | 2020-10-26 | `inetChecksite()` fixed vulnerability: command injection |
|
||||||
| 4.27.10 | 2020-10-16 | `dockerContainers()` resolved hanging issue |
|
| 4.27.10 | 2020-10-16 | `dockerContainers()` resolved hanging issue |
|
||||||
| 4.27.9 | 2020-10-13 | `networkInterfaces()` loopback internal detection (windows) |
|
| 4.27.9 | 2020-10-13 | `networkInterfaces()` loopback internal detection (windows) |
|
||||||
|
|||||||
@ -87,13 +87,13 @@ si.cpu()
|
|||||||
|
|
||||||
(last 7 major and minor version releases)
|
(last 7 major and minor version releases)
|
||||||
|
|
||||||
|
- Version 4.28.0: `graphics()` added deviceName (Windows)
|
||||||
- Version 4.27.0: `observe()` added observe / watch function
|
- Version 4.27.0: `observe()` added observe / watch function
|
||||||
- Version 4.26.0: `diskLayout()` added full S.M.A.R.T data (Linux)
|
- Version 4.26.0: `diskLayout()` added full S.M.A.R.T data (Linux)
|
||||||
- Version 4.25.0: `get()` added function to get partial system info
|
- Version 4.25.0: `get()` added function to get partial system info
|
||||||
- Version 4.24.0: `networkInterfaces()` added subnet mask ip4 and ip6
|
- Version 4.24.0: `networkInterfaces()` added subnet mask ip4 and ip6
|
||||||
- Version 4.23.0: `versions()` added param to specify which program/lib versions to detect
|
- Version 4.23.0: `versions()` added param to specify which program/lib versions to detect
|
||||||
- Version 4.22.0: `services()` added pids (windows)
|
- Version 4.22.0: `services()` added pids (windows)
|
||||||
- Version 4.21.0: added npx copmpatibility
|
|
||||||
- ...
|
- ...
|
||||||
|
|
||||||
You can find all changes here: [detailed changelog][changelog-url]
|
You can find all changes here: [detailed changelog][changelog-url]
|
||||||
@ -258,6 +258,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (m
|
|||||||
| | controllers[]| X | | X | X | | graphics controllers array |
|
| | controllers[]| X | | X | X | | graphics controllers array |
|
||||||
| | ...[0].model | X | | X | X | | graphics controller model |
|
| | ...[0].model | X | | X | X | | graphics controller model |
|
||||||
| | ...[0].vendor | X | | X | X | | e.g. ATI |
|
| | ...[0].vendor | X | | X | X | | e.g. ATI |
|
||||||
|
| | ...[0].deviceName | | | | X | | e.g. \\\\.\\DISPLAY1 |
|
||||||
| | ...[0].bus | X | | X | X | | on which bus (e.g. PCIe) |
|
| | ...[0].bus | X | | X | X | | on which bus (e.g. PCIe) |
|
||||||
| | ...[0].vram | X | | X | X | | VRAM size (in MB) |
|
| | ...[0].vram | X | | X | X | | VRAM size (in MB) |
|
||||||
| | ...[0].vramDynamic | X | | X | X | | true if dynamicly allocated ram |
|
| | ...[0].vramDynamic | X | | X | X | | true if dynamicly allocated ram |
|
||||||
|
|||||||
@ -155,6 +155,16 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>monitor/display vendor</td>
|
<td>monitor/display vendor</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>...[0].deviceName</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
<td>e.g. \\.\DISPLAY1</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>...[0].model</td>
|
<td>...[0].model</td>
|
||||||
|
|||||||
@ -83,6 +83,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4.28.0</th>
|
||||||
|
<td>2020-11-04</td>
|
||||||
|
<td><span class="code">graphics()</span> added deviceName (windows)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">4.27.11</th>
|
<th scope="row">4.27.11</th>
|
||||||
<td>2020-10-26</td>
|
<td>2020-10-26</td>
|
||||||
|
|||||||
@ -168,7 +168,7 @@
|
|||||||
<img class="logo" src="assets/logo.png">
|
<img class="logo" src="assets/logo.png">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span></div>
|
<div class="subtitle"><span id="typed"></span></div>
|
||||||
<div class="version">Current Version: <span id="version">4.27.11</span></div>
|
<div class="version">Current Version: <span id="version">4.28.0</span></div>
|
||||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
|
|||||||
@ -43,9 +43,10 @@ function fsSize(callback) {
|
|||||||
lines.forEach(function (line) {
|
lines.forEach(function (line) {
|
||||||
if (line !== '') {
|
if (line !== '') {
|
||||||
line = line.replace(/ +/g, ' ').split(' ');
|
line = line.replace(/ +/g, ' ').split(' ');
|
||||||
if (line && (line[0].startsWith('/')) || (line[6] && line[6] === '/')) {
|
console.log(line);
|
||||||
|
if (line && ((line[0].startsWith('/')) || (line[6] && line[6] === '/') || (line[0].indexOf('/') > 0))) {
|
||||||
const fs = line[0];
|
const fs = line[0];
|
||||||
const fstype = ((_linux || _freebsd || _openbsd || _netbsd) ? line[1] : 'HFS');
|
const fstype = ((_linux || _freebsd || _openbsd || _netbsd) ? line[1] : (line[0].startsWith('/')) ? 'HFS' : 'NFS');
|
||||||
const size = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[2] : line[1])) * 1024;
|
const size = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[2] : line[1])) * 1024;
|
||||||
const used = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[3] : line[2])) * 1024;
|
const used = parseInt(((_linux || _freebsd || _openbsd || _netbsd) ? line[3] : line[2])) * 1024;
|
||||||
const use = parseFloat((100.0 * ((_linux || _freebsd || _openbsd || _netbsd) ? line[3] : line[2]) / ((_linux || _freebsd || _openbsd || _netbsd) ? line[2] : line[1])).toFixed(2));
|
const use = parseFloat((100.0 * ((_linux || _freebsd || _openbsd || _netbsd) ? line[3] : line[2]) / ((_linux || _freebsd || _openbsd || _netbsd) ? line[2] : line[1])).toFixed(2));
|
||||||
@ -71,7 +72,7 @@ function fsSize(callback) {
|
|||||||
let data = [];
|
let data = [];
|
||||||
if (_linux || _freebsd || _openbsd || _netbsd || _darwin) {
|
if (_linux || _freebsd || _openbsd || _netbsd || _darwin) {
|
||||||
let cmd = '';
|
let cmd = '';
|
||||||
if (_darwin) cmd = 'df -lkP | grep ^/';
|
if (_darwin) cmd = 'df -kP';
|
||||||
if (_linux) cmd = 'df -lkPTx squashfs | grep ^/';
|
if (_linux) cmd = 'df -lkPTx squashfs | grep ^/';
|
||||||
if (_freebsd || _openbsd || _netbsd) cmd = 'df -lkPT';
|
if (_freebsd || _openbsd || _netbsd) cmd = 'df -lkPT';
|
||||||
exec(cmd, function (error, stdout) {
|
exec(cmd, function (error, stdout) {
|
||||||
|
|||||||
@ -72,6 +72,7 @@ function graphics(callback) {
|
|||||||
let currentDisplay = {
|
let currentDisplay = {
|
||||||
vendor: '',
|
vendor: '',
|
||||||
model: '',
|
model: '',
|
||||||
|
deviceName: '',
|
||||||
main: false,
|
main: false,
|
||||||
builtin: false,
|
builtin: false,
|
||||||
connection: '',
|
connection: '',
|
||||||
@ -109,6 +110,7 @@ function graphics(callback) {
|
|||||||
currentDisplay = {
|
currentDisplay = {
|
||||||
vendor: '',
|
vendor: '',
|
||||||
model: '',
|
model: '',
|
||||||
|
deviceName: '',
|
||||||
main: false,
|
main: false,
|
||||||
builtin: false,
|
builtin: false,
|
||||||
connection: '',
|
connection: '',
|
||||||
@ -304,6 +306,7 @@ function graphics(callback) {
|
|||||||
let result = {
|
let result = {
|
||||||
vendor: '',
|
vendor: '',
|
||||||
model: '',
|
model: '',
|
||||||
|
deviceName: '',
|
||||||
main: false,
|
main: false,
|
||||||
builtin: false,
|
builtin: false,
|
||||||
connection: '',
|
connection: '',
|
||||||
@ -363,6 +366,7 @@ function graphics(callback) {
|
|||||||
let currentDisplay = {
|
let currentDisplay = {
|
||||||
vendor: '',
|
vendor: '',
|
||||||
model: '',
|
model: '',
|
||||||
|
deviceName: '',
|
||||||
main: false,
|
main: false,
|
||||||
builtin: false,
|
builtin: false,
|
||||||
connection: '',
|
connection: '',
|
||||||
@ -718,9 +722,14 @@ function graphics(callback) {
|
|||||||
if (ssections[i].trim() !== '') {
|
if (ssections[i].trim() !== '') {
|
||||||
ssections[i] = 'BitsPerPixel ' + ssections[i];
|
ssections[i] = 'BitsPerPixel ' + ssections[i];
|
||||||
msections[i] = 'Active ' + msections[i];
|
msections[i] = 'Active ' + msections[i];
|
||||||
|
// tsections can be empty on earlier versions of powershell (<=2.0). Tag connection type as UNKNOWN
|
||||||
|
// if this information is missing
|
||||||
|
if (tsections.length === 0) {
|
||||||
|
tsections[i] = 'Unknown';
|
||||||
|
}
|
||||||
let linesScreen = ssections[i].split(os.EOL);
|
let linesScreen = ssections[i].split(os.EOL);
|
||||||
let linesMonitor = msections[i].split(os.EOL);
|
let linesMonitor = msections[i].split(os.EOL);
|
||||||
|
|
||||||
let linesConnection = tsections[i].split(os.EOL);
|
let linesConnection = tsections[i].split(os.EOL);
|
||||||
const bitsPerPixel = util.getValue(linesScreen, 'BitsPerPixel');
|
const bitsPerPixel = util.getValue(linesScreen, 'BitsPerPixel');
|
||||||
const bounds = util.getValue(linesScreen, 'Bounds').replace('{', '').replace('}', '').split(',');
|
const bounds = util.getValue(linesScreen, 'Bounds').replace('{', '').replace('}', '').split(',');
|
||||||
@ -729,6 +738,7 @@ function graphics(callback) {
|
|||||||
const sizey = util.getValue(linesMonitor, 'MaxVerticalImageSize');
|
const sizey = util.getValue(linesMonitor, 'MaxVerticalImageSize');
|
||||||
const instanceName = util.getValue(linesMonitor, 'InstanceName').toLowerCase();
|
const instanceName = util.getValue(linesMonitor, 'InstanceName').toLowerCase();
|
||||||
const videoOutputTechnology = util.getValue(linesConnection, 'VideoOutputTechnology');
|
const videoOutputTechnology = util.getValue(linesConnection, 'VideoOutputTechnology');
|
||||||
|
const deviceName = util.getValue(linesScreen, 'DeviceName');
|
||||||
let displayVendor = '';
|
let displayVendor = '';
|
||||||
let displayModel = '';
|
let displayModel = '';
|
||||||
isections.forEach(element => {
|
isections.forEach(element => {
|
||||||
@ -740,6 +750,7 @@ function graphics(callback) {
|
|||||||
displays.push({
|
displays.push({
|
||||||
vendor: instanceName.startsWith(deviceID) && displayVendor === '' ? vendor : displayVendor,
|
vendor: instanceName.startsWith(deviceID) && displayVendor === '' ? vendor : displayVendor,
|
||||||
model: instanceName.startsWith(deviceID) && displayModel === '' ? model : displayModel,
|
model: instanceName.startsWith(deviceID) && displayModel === '' ? model : displayModel,
|
||||||
|
deviceName,
|
||||||
main: primary.toLowerCase() === 'true',
|
main: primary.toLowerCase() === 'true',
|
||||||
builtin: videoOutputTechnology === '2147483648',
|
builtin: videoOutputTechnology === '2147483648',
|
||||||
connection: videoOutputTechnology && videoTypes[videoOutputTechnology] ? videoTypes[videoOutputTechnology] : '',
|
connection: videoOutputTechnology && videoTypes[videoOutputTechnology] ? videoTypes[videoOutputTechnology] : '',
|
||||||
|
|||||||
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@ -252,6 +252,7 @@ export namespace Systeminformation {
|
|||||||
interface GraphicsDisplayData {
|
interface GraphicsDisplayData {
|
||||||
vendor: string;
|
vendor: string;
|
||||||
model: string;
|
model: string;
|
||||||
|
deviceName: string;
|
||||||
main: boolean;
|
main: boolean;
|
||||||
builtin: boolean;
|
builtin: boolean;
|
||||||
connection: string;
|
connection: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user