fix typescript typings, code cleanup, docs updated

This commit is contained in:
Sebastian Hildebrandt 2022-10-24 10:11:06 +02:00
parent 977f493de5
commit 8cc5f31d8b
24 changed files with 348 additions and 278 deletions

View File

@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- | | ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.12.9 | 2022-10-24 | fix typescript typings, code cleanup, docs updated |
| 5.12.8 | 2022-10-23 | `processes()` fix truncated commands (windows) | | 5.12.8 | 2022-10-23 | `processes()` fix truncated commands (windows) |
| 5.12.7 | 2022-10-15 | `versions()` fix postgres | | 5.12.7 | 2022-10-15 | `versions()` fix postgres |
| 5.12.6 | 2022-08-18 | `networkConnections()` fix UDP (windows) | | 5.12.6 | 2022-08-18 | `networkConnections()` fix UDP (windows) |

View File

@ -57,6 +57,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.12.9</th>
<td>2022-10-24</td>
<td>fix typescript typings, code cleanup, docs updated</td>
</tr>
<tr> <tr>
<th scope="row">5.12.8</th> <th scope="row">5.12.8</th>
<td>2022-10-23</td> <td>2022-10-23</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo"> <img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.12.8</span></div> <div class="version">New Version: <span id="version">5.12.9</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">

View File

