Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI : Hide the process count of amp if regex is not defined #1742

Merged
merged 1 commit into from
Oct 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions glances/outputs/static/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ body {
}
}

#amps-plugin .process-result {
#amps .process-result {
max-width: 300px;
overflow: hidden;
white-space: pre-wrap;
padding-left: 10px;
text-overflow: ellipsis;
}

#gpu-plugin .gpu-name {
#gpu .gpu-name {
white-space: nowrap;
overflow: hidden;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function GlancesPluginAmpsController($scope, GlancesStats, favico
}, this);
};

vm.getDescriptionDecoration = function (process) {
vm.getNameDecoration = function (process) {
var count = process.count;
var countMin = process.countmin;
var countMax = process.countmax;
Expand Down
4 changes: 2 additions & 2 deletions glances/outputs/static/js/components/plugin-amps/view.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<section id="amps" class="plugin">
<div class="table">
<div class="table-row" ng-repeat="process in vm.processes">
<div class="table-cell text-left" ng-class="vm.getDescriptionDecoration(process)">{{ process.name }}</div>
<div class="table-cell text-left">{{ process.count }}</div>
<div class="table-cell text-left" ng-class="vm.getNameDecoration(process)">{{ process.name }}</div>
<div class="table-cell text-left" ng-if="process.regex">{{ process.count }}</div>
<div class="table-cell text-left process-result" ng-bind-html="process.result|nl2br"></div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions glances/outputs/static/public/glances.js
Original file line number Diff line number Diff line change
Expand Up @@ -17952,7 +17952,7 @@ exports = module.exports = __webpack_require__(1)(false);


// module
exports.push([module.i, "body {\n background: black;\n color: #BBB;\n font-family: \"Lucida Sans Typewriter\", \"Lucida Console\", Monaco, \"Bitstream Vera Sans Mono\", monospace; }\n\n.table {\n display: table;\n width: 100%;\n max-width: 100%; }\n\n.table-row-group {\n display: table-row-group; }\n\n.table-row {\n display: table-row; }\n\n.table-cell {\n display: table-cell;\n text-align: right; }\n\n.row {\n margin-right: 0px; }\n\n.top-plugin {\n margin-bottom: 20px; }\n\n.plugin {\n margin-bottom: 20px; }\n\n.plugin.table-row-group .table-row:last-child .table-cell {\n padding-bottom: 20px; }\n\n.underline {\n text-decoration: underline; }\n\n.bold {\n font-weight: bold; }\n\n.sort {\n font-weight: bold;\n color: white; }\n\n.sortable {\n cursor: pointer; }\n\n.text-right {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.sidebar .table-cell:not(.text-left) {\n padding-left: 10px; }\n\n/* Theme */\n.title {\n font-weight: bold;\n color: white; }\n\n.highlight {\n font-weight: bold;\n color: #5D4062; }\n\n.ok, .status, .process {\n color: #3E7B04;\n /*font-weight: bold;*/ }\n\n.ok_log {\n background-color: #3E7B04;\n color: white;\n /*font-weight: bold;*/ }\n\n.max {\n color: #3E7B04;\n font-weight: bold; }\n\n.careful {\n color: #295183;\n font-weight: bold; }\n\n.careful_log {\n background-color: #295183;\n color: white;\n font-weight: bold; }\n\n.warning, .nice {\n color: #5D4062;\n font-weight: bold; }\n\n.warning_log {\n background-color: #5D4062;\n color: white;\n font-weight: bold; }\n\n.critical {\n color: #A30000;\n font-weight: bold; }\n\n.critical_log {\n background-color: #A30000;\n color: white;\n font-weight: bold; }\n\n/* Plugins */\n#processlist-plugin .table-cell {\n padding: 0px 5px 0px 5px;\n white-space: nowrap; }\n\n#containers-plugin .table-cell {\n padding: 0px 10px 0px 10px;\n white-space: nowrap; }\n\n#quicklook-plugin .progress {\n margin-bottom: 0px;\n min-width: 100px;\n background-color: #000;\n height: 12px;\n border-radius: 0px;\n text-align: right; }\n\n#quicklook-plugin .progress-bar-ok {\n background-color: #3E7B04; }\n\n#quicklook-plugin .progress-bar-careful {\n background-color: #295183; }\n\n#quicklook-plugin .progress-bar-warning {\n background-color: #5D4062; }\n\n#quicklook-plugin .progress-bar-critical {\n background-color: #A30000; }\n\n#quicklook-plugin .cpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n#amps-plugin .process-result {\n max-width: 300px;\n overflow: hidden;\n white-space: pre-wrap;\n padding-left: 10px;\n text-overflow: ellipsis; }\n\n#gpu-plugin .gpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n/* Loading page */\n#loading-page .glances-logo {\n background: url(" + escape(__webpack_require__(11)) + ") no-repeat center center;\n background-size: contain; }\n\n@media (max-width: 750px) {\n #loading-page .glances-logo {\n height: 400px; } }\n\n@media (min-width: 750px) {\n #loading-page .glances-logo {\n height: 500px; } }\n\n/*\nLoading animation\nsource : https://github.com/lukehaas/css-loaders\n*/\n#loading-page .loader:before,\n#loading-page .loader:after,\n#loading-page .loader {\n border-radius: 50%;\n width: 1em;\n height: 1em;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation: loader 1.8s infinite ease-in-out;\n animation: loader 1.8s infinite ease-in-out; }\n\n#loading-page .loader {\n margin: auto;\n font-size: 10px;\n position: relative;\n text-indent: -9999em;\n -webkit-animation-delay: 0.16s;\n animation-delay: 0.16s; }\n\n#loading-page .loader:before {\n left: -3.5em; }\n\n#loading-page .loader:after {\n left: 3.5em;\n -webkit-animation-delay: 0.32s;\n animation-delay: 0.32s; }\n\n#loading-page .loader:before,\n#loading-page .loader:after {\n content: '';\n position: absolute;\n top: 0; }\n\n@-webkit-keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n\n@keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n", ""]);
exports.push([module.i, "body {\n background: black;\n color: #BBB;\n font-family: \"Lucida Sans Typewriter\", \"Lucida Console\", Monaco, \"Bitstream Vera Sans Mono\", monospace; }\n\n.table {\n display: table;\n width: 100%;\n max-width: 100%; }\n\n.table-row-group {\n display: table-row-group; }\n\n.table-row {\n display: table-row; }\n\n.table-cell {\n display: table-cell;\n text-align: right; }\n\n.row {\n margin-right: 0px; }\n\n.top-plugin {\n margin-bottom: 20px; }\n\n.plugin {\n margin-bottom: 20px; }\n\n.plugin.table-row-group .table-row:last-child .table-cell {\n padding-bottom: 20px; }\n\n.underline {\n text-decoration: underline; }\n\n.bold {\n font-weight: bold; }\n\n.sort {\n font-weight: bold;\n color: white; }\n\n.sortable {\n cursor: pointer; }\n\n.text-right {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.sidebar .table-cell:not(.text-left) {\n padding-left: 10px; }\n\n/* Theme */\n.title {\n font-weight: bold;\n color: white; }\n\n.highlight {\n font-weight: bold;\n color: #5D4062; }\n\n.ok, .status, .process {\n color: #3E7B04;\n /*font-weight: bold;*/ }\n\n.ok_log {\n background-color: #3E7B04;\n color: white;\n /*font-weight: bold;*/ }\n\n.max {\n color: #3E7B04;\n font-weight: bold; }\n\n.careful {\n color: #295183;\n font-weight: bold; }\n\n.careful_log {\n background-color: #295183;\n color: white;\n font-weight: bold; }\n\n.warning, .nice {\n color: #5D4062;\n font-weight: bold; }\n\n.warning_log {\n background-color: #5D4062;\n color: white;\n font-weight: bold; }\n\n.critical {\n color: #A30000;\n font-weight: bold; }\n\n.critical_log {\n background-color: #A30000;\n color: white;\n font-weight: bold; }\n\n/* Plugins */\n#processlist-plugin .table-cell {\n padding: 0px 5px 0px 5px;\n white-space: nowrap; }\n\n#containers-plugin .table-cell {\n padding: 0px 10px 0px 10px;\n white-space: nowrap; }\n\n#quicklook-plugin .progress {\n margin-bottom: 0px;\n min-width: 100px;\n background-color: #000;\n height: 12px;\n border-radius: 0px;\n text-align: right; }\n\n#quicklook-plugin .progress-bar-ok {\n background-color: #3E7B04; }\n\n#quicklook-plugin .progress-bar-careful {\n background-color: #295183; }\n\n#quicklook-plugin .progress-bar-warning {\n background-color: #5D4062; }\n\n#quicklook-plugin .progress-bar-critical {\n background-color: #A30000; }\n\n#quicklook-plugin .cpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n#amps .process-result {\n max-width: 300px;\n overflow: hidden;\n white-space: pre-wrap;\n padding-left: 10px;\n text-overflow: ellipsis; }\n\n#gpu .gpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n/* Loading page */\n#loading-page .glances-logo {\n background: url(" + escape(__webpack_require__(11)) + ") no-repeat center center;\n background-size: contain; }\n\n@media (max-width: 750px) {\n #loading-page .glances-logo {\n height: 400px; } }\n\n@media (min-width: 750px) {\n #loading-page .glances-logo {\n height: 500px; } }\n\n/*\nLoading animation\nsource : https://github.com/lukehaas/css-loaders\n*/\n#loading-page .loader:before,\n#loading-page .loader:after,\n#loading-page .loader {\n border-radius: 50%;\n width: 1em;\n height: 1em;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation: loader 1.8s infinite ease-in-out;\n animation: loader 1.8s infinite ease-in-out; }\n\n#loading-page .loader {\n margin: auto;\n font-size: 10px;\n position: relative;\n text-indent: -9999em;\n -webkit-animation-delay: 0.16s;\n animation-delay: 0.16s; }\n\n#loading-page .loader:before {\n left: -3.5em; }\n\n#loading-page .loader:after {\n left: 3.5em;\n -webkit-animation-delay: 0.32s;\n animation-delay: 0.32s; }\n\n#loading-page .loader:before,\n#loading-page .loader:after {\n content: '';\n position: absolute;\n top: 0; }\n\n@-webkit-keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n\n@keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n", ""]);

// exports

Expand Down Expand Up @@ -57779,7 +57779,7 @@ function GlancesPluginAmpsController($scope, GlancesStats, favicoService) {
}, this);
};

