wazuh-kibana-app/public/templates/agents/agents-syscollector.html

150 lines
10 KiB
HTML

<md-content layout="column" ng-if="tab === 'syscollector'" ng-show="!load">
<div layout="row" class="layout-padding" ng-if="!syscollectorEnabled">
<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">The inventory is disabled</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="column" class="wz-padding-top-10">
<p>The inventory (<span class="wz-text-monospace">syscollector</span>) is disabled for this agent. Visit the documentation on <a target="_blank" href="https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/wodle-syscollector.html">this link</a> to learn about how to enable it.</p>
</div>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding" ng-if="syscollectorEnabled && !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">No scans available</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="column" class="wz-padding-top-10">
<p>The inventory (<span class="wz-text-monospace">syscollector</span>) is enabled for this agent, but there are no scans yet. Check your agent configuration.</p>
</div>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding wz-padding-bottom-0" ng-if="syscollectorEnabled && 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-divider class="wz-margin-top-10"></md-divider>
<div layout="column" class="wz-padding-top-10">
<p>There's not enough information about the hardware or the Operating System. Check your agent configuration.</p>
</div>
</md-card-content>
</md-card>
</div>
<div layout="row" class="inventory-metrics" ng-if="syscollectorEnabled && 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 flex="10">Cores: <span class="wz-text-bold">{{ syscollector.hardware.cpu.cores }}</span></div>
<div flex="15">Memory: <span class="wz-text-bold">{{ (syscollector.hardware.ram.total / 1024) | number: 2 }} MB</span></div>
<div flex="10">Arch: <span class="wz-text-bold">{{ syscollector.os.architecture }}</span></div>
<div flex>OS: <span class="wz-text-bold">{{ syscollector.os.os.name }} {{ syscollector.os.os.version }}</span></div>
<div flex>CPU: <span class="wz-text-bold">{{ syscollector.hardware.cpu.name }}</span></div>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding wz-padding-bottom-0" ng-if="syscollectorEnabled && hasSize(syscollector)">
<md-card flex class="wz-md-card">
<md-card-content class="wz-text-center" ng-if="syscollector.netiface && !syscollector.netiface.items.length">
<i class="fa fa-fw fa-info-circle" aria-hidden="true"></i> <span class="wz-headline-title">No interfaces scan available</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="column" class="wz-padding-top-10">
<p>The interfaces scan is disabled or not ready yet. Wait a little bit and try refreshing the page.</p>
</div>
</md-card-content>
<md-card-content ng-if="syscollector.netiface && syscollector.netiface.items.length">
<span class="wz-headline-title"><i class="fa fa-fw fa-sitemap"></i> Network interfaces</span>
<span class="color-grey pull-right">Last scan: {{syscollector.netiface.items[0].scan.time}}</span>
<md-divider class="wz-margin-top-10"></md-divider>
<table class="table table-striped table-condensed table-layout-fixed">
<thead class="wz-text-bold">
<th class="wz-text-left">Name</th>
<th class="wz-text-left">Mac</th>
<th class="wz-text-left">State</th>
<th class="wz-text-left">MTU</th>
<th class="wz-text-left">Type</th>
</thead>
<tbody>
<tr class="wz-word-wrap" ng-repeat="interface in syscollector.netiface.items">
<td>{{interface.name}}</td>
<td>{{interface.mac}}</td>
<td>
<svg ng-if="interface.state !== 'up'" class="euiIcon euiIcon--medium euiIcon--warning" focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><circle id="dot-a" cx="8" cy="8" r="4"></circle></defs><use xlink:href="#dot-a"></use></svg>
<svg ng-if="interface.state === 'up'" class="euiIcon euiIcon--medium euiIcon--success" focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><circle id="dot-a" cx="8" cy="8" r="4"></circle></defs><use xlink:href="#dot-a"></use></svg>
{{interface.state}}
</td>
<td>{{interface.mtu}}</td>
<td>{{interface.type}}</td>
</tr>
</tbody>
</table>
</md-card-content>
</md-card>
<md-card flex class="wz-md-card">
<md-card-content class="wz-text-center wz-margin-bottom-40-inv" ng-if="syscollector.ports && !syscollector.ports.items.length">
<i class="fa fa-fw fa-info-circle" aria-hidden="true"></i> <span class="wz-headline-title">No ports scan available</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="column" class="wz-padding-top-10">
<p>The ports scan is disabled or not ready yet. Wait a little bit and try refreshing the page.</p>
</div>
</md-card-content>
<md-card-content class="wz-margin-bottom-40-inv" ng-if="syscollector.ports && syscollector.ports.items.length">
<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>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding wz-padding-top-0" ng-if="syscollectorEnabled && hasSize(syscollector)">
<md-card flex class="wz-md-card">
<md-card-content>
<span class="wz-headline-title"><i class="fa fa-fw fa-cubes"></i> Packages</span>
<span class="color-grey pull-right">Last scan: {{syscollector.packagesDate}}</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row" class="wz-margin-top-10">
<input placeholder="Filter packages..." ng-model="packageSearch" type="text" class="kuiLocalSearchInput ng-empty ng-pristine ng-scope ng-touched ng-valid height-30"
aria-invalid="false" wz-enter="search(packageSearch,'packages')">
<button type="submit" aria-label="Search" class="kuiLocalSearchButton height-30" ng-click="search(packageSearch,'packages')">
<span class="fa fa-search" aria-hidden="true"></span>
</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 + '/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>
</div>
</md-card-content>
</md-card>
</div>
<div layout="row" class="layout-padding wz-padding-top-0" ng-if="syscollectorEnabled && hasSize(syscollector)">
<md-card flex class="wz-md-card">
<md-card-content>
<span class="wz-headline-title"><i class="fa fa-fw fa-terminal"></i> Processes</span>
<span class="color-grey pull-right">Last scan: {{syscollector.processesDate}}</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row" class="wz-margin-top-10">
<input placeholder="Filter processes..." ng-model="processSearch" type="text" class="kuiLocalSearchInput ng-empty ng-pristine ng-scope ng-touched ng-valid height-30"
aria-invalid="false" wz-enter="search(processSearch,'processes')">
<button type="submit" aria-label="Search" class="kuiLocalSearchButton height-30" ng-click="search(processSearch,'processes')">
<span class="fa fa-search" aria-hidden="true"></span>
</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>
</div>
</md-card-content>
</md-card>
</div>
</md-content>