@ -1,6 +1,6 @@
body { body {
font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #0e182e; background-color: rgb(14, 24, 46);
font-weight: 300; font-weight: 300;
min-height: 100%; min-height: 100%;
} }
@ -11,7 +11,7 @@ h3,
h4 { h4 {
font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 500; font-weight: 500;
color: #3d5cb3; color: rgb(61, 92, 179);
} }
.center { .center {
@ -24,7 +24,7 @@ h4 {
.warning { .warning {
font-weight: 500; font-weight: 500;
color: #9c0101; color: rgb(156, 1, 1);
} }
.larger { .larger {
@ -37,19 +37,17 @@ h4 {
} }
.blue { .blue {
color: #3d5cb3; color: rgb(61, 92, 179);
} }
.container-fluid { .container-fluid {
background-color: white; background-color: rgb(255, 255, 255);
padding-bottom: 30px; padding-bottom: 30px;
} }
.bg-image-full { .bg-image-full {
background-color: #1a1f30; background-color: #1a1f30; /* For browsers that do not support gradients */
/* For browsers that do not support gradients */ background-image: linear-gradient(210deg, #2a2d66, #060520); /* Standard syntax (must be last) */
background-image: linear-gradient(210deg, #2a2d66, #060520);
/* Standard syntax (must be last) */
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
@ -57,7 +55,6 @@ h4 {
background-size: cover; background-size: cover;
-o-background-size: cover; -o-background-size: cover;
height: 100vh; height: 100vh;
height: calc(var(--vh, 1vh) * 100);
opacity: 0.95; opacity: 0.95;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -65,6 +62,16 @@ h4 {
width: 100% !important; width: 100% !important;
flex-direction: column; flex-direction: column;
} }
@media only screen and (min-height: 1100px) {
.bg-image-full {
max-height: 900px;
}
}
@media only screen and (min-height: 1900px) {
.bg-image-full {
max-height: 1260px;
}
}
.bg-image-full .top-container { .bg-image-full .top-container {
text-align: center; text-align: center;
align-self: center; align-self: center;
@ -89,7 +96,7 @@ h4 {
padding: 0.25em 0; padding: 0.25em 0;
color: white; color: white;
transform: rotate(45deg); transform: rotate(45deg);
background: #971d1d; background: rgb(151, 29, 29);
font-size: 0.9rem; font-size: 0.9rem;
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
@ -296,10 +303,8 @@ h4 {
.nav { .nav {
background: no-repeat center center scroll; background: no-repeat center center scroll;
background-color: #1a1f30; background-color: #1a1f30; /* For browsers that do not support gradients */
/* For browsers that do not support gradients */ background-image: linear-gradient(210deg, #2a2d66, #060520); /* Standard syntax (must be last) */
background-image: linear-gradient(210deg, #2a2d66, #060520);
/* Standard syntax (must be last) */
background-size: cover; background-size: cover;
-o-background-size: cover; -o-background-size: cover;
height: 65px; height: 65px;
@ -400,10 +405,10 @@ h4 {
} }
.features .inner:hover { .features .inner:hover {
background: #f4f4f4; background: #f4f4f4;
color: #567adf; color: rgb(86, 122, 223);
} }
.features .inner:hover .icons { .features .inner:hover .icons {
color: #567adf; color: rgb(86, 122, 223);
} }
.sectionheader .title { .sectionheader .title {
@ -411,7 +416,7 @@ h4 {
padding-top: 20px; padding-top: 20px;
font-size: 2rem; font-size: 2rem;
font-weight: 500; font-weight: 500;
color: #3d5cb3; color: rgb(61, 92, 179);
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
.sectionheader .title { .sectionheader .title {
@ -435,7 +440,7 @@ h4 {
text-align: center; text-align: center;
font-size: 1.4rem; font-size: 1.4rem;
font-weight: 500; font-weight: 500;
color: #3d5cb3; color: rgb(61, 92, 179);
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
.sectionheader .title-small { .sectionheader .title-small {
@ -513,7 +518,7 @@ h4 {
} }
.index a:hover { .index a:hover {
text-decoration: none; text-decoration: none;
color: #567adf; color: rgb(86, 122, 223);
} }
.left .text, .left .text,
@ -583,13 +588,13 @@ ul {
text-decoration: none; text-decoration: none;
} }
.menu .title a:hover { .menu .title a:hover {
color: #567adf; color: rgb(86, 122, 223);
} }
.menu .title .navtitle { .menu .title .navtitle {
font-size: 1.3rem; font-size: 1.3rem;
margin-bottom: 5px; margin-bottom: 5px;
display: inline-block; display: inline-block;
color: #3d5cb3; color: rgb(61, 92, 179);
} }
.menu hr { .menu hr {
margin: 5px 0; margin: 5px 0;
@ -608,10 +613,10 @@ ul {
text-decoration: none; text-decoration: none;
} }
.menu ul li a:hover { .menu ul li a:hover {
color: #567adf; color: rgb(86, 122, 223);
} }
.menu ul li.active > a { .menu ul li.active > a {
color: #567adf; color: rgb(86, 122, 223);
font-weight: 500; font-weight: 500;
} }
@ -666,7 +671,7 @@ pre {
position: relative; position: relative;
} }
.footer .home { .footer .home {
color: #3d5cb3; color: rgb(61, 92, 179);
font-size: 1.1rem; font-size: 1.1rem;
} }
.footer a { .footer a {

File diff suppressed because one or more lines are too long

View File

@ -52,7 +52,16 @@ h4 {
background-size: cover; background-size: cover;
-o-background-size: cover; -o-background-size: cover;
height: 100vh; //calc(100vh); height: 100vh; //calc(100vh);
height: calc(var(--vh, 1vh) * 100); // height: calc(var(--vh, 1vh) * 100);
@media only screen and (min-height: 1100px) {
max-height: 900px;
}
@media only screen and (min-height: 1900px) {
max-height: 1260px;
}
opacity: 0.95; opacity: 0.95;
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@ -39,7 +39,7 @@
600, 600,
'easeOutQuad', 'easeOutQuad',
function () { function () {
console.log('READY') console.log('READY');
} }
); );
}); });
@ -77,7 +77,7 @@
loop: false, loop: false,
backDelay: 1200, backDelay: 1200,
} };
var typed = new Typed('#typed', options); var typed = new Typed('#typed', options);
} }
function scrollIt(destination, duration = 200, easing = 'linear', callback) { function scrollIt(destination, duration = 200, easing = 'linear', callback) {
@ -166,7 +166,7 @@
<header class="bg-image-full"> <header class="bg-image-full">
<div class="container"> <div class="container">
<a href="security.html" class="recommendation">Security advisory:<br>Update to v4.34.21</a> <a href="security.html" class="recommendation">Security advisory:<br>Update to v4.34.21</a>
<img class="logo" src="assets/logo.png"> <img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation </div> <div class="title">systeminformation </div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version larger">Version 4 documentation</div> <div class="version larger">Version 4 documentation</div>

View File

@ -2,7 +2,7 @@ body {
font-family: -apple-system, BlinkMacSystemFont, "segoe ui", Roboto, Helvetica, Arial, sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol"; font-family: -apple-system, BlinkMacSystemFont, "segoe ui", Roboto, Helvetica, Arial, sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol";
font-weight: 300; font-weight: 300;
min-height: 100%; min-height: 100%;
background-color: #59351e; background-color: rgb(89, 53, 30);
} }
h1, h1,
@ -23,30 +23,37 @@ h4 {
.warning { .warning {
font-weight: 500; font-weight: 500;
color: #9c0101; color: rgb(156, 1, 1);
} }
.container-fluid { .container-fluid {
background-color: white; background-color: rgb(255, 255, 255);
padding-bottom: 30px; padding-bottom: 30px;
} }
.bg-image-full { .bg-image-full {
background: no-repeat center center scroll; background: no-repeat center center scroll;
background-color: #4b2313; background-color: #4b2313; /* For browsers that do not support gradients */
/* For browsers that do not support gradients */ background-image: linear-gradient(210deg, #4b2313, #2c0c0a); /* Standard syntax (must be last) */
background-image: linear-gradient(210deg, #4b2313, #2c0c0a);
/* Standard syntax (must be last) */
background-size: cover; background-size: cover;
-o-background-size: cover; -o-background-size: cover;
height: 100vh; height: 100vh;
height: calc(var(--vh, 1vh) * 100);
opacity: 0.95; opacity: 0.95;
display: flex; display: flex;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
flex-direction: column; flex-direction: column;
} }
@media only screen and (min-height: 1100px) {
.bg-image-full {
max-height: 900px;
}
}
@media only screen and (min-height: 1900px) {
.bg-image-full {
max-height: 1260px;
}
}
.bg-image-full .container { .bg-image-full .container {
text-align: center; text-align: center;
align-self: center; align-self: center;
@ -67,7 +74,7 @@ h4 {
padding: 0.25em 0; padding: 0.25em 0;
color: white; color: white;
transform: rotate(45deg); transform: rotate(45deg);
background: #971d1d; background: rgb(151, 29, 29);
font-size: 0.9rem; font-size: 0.9rem;
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
@ -95,15 +102,21 @@ h4 {
padding-top: 10px; padding-top: 10px;
font-size: 1.8rem; font-size: 1.8rem;
margin-bottom: 10px; margin-bottom: 10px;
font-weight: 500;
}
@media only screen and (min-width: 374px) {
.bg-image-full .title {
font-size: 2.1rem;
}
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
.bg-image-full .title { .bg-image-full .title {
font-size: 2.4rem; font-size: 2.4rem;
} }
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 767px) {
.bg-image-full .title { .bg-image-full .title {
font-size: 3.2rem; font-size: 3.5rem;
} }
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
@ -111,6 +124,16 @@ h4 {
font-size: 4rem; font-size: 4rem;
} }
} }
@media only screen and (min-width: 1200px) {
.bg-image-full .title {
font-size: 5rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .title {
font-size: 6rem;
}
}
.bg-image-full .logo { .bg-image-full .logo {
width: 100px; width: 100px;
} }
@ -119,7 +142,7 @@ h4 {
width: 120px; width: 120px;
} }
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 767px) {
.bg-image-full .logo { .bg-image-full .logo {
width: 160px; width: 160px;
} }
@ -129,6 +152,11 @@ h4 {
width: 200px; width: 200px;
} }
} }
@media only screen and (min-width: 1900px) {
.bg-image-full .logo {
width: 250px;
}
}
.bg-image-full .subtitle { .bg-image-full .subtitle {
text-align: center; text-align: center;
color: #bbb; color: #bbb;
@ -144,7 +172,7 @@ h4 {
font-size: 1rem; font-size: 1rem;
} }
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 767px) {
.bg-image-full .subtitle { .bg-image-full .subtitle {
font-size: 1.1rem; font-size: 1.1rem;
} }
@ -154,6 +182,16 @@ h4 {
font-size: 1.3rem; font-size: 1.3rem;
} }
} }
@media only screen and (min-width: 1200px) {
.bg-image-full .subtitle {
font-size: 1.4rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .subtitle {
font-size: 1.6rem;
}
}
.bg-image-full .text > a { .bg-image-full .text > a {
text-align: center; text-align: center;
color: #fff; color: #fff;
@ -173,7 +211,7 @@ h4 {
font-size: 1rem; font-size: 1rem;
} }
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 767px) {
.bg-image-full .text > a { .bg-image-full .text > a {
font-size: 1rem; font-size: 1rem;
} }
@ -183,6 +221,16 @@ h4 {
font-size: 1.1rem; font-size: 1.1rem;
} }
} }
@media only screen and (min-width: 1200px) {
.bg-image-full .text > a {
font-size: 1.2rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .text > a {
font-size: 1.5rem;
}
}
.bg-image-full .version { .bg-image-full .version {
text-align: center; text-align: center;
margin-bottom: 10px; margin-bottom: 10px;
@ -204,6 +252,16 @@ h4 {
font-size: 1.1rem; font-size: 1.1rem;
} }
} }
@media only screen and (min-width: 1200px) {
.bg-image-full .version {
font-size: 1.2rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .version {
font-size: 1.5rem;
}
}
.bg-image-full .down { .bg-image-full .down {
text-align: center; text-align: center;
color: #fff; color: #fff;
@ -218,10 +276,8 @@ h4 {
.nav { .nav {
background: no-repeat center center scroll; background: no-repeat center center scroll;
background-color: #4b2313; background-color: #4b2313; /* For browsers that do not support gradients */
/* For browsers that do not support gradients */ background-image: linear-gradient(210deg, #4b2313, #2c0c0a); /* Standard syntax (must be last) */
background-image: linear-gradient(210deg, #4b2313, #2c0c0a);
/* Standard syntax (must be last) */
background-size: cover; background-size: cover;
-o-background-size: cover; -o-background-size: cover;
height: 65px; height: 65px;
@ -320,10 +376,10 @@ h4 {
} }
.features .inner:hover { .features .inner:hover {
background: #f4f4f4; background: #f4f4f4;
color: #567adf; color: rgb(86, 122, 223);
} }
.features .inner:hover .icons { .features .inner:hover .icons {
color: #567adf; color: rgb(86, 122, 223);
} }
.sectionheader .title { .sectionheader .title {
@ -424,7 +480,7 @@ h4 {
} }
.index a:hover { .index a:hover {
text-decoration: none; text-decoration: none;
color: #567adf; color: rgb(86, 122, 223);
} }
.left .text, .left .text,
@ -494,7 +550,7 @@ ul {
text-decoration: none; text-decoration: none;
} }
.menu .title a:hover { .menu .title a:hover {
color: #567adf; color: rgb(86, 122, 223);
} }
.menu hr { .menu hr {
margin: 5px 0; margin: 5px 0;
@ -513,10 +569,10 @@ ul {
text-decoration: none; text-decoration: none;
} }
.menu ul li a:hover { .menu ul li a:hover {
color: #567adf; color: rgb(86, 122, 223);
} }
.menu ul li.active > a { .menu ul li.active > a {
color: #567adf; color: rgb(86, 122, 223);
} }
.code { .code {
@ -583,5 +639,5 @@ pre {
} }
.v5 { .v5 {
color: #567adf; color: rgb(86, 122, 223);
}/*# sourceMappingURL=styles.css.map */ }/*# sourceMappingURL=styles.css.map */

View File

@ -1 +1 @@
{"version":3,"sources":["styles.scss"],"names":[],"mappings":"AAAA;EACE,0JAAA;EAEA,gBAAA;EACA,gBAAA;EACA,yBAAA;AAAF;;AAEA;;;;EAIE,0JAAA;EAEA,gBAAA;AAAF;;AAEA;EACE,kBAAA;AACF;;AACA;EACE,gBAAA;AAEF;;AAAA;EACE,gBAAA;EACA,cAAA;AAGF;;AADA;EACE,uBAAA;EACA,oBAAA;AAIF;;AAFA;EACE,0CAAA;EACA,yBAAA;EAA2B,+CAAA;EAC3B,2DAAA;EAA6D,mCAAA;EAI7D,sBAAA;EACA,yBAAA;EACA,aAAA;EACA,kCAAA;EACA,aAAA;EACA,aAAA;EACA,uBAAA;EACA,kBAAA;EAGA,sBAAA;AAIF;AAHE;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E,oBAAA;EACA,WAAA;AAwFJ;AAvFI;EACE,WAAA;EACA,WAAA;EACA,qBAAA;AAyFN;AAxFM;EACE,cAAA;AA0FR;AAtFE;EACE,aAAA;AAwFJ;AAtFE;EACE,qBAAA;EACA,SAAA;EACA,UAAA;AAwFJ;AAvFI;EACE,cAAA;AAyFN;AAxFM;EACE,WAAA;EACA,WAAA;EACA,qBAAA;AA0FR;AAzFQ;EACE,cAAA;AA2FV;AAxFM;EACE,cAAA;AA0FR;;AArFA;EACE,mEAAA;EACA,mCAAA;EACA,eAAA;EACA,kBAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,sBAAA;EACA,SAAA;EACA,cAAA;AAwFF;;AAtFA;EACE,0BAAA;EACA,mEAAA;EACA,mCAAA;EACA,eAAA;EACA,kBAAA;EACA,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,sBAAA;EACA,WAAA;EACA,gBAAA;AAyFF;;AAtFE;EACE,iCAAA;AAyFJ;AAvFE;EACE,oCAAA;AAyFJ;AAvFE;EACE,gBAAA;EACA,kBAAA;AAyFJ;AAvFE;EACE,uBAAA;AAyFJ;AAxFI;EACE,yBAAA;AA0FN;;AAtFA;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,kBAAA;AAyFF;AAxFE;EACE,WAAA;AA0FJ;AAxFE;EACE,WAAA;EACA,iBAAA;AA0FJ;;AAvFA;EACE,gBAAA;EACA,4BAAA;AA0FF;;AAxFA;EACE,cAAA;AA2FF","file":"styles.css"} {"version":3,"sources":["styles.scss","styles.css"],"names":[],"mappings":"AAAA;EACE,0JAAA;EAEA,gBAAA;EACA,gBAAA;EACA,iCAAA;ACAF;;ADEA;;;;EAIE,0JAAA;EAEA,gBAAA;ACAF;;ADEA;EACE,kBAAA;ACCF;;ADCA;EACE,gBAAA;ACEF;;ADAA;EACE,gBAAA;EACA,qBAAA;ACGF;;ADDA;EACE,oCAAA;EACA,oBAAA;ACIF;;ADFA;EACE,0CAAA;EACA,y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A,WAAA;EACA,gBAAA;AC0EF;;ADvEE;EACE,iCAAA;AC0EJ;ADxEE;EACE,oCAAA;AC0EJ;ADxEE;EACE,gBAAA;EACA,kBAAA;AC0EJ;ADxEE;EACE,uBAAA;AC0EJ;ADzEI;EACE,yBAAA;AC2EN;;ADvEA;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,kBAAA;AC0EF;ADzEE;EACE,WAAA;AC2EJ;ADzEE;EACE,WAAA;EACA,iBAAA;AC2EJ;;ADxEA;EACE,gBAAA;EACA,4BAAA;AC2EF;;ADzEA;EACE,wBAAA;AC4EF","file":"styles.css"}

View File

@ -37,8 +37,15 @@ h4 {
background-size: cover; background-size: cover;
-o-background-size: cover; -o-background-size: cover;
height: 100vh; //calc(100vh); height: 100vh; //calc(100vh);
height: calc(var(--vh, 1vh) * 100); // height: calc(var(--vh, 1vh) * 100);
opacity: 0.95;
@media only screen and (min-height: 1100px) {
max-height: 900px;
}
@media only screen and (min-height: 1900px) {
max-height: 1260px;
} opacity: 0.95;
display: flex; display: flex;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
@ -87,81 +94,144 @@ h4 {
padding-top: 10px; padding-top: 10px;
font-size: 1.8rem; font-size: 1.8rem;
margin-bottom: 10px; margin-bottom: 10px;
font-weight: 500;
@media only screen and (min-width: 374px) {
font-size: 2.1rem;
}
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
font-size: 2.4rem; font-size: 2.4rem;
} }
@media only screen and (min-width: 768px) {
font-size: 3.2rem; @media only screen and (min-width: 767px) {
font-size: 3.5rem;
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
font-size: 4rem; font-size: 4rem;
} }
@media only screen and (min-width: 1200px) {
font-size: 5rem;
}
@media only screen and (min-width: 1900px) {
font-size: 6rem;
}
} }
.logo { .logo {
width: 100px; width: 100px;
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
width: 120px; width: 120px;
} }
@media only screen and (min-width: 768px) {
@media only screen and (min-width: 767px) {
width: 160px; width: 160px;
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
width: 200px; width: 200px;
} }
@media only screen and (min-width: 1900px) {
width: 250px;
} }
}
.subtitle { .subtitle {
text-align: center; text-align: center;
color: #bbb; color: #bbb;
font-size: 0.78rem; font-size: 0.78rem;
@media only screen and (min-width: 375px) { @media only screen and (min-width: 375px) {
font-size: 0.9rem; font-size: 0.9rem;
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
font-size: 1rem; font-size: 1rem;
} }
@media only screen and (min-width: 768px) {
@media only screen and (min-width: 767px) {
font-size: 1.1rem; font-size: 1.1rem;
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
font-size: 1.3rem; font-size: 1.3rem;
} }
@media only screen and (min-width: 1200px) {
font-size: 1.4rem;
} }
@media only screen and (min-width: 1900px) {
font-size: 1.6rem;
}
}
.text>a { .text>a {
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 0.9rem; font-size: 0.9rem;
&:hover { &:hover {
color: #aaa; color: #aaa;
text-decoration: none; text-decoration: none;
} }
@media only screen and (min-width: 375px) { @media only screen and (min-width: 375px) {
font-size: 0.9rem; font-size: 0.9rem;
} }
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
font-size: 1rem; font-size: 1rem;
} }
@media only screen and (min-width: 768px) {
@media only screen and (min-width: 767px) {
font-size: 1rem; font-size: 1rem;
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
font-size: 1.1rem; font-size: 1.1rem;
} }
@media only screen and (min-width: 1200px) {
font-size: 1.2rem;
} }
@media only screen and (min-width: 1900px) {
font-size: 1.5rem;
}
}
.version { .version {
text-align: center; text-align: center;
margin-bottom: 10px; margin-bottom: 10px;
color: #fff; color: #fff;
font-size: 0.9rem; font-size: 0.9rem;
@media only screen and (min-width: 420px) { @media only screen and (min-width: 420px) {
font-size: 0.9rem; font-size: 0.9rem;
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 768px) {
font-size: 1rem; font-size: 1rem;
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
font-size: 1.1rem; font-size: 1.1rem;
} }
@media only screen and (min-width: 1200px) {
font-size: 1.2rem;
} }
@media only screen and (min-width: 1900px) {
font-size: 1.5rem;
}
}
.down { .down {
text-align: center; text-align: center;
color: #fff; color: #fff;
@ -169,6 +239,7 @@ h4 {
line-height: 1; line-height: 1;
margin-bottom: 15px; margin-bottom: 15px;
cursor: pointer; cursor: pointer;
.caret { .caret {
font-size: 3rem; font-size: 3rem;
} }

View File

@ -230,7 +230,7 @@ module.exports = function (callback) {
workload.push(util.powerShell('(Get-WmiObject -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity')); workload.push(util.powerShell('(Get-WmiObject -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity'));
util.promiseAll( util.promiseAll(
workload workload
).then(data => { ).then((data) => {
if (data) { if (data) {
let parts = data.results[0].split(/\n\s*\n/); let parts = data.results[0].split(/\n\s*\n/);
let batteries = []; let batteries = [];

View File

@ -23,7 +23,7 @@ const si = require('./index');
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
(function () { (function () {
si.getStaticData().then( si.getStaticData().then(
(data => { ((data) => {
data.time = si.time(); data.time = si.time();
console.log(JSON.stringify(data, null, 2)); console.log(JSON.stringify(data, null, 2));
} }

View File

@ -656,7 +656,7 @@ function getCpu() {
result.cores = parseInt(countThreads) || util.cores(); result.cores = parseInt(countThreads) || util.cores();
result.physicalCores = parseInt(countCores) || util.cores(); result.physicalCores = parseInt(countCores) || util.cores();
} }
cpuCache().then(res => { cpuCache().then((res) => {
result.cache = res; result.cache = res;
resolve(result); resolve(result);
}); });
@ -816,7 +816,7 @@ function getCpu() {
Promise.all( Promise.all(
workload workload
).then(data => { ).then((data) => {
let lines = data[0].split('\r\n'); let lines = data[0].split('\r\n');
let name = util.getValue(lines, 'name', ':') || ''; let name = util.getValue(lines, 'name', ':') || '';
if (name.indexOf('@') >= 0) { if (name.indexOf('@') >= 0) {

View File

@ -35,7 +35,7 @@ function dockerInfo(callback) {
} }
const result = {}; const result = {};
_docker_socket.getInfo(data => { _docker_socket.getInfo((data) => {
result.id = data.ID; result.id = data.ID;
result.containers = data.Containers; result.containers = data.Containers;
result.containersRunning = data.ContainersRunning; result.containersRunning = data.ContainersRunning;
@ -130,7 +130,7 @@ function dockerImages(all, callback) {
if (workload.length) { if (workload.length) {
Promise.all( Promise.all(
workload workload
).then(data => { ).then((data) => {
if (callback) { callback(data); } if (callback) { callback(data); }
resolve(data); resolve(data);
}); });
@ -255,24 +255,11 @@ function dockerContainers(all, callback) {
element.Name = element.Names[0].replace(/^\/|\/$/g, ''); element.Name = element.Names[0].replace(/^\/|\/$/g, '');
} }
workload.push(dockerContainerInspect(element.Id.trim(), element)); workload.push(dockerContainerInspect(element.Id.trim(), element));
// result.push({
// id: element.Id,
// name: element.Name,
// image: element.Image,
// imageID: element.ImageID,
// command: element.Command,
// created: element.Created,
// state: element.State,
// ports: element.Ports,
// mounts: element.Mounts,
// // hostconfig: element.HostConfig,
// // network: element.NetworkSettings
// });
}); });
if (workload.length) { if (workload.length) {
Promise.all( Promise.all(
workload workload
).then(data => { ).then((data) => {
if (callback) { callback(data); } if (callback) { callback(data); }
resolve(data); resolve(data);
}); });
@ -511,7 +498,7 @@ function dockerContainerStats(containerIDs, callback) {
if (workload.length) { if (workload.length) {
Promise.all( Promise.all(
workload workload
).then(data => { ).then((data) => {
if (callback) { callback(data); } if (callback) { callback(data); }
resolve(data); resolve(data);
}); });
@ -685,7 +672,7 @@ function dockerVolumes(callback) {
if (!_docker_socket) { if (!_docker_socket) {
_docker_socket = new DockerSocket(); _docker_socket = new DockerSocket();
} }
_docker_socket.listVolumes(data => { _docker_socket.listVolumes((data) => {
let dockerVolumes = {}; let dockerVolumes = {};
try { try {
dockerVolumes = data; dockerVolumes = data;
@ -726,7 +713,7 @@ function dockerAll(callback) {
if (result && Object.prototype.toString.call(result) === '[object Array]' && result.length > 0) { if (result && Object.prototype.toString.call(result) === '[object Array]' && result.length > 0) {
let l = result.length; let l = result.length;
result.forEach(function (element) { result.forEach(function (element) {
dockerContainerStats(element.id).then(res => { dockerContainerStats(element.id).then((res) => {
// include stats in array // include stats in array
element.memUsage = res[0].memUsage; element.memUsage = res[0].memUsage;
element.memLimit = res[0].memLimit; element.memLimit = res[0].memLimit;

View File

@ -53,7 +53,7 @@ function fsSize(callback) {
const linuxTmpFileSystems = ['rootfs', 'unionfs', 'squashfs', 'cramfs', 'initrd', 'initramfs', 'devtmpfs', 'tmpfs', 'udev', 'devfs', 'specfs', 'type', 'appimaged']; const linuxTmpFileSystems = ['rootfs', 'unionfs', 'squashfs', 'cramfs', 'initrd', 'initramfs', 'devtmpfs', 'tmpfs', 'udev', 'devfs', 'specfs', 'type', 'appimaged'];
let result = false; let result = false;
linuxTmpFileSystems.forEach(linuxFs => { linuxTmpFileSystems.forEach(linuxFs => {
if (fs.toLowerCase().indexOf(linuxFs) >= 0) result = true; if (fs.toLowerCase().indexOf(linuxFs) >= 0) { result = true; }
}); });
return result; return result;
} }
@ -1209,7 +1209,7 @@ function diskLayout(callback) {
} }
util.promiseAll( util.promiseAll(
workload workload
).then(data => { ).then((data) => {
let devices = data.results[0].toString().split(/\n\s*\n/); let devices = data.results[0].toString().split(/\n\s*\n/);
devices.forEach(function (device) { devices.forEach(function (device) {
let lines = device.split('\r\n'); let lines = device.split('\r\n');

View File

@ -784,7 +784,7 @@ function graphics(callback) {
Promise.all( Promise.all(
workload workload
).then(data => { ).then((data) => {
// controller + vram // controller + vram
let csections = data[0].replace(/\r/g, '').split(/\n\s*\n/); let csections = data[0].replace(/\r/g, '').split(/\n\s*\n/);
let vsections = data[1].replace(/\r/g, '').split(/\n\s*\n/); let vsections = data[1].replace(/\r/g, '').split(/\n\s*\n/);

67
lib/index.d.ts vendored
View File

@ -156,16 +156,16 @@ export namespace Systeminformation {
type: string; type: string;
protocol: string; protocol: string;
}; };
model_family?: string, model_family?: string;
model_name?: string, model_name?: string;
serial_number?: string, serial_number?: string;
firmware_version?: string, firmware_version?: string;
smart_status: { smart_status: {
passed: boolean; passed: boolean;
}; };
trim?: { trim?: {
supported: boolean; supported: boolean;
}, };
ata_smart_attributes?: { ata_smart_attributes?: {
revision: number; revision: number;
table: { table: {
@ -185,7 +185,10 @@ export namespace Systeminformation {
event_count: boolean; event_count: boolean;
auto_keep: boolean; auto_keep: boolean;
}; };
raw: { value: number; string: string; }; raw: {
value: number;
string: string;
};
}[]; }[];
}; };
ata_smart_error_log?: { ata_smart_error_log?: {
@ -201,12 +204,12 @@ export namespace Systeminformation {
type: { type: {
value: number; value: number;
string: string; string: string;
}, };
status: { status: {
value: number; value: number;
string: string; string: string;
passed: boolean; passed: boolean;
}, };
lifetime_hours: number; lifetime_hours: number;
}[]; }[];
count: number; count: number;
@ -215,34 +218,34 @@ export namespace Systeminformation {
}; };
}; };
nvme_pci_vendor?: { nvme_pci_vendor?: {
id: number, id: number;
subsystem_id: number; subsystem_id: number;
}, },
nvme_smart_health_information_log?: { nvme_smart_health_information_log?: {
critical_warning?: number, critical_warning?: number;
temperature?: number, temperature?: number;
available_spare?: number, available_spare?: number;
available_spare_threshold?: number, available_spare_threshold?: number;
percentage_used?: number, percentage_used?: number;
data_units_read?: number, data_units_read?: number;
data_units_written?: number, data_units_written?: number;
host_reads?: number, host_reads?: number;
host_writes?: number, host_writes?: number;
controller_busy_time?: number, controller_busy_time?: number;
power_cycles?: number, power_cycles?: number;
power_on_hours?: number, power_on_hours?: number;
unsafe_shutdowns?: number, unsafe_shutdowns?: number;
media_errors?: number, media_errors?: number;
num_err_log_entries?: number, num_err_log_entries?: number;
warning_temp_time?: number, warning_temp_time?: number;
critical_comp_time?: number, critical_comp_time?: number;
temperature_sensors?: number[]; temperature_sensors?: number[];
}, },
user_capacity?: { user_capacity?: {
blocks: number, blocks: number;
bytes: number; bytes: number;
}, },
logical_block_size?: number, logical_block_size?: number;
temperature: { temperature: {
current: number; current: number;
}; };
@ -283,7 +286,7 @@ export namespace Systeminformation {
currentCapacity: number; currentCapacity: number;
capacityUnit: string; capacityUnit: string;
percent: number; percent: number;
timeRemaining: number, timeRemaining: number;
acConnected: boolean; acConnected: boolean;
type: string; type: string;
model: string; model: string;
@ -618,7 +621,7 @@ export namespace Systeminformation {
interface ProcessesProcessData { interface ProcessesProcessData {
pid: number; pid: number;
parentPid: number; parentPid: number;
name: string, name: string;
cpu: number; cpu: number;
cpuu: number; cpuu: number;
cpus: number; cpus: number;
@ -627,7 +630,7 @@ export namespace Systeminformation {
memVsz: number; memVsz: number;
memRss: number; memRss: number;
nice: number; nice: number;
started: string, started: string;
state: string; state: string;
tty: string; tty: string;
user: string; user: string;
@ -772,7 +775,7 @@ export namespace Systeminformation {
restartCount: number; restartCount: number;
cpuStats: any; cpuStats: any;
precpuStats: any; precpuStats: any;
memoryStats: any, memoryStats: any;
networks: any; networks: any;
} }

View File

@ -95,7 +95,7 @@ function getStaticData(callback) {
network.networkInterfaces(), network.networkInterfaces(),
memory.memLayout(), memory.memLayout(),
filesystem.diskLayout() filesystem.diskLayout()
]).then(res => { ]).then((res) => {
data.system = res[0]; data.system = res[0];
data.bios = res[1]; data.bios = res[1];
data.baseboard = res[2]; data.baseboard = res[2];
@ -181,95 +181,95 @@ function getDynamicData(srv, iface, callback) {
data.node = process.versions.node; data.node = process.versions.node;
data.v8 = process.versions.v8; data.v8 = process.versions.v8;
cpu.cpuCurrentSpeed().then(res => { cpu.cpuCurrentSpeed().then((res) => {
data.cpuCurrentSpeed = res; data.cpuCurrentSpeed = res;
functionProcessed(); functionProcessed();
}); });
users.users().then(res => { users.users().then((res) => {
data.users = res; data.users = res;
functionProcessed(); functionProcessed();
}); });
processes.processes().then(res => { processes.processes().then((res) => {
data.processes = res; data.processes = res;
functionProcessed(); functionProcessed();
}); });
cpu.currentLoad().then(res => { cpu.currentLoad().then((res) => {
data.currentLoad = res; data.currentLoad = res;
functionProcessed(); functionProcessed();
}); });
if (!_sunos) { if (!_sunos) {
cpu.cpuTemperature().then(res => { cpu.cpuTemperature().then((res) => {
data.temp = res; data.temp = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_openbsd && !_freebsd && !_netbsd && !_sunos) { if (!_openbsd && !_freebsd && !_netbsd && !_sunos) {
network.networkStats(iface).then(res => { network.networkStats(iface).then((res) => {
data.networkStats = res; data.networkStats = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_sunos) { if (!_sunos) {
network.networkConnections().then(res => { network.networkConnections().then((res) => {
data.networkConnections = res; data.networkConnections = res;
functionProcessed(); functionProcessed();
}); });
} }
memory.mem().then(res => { memory.mem().then((res) => {
data.mem = res; data.mem = res;
functionProcessed(); functionProcessed();
}); });
if (!_sunos) { if (!_sunos) {
battery().then(res => { battery().then((res) => {
data.battery = res; data.battery = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_sunos) { if (!_sunos) {
processes.services(srv).then(res => { processes.services(srv).then((res) => {
data.services = res; data.services = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_sunos) { if (!_sunos) {
filesystem.fsSize().then(res => { filesystem.fsSize().then((res) => {
data.fsSize = res; data.fsSize = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_windows && !_openbsd && !_freebsd && !_netbsd && !_sunos) { if (!_windows && !_openbsd && !_freebsd && !_netbsd && !_sunos) {
filesystem.fsStats().then(res => { filesystem.fsStats().then((res) => {
data.fsStats = res; data.fsStats = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_windows && !_openbsd && !_freebsd && !_netbsd && !_sunos) { if (!_windows && !_openbsd && !_freebsd && !_netbsd && !_sunos) {
filesystem.disksIO().then(res => { filesystem.disksIO().then((res) => {
data.disksIO = res; data.disksIO = res;
functionProcessed(); functionProcessed();
}); });
} }
if (!_openbsd && !_freebsd && !_netbsd && !_sunos) { if (!_openbsd && !_freebsd && !_netbsd && !_sunos) {
wifi.wifiNetworks().then(res => { wifi.wifiNetworks().then((res) => {
data.wifiNetworks = res; data.wifiNetworks = res;
functionProcessed(); functionProcessed();
}); });
} }
internet.inetLatency().then(res => { internet.inetLatency().then((res) => {
data.inetLatency = res; data.inetLatency = res;
functionProcessed(); functionProcessed();
}); });
@ -301,9 +301,9 @@ function getAllData(srv, iface, callback) {
iface = ''; iface = '';
} }
getStaticData().then(res => { getStaticData().then((res) => {
data = res; data = res;
getDynamicData(srv, iface).then(res => { getDynamicData(srv, iface).then((res) => {
for (let key in res) { for (let key in res) {
if ({}.hasOwnProperty.call(res, key)) { if ({}.hasOwnProperty.call(res, key)) {
data[key] = res[key]; data[key] = res[key];
@ -333,7 +333,7 @@ function get(valueObject, callback) {
} }
}); });
Promise.all(allPromises).then(data => { Promise.all(allPromises).then((data) => {
const result = {}; const result = {};
let i = 0; let i = 0;
for (let key in valueObject) { for (let key in valueObject) {
@ -419,7 +419,7 @@ function observe(valueObject, interval, callback) {
let _data = null; let _data = null;
const result = setInterval(() => { const result = setInterval(() => {
get(valueObject).then(data => { get(valueObject).then((data) => {
if (JSON.stringify(_data) !== JSON.stringify(data)) { if (JSON.stringify(_data) !== JSON.stringify(data)) {
_data = Object.assign({}, data); _data = Object.assign({}, data);
callback(data); callback(data);

View File

@ -250,7 +250,7 @@ function getWindowsNics() {
let cmd = 'Get-WmiObject Win32_NetworkAdapter | fl *' + '; echo \'#-#-#-#\';'; let cmd = 'Get-WmiObject Win32_NetworkAdapter | fl *' + '; echo \'#-#-#-#\';';
cmd += 'Get-WmiObject Win32_NetworkAdapterConfiguration | fl DHCPEnabled' + ''; cmd += 'Get-WmiObject Win32_NetworkAdapterConfiguration | fl DHCPEnabled' + '';
try { try {
util.powerShell(cmd).then(data => { util.powerShell(cmd).then((data) => {
data = data.split('#-#-#-#'); data = data.split('#-#-#-#');
const nsections = (data[0] || '').split(/\n\s*\n/); const nsections = (data[0] || '').split(/\n\s*\n/);
const nconfigsections = (data[1] || '').split(/\n\s*\n/); const nconfigsections = (data[1] || '').split(/\n\s*\n/);
@ -1161,7 +1161,7 @@ function networkStats(ifaces, callback) {
if (workload.length) { if (workload.length) {
Promise.all( Promise.all(
workload workload
).then(data => { ).then((data) => {
if (callback) { callback(data); } if (callback) { callback(data); }
resolve(data); resolve(data);
}); });
@ -1183,7 +1183,7 @@ function networkStatsSingle(iface) {
if (sections[i].trim() !== '') { if (sections[i].trim() !== '') {
let lines = sections[i].trim().split('\r\n'); let lines = sections[i].trim().split('\r\n');
perfData.push({ perfData.push({
name: util.getValue(lines, 'Name', ':').replace(/[()[\] ]+/g, '').replace(/\#|\//g, '_').toLowerCase(), name: util.getValue(lines, 'Name', ':').replace(/[()[\] ]+/g, '').replace(/#|\//g, '_').toLowerCase(),
rx_bytes: parseInt(util.getValue(lines, 'BytesReceivedPersec', ':'), 10), rx_bytes: parseInt(util.getValue(lines, 'BytesReceivedPersec', ':'), 10),
rx_errors: parseInt(util.getValue(lines, 'PacketsReceivedErrors', ':'), 10), rx_errors: parseInt(util.getValue(lines, 'PacketsReceivedErrors', ':'), 10),
rx_dropped: parseInt(util.getValue(lines, 'PacketsReceivedDiscarded', ':'), 10), rx_dropped: parseInt(util.getValue(lines, 'PacketsReceivedDiscarded', ':'), 10),
@ -1202,7 +1202,7 @@ function networkStatsSingle(iface) {
let ifaceSanitized = ''; let ifaceSanitized = '';
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(iface); const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(iface);
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) { for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) { if (s[i] !== undefined) {
ifaceSanitized = ifaceSanitized + s[i]; ifaceSanitized = ifaceSanitized + s[i];
} }
} }
@ -1334,8 +1334,8 @@ function networkStatsSingle(iface) {
det.mac.toLowerCase() === ifaceSanitized.toLowerCase() || det.mac.toLowerCase() === ifaceSanitized.toLowerCase() ||
det.ip4.toLowerCase() === ifaceSanitized.toLowerCase() || det.ip4.toLowerCase() === ifaceSanitized.toLowerCase() ||
det.ip6.toLowerCase() === ifaceSanitized.toLowerCase() || det.ip6.toLowerCase() === ifaceSanitized.toLowerCase() ||
det.ifaceName.replace(/[()[\] ]+/g, '').replace(/\#|\//g, '_').toLowerCase() === ifaceSanitized.replace(/[()[\] ]+/g, '').replace('#', '_').toLowerCase()) && det.ifaceName.replace(/[()[\] ]+/g, '').replace(/#|\//g, '_').toLowerCase() === ifaceSanitized.replace(/[()[\] ]+/g, '').replace('#', '_').toLowerCase()) &&
(det.ifaceName.replace(/[()[\] ]+/g, '').replace(/\#|\//g, '_').toLowerCase() === detail.name)) { (det.ifaceName.replace(/[()[\] ]+/g, '').replace(/#|\//g, '_').toLowerCase() === detail.name)) {
ifaceName = det.iface; ifaceName = det.iface;
rx_bytes = detail.rx_bytes; rx_bytes = detail.rx_bytes;
rx_dropped = detail.rx_dropped; rx_dropped = detail.rx_dropped;
@ -1693,7 +1693,7 @@ function networkGatewayDefault(callback) {
}); });
if (!result) { if (!result) {
util.powerShell('Get-CimInstance -ClassName Win32_IP4RouteTable | Where-Object { $_.Destination -eq \'0.0.0.0\' -and $_.Mask -eq \'0.0.0.0\' }') util.powerShell('Get-CimInstance -ClassName Win32_IP4RouteTable | Where-Object { $_.Destination -eq \'0.0.0.0\' -and $_.Mask -eq \'0.0.0.0\' }')
.then(data => { .then((data) => {
let lines = data.toString().split('\r\n'); let lines = data.toString().split('\r\n');
if (lines.length > 1 && !result) { if (lines.length > 1 && !result) {
result = util.getValue(lines, 'NextHop'); result = util.getValue(lines, 'NextHop');

View File

@ -250,7 +250,7 @@ function osInfo(callback) {
result.build = (release.BUILD_ID || '').replace(/"/g, '').trim(); result.build = (release.BUILD_ID || '').replace(/"/g, '').trim();
isUefiLinux().then(uefi => { isUefiLinux().then(uefi => {
result.uefi = uefi; result.uefi = uefi;
uuid().then(data => { uuid().then((data) => {
result.serial = data.os; result.serial = data.os;
if (callback) { if (callback) {
callback(result); callback(result);
@ -333,7 +333,7 @@ function osInfo(callback) {
workload.push(util.powerShell('Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SystemInformation]::TerminalServerSession')); workload.push(util.powerShell('Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SystemInformation]::TerminalServerSession'));
util.promiseAll( util.promiseAll(
workload workload
).then(data => { ).then((data) => {
let lines = data.results[0] ? data.results[0].toString().split('\r\n') : ['']; let lines = data.results[0] ? data.results[0].toString().split('\r\n') : [''];
result.distro = util.getValue(lines, 'Caption', ':').trim(); result.distro = util.getValue(lines, 'Caption', ':').trim();
result.serial = util.getValue(lines, 'SerialNumber', ':').trim(); result.serial = util.getValue(lines, 'SerialNumber', ':').trim();

View File

@ -571,7 +571,7 @@ function baseboard(callback) {
workload.push(execPromise('export LC_ALL=C; dmidecode -t memory 2>/dev/null')); workload.push(execPromise('export LC_ALL=C; dmidecode -t memory 2>/dev/null'));
util.promiseAll( util.promiseAll(
workload workload
).then(data => { ).then((data) => {
let lines = data.results[0] ? data.results[0].toString().split('\n') : ['']; let lines = data.results[0] ? data.results[0].toString().split('\n') : [''];
result.manufacturer = util.getValue(lines, 'Manufacturer'); result.manufacturer = util.getValue(lines, 'Manufacturer');
result.model = util.getValue(lines, 'Product Name'); result.model = util.getValue(lines, 'Product Name');
@ -630,7 +630,7 @@ function baseboard(callback) {
workload.push(execPromise('system_profiler SPMemoryDataType')); workload.push(execPromise('system_profiler SPMemoryDataType'));
util.promiseAll( util.promiseAll(
workload workload
).then(data => { ).then((data) => {
let lines = data.results[0] ? data.results[0].toString().replace(/[<>"]/g, '').split('\n') : ['']; let lines = data.results[0] ? data.results[0].toString().replace(/[<>"]/g, '').split('\n') : [''];
result.manufacturer = util.getValue(lines, 'manufacturer', '=', true); result.manufacturer = util.getValue(lines, 'manufacturer', '=', true);
result.model = util.getValue(lines, 'model', '=', true); result.model = util.getValue(lines, 'model', '=', true);
@ -668,7 +668,7 @@ function baseboard(callback) {
workload.push(util.powerShell(`Get-WmiObject Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`)); workload.push(util.powerShell(`Get-WmiObject Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
util.promiseAll( util.promiseAll(
workload workload
).then(data => { ).then((data) => {
let lines = data.results[0] ? data.results[0].toString().split('\r\n') : ['']; let lines = data.results[0] ? data.results[0].toString().split('\r\n') : [''];
result.manufacturer = util.getValue(lines, 'manufacturer', ':'); result.manufacturer = util.getValue(lines, 'manufacturer', ':');

View File

@ -278,21 +278,6 @@ function usb(callback) {
} }
resolve(result); resolve(result);
}); });
// util.powerShell("gwmi Win32_USBControllerDevice |\%{[wmi]($_.Dependent)}").then(data => {
// const parts = data.toString().split(/\n\s*\n/);
// for (let i = 0; i < parts.length; i++) {
// const usb = parseWindowsUsb(parts[i].split('\n'), i)
// if (usb) {
// result.push(usb)
// }
// }
// if (callback) {
// callback(result);
// }
// resolve(result);
// });
} }
if (_sunos || _freebsd || _openbsd || _netbsd) { if (_sunos || _freebsd || _openbsd || _netbsd) {
resolve(null); resolve(null);

View File

@ -26,44 +26,6 @@ const _openbsd = (_platform === 'openbsd');
const _netbsd = (_platform === 'netbsd'); const _netbsd = (_platform === 'netbsd');
const _sunos = (_platform === 'sunos'); const _sunos = (_platform === 'sunos');
// let _winDateFormat = {
// dateFormat: '',
// dateSeperator: '',
// timeFormat: '',
// timeSeperator: '',
// amDesignator: '',
// pmDesignator: ''
// };
// --------------------------
// array of users online = sessions
// function getWinCulture() {
// return new Promise((resolve) => {
// process.nextTick(() => {
// if (!_winDateFormat.dateFormat) {
// util.powerShell('(get-culture).DateTimeFormat')
// .then(data => {
// let lines = data.toString().split('\r\n');
// _winDateFormat.dateFormat = util.getValue(lines, 'ShortDatePattern', ':');
// _winDateFormat.dateSeperator = util.getValue(lines, 'DateSeparator', ':');
// _winDateFormat.timeFormat = util.getValue(lines, 'ShortTimePattern', ':');
// _winDateFormat.timeSeperator = util.getValue(lines, 'TimeSeparator', ':');
// _winDateFormat.amDesignator = util.getValue(lines, 'AMDesignator', ':');
// _winDateFormat.pmDesignator = util.getValue(lines, 'PMDesignator', ':');
// resolve(_winDateFormat);
// })
// .catch(() => {
// resolve(_winDateFormat);
// });
// } else {
// resolve(_winDateFormat);
// }
// });
// });
// }
function parseUsersLinux(lines, phase) { function parseUsersLinux(lines, phase) {
let result = []; let result = [];
let result_who = []; let result_who = [];
@ -245,21 +207,11 @@ function users(callback) {
} }
if (_windows) { if (_windows) {
try { try {
// const workload = [];
// // workload.push(util.powerShell('Get-CimInstance -ClassName Win32_Account | fl *'));
// workload.push(util.powerShell('Get-WmiObject Win32_LogonSession | fl *'));
// workload.push(util.powerShell('Get-WmiObject Win32_LoggedOnUser | fl *'));
// workload.push(util.powerShell('Get-WmiObject Win32_Process -Filter "name=\'explorer.exe\'" | Select @{Name="domain";Expression={$_.GetOwner().Domain}}, @{Name="username";Expression={$_.GetOwner().User}} | fl'));
// Promise.all(
// workload
// ).then(data => {
let cmd = 'Get-WmiObject Win32_LogonSession | select LogonId,StartTime | fl' + '; echo \'#-#-#-#\';'; let cmd = 'Get-WmiObject Win32_LogonSession | select LogonId,StartTime | fl' + '; echo \'#-#-#-#\';';
cmd += 'Get-WmiObject Win32_LoggedOnUser | select antecedent,dependent | fl ' + '; echo \'#-#-#-#\';'; cmd += 'Get-WmiObject Win32_LoggedOnUser | select antecedent,dependent | fl ' + '; echo \'#-#-#-#\';';
cmd += 'Get-WmiObject Win32_Process -Filter "name=\'explorer.exe\'" | Select @{Name="sessionid";Expression={$_.SessionId}}, @{Name="domain";Expression={$_.GetOwner().Domain}}, @{Name="username";Expression={$_.GetOwner().User}} | fl' + '; echo \'#-#-#-#\';'; cmd += 'Get-WmiObject Win32_Process -Filter "name=\'explorer.exe\'" | Select @{Name="sessionid";Expression={$_.SessionId}}, @{Name="domain";Expression={$_.GetOwner().Domain}}, @{Name="username";Expression={$_.GetOwner().User}} | fl' + '; echo \'#-#-#-#\';';
cmd += 'query user'; cmd += 'query user';
util.powerShell(cmd).then(data => { util.powerShell(cmd).then((data) => {
// controller + vram
// let accounts = parseWinAccounts(data[0].split(/\n\s*\n/));
if (data) { if (data) {
data = data.split('#-#-#-#'); data = data.split('#-#-#-#');
let sessions = parseWinSessions((data[0] || '').split(/\n\s*\n/)); let sessions = parseWinSessions((data[0] || '').split(/\n\s*\n/));

View File

@ -4,66 +4,65 @@ function test(f) {
return new Promise((resolve) => { return new Promise((resolve) => {
process.nextTick(() => { process.nextTick(() => {
f = f.replace(/'/g, ''); f = f.replace(/'/g, '');
// console.log(f); if (f === 'a') { si.audio().then((data) => { if (data !== null) { resolve({ data, title: 'Audio' }); } else { resolve('not_supported'); } }); }
if (f === 'a') { si.audio().then(data => { if (data !== null) { resolve({ data, title: 'Audio' }); } else { resolve('not_supported'); } }); } else if (f === 'b') { si.bios().then((data) => { if (data !== null) { resolve({ data, title: 'BIOS' }); } else { resolve('not_supported'); } }); }
else if (f === 'b') { si.bios().then(data => { if (data !== null) { resolve({ data, title: 'BIOS' }); } else { resolve('not_supported'); } }); } else if (f === 'B') { si.baseboard().then((data) => { if (data !== null) { resolve({ data, title: 'Baseboard' }); } else { resolve('not_supported'); } }); }
else if (f === 'B') { si.baseboard().then(data => { if (data !== null) { resolve({ data, title: 'Baseboard' }); } else { resolve('not_supported'); } }); } else if (f === 'C') { si.chassis().then((data) => { if (data !== null) { resolve({ data, title: 'Chassis' }); } else { resolve('not_supported'); } }); }
else if (f === 'C') { si.chassis().then(data => { if (data !== null) { resolve({ data, title: 'Chassis' }); } else { resolve('not_supported'); } }); } else if (f === 'c') { si.cpu().then((data) => { if (data !== null) { resolve({ data, title: 'CPU' }); } else { resolve('not_supported'); } }); }
else if (f === 'c') { si.cpu().then(data => { if (data !== null) { resolve({ data, title: 'CPU' }); } else { resolve('not_supported'); } }); } else if (f === 'd') { si.diskLayout().then((data) => { if (data !== null) { resolve({ data, title: 'Disk Layout' }); } else { resolve('not_supported'); } }); }
else if (f === 'd') { si.diskLayout().then(data => { if (data !== null) { resolve({ data, title: 'Disk Layout' }); } else { resolve('not_supported'); } }); } else if (f === 'D') { si.disksIO().then((data) => { if (data !== null) { resolve({ data, title: 'Disks IO' }); } else { resolve('not_supported'); } }); }
else if (f === 'D') { si.disksIO().then(data => { if (data !== null) { resolve({ data, title: 'Disks IO' }); } else { resolve('not_supported'); } }); } else if (f === 'e') { si.blockDevices().then((data) => { if (data !== null) { resolve({ data, title: 'Block Devices' }); } else { resolve('not_supported'); } }); }
else if (f === 'e') { si.blockDevices().then(data => { if (data !== null) { resolve({ data, title: 'Block Devices' }); } else { resolve('not_supported'); } }); } else if (f === 'E') { si.fsOpenFiles().then((data) => { if (data !== null) { resolve({ data, title: 'Open Files' }); } else { resolve('not_supported'); } }); }
else if (f === 'E') { si.fsOpenFiles().then(data => { if (data !== null) { resolve({ data, title: 'Open Files' }); } else { resolve('not_supported'); } }); } else if (f === 'f') { si.fsSize().then((data) => { if (data !== null) { resolve({ data, title: 'File System' }); } else { resolve('not_supported'); } }); }
else if (f === 'f') { si.fsSize().then(data => { if (data !== null) { resolve({ data, title: 'File System' }); } else { resolve('not_supported'); } }); } else if (f === 'F') { si.fsStats().then((data) => { if (data !== null) { resolve({ data, title: 'FS Stats' }); } else { resolve('not_supported'); } }); }
else if (f === 'F') { si.fsStats().then(data => { if (data !== null) { resolve({ data, title: 'FS Stats' }); } else { resolve('not_supported'); } }); } else if (f === 'g') { si.graphics().then((data) => { if (data !== null) { resolve({ data, title: 'Graphics' }); } else { resolve('not_supported'); } }); }
else if (f === 'g') { si.graphics().then(data => { if (data !== null) { resolve({ data, title: 'Graphics' }); } else { resolve('not_supported'); } }); } else if (f === 'h') { si.bluetoothDevices().then((data) => { if (data !== null) { resolve({ data, title: 'Bluetooth' }); } else { resolve('not_supported'); } }); }
else if (f === 'h') { si.bluetoothDevices().then(data => { if (data !== null) { resolve({ data, title: 'Bluetooth' }); } else { resolve('not_supported'); } }); } else if (f === 'i') { si.inetLatency().then((data) => { if (data !== null) { resolve({ data, title: 'Internet Latency' }); } else { resolve('not_supported'); } }); }
else if (f === 'i') { si.inetLatency().then(data => { if (data !== null) { resolve({ data, title: 'Internet Latency' }); } else { resolve('not_supported'); } }); } else if (f === 'I') { si.inetChecksite('https://systeminformation.io').then((data) => { if (data !== null) { resolve({ data, title: 'Internet Check Site' }); } else { resolve('not_supported'); } }); }
else if (f === 'I') { si.inetChecksite('https://systeminformation.io').then(data => { if (data !== null) { resolve({ data, title: 'Internet Check Site' }); } else { resolve('not_supported'); } }); } else if (f === 'j') { si.cpuCurrentSpeed().then((data) => { if (data !== null) { resolve({ data, title: 'CPU Current Speed' }); } else { resolve('not_supported'); } }); }
else if (f === 'j') { si.cpuCurrentSpeed().then(data => { if (data !== null) { resolve({ data, title: 'CPU Current Speed' }); } else { resolve('not_supported'); } }); } else if (f === 'l') { si.currentLoad().then((data) => { if (data !== null) { resolve({ data, title: 'CPU Current Load' }); } else { resolve('not_supported'); } }); }
else if (f === 'l') { si.currentLoad().then(data => { if (data !== null) { resolve({ data, title: 'CPU Current Load' }); } else { resolve('not_supported'); } }); } else if (f === 'L') { si.fullLoad().then((data) => { if (data !== null) { resolve({ data, title: 'CPU Full Load' }); } else { resolve('not_supported'); } }); }
else if (f === 'L') { si.fullLoad().then(data => { if (data !== null) { resolve({ data, title: 'CPU Full Load' }); } else { resolve('not_supported'); } }); } else if (f === 'm') { si.mem().then((data) => { if (data !== null) { resolve({ data, title: 'Memory' }); } else { resolve('not_supported'); } }); }
else if (f === 'm') { si.mem().then(data => { if (data !== null) { resolve({ data, title: 'Memory' }); } else { resolve('not_supported'); } }); } else if (f === 'M') { si.memLayout().then((data) => { if (data !== null) { resolve({ data, title: 'Memory Layout' }); } else { resolve('not_supported'); } }); }
else if (f === 'M') { si.memLayout().then(data => { if (data !== null) { resolve({ data, title: 'Memory Layout' }); } else { resolve('not_supported'); } }); } else if (f === 'o') { si.osInfo().then((data) => { if (data !== null) { resolve({ data, title: 'OS Info' }); } else { resolve('not_supported'); } }); }
else if (f === 'o') { si.osInfo().then(data => { if (data !== null) { resolve({ data, title: 'OS Info' }); } else { resolve('not_supported'); } }); } else if (f === 'p') { si.processes().then((data) => { if (data !== null) { resolve({ data, title: 'Processes' }); } else { resolve('not_supported'); } }); }
else if (f === 'p') { si.processes().then(data => { if (data !== null) { resolve({ data, title: 'Processes' }); } else { resolve('not_supported'); } }); } else if (f === 'P') { si.processLoad('postgres, login, apache, mysql, nginx, git, node').then((data) => { if (data !== null) { resolve({ data, title: 'Process Load' }); } else { resolve('not_supported'); } }); }
else if (f === 'P') { si.processLoad('postgres, login, apache, mysql, nginx, git, node').then(data => { if (data !== null) { resolve({ data, title: 'Process Load' }); } else { resolve('not_supported'); } }); } else if (f === 'r') { si.printer().then((data) => { if (data !== null) { resolve({ data, title: 'Printer' }); } else { resolve('not_supported'); } }); }
else if (f === 'r') { si.printer().then(data => { if (data !== null) { resolve({ data, title: 'Printer' }); } else { resolve('not_supported'); } }); } else if (f === 's') { si.services('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'Services' }); } else { resolve('not_supported'); } }); }
else if (f === 's') { si.services('apache2, postgres, wsearch').then(data => { if (data !== null) { resolve({ data, title: 'Services' }); } else { resolve('not_supported'); } }); } else if (f === 'S') { si.shell().then((data) => { if (data !== null) { resolve({ data, title: 'Shell' }); } else { resolve('not_supported'); } }); }
else if (f === 'S') { si.shell().then(data => { if (data !== null) { resolve({ data, title: 'Shell' }); } else { resolve('not_supported'); } }); }
else if (f === 't') { resolve({ data: si.time(), title: 'Time' }); } else if (f === 't') { resolve({ data: si.time(), title: 'Time' }); }
else if (f === 'T') { si.cpuTemperature().then(data => { if (data !== null) { resolve({ data, title: 'CPU Temperature' }); } else { resolve('not_supported'); } }); } else if (f === 'T') { si.cpuTemperature().then((data) => { if (data !== null) { resolve({ data, title: 'CPU Temperature' }); } else { resolve('not_supported'); } }); }
else if (f === 'u') { si.usb().then(data => { if (data !== null) { resolve({ data, title: 'USB' }); } else { resolve('not_supported'); } }); } else if (f === 'u') { si.usb().then((data) => { if (data !== null) { resolve({ data, title: 'USB' }); } else { resolve('not_supported'); } }); }
else if (f === 'U') { si.uuid().then(data => { if (data !== null) { resolve({ data, title: 'UUID' }); } else { resolve('not_supported'); } }); } else if (f === 'U') { si.uuid().then((data) => { if (data !== null) { resolve({ data, title: 'UUID' }); } else { resolve('not_supported'); } }); }
else if (f === 'v') { si.versions().then(data => { if (data !== null) { resolve({ data, title: 'Versions' }); } else { resolve('not_supported'); } }); } else if (f === 'v') { si.versions().then((data) => { if (data !== null) { resolve({ data, title: 'Versions' }); } else { resolve('not_supported'); } }); }
else if (f === 'V') { si.vboxInfo().then(data => { if (data !== null) { resolve({ data, title: 'Virtual Box' }); } else { resolve('not_supported'); } }); } else if (f === 'V') { si.vboxInfo().then((data) => { if (data !== null) { resolve({ data, title: 'Virtual Box' }); } else { resolve('not_supported'); } }); }
else if (f === 'w') { si.wifiNetworks().then(data => { if (data !== null) { resolve({ data, title: 'WIFI Networks' }); } else { resolve('not_supported'); } }); } else if (f === 'w') { si.wifiNetworks().then((data) => { if (data !== null) { resolve({ data, title: 'WIFI Networks' }); } else { resolve('not_supported'); } }); }
else if (f === 'W') { si.wifiInterfaces().then(data => { if (data !== null) { resolve({ data, title: 'WIFI Interfaces' }); } else { resolve('not_supported'); } }); } else if (f === 'W') { si.wifiInterfaces().then((data) => { if (data !== null) { resolve({ data, title: 'WIFI Interfaces' }); } else { resolve('not_supported'); } }); }
else if (f === 'x') { si.wifiConnections().then(data => { if (data !== null) { resolve({ data, title: 'WIFI Connections' }); } else { resolve('not_supported'); } }); } else if (f === 'x') { si.wifiConnections().then((data) => { if (data !== null) { resolve({ data, title: 'WIFI Connections' }); } else { resolve('not_supported'); } }); }
else if (f === 'y') { si.system().then(data => { if (data !== null) { resolve({ data, title: 'System' }); } else { resolve('not_supported'); } }); } else if (f === 'y') { si.system().then((data) => { if (data !== null) { resolve({ data, title: 'System' }); } else { resolve('not_supported'); } }); }
else if (f === 'Y') { si.battery().then(data => { if (data !== null) { resolve({ data, title: 'Battery' }); } else { resolve('not_supported'); } }); } else if (f === 'Y') { si.battery().then((data) => { if (data !== null) { resolve({ data, title: 'Battery' }); } else { resolve('not_supported'); } }); }
else if (f === 'z') { si.users().then(data => { if (data !== null) { resolve({ data, title: 'Users' }); } else { resolve('not_supported'); } }); } else if (f === 'z') { si.users().then((data) => { if (data !== null) { resolve({ data, title: 'Users' }); } else { resolve('not_supported'); } }); }
else if (f === '1') { si.networkInterfaceDefault().then(data => { if (data !== null) { resolve({ data, title: 'NET Iface Default' }); } else { resolve('not_supported'); } }); } else if (f === '1') { si.networkInterfaceDefault().then((data) => { if (data !== null) { resolve({ data, title: 'NET Iface Default' }); } else { resolve('not_supported'); } }); }
else if (f === '2') { si.networkGatewayDefault().then(data => { if (data !== null) { resolve({ data, title: 'NET Gateway Default' }); } else { resolve('not_supported'); } }); } else if (f === '2') { si.networkGatewayDefault().then((data) => { if (data !== null) { resolve({ data, title: 'NET Gateway Default' }); } else { resolve('not_supported'); } }); }
else if (f === '3') { si.networkInterfaces().then(data => { if (data !== null) { resolve({ data, title: 'NET Interfaces' }); } else { resolve('not_supported'); } }); } else if (f === '3') { si.networkInterfaces().then((data) => { if (data !== null) { resolve({ data, title: 'NET Interfaces' }); } else { resolve('not_supported'); } }); }
else if (f === '4') { si.networkStats().then(data => { if (data !== null) { resolve({ data, title: 'NET Stats' }); } else { resolve('not_supported'); } }); } else if (f === '4') { si.networkStats().then((data) => { if (data !== null) { resolve({ data, title: 'NET Stats' }); } else { resolve('not_supported'); } }); }
else if (f === '5') { si.networkConnections().then(data => { if (data !== null) { resolve({ data, title: 'NET Connections' }); } else { resolve('not_supported'); } }); } else if (f === '5') { si.networkConnections().then((data) => { if (data !== null) { resolve({ data, title: 'NET Connections' }); } else { resolve('not_supported'); } }); }
else if (f === '6') { si.dockerInfo().then(data => { if (data !== null) { resolve({ data, title: 'Docker Info' }); } else { resolve('not_supported'); } }); } else if (f === '6') { si.dockerInfo().then((data) => { if (data !== null) { resolve({ data, title: 'Docker Info' }); } else { resolve('not_supported'); } }); }
else if (f === '7') { si.dockerImages().then(data => { if (data !== null) { resolve({ data, title: 'Docker Images' }); } else { resolve('not_supported'); } }); } else if (f === '7') { si.dockerImages().then((data) => { if (data !== null) { resolve({ data, title: 'Docker Images' }); } else { resolve('not_supported'); } }); }
else if (f === '8') { si.dockerContainers(true).then(data => { if (data !== null) { resolve({ data, title: 'Docker Containers' }); } else { resolve('not_supported'); } }); } else if (f === '8') { si.dockerContainers(true).then((data) => { if (data !== null) { resolve({ data, title: 'Docker Containers' }); } else { resolve('not_supported'); } }); }
else if (f === '9') { si.dockerContainerStats('*').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Stats' }); } else { resolve('not_supported'); } }); } else if (f === '9') { si.dockerContainerStats('*').then((data) => { if (data !== null) { resolve({ data, title: 'Docker Cont Stats' }); } else { resolve('not_supported'); } }); }
else if (f === '0') { si.dockerContainerProcesses('*').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Processes' }); } else { resolve('not_supported'); } }); } else if (f === '0') { si.dockerContainerProcesses('*').then((data) => { if (data !== null) { resolve({ data, title: 'Docker Cont Processes' }); } else { resolve('not_supported'); } }); }
else if (f === '+') { si.dockerVolumes().then(data => { if (data !== null) { resolve({ data, title: 'Docker Volumes' }); } else { resolve('not_supported'); } }); } else if (f === '+') { si.dockerVolumes().then((data) => { if (data !== null) { resolve({ data, title: 'Docker Volumes' }); } else { resolve('not_supported'); } }); }
else if (f === ',') { si.getStaticData().then(data => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported'); } }); } else if (f === ',') { si.getStaticData().then((data) => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported'); } }); }
else if (f === '.') { si.getDynamicData('apache2, postgres, wsearch').then(data => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported'); } }); } else if (f === '.') { si.getDynamicData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported'); } }); }
else if (f === '/') { si.getAllData('apache2, postgres, wsearch').then(data => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported'); } }); } else if (f === '/') { si.getAllData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported'); } }); }
else if (f === '?') { else if (f === '?') {
const valueObject = { const valueObject = {
cpu: '*', cpu: '*',
osInfo: 'platform, release', osInfo: 'platform, release',
system: 'model, manufacturer' system: 'model, manufacturer'
}; };
si.get(valueObject).then(data => resolve({ data, title: 'Get Object' })); si.get(valueObject).then((data) => resolve({ data, title: 'Get Object' }));
} }
else { resolve('no_key'); } else { resolve('no_key'); }
}); });
@ -71,10 +70,7 @@ function test(f) {
} }
const key = process.argv[2]; const key = process.argv[2];
// console.log(process.argv)
// console.log(process.argv); test(key).then((data) => {
test(key).then(data => {
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
}); });