mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Merge pull request #1472 from notFloran/webui-fix-isLinux
[WebUI] Fix use of isLinux
This commit is contained in:
commit
68d10873bb
@ -28,6 +28,8 @@ export default function GlancesPluginCpuController($scope, GlancesStats) {
|
|||||||
var stats = data.stats['cpu'];
|
var stats = data.stats['cpu'];
|
||||||
_view = data.views['cpu'];
|
_view = data.views['cpu'];
|
||||||
|
|
||||||
|
vm.isLinux = data.isLinux;
|
||||||
|
|
||||||
vm.total = stats.total;
|
vm.total = stats.total;
|
||||||
vm.user = stats.user;
|
vm.user = stats.user;
|
||||||
vm.system = stats.system;
|
vm.system = stats.system;
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
{{ vm.soft_interrupts }}
|
{{ vm.soft_interrupts }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-row" ng-if="!statsSystem.isLinux() && vm.syscalls">
|
<div class="table-row" ng-if="!vm.isLinux && vm.syscalls">
|
||||||
<div class="table-cell text-left">syscal:</div>
|
<div class="table-cell text-left">syscal:</div>
|
||||||
<div class="table-cell">
|
<div class="table-cell">
|
||||||
{{ vm.syscalls }}
|
{{ vm.syscalls }}
|
||||||
|
@ -25,6 +25,7 @@ export default function GlancesPluginSystemController($scope, GlancesStats) {
|
|||||||
var loadData = function (data) {
|
var loadData = function (data) {
|
||||||
var stats = data.stats['system'];
|
var stats = data.stats['system'];
|
||||||
|
|
||||||
|
vm.isLinux = data.isLinux;
|
||||||
vm.hostname = stats['hostname'];
|
vm.hostname = stats['hostname'];
|
||||||
vm.platform = stats['platform'];
|
vm.platform = stats['platform'];
|
||||||
vm.os.name = stats['os_name'];
|
vm.os.name = stats['os_name'];
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<section id="system">
|
<section id="system">
|
||||||
<span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>
|
<span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>
|
||||||
<span class="title">{{ vm.hostname }}</span>
|
<span class="title">{{ vm.hostname }}</span>
|
||||||
<span ng-if="vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>
|
<span ng-if="vm.isLinux" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>
|
||||||
<span ng-if="!vm.stats.isLinux"
|
<span ng-if="!vm.isLinux" class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>
|
||||||
class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>
|
|
||||||
</section>
|
</section>
|
||||||
|
41
glances/outputs/static/package-lock.json
generated
41
glances/outputs/static/package-lock.json
generated
@ -2003,7 +2003,8 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -2024,12 +2025,14 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@ -2044,17 +2047,20 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@ -2171,7 +2177,8 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@ -2183,6 +2190,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -2197,6 +2205,7 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@ -2204,12 +2213,14 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@ -2228,6 +2239,7 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@ -2308,7 +2320,8 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@ -2320,6 +2333,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@ -2405,7 +2419,8 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@ -2441,6 +2456,7 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@ -2460,6 +2476,7 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@ -2503,12 +2520,14 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
7
glances/outputs/static/public/glances.js
vendored
7
glances/outputs/static/public/glances.js
vendored
@ -40468,6 +40468,8 @@ function GlancesPluginCpuController($scope, GlancesStats) {
|
|||||||
var stats = data.stats['cpu'];
|
var stats = data.stats['cpu'];
|
||||||
_view = data.views['cpu'];
|
_view = data.views['cpu'];
|
||||||
|
|
||||||
|
vm.isLinux = data.isLinux;
|
||||||
|
|
||||||
vm.total = stats.total;
|
vm.total = stats.total;
|
||||||
vm.user = stats.user;
|
vm.user = stats.user;
|
||||||
vm.system = stats.system;
|
vm.system = stats.system;
|
||||||
@ -40509,7 +40511,7 @@ function GlancesPluginCpuController($scope, GlancesStats) {
|
|||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/plugin-cpu/view.html';
|
var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/plugin-cpu/view.html';
|
||||||
var html = "<section id=\"cpu\" class=\"plugin\">\n <div class=\"row\">\n <div class=\"col-sm-24 col-md-12 col-lg-8\">\n <div class=\"table\">\n <div class=\"table-row\">\n <div class=\"table-cell text-left title\">CPU</div>\n <div class=\"table-cell\">{{ vm.total }}%</div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-cell text-left\">user:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('user')\">\n {{ vm.user }}%\n </div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-cell text-left\">system:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('system')\">\n {{ vm.system }}%\n </div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-cell text-left\">idle:</div>\n <div class=\"table-cell\">{{ vm.idle }}%</div>\n </div>\n </div>\n </div>\n <div class=\"hidden-xs hidden-sm col-md-12 col-lg-8\">\n <div class=\"table\">\n <div class=\"table-row\" ng-show=\"vm.nice != undefined\">\n <div class=\"table-cell text-left\">nice:</div>\n <div class=\"table-cell\">\n {{ vm.nice }}%\n </div>\n </div>\n <div class=\"table-row\" ng-show=\"vm.irq != undefined\">\n <div class=\"table-cell text-left\">irq:</div>\n <div class=\"table-cell\">\n {{ vm.irq }}%\n </div>\n </div>\n <div class=\"table-row\" ng-show=\"vm.iowait != undefined\">\n <div class=\"table-cell text-left\">iowait:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('iowait')\">\n {{ vm.iowait }}%\n </div>\n </div>\n <div class=\"table-row\" ng-show=\"vm.steal != undefined\">\n <div class=\"table-cell text-left\">steal:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('steal')\">\n {{ vm.steal }}%\n </div>\n </div>\n </div>\n </div>\n <div class=\"hidden-xs hidden-sm hidden-md col-lg-8\">\n <div class=\"table\">\n <div class=\"table-row\" ng-if=\"vm.ctx_switches\">\n <div class=\"table-cell text-left\">ctx_sw:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('ctx_switches')\">\n {{ vm.ctx_switches }}\n </div>\n </div>\n <div class=\"table-row\" ng-if=\"vm.interrupts\">\n <div class=\"table-cell text-left\">inter:</div>\n <div class=\"table-cell\">\n {{ vm.interrupts }}\n </div>\n </div>\n <div class=\"table-row\" ng-if=\"vm.soft_interrupts\">\n <div class=\"table-cell text-left\">sw_int:</div>\n <div class=\"table-cell\">\n {{ vm.soft_interrupts }}\n </div>\n </div>\n <div class=\"table-row\" ng-if=\"!statsSystem.isLinux() && vm.syscalls\">\n <div class=\"table-cell text-left\">syscal:</div>\n <div class=\"table-cell\">\n {{ vm.syscalls }}\n </div>\n </div>\n </div>\n </div>\n </div>\n</section>\n";
|
var html = "<section id=\"cpu\" class=\"plugin\">\n <div class=\"row\">\n <div class=\"col-sm-24 col-md-12 col-lg-8\">\n <div class=\"table\">\n <div class=\"table-row\">\n <div class=\"table-cell text-left title\">CPU</div>\n <div class=\"table-cell\">{{ vm.total }}%</div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-cell text-left\">user:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('user')\">\n {{ vm.user }}%\n </div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-cell text-left\">system:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('system')\">\n {{ vm.system }}%\n </div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-cell text-left\">idle:</div>\n <div class=\"table-cell\">{{ vm.idle }}%</div>\n </div>\n </div>\n </div>\n <div class=\"hidden-xs hidden-sm col-md-12 col-lg-8\">\n <div class=\"table\">\n <div class=\"table-row\" ng-show=\"vm.nice != undefined\">\n <div class=\"table-cell text-left\">nice:</div>\n <div class=\"table-cell\">\n {{ vm.nice }}%\n </div>\n </div>\n <div class=\"table-row\" ng-show=\"vm.irq != undefined\">\n <div class=\"table-cell text-left\">irq:</div>\n <div class=\"table-cell\">\n {{ vm.irq }}%\n </div>\n </div>\n <div class=\"table-row\" ng-show=\"vm.iowait != undefined\">\n <div class=\"table-cell text-left\">iowait:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('iowait')\">\n {{ vm.iowait }}%\n </div>\n </div>\n <div class=\"table-row\" ng-show=\"vm.steal != undefined\">\n <div class=\"table-cell text-left\">steal:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('steal')\">\n {{ vm.steal }}%\n </div>\n </div>\n </div>\n </div>\n <div class=\"hidden-xs hidden-sm hidden-md col-lg-8\">\n <div class=\"table\">\n <div class=\"table-row\" ng-if=\"vm.ctx_switches\">\n <div class=\"table-cell text-left\">ctx_sw:</div>\n <div class=\"table-cell\" ng-class=\"vm.getDecoration('ctx_switches')\">\n {{ vm.ctx_switches }}\n </div>\n </div>\n <div class=\"table-row\" ng-if=\"vm.interrupts\">\n <div class=\"table-cell text-left\">inter:</div>\n <div class=\"table-cell\">\n {{ vm.interrupts }}\n </div>\n </div>\n <div class=\"table-row\" ng-if=\"vm.soft_interrupts\">\n <div class=\"table-cell text-left\">sw_int:</div>\n <div class=\"table-cell\">\n {{ vm.soft_interrupts }}\n </div>\n </div>\n <div class=\"table-row\" ng-if=\"!vm.isLinux && vm.syscalls\">\n <div class=\"table-cell text-left\">syscal:</div>\n <div class=\"table-cell\">\n {{ vm.syscalls }}\n </div>\n </div>\n </div>\n </div>\n </div>\n</section>\n";
|
||||||
window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);
|
window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);
|
||||||
module.exports = path;
|
module.exports = path;
|
||||||
|
|
||||||
@ -42295,6 +42297,7 @@ function GlancesPluginSystemController($scope, GlancesStats) {
|
|||||||
var loadData = function (data) {
|
var loadData = function (data) {
|
||||||
var stats = data.stats['system'];
|
var stats = data.stats['system'];
|
||||||
|
|
||||||
|
vm.isLinux = data.isLinux;
|
||||||
vm.hostname = stats['hostname'];
|
vm.hostname = stats['hostname'];
|
||||||
vm.platform = stats['platform'];
|
vm.platform = stats['platform'];
|
||||||
vm.os.name = stats['os_name'];
|
vm.os.name = stats['os_name'];
|
||||||
@ -42310,7 +42313,7 @@ function GlancesPluginSystemController($scope, GlancesStats) {
|
|||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/plugin-system/view.html';
|
var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/plugin-system/view.html';
|
||||||
var html = "<section id=\"system\">\n <span ng-if=\"vm.isDisconnected\" class=\"critical\">Disconnected from</span>\n <span class=\"title\">{{ vm.hostname }}</span>\n <span ng-if=\"vm.stats.isLinux\" class=\"hidden-xs hidden-sm\">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>\n <span ng-if=\"!vm.stats.isLinux\"\n class=\"hidden-xs hidden-sm\">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>\n</section>\n";
|
var html = "<section id=\"system\">\n <span ng-if=\"vm.isDisconnected\" class=\"critical\">Disconnected from</span>\n <span class=\"title\">{{ vm.hostname }}</span>\n <span ng-if=\"vm.isLinux\" class=\"hidden-xs hidden-sm\">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>\n <span ng-if=\"!vm.isLinux\" class=\"hidden-xs hidden-sm\">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>\n</section>\n";
|
||||||
window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);
|
window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);
|
||||||
module.exports = path;
|
module.exports = path;
|
||||||
|
|
||||||
|
2
glances/outputs/static/public/glances.map.js
vendored
2
glances/outputs/static/public/glances.map.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user