From 32a89419e5ea9e2cec1fc184249a6bce84e7119c Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Fri, 14 Apr 2017 22:41:59 +0200 Subject: [PATCH] [Web UI] remove domain from username in processlist --- glances/outputs/static/js/services/plugins/processlist.js | 4 ++++ glances/outputs/static/public/js/main.min.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/glances/outputs/static/js/services/plugins/processlist.js b/glances/outputs/static/js/services/plugins/processlist.js index 51dd0e09..24cb5069 100644 --- a/glances/outputs/static/js/services/plugins/processlist.js +++ b/glances/outputs/static/js/services/plugins/processlist.js @@ -42,6 +42,10 @@ glancesApp.service('GlancesPluginProcessList', function($filter, GlancesPlugin) process.cmdline = process.cmdline.join(' '); } + if (data['system'].os_name === 'Windows') { + process.username = _.last(process.username.split('\\')); + } + this.processes.push(process); } }; diff --git a/glances/outputs/static/public/js/main.min.js b/glances/outputs/static/public/js/main.min.js index 85e32af2..03555ecd 100644 --- a/glances/outputs/static/public/js/main.min.js +++ b/glances/outputs/static/public/js/main.min.js @@ -1265,6 +1265,10 @@ glancesApp.service('GlancesPluginProcessList', ["$filter", "GlancesPlugin", func process.cmdline = process.cmdline.join(' '); } + if (data['system'].os_name === 'Windows') { + process.username = _.last(process.username.split('\\')); + } + this.processes.push(process); } };