Added the status of the process in a more human readable format

This commit is contained in:
Jesús Ángel 2018-09-13 17:58:29 +02:00
parent 0b20e95d2d
commit f5b51eb021
2 changed files with 26 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import DataFactory from '../../services/data-factory';
import KeyEquivalenece from '../../../util/csv-key-equivalence';
import CheckRows from './wz-table-rows';
import { FilterHandler } from '../../utils/filter-handler';
import ProcessEquivalence from '../../../util/process-state-equivalence';
const app = uiModules.get('app/wazuh', []);
app
@ -393,6 +394,9 @@ app
});
$scope.nonDecoderValue = (key, item) => {
if(key === 'state' && instance.path.includes('processes')){
return ProcessEquivalence[item.state] || 'Unknown'
}
return key.value === 'local.ip'
? (item.local && item.local.ip
? `${item.local.ip}:${item.local.port}`

View File

@ -0,0 +1,22 @@
/*
* Wazuh app - Wazuh syscollector process state equivalence
* Copyright (C) 2018 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Find more information about this on the LICENSE file.
*/
export default {
R: 'running',
S: 'sleeping',
D: 'disk sleep',
T: 'stopped',
t: 'tracing stop',
X: 'dead',
Z: 'zombie',
P: 'parked',
I: 'idle'
}