Add new table for windows hotfixes (#1934)

This commit is contained in:
Jose Sanchez Robles 2019-11-28 16:02:07 +01:00 committed by Juanca Rodríguez
parent 32b7e80761
commit 7da6496ee4
2 changed files with 222 additions and 189 deletions

View File

@ -1,200 +1,231 @@
<md-content layout="column" ng-if="tab === 'syscollector'" ng-show="!load" class="">
<div ng-if="tab === 'syscollector'" ng-show="!load" class="euiPageBody">
<div layout="row" class="wz-margin-top-16 wz-margin-right-8 wz-margin-left-8" ng-if="agent && agent.status !== 'Active'">
<div flex class="euiCallOut euiCallOut--warning">
<div class="euiCallOutHeader">
<react-component name="EuiIcon" props="{type:'help',className:'euiCallOutHeader__title'}" />
<span class="euiCallOutHeader__title">This agent has never connected.</span>
</div>
<div layout="row" class="wz-margin-top-16 wz-margin-right-8 wz-margin-left-8"
ng-if="agent && agent.status !== 'Active'">
<div flex class="euiCallOut euiCallOut--warning">
<div class="euiCallOutHeader">
<react-component name="EuiIcon" props="{type:'help',className:'euiCallOutHeader__title'}" />
<span class="euiCallOutHeader__title">This agent has never connected.</span>
</div>
</div>
</div>
<div layout="row" class="layout-padding" ng-if="agent && agent.status === 'Active' && !hasSize(syscollector)">
<md-card flex class="wz-md-card" flex>
<md-card-content class="wz-text-center">
<i class="fa fa-fw fa-info-circle" aria-hidden="true"></i> <span class="wz-headline-title">Could not
fetch inventory for this agent.</span>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding wz-padding-bottom-0"
ng-if="agent && agent.status === 'Active' && hasSize(syscollector) && (!hasSize(syscollector.hardware) || !hasSize(syscollector.os))">
<md-card flex class="wz-md-card" flex>
<md-card-content class="wz-text-center">
<i class="fa fa-fw fa-info-circle" aria-hidden="true"></i> <span class="wz-headline-title">Not enough
hardware or operating system information</span>
</md-card-content>
</md-card>
</div>
<div layout="row" class="inventory-metrics"
ng-if="agent && agent.status === 'Active' && hasSize(syscollector) && hasSize(syscollector.hardware) && hasSize(syscollector.os)">
<md-card flex class="wz-metric-color wz-md-card">
<md-card-content layout="row" class="wz-padding-metric">
<div class="euiFlexItem--flexGrowZero">Cores: <span
class="wz-text-bold">{{ syscollector.hardware.cpu.cores }}</span>
</div>
</div>
<div layout="row" class="layout-padding" ng-if="agent && agent.status === 'Active' && !hasSize(syscollector)">
<md-card flex class="wz-md-card" flex>
<md-card-content class="wz-text-center">
<i class="fa fa-fw fa-info-circle" aria-hidden="true"></i> <span class="wz-headline-title">Could not
fetch inventory for this agent.</span>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding wz-padding-bottom-0"
ng-if="agent && agent.status === 'Active' && hasSize(syscollector) && (!hasSize(syscollector.hardware) || !hasSize(syscollector.os))">
<md-card flex class="wz-md-card" flex>
<md-card-content class="wz-text-center">
<i class="fa fa-fw fa-info-circle" aria-hidden="true"></i> <span class="wz-headline-title">Not enough
hardware or operating system information</span>
</md-card-content>
</md-card>
</div>
<div layout="row" class="inventory-metrics"
ng-if="agent && agent.status === 'Active' && hasSize(syscollector) && hasSize(syscollector.hardware) && hasSize(syscollector.os)">
<md-card flex class="wz-metric-color wz-md-card">
<md-card-content layout="row" class="wz-padding-metric">
<div class="euiFlexItem--flexGrowZero">Cores: <span
class="wz-text-bold">{{ syscollector.hardware.cpu.cores }}</span>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">Memory: <span class="wz-text-bold">{{ (syscollector.hardware.ram.total / 1024) | number:
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">Memory: <span class="wz-text-bold">{{ (syscollector.hardware.ram.total / 1024) | number:
2 }} MB</span>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">Arch: <span
class="wz-text-bold">{{ syscollector.os.architecture }}</span>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">OS: <span
class="wz-text-bold">{{ syscollector.os.os.name }}
{{ syscollector.os.os.version }}</span>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">CPU: <span
class="wz-text-bold">{{ syscollector.hardware.cpu.name }}</span>
</div>
<div flex></div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16"
ng-if="syscollector.os.scan && syscollector.os.scan.time">Last scan: <span
class="wz-text-bold">{{ offsetTimestamp('',syscollector.os.scan.time) }}</span>
</div>
</md-card-content>
</md-card>
</div>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">Arch: <span
class="wz-text-bold">{{ syscollector.os.architecture }}</span>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">OS: <span
class="wz-text-bold">{{ syscollector.os.os.name }}
{{ syscollector.os.os.version }}</span>
</div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16">CPU: <span
class="wz-text-bold">{{ syscollector.hardware.cpu.name }}</span>
</div>
<div flex></div>
<div class="euiFlexItem--flexGrowZero wz-margin-left-16"
ng-if="syscollector.os.scan && syscollector.os.scan.time">Last scan: <span
class="wz-text-bold">{{ offsetTimestamp('',syscollector.os.scan.time) }}</span>
</div>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding" ng-if="agent && agent.status === 'Active' && hasSize(syscollector)">
<md-card flex class="wz-md-card">
<md-card-content>
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'indexMapping'}" /> Network interfaces
<div class="euiPage" ng-if="agent && agent.status === 'Active' && hasSize(syscollector)">
<div class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive">
<div class="euiFlexItem">
<div class="euiPanel euiPanel--paddingLarge">
<div class="euiPageContentBody">
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'indexMapping'}" /> Network interfaces
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<!--<react-component name="InventoryInterfacesTable" props="{items: syscollector.netiface.items}" />-->
<wz-table-eui flex path="'/syscollector/' + agent.id + '/netiface'" initial-sort-field="'name'"
keys="['name','mac',{value:'state',isHealth: {success: 'up', danger: 'down'}},'mtu','type']">
</wz-table-eui>
</div>
</div>
</div>
<div class="euiFlexItem">
<div class="euiPanel euiPanel--paddingLarge" ng-if="agent && agent.os && agent.os.platform !== 'darwin'">
<div class="euiPageContentBody">
<span class=" wz-headline-title">
<react-component name="EuiIcon" props="{type:'inputOutput'}" /> Network ports
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'windows'"
path="'/syscollector/' + agent.id + '/ports'" initial-sort-field="'process'"
keys="['process',{value:'local.ip', sortable:false},{value:'local.port', sortable:false},'state','protocol']">
</wz-table-eui>
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform !== 'windows'"
path="'/syscollector/' + agent.id + '/ports'" initial-sort-field="'protocol'"
keys="[{value:'local.ip', sortable:false},{value:'local.port', sortable:false},'state','protocol']">
</wz-table-eui>
</div>
</div>
</div>
</div>
</div>
<div class="euiPage" ng-if="agent && agent.status === 'Active' && hasSize(syscollector)">
<div class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive">
<div class="euiFlexItem euiFlexItem--flexGrow3">
<div class="euiPanel euiPanel--paddingLarge">
<div class="euiPageContentBody">
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'controlsHorizontal'}" /> Network settings</span>
<md-divider class="wz-margin-top-10"></md-divider>
<wz-table-eui flex path="'/syscollector/' + agent.id + '/netaddr'"
keys="['iface', 'address', 'netmask', 'proto', 'broadcast']" initial-sort-field="'iface'">
</wz-table-eui>
</div>
</div>
</div>
<div class="euiFlexItem euiFlexItem--flexGrow1" ng-if="agent && agent.os && agent.os.platform === 'windows'">
<div class="euiPanel euiPanel--paddingLarge">
<div class="euiPageContentBody">
<span class="wz-headline-title">
<span class="wz-headline-title"><i class="fa fa-fw fa-windows"></i> Windows updates</span></span>
<md-divider class="wz-margin-top-10"></md-divider>
<wz-table-eui style="overflow: hidden;" custom-columns="true"
path="'/syscollector/' + agent.id + '/hotfixes'" keys="['hotfix']" initial-sort-field="'hotfix'">
</wz-table-eui>
</div>
</div>
</div>
</div>
</div>
<div class="euiPage" ng-if="agent && agent.status === 'Active' && hasSize(syscollector)">
<div class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive">
<div class="euiFlexItem">
<div class="euiPanel euiPanel--paddingLarge">
<div class="euiPageContentBody">
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'apps'}" /> Packages
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row"
class="wz-margin-top-10 euiFlexGroup euiFlexGroup--alignItemsCenter euiFormControlLayout__childrenWrapper">
<input placeholder="Filter packages..." ng-model="packageSearch" type="text"
class="euiFieldSearch euiFieldSearch--fullWidth euiFlexItem height-30" aria-invalid="false"
wz-enter="search(packageSearch,'packages')">
<div class="euiFormControlLayoutIcons">
<span class="euiFormControlLayoutCustomIcon">
<react-component name="EuiIcon"
props="{type:'search', className:'euiFormControlLayoutCustomIcon__icon'}" />
</span>
<md-divider class="wz-margin-top-10"></md-divider>
</div>
<button type="submit" aria-label="Search"
class="euiFlexItem euiFlexItem--flexGrowZero kuiButton kuiButton--secondary wz-margin-left-8 height-30"
ng-click="search(packageSearch,'packages')">
Search
</button>
</div>
<!--<react-component name="InventoryInterfacesTable" props="{items: syscollector.netiface.items}" />-->
<wz-table-eui flex path="'/syscollector/' + agent.id + '/netiface'" initial-sort-field="'name'"
keys="['name','mac',{value:'state',isHealth: {success: 'up', danger: 'down'}},'mtu','type']">
</wz-table-eui>
</md-card-content>
</md-card>
<md-card flex class="wz-md-card" ng-if="agent && agent.os && agent.os.platform !== 'darwin'">
<md-card-content>
<span class=" wz-headline-title">
<react-component name="EuiIcon" props="{type:'inputOutput'}" /> Network ports
<div layout="row" ng-if="agent && syscollector && !load" class="wz-margin-top-10">
<wz-table-eui flex
ng-if="agent && agent.os && agent.os.platform !== 'windows' && agent.os.platform !== 'darwin'"
path="'/syscollector/' + agent.id + '/packages'" initial-sort-field="'name'"
keys="['name',{value:'architecture',width: '10%'},'version',{value:'vendor',width: '30%'},{value:'description',width: '30%'}]" />
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'darwin'"
path="'/syscollector/' + agent.id + '/packages'" initial-sort-field="'name'"
keys="['name','version','format',{value:'location',width: '30%'},{value:'description',width: '20%'}]" />
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'windows'"
path="'/syscollector/' + agent.id + '/packages'"
keys="['name',{value:'architecture',width: '10%'},'version',{value:'vendor',width: '30%'}]" />
</div>
<div layout="row" layout-align="end center">
<button type="button" ng-click="downloadCsv('/syscollector/'+agent.id+'/packages', 'packages.csv')"
class="euiButtonEmpty euiButtonEmpty--primary euiButtonEmpty--small">
<span class="euiButtonEmpty__content">
<react-component name="EuiIcon" props="{type:'importAction'}" />
<span class="euiButtonEmpty__text">Formatted</span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'windows'"
path="'/syscollector/' + agent.id + '/ports'" initial-sort-field="'process'"
keys="['process',{value:'local.ip', sortable:false},{value:'local.port', sortable:false},'state','protocol']">
</wz-table-eui>
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform !== 'windows'"
path="'/syscollector/' + agent.id + '/ports'" initial-sort-field="'protocol'"
keys="[{value:'local.ip', sortable:false},{value:'local.port', sortable:false},'state','protocol']">
</wz-table-eui>
</md-card-content>
</md-card>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div layout="row" class="layout-padding" ng-if="agent && agent.status === 'Active' && hasSize(syscollector)">
<md-card flex class="wz-md-card">
<md-card-content>
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'controlsHorizontal'}" /> Network settings</span>
<md-divider class="wz-margin-top-10"></md-divider>
<wz-table-eui flex path="'/syscollector/' + agent.id + '/netaddr'"
keys="['iface', 'address', 'netmask', 'proto', 'broadcast']" initial-sort-field="'iface'">
</wz-table-eui>
</md-card-content>
</md-card>
</div>
<div class="euiPage"
ng-if="agent && agent.status === 'Active' && hasSize(syscollector) && agent.os && agent.os.platform !== 'darwin'">
<div class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive">
<div layout="row" class="layout-padding" ng-if="agent && agent.status === 'Active' && hasSize(syscollector)">
<md-card flex class="wz-md-card">
<md-card-content>
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'apps'}" /> Packages
<div class="euiFlexItem">
<div class="euiPanel euiPanel--paddingLarge">
<div class="euiPageContentBody">
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'console'}" /> Processes</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row"
class="wz-margin-top-10 euiFlexGroup euiFlexGroup--alignItemsCenter euiFormControlLayout__childrenWrapper">
<input placeholder="Filter processes..." ng-model="processSearch" type="text"
class="euiFieldSearch euiFieldSearch--fullWidth euiFlexItem height-30" aria-invalid="false"
wz-enter="search(processSearch,'processes')">
<div class="euiFormControlLayoutIcons">
<span class="euiFormControlLayoutCustomIcon">
<react-component name="EuiIcon"
props="{type:'search', className:'euiFormControlLayoutCustomIcon__icon'}" />
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row"
class="wz-margin-top-10 euiFlexGroup euiFlexGroup--alignItemsCenter euiFormControlLayout__childrenWrapper">
<input placeholder="Filter packages..." ng-model="packageSearch" type="text"
class="euiFieldSearch euiFieldSearch--fullWidth euiFlexItem height-30" aria-invalid="false"
wz-enter="search(packageSearch,'packages')">
<div class="euiFormControlLayoutIcons">
<span class="euiFormControlLayoutCustomIcon">
<react-component name="EuiIcon"
props="{type:'search', className:'euiFormControlLayoutCustomIcon__icon'}" />
</span>
</div>
<button type="submit" aria-label="Search"
class="euiFlexItem euiFlexItem--flexGrowZero kuiButton kuiButton--secondary wz-margin-left-8 height-30"
ng-click="search(packageSearch,'packages')">
Search
</button>
</div>
<div layout="row" ng-if="agent && syscollector && !load" class="wz-margin-top-10">
<wz-table-eui flex
ng-if="agent && agent.os && agent.os.platform !== 'windows' && agent.os.platform !== 'darwin'"
path="'/syscollector/' + agent.id + '/packages'" initial-sort-field="'name'"
keys="['name',{value:'architecture',width: '10%'},'version',{value:'vendor',width: '30%'},{value:'description',width: '30%'}]" />
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'darwin'"
path="'/syscollector/' + agent.id + '/packages'" initial-sort-field="'name'"
keys="['name','version','format',{value:'location',width: '30%'},{value:'description',width: '20%'}]" />
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'windows'"
path="'/syscollector/' + agent.id + '/packages'"
keys="['name',{value:'architecture',width: '10%'},'version',{value:'vendor',width: '30%'}]" />
</div>
<div layout="row" layout-align="end center">
<button type="button" ng-click="downloadCsv('/syscollector/'+agent.id+'/packages', 'packages.csv')"
class="euiButtonEmpty euiButtonEmpty--primary euiButtonEmpty--small">
<span class="euiButtonEmpty__content">
<react-component name="EuiIcon" props="{type:'importAction'}" />
<span class="euiButtonEmpty__text">Formatted</span>
</span>
</button>
</div>
</md-card-content>
</md-card>
</div>
<button type="submit" aria-label="Search"
class="euiFlexItem euiFlexItem--flexGrowZero kuiButton kuiButton--secondary wz-margin-left-8 height-30"
ng-click="search(processSearch,'processes')">
Search
</button>
</div>
<div layout="row" ng-if="agent && syscollector && !load" class="wz-margin-top-10">
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'windows'"
path="'/syscollector/' + agent.id + '/processes'"
keys="[{value: 'name', width: '10%'},'pid','ppid','vm_size','priority','nlwp',{value: 'cmd', width: '30%'}]" />
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform !== 'windows'"
path="'/syscollector/' + agent.id + '/processes'"
keys="[{value: 'name', width: '10%'},'euser','egroup','pid','ppid',{value: 'cmd', width: '15%'},{value: 'argvs', width: '15%'},'vm_size','size','session','nice',{value:'state',isProcessStatus:true, width: '15%'}]" />
</div>
<div layout="row" layout-align="end center">
<button type="button" ng-click="downloadCsv('/syscollector/'+agent.id+'/processes', 'processes.csv')"
class="euiButtonEmpty euiButtonEmpty--primary euiButtonEmpty--small">
<span class="euiButtonEmpty__content">
<react-component name="EuiIcon" props="{type:'importAction'}" />
<span class="euiButtonEmpty__text">Formatted</span>
</span>
</button>
</div>
</div>
</div>
</div>
</div>
<div layout="row" class="layout-padding wz-padding-top-0"
ng-if="agent && agent.status === 'Active' && hasSize(syscollector) && agent.os && agent.os.platform !== 'darwin'">
<md-card flex class="wz-md-card">
<md-card-content>
<span class="wz-headline-title">
<react-component name="EuiIcon" props="{type:'console'}" /> Processes</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row"
class="wz-margin-top-10 euiFlexGroup euiFlexGroup--alignItemsCenter euiFormControlLayout__childrenWrapper">
<input placeholder="Filter processes..." ng-model="processSearch" type="text"
class="euiFieldSearch euiFieldSearch--fullWidth euiFlexItem height-30" aria-invalid="false"
wz-enter="search(processSearch,'processes')">
<div class="euiFormControlLayoutIcons">
<span class="euiFormControlLayoutCustomIcon">
<react-component name="EuiIcon"
props="{type:'search', className:'euiFormControlLayoutCustomIcon__icon'}" />
</span>
</div>
<button type="submit" aria-label="Search"
class="euiFlexItem euiFlexItem--flexGrowZero kuiButton kuiButton--secondary wz-margin-left-8 height-30"
ng-click="search(processSearch,'processes')">
Search
</button>
</div>
<div layout="row" ng-if="agent && syscollector && !load" class="wz-margin-top-10">
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform === 'windows'"
path="'/syscollector/' + agent.id + '/processes'"
keys="[{value: 'name', width: '10%'},'pid','ppid','vm_size','priority','nlwp',{value: 'cmd', width: '30%'}]" />
<wz-table-eui flex ng-if="agent && agent.os && agent.os.platform !== 'windows'"
path="'/syscollector/' + agent.id + '/processes'"
keys="[{value: 'name', width: '10%'},'euser','egroup','pid','ppid',{value: 'cmd', width: '15%'},{value: 'argvs', width: '15%'},'vm_size','size','session','nice',{value:'state',isProcessStatus:true, width: '15%'}]" />
</div>
<div layout="row" layout-align="end center">
<button type="button"
ng-click="downloadCsv('/syscollector/'+agent.id+'/processes', 'processes.csv')"
class="euiButtonEmpty euiButtonEmpty--primary euiButtonEmpty--small">
<span class="euiButtonEmpty__content">
<react-component name="EuiIcon" props="{type:'importAction'}" />
<span class="euiButtonEmpty__text">Formatted</span>
</span>
</button>
</div>
</md-card-content>
</md-card>
</div>
</md-content>
</div>
</div>

View File

@ -119,5 +119,7 @@ export const KeyEquivalence = {
compliance: 'Compliance',
rules: 'Rules',
reason: 'Reason',
registerIP: 'Register IP'
registerIP: 'Register IP',
'hotfix': 'Update code',
'scan.time': 'Registered by Wazuh at'
};