mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
163 lines
8.2 KiB
HTML
163 lines
8.2 KiB
HTML
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
|
|
<div ng-if="submenuNavItem == 'preview'">
|
|
<md-content flex class="agentsPreview" ng-controller="agentsPreviewController" layout="column" style="height: 100%;" class="md-padding" layout-align="start space-around">
|
|
<div infinite-scroll-module='agents.nextPage()' infinite-scroll-disabled='agents.busy' infinite-scroll-distance='0' style="padding: 0">
|
|
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>
|
|
<div flex layout="column" layout-align="space-between stretch">
|
|
<div layout="row" layout-align="space-between stretch">
|
|
<md-card flex class="cardHover" layout="column" style="margin-left: 0px;" ng-click="applyAgent(lastAgent)">
|
|
<md-card-content style="text-align: center;">
|
|
<div class="metric-value ng-binding" style="font-size: 16pt;">{{lastAgent.name}}</div>
|
|
<div class="ng-binding">Last registered agent</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
|
|
<md-card flex layout="column" class="cardHover">
|
|
<md-card-content style="text-align: center;" ng-click="applyAgent(mostActiveAgent)">
|
|
<div class="metric-value ng-binding" style="font-size: 16pt;">{{mostActiveAgent.name}}</div>
|
|
<div class="ng-binding">Higher activity</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
|
|
<md-card flex="10" layout="column">
|
|
<md-card-content style="text-align: center;">
|
|
<div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountActive}}</div>
|
|
<div class="ng-binding">Active</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
|
|
<md-card flex="10" layout="column">
|
|
<md-card-content style="text-align: center;">
|
|
<div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountDisconnected}}</div>
|
|
<div class="ng-binding">Disconnected</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
|
|
<md-card flex="10" layout="column">
|
|
<md-card-content style="text-align: center;">
|
|
<div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountNeverConnected}}</div>
|
|
<div class="ng-binding">Never connected</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
|
|
<md-card flex="10" layout="column" style="margin-right: 0px;">
|
|
<md-card-content style="text-align: center;">
|
|
<div class="metric-value ng-binding" style="font-size: 16pt;">{{(agentsCoverity | number:2)}}%</div>
|
|
<div class="ng-binding">Agents coverage</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
|
|
</div>
|
|
<div layout="row" layout-align="start stretch">
|
|
|
|
<div layout="row" class="sideNavBox" flex="50">
|
|
|
|
<input placeholder="Filter" type="text" id="searchBox" ng-model="$parent._agentSearch" ng-change="agentSearchFilter($parent._agentSearch)" class="input-filter-box"
|
|
flex>
|
|
</div>
|
|
<div layout="row" class="sideNavBox" flex="20">
|
|
<md-input-container flex class="md-whiteframe-z1 md-input-margin">
|
|
<md-select id="eventBox" ng-model="$parent._status" ng-change="agentStatusFilter($parent._status)" aria-label="Filter by status">
|
|
<md-option value="all">All states</md-option>
|
|
<md-option value="active">Active</md-option>
|
|
<md-option value="disconnected">Disconnected</md-option>
|
|
<md-option value="Never Connected">Never connected</md-option>
|
|
</md-select>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" class="sideNavBox" flex="20">
|
|
<md-input-container flex class="md-whiteframe-z1 md-input-margin">
|
|
<md-select id="eventBox" ng-model="$parent._osPlatform" ng-change="agentOSPlatformFilter($parent._osPlatform)" aria-label="Filter by operative system">
|
|
<md-option value="all">All OS platforms</md-option>
|
|
<md-option ng-repeat='platform in osPlatforms' value="{{platform}}">
|
|
{{platform}}
|
|
</md-option>
|
|
</md-select>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" class="sideNavBox" flex="10">
|
|
<md-input-container flex class="md-whiteframe-z1">
|
|
<md-select id="eventBox" ng-model="$parent._osVersion" ng-change="agentOSFilter($parent._osVersion)" aria-label="Filter by operative system">
|
|
<md-option value="all">All OS versions</md-option>
|
|
<md-option ng-repeat='version in osVersions' value="{{version}}">
|
|
{{version}}
|
|
</md-option>
|
|
</md-select>
|
|
</md-input-container>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<md-toolbar layout="row">
|
|
<div class="md-toolbar-tools">
|
|
<span flex="10" ng-click="setSort('id')">ID
|
|
<i class="fa" ng-class="_sort === 'id' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
|
|
<span flex="25" ng-click="setSort('name')">Name
|
|
<i class="fa" ng-class="_sort === 'name' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
|
|
<span flex="20" ng-click="setSort('ip')">IP
|
|
<i class="fa" ng-class="_sort === 'ip' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
|
|
<span flex="20" ng-click="setSort('status')">Status
|
|
<i class="fa" ng-class="_sort === 'status' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
|
|
<span flex="15" ng-click="setSort('os.platform')">OS platform
|
|
<i class="fa" ng-class="_sort === 'os' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
|
|
<span flex="10" ng-click="setSort('os.version')">OS version
|
|
<i class="fa" ng-class="_sort === 'os' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
|
|
</div>
|
|
</md-toolbar>
|
|
</div>
|
|
</div>
|
|
<md-list ng-repeat='agent in agents.items' class="agents-preview-table" ng-click="applyAgent(agent)">
|
|
<md-list-item>
|
|
<span flex="10">{{agent.id}}</span>
|
|
<span flex="25">{{agent.name}}</span>
|
|
<span flex="20">{{agent.ip}}</span>
|
|
<span flex="10">{{agent.status}}</span>
|
|
<span flex="10"> <span ng-class="getAgentStatusClass(agent.status)" class="round status"></span></span>
|
|
<span flex="15">{{agent.os.platform}}</span>
|
|
<span flex="10">{{agent.os.version}}</span>
|
|
</md-list-item>
|
|
</md-list>
|
|
<md-divider></md-divider>
|
|
</div>
|
|
<md-button class="md-fab" ng-click="showPrerenderedDialog($event)" >
|
|
<md-icon md-font-library="material-icons">add</md-icon>
|
|
</md-button>
|
|
|
|
<div style="visibility: hidden">
|
|
<div class="md-dialog-container" id="newAgentDialog">
|
|
<div ng-show="newAgentKey != ''">
|
|
<md-dialog class="new-agent-key" layout-padding>
|
|
<h3 class="agent-key">Agent key</h3>
|
|
<p class="agent-key">{{newAgentKey}}</p>
|
|
<md-button ng-click="hidePrerenderedDialog()">Close</md-button>
|
|
</md-dialog>
|
|
</div>
|
|
<div ng-show="newAgentKey == ''">
|
|
<md-dialog layout-padding>
|
|
<h3>New agent</h3>
|
|
<form name="newAgentForm">
|
|
<div layout="row">
|
|
<md-input-container class="md-block" flex-gt-sm>
|
|
<label>Name</label>
|
|
<input required name="name" ng-model="newAgent.name" />
|
|
</md-input-container>
|
|
<md-input-container class="md-block" flex-gt-sm>
|
|
<label>IP</label>
|
|
<input required name="ip" ng-model="newAgent.ip" />
|
|
</md-input-container>
|
|
</div>
|
|
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
|
|
<md-button ng-click="saveNewAgent()">Add</md-button>
|
|
<md-button ng-click="hidePrerenderedDialog()">Close</md-button>
|
|
</section>
|
|
</form>
|
|
</md-dialog>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="agents.busy"></md-progress-linear></md-content>
|
|
</md-content>
|
|
</div>
|