vm.getDescriptionDecoration = function (process) {
vm.getNameDecoration = function (process) {
var count = process.count;
var countMin = process.countmin;
var countMax = process.countmax;
Expand All @@ -57805,7 +57805,7 @@ function GlancesPluginAmpsController($scope, GlancesStats, favicoService) {
/***/ (function(module, exports) {

var path = '/Users/fbrutel/dev/glances/glances/outputs/static/js/components/plugin-amps/view.html';
var html = "<section id=\"amps\" class=\"plugin\">\n <div class=\"table\">\n <div class=\"table-row\" ng-repeat=\"process in vm.processes\">\n <div class=\"table-cell text-left\" ng-class=\"vm.getDescriptionDecoration(process)\">{{ process.name }}</div>\n <div class=\"table-cell text-left\">{{ process.count }}</div>\n <div class=\"table-cell text-left process-result\" ng-bind-html=\"process.result|nl2br\"></div>\n </div>\n </div>\n</section>\n";
var html = "<section id=\"amps\" class=\"plugin\">\n <div class=\"table\">\n <div class=\"table-row\" ng-repeat=\"process in vm.processes\">\n <div class=\"table-cell text-left\" ng-class=\"vm.getNameDecoration(process)\">{{ process.name }}</div>\n <div class=\"table-cell text-left\" ng-if=\"process.regex\">{{ process.count }}</div>\n <div class=\"table-cell text-left process-result\" ng-bind-html=\"process.result|nl2br\"></div>\n </div>\n </div>\n</section>\n";
window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);
module.exports = path;

Expand Down
2 changes: 1 addition & 1 deletion glances/outputs/static/public/glances.map.js

Large diffs are not rendered by default.