Display full interface name of network for big screen in the webui

This commit is contained in:
Floran Brutel 2021-07-28 07:48:46 +02:00
parent 42d56426c8
commit fd6e19854d
6 changed files with 75 additions and 42 deletions

View File

@ -8,7 +8,7 @@
</div> </div>
<div class="table-row" ng-repeat="fs in vm.fileSystems"> <div class="table-row" ng-repeat="fs in vm.fileSystems">
<div class="table-cell text-left">{{ fs.shortMountPoint }} <span class="visible-lg-inline" <div class="table-cell text-left">{{ fs.shortMountPoint }} <span class="visible-lg-inline"
ng-show="fs.name.length <= 20">({{ fs.name }})<span> ng-show="fs.name.length <= 20">({{ fs.name }})</span>
</div> </div>
<div class="table-cell" ng-class="vm.getDecoration(fs.mountPoint, 'used')"> <div class="table-cell" ng-class="vm.getDecoration(fs.mountPoint, 'used')">
<span ng-show="!vm.arguments.fs_free_space">{{ fs.used | bytes }}</span> <span ng-show="!vm.arguments.fs_free_space">{{ fs.used | bytes }}</span>

View File

@ -18,9 +18,11 @@ export default function GlancesPluginNetworkController($scope, $filter, GlancesS
vm.networks = []; vm.networks = [];
for (var i = 0; i < networkStats.length; i++) { for (var i = 0; i < networkStats.length; i++) {
var networkData = networkStats[i]; var networkData = networkStats[i];
var alias = networkData['alias'] !== undefined ? networkData['alias'] : null
var network = { var network = {
'interfaceName': networkData['interface_name'], 'interfaceName': networkData['interface_name'],
'ifname': alias ? alias : networkData['interface_name'],
'rx': networkData['rx'], 'rx': networkData['rx'],
'tx': networkData['tx'], 'tx': networkData['tx'],
'cx': networkData['cx'], 'cx': networkData['cx'],
@ -28,7 +30,6 @@ export default function GlancesPluginNetworkController($scope, $filter, GlancesS
'cumulativeRx': networkData['cumulative_rx'], 'cumulativeRx': networkData['cumulative_rx'],
'cumulativeTx': networkData['cumulative_tx'], 'cumulativeTx': networkData['cumulative_tx'],
'cumulativeCx': networkData['cumulative_cx'], 'cumulativeCx': networkData['cumulative_cx'],
'alias': networkData['alias'] !== undefined ? networkData['alias'] : null
}; };
vm.networks.push(network); vm.networks.push(network);

View File

@ -13,7 +13,10 @@
<div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx</div> <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx</div>
</div> </div>
<div class="table-row" ng-repeat="network in vm.networks track by network.interfaceName"> <div class="table-row" ng-repeat="network in vm.networks track by network.interfaceName">
<div class="table-cell text-left">{{ (network.alias ? network.alias : network.interfaceName) | min_size }}</div> <div class="table-cell text-left">
<span class="visible-lg-inline">{{ network.ifname }}</span>
<span class="hidden-lg">{{ network.ifname | min_size }}</span>
</div>
<div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ?
(network.rx / network.time_since_update | bytes) : (network.rx / network.time_since_update | bits) }} (network.rx / network.time_since_update | bytes) : (network.rx / network.time_since_update | bits) }}
</div> </div>

View File

@ -433,6 +433,16 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"block-stream": { "block-stream": {
"version": "0.0.9", "version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
@ -712,7 +722,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1900,6 +1910,13 @@
} }
} }
}, },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"fill-range": { "fill-range": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@ -1980,7 +1997,7 @@
"dependencies": { "dependencies": {
"combined-stream": { "combined-stream": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2978,7 +2995,7 @@
}, },
"load-json-file": { "load-json-file": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -3436,6 +3453,13 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
"dev": true,
"optional": true
},
"nanomatch": { "nanomatch": {
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@ -3782,7 +3806,7 @@
}, },
"os-locale": { "os-locale": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -6175,7 +6199,11 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true, "dev": true,
"optional": true "optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
}, },
"glob-parent": { "glob-parent": {
"version": "3.1.0", "version": "3.1.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long