Merge branch '3.7-6.5' into issue-978

This commit is contained in:
JuanCarlos 2018-11-27 16:28:32 +01:00
commit 04de4272f1
4 changed files with 27 additions and 10 deletions

View File

@ -127,9 +127,10 @@ export class DecodersController {
async downloadCsv() {
try {
const path = this.typeFilter === 'parents' ? '/decoders/parents' : '/decoders';
const currentApi = JSON.parse(this.appState.getCurrentAPI()).id;
const output = await this.csvReq.fetch(
'/decoders',
path,
currentApi,
this.wzTableFilter.get()
);

View File

@ -98,7 +98,7 @@
<span class="wz-headline-title"><i class="fa fa-fw fa-exchange"></i> Network ports</span>
<span class="color-grey pull-right">Last scan: {{syscollector.ports.items[0].scan.time}}</span>
<md-divider class="wz-margin-top-10"></md-divider>
<wz-table flex path="'/syscollector/' + agent.id + '/ports'" row-sizes="[4]" keys="[{value:'local.ip',nosortable:true},{value:'remote.ip',nosortable:true},'state','protocol']">
<wz-table flex path="'/syscollector/' + agent.id + '/ports'" row-sizes="[4]" keys="[{value:'local.ip',nosortable:true}, {value:'local.port',nosortable:true},{value:'remote.ip',nosortable:true},{value:'remote.port',nosortable:true},'state','protocol']">
</wz-table>
</md-card-content>
</md-card>
@ -119,7 +119,7 @@
</div>
<div layout="row" ng-if="agent && syscollector && !load" class="wz-margin-top-10 wz-margin-bottom-40-inv">
<wz-table flex path="'/syscollector/' + agent.id + '/packages'" row-sizes="[6,4,3,3]" extra-limit="true" keys="[{value:'name',size:2},'architecture','version',{value:'vendor',size:2},{value:'description',size:3}]">
<wz-table flex path="'/syscollector/' + agent.id + '/packages'" row-sizes="[10,8,6]" extra-limit="true" keys="[{value:'name',size:2},'architecture','version',{value:'vendor',size:2},{value:'description',size:3}]">
</wz-table>
</div>
</md-card-content>
@ -140,7 +140,7 @@
</button>
</div>
<div layout="row" ng-if="agent && syscollector && !load" class="wz-margin-top-10 wz-margin-bottom-40-inv">
<wz-table flex path="'/syscollector/' + agent.id + '/processes'" row-sizes="[6,4,3,3]" extra-limit="true" keys="['name','euser','nice','state']">
<wz-table flex path="'/syscollector/' + agent.id + '/processes'" row-sizes="[10,8,6]" extra-limit="true" keys="['name','euser','nice','state']">
</wz-table>
</div>
</md-card-content>

View File

@ -798,7 +798,21 @@ export class WazuhApiCtrl {
output.body.data &&
output.body.data.totalItems
) {
const fields = Object.keys(output.body.data.items[0]);
const fields = req.payload.path.includes('/agents')
? [
'id',
'status',
'name',
'ip',
'group',
'manager',
'node_name',
'dateAdd',
'version',
'lastKeepAlive',
'os'
]
: Object.keys(output.body.data.items[0]);
const json2csvParser = new Parser({ fields });
let csv = json2csvParser.parse(itemsArray);
@ -889,9 +903,9 @@ export class WazuhApiCtrl {
const parsedResponses = data.map(
item =>
item && item.body && item.body.data && !item.body.error
? item.body.data
: false
item && item.body && item.body.data && !item.body.error
? item.body.data
: false
);
const [

View File

@ -61,8 +61,10 @@ export const KeyEquivalenece = {
proto: 'Protocol',
address: 'Address',
protocol: 'Protocol',
'local.ip': 'Local',
'remote.ip': 'Remote',
'local.ip': 'Local IP',
'remote.ip': 'Remote IP',
'local.port': 'Local port',
'remote.port': 'Remote port',
euser: 'Effective user',
nice: 'Priority'
};