Rebranding templates

This commit is contained in:
havidarou 2017-10-20 16:37:42 -04:00
parent 3b899da8d8
commit 36ceff57f2
15 changed files with 490 additions and 449 deletions

View File

@ -1,5 +1,4 @@
<md-content ng-if="submenuNavItem == 'overview' && agentInfo" ng-controller="agentsOverviewController">
<!-- Kibana search bar -->
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(7)'><div></div></div>
@ -87,7 +86,7 @@
</md-content>
<!-- View: Panels -->
<div ng-show='hideRing(7) && results' ng-if="tabView == 'panels' && !load">
<div ng-show='hideRing(7) && results' ng-if="tabView == 'panels' && !loading">
<md-content layout="row">
<md-card flex="33">
<md-card-title>
@ -125,7 +124,6 @@
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-content layout="row" layout-align="start stretch">
<md-card flex class="visBox-alert-level-evolution">
@ -153,7 +151,6 @@
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-content layout="row">
<md-card flex="60">

View File

@ -2,9 +2,9 @@
<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 class='uil-ring-css' ng-show='load'><div></div></div>
<div infinite-scroll-module='agents.nextPage()' ng-show="!load" 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 class='uil-ring-css' ng-show='loading'><div></div></div>
<div when-scrolled='agents.nextPage('')' ng-show="!loading" style="padding: 0">
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="loading"></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)">
@ -48,18 +48,15 @@
<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="60">
<input placeholder="Filter" type="text" id="searchBox" ng-model="$parent._agentSearch" ng-change="agentSearchFilter($parent._agentSearch)" class="input-filter-box"
flex>
<input placeholder="Filter agents" type="text" id="searchBox" ng-model="searchTerm" ng-change="agents.addFilter('search', searchTerm)" 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-select id="eventBox" ng-model="status" ng-change="agents.addFilter('status', 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>
@ -69,7 +66,7 @@
</div>
<div layout="row" class="sideNavBox" flex="20">
<md-input-container flex class="md-whiteframe-z1">
<md-select id="eventBox" ng-model="$parent._osPlatform" ng-change="agentOSPlatformFilter($parent._osPlatform)" aria-label="Filter by operative system">
<md-select id="eventBox" ng-model="osPlatform" ng-change="agents.addFilter('os.name', 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}}
@ -82,24 +79,25 @@
<div>
<md-toolbar layout="row">
<div class="md-toolbar-tools">
<span flex="5" 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="15" 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="15" 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="10" 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>
<span flex="15" ng-click="setSort('version')">Agent version
<i class="fa" ng-class="_sort === 'version' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="5" ng-click="agents.sort('id')">ID
<i class="fa" ng-class="agents.sortValue === 'id' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="25" ng-click="agents.sort('name')">Name
<i class="fa" ng-class="agents.sortValue === 'name' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('ip')">IP
<i class="fa" ng-class="agents.sortValue === 'ip' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('status')">Status
<i class="fa" ng-class="agents.sortValue === 'status' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="10" ng-click="agents.sort('os.platform')">OS platform
<i class="fa" ng-class="agents.sortValue === 'os' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="10" ng-click="agents.sort('os.version')">OS version
<i class="fa" ng-class="agents.sortValue === 'os' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('version')">Agent version
<i class="fa" ng-class="agents.sortValue === 'version' ? (agents.sortDir ? '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">
<md-list-item>
<span flex="5" ng-click="applyAgent(agent)">{{agent.id}}</span>
@ -113,6 +111,6 @@
</md-list>
<md-divider></md-divider>
</div>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="agents.busy"></md-progress-linear></md-content>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="agents.busy && !agents.end"></md-progress-linear></md-content>
</md-content>
</div>

View File

@ -12,7 +12,7 @@
</md-nav-bar>
</md-content>
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="loading"></md-progress-linear>
<div flex layout="row" style="height: 100%; {{(tabView != 'discover') ? 'background-color: #e4e4e4' : ''}}" >
<md-content flex id="content" style="height: 100%;">
@ -20,7 +20,6 @@
<md-toolbar style="height: 50px;">
<div class="md-toolbar-tools" layout="row" layout-align="space-between center">
<div style="text-transform: none; font-size: 20px;" ng-if="_agent">
<div style="float: left;margin-top: 3px;margin-right: 11px;">
<span> <i style="margin-right: 5px; " class="fa fa-desktop" aria-hidden="true"></i>
{{_agent.id}} - {{_agent.name}}</span><span ng-show="_agent.id == '000'">(Manager)</span>
@ -33,29 +32,26 @@
<div ng-click="restartAgent()" style="float: left;" ng-show="_agent.status == 'Active' && _agent.id != '000' ">
<span style="width: 100%;background-color: #3caed2;padding: 4px;color: white;font-weight: normal;font-size: 12px;text-transform: uppercase;">Restart</span>
</div>
</div>
<div ng-if="!_agent">
<h2 class="wazuh-h2" style="text-transform: none; font-size: 20px;">
<i style="margin-right: 5px; " class="fa fa-desktop" aria-hidden="true"></i> Agents overview
<i style="margin-right: 5px; " class="fa fa-desktop" aria-hidden="true"></i> Agents preview
</h2>
</div>
<span layout="row" style="padding-left: 0px;" layout-align="space-between start" flex="40">
<md-autocomplete id="agentsAutocomplete" flex md-no-cache="true" md-select-on-match="true" md-selected-item="_swpagent" md-selected-item-change="applyAgent(_swpagent)" md-search-text="search"
md-items="item in agentsSearch(search)" md-item-text="item.name" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar"
placeholder="Search by name, ID or IP address">
<md-autocomplete id="agentsAutocomplete" flex md-no-cache="true" md-select-on-match="true" md-selected-item="_swpagent" md-selected-item-change="applyAgent(_swpagent)" md-search-text="searchTerm" md-items="agent in agentsAutoComplete.items" md-item-text="agent.name" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar" placeholder="Search by name, ID or IP address">
<md-item-template>
<span class="item-title">
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{item.name}} ({{item.id}}) </strong></span>
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{agent.name}} ({{agent.id}}) </strong></span>
</span>
<span class="item-metadata">
<span class="item-metastat" md-highlight-text="search" md-highlight-flags="i"> {{item.ip}} ({{item.status}}) </span>
<span class="item-metastat" md-highlight-text="searchTerm" md-highlight-flags="i"> {{agent.ip}} ({{agent.status}}) </span>
</span>
</md-item-template>
<md-not-found>
No agents matching "{{search}}" were found.
No agents matching "{{searchTerm}}" were found.
</md-not-found>
</md-autocomplete>
</span>
@ -64,7 +60,6 @@
</md-content>
<md-content layout="row" layout-align="space-between start" class="horizontalTabsBar">
<md-content ng-show="_agent" class="horizontalTabsBar" layout="column" layout-align="center start">
<md-nav-bar style="padding-right: 0px;" md-selected-nav-item="submenuNavItem" nav-bar-aria-label="navigation submenu">
<md-nav-item md-nav-click="switchTab('overview')" name="overview">Overview</md-nav-item>
@ -86,5 +81,4 @@
</md-nav-item>
</md-nav-bar>
</md-content>
</md-content>

View File

@ -0,0 +1,71 @@
<div flex ng-cloak layout="row" ng-controller="groupsPreviewController" layout-align="space-around" style="background-color: #e3e3e3;" ng-if="groupsMenu == 'preview'">
<div flex="25" layout="column">
<input flex="none" placeholder="Filter groups" type="text" ng-model="searchTerm" ng-change="groups.addFilter('search', searchTerm)" style="height: 35px; margin: 5px;">
<md-card flex style="overflow: auto; height:400px; overflow-y: scroll;" when-scrolled="groups.nextPage('')">
<md-content flex layout="column" ng-init="selectedGroup = 0;">
<md-card ng-repeat="group in groups.items | filter : searchTerm | orderBy : groups.sortValue : groups.sortDir" ng-class="{selectedItem:($parent.selectedGroup == $index)}" ng-click="$parent.loadGroup($index)" layout="row">
<md-card-title>
<md-card-title-text>
<span class="md-headline" flex="25">{{group.name}}</span>
<span class="md-subhead" flex="25">This is a sample description of the group.</span>
</md-card-title-text>
</md-card-title>
</md-card>
</md-content>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="groups.busy && !groups.end"></md-progress-linear></md-content>
</md-card>
</div>
<div flex="75" layout="column" style="width: auto; margin:10px;">
<md-tabs class="groupContentTabs" layout-fill flex>
<md-tab label="Agents">
<md-tab-content flex layout fill >
<md-toolbar style="overflow:hidden;" layout-fill>
<div flex layout="row" layout-fill>
<md-card flex style="overflow: auto; height:400px;" layout-fill when-scrolled="groupAgents.nextPage('')">
<md-list flex layout="column">
<md-list-item ng-repeat="agent in groupAgents.items | filter : searchTerm | orderBy : agent.sortValue : agent.sortDir" layout="row" ng-init="test=false" ng-click="$parent.showFile($index);" style="margin: 5px;">
<span flex>{{agent.name}}</span>
<div flex layout="row" layout-align="end center"></div>
</md-list-item>
</md-list>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="groupAgents.busy && !groupAgents.end"></md-progress-linear></md-content>
</md-card>
</div>
</md-toolbar>
</md-tab-content>
</md-tab>
<md-tab style="background-color: white;" layout-fill flex label="Files">
<md-tab-content flex layout fill >
<md-toolbar style="overflow:hidden;" layout-fill>
<md-sidenav flex="100" layout-fill md-is-open="test" md-disable-backdrop="true" class="md-whiteframe-z1 md-sidenav-right">
<md-content flex layout-fill>
<pre flex layout-fill style="background-color: #ffffff;">
{{file | json}}
</pre>
</md-content>
</md-sidenav>
<div flex layout="row" layout-fill>
<md-card flex style="overflow: auto; height:400px;" layout-fill when-scrolled="files.nextPage('')">
<md-list flex layout="column">
<md-list-item ng-repeat="file in groupFiles.items | filter : searchTerm | orderBy : files.sortValue : files.sortDir" layout="row" ng-init="test=false" ng-click="$parent.showFile($index);" style="margin: 5px;">
<span flex>{{file.filename}}</span>
<div flex layout="row" layout-align="end center">
</div>
</md-list-item>
</md-list>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="files.busy && !files.end"></md-progress-linear></md-content>
</md-card>
</div>
</md-toolbar>
</md-tab-content>
</md-tab>
</md-tabs>
</div>
</div>

View File

@ -0,0 +1,6 @@
<div flex layout="column" ng-controller="groupsController" ng-if="submenuNavItem == 'groups'" style="height: 100%">
<div style="display: none;">
<kbn-searchbar></kbn-searchbar>
</div>
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>

View File

@ -0,0 +1,5 @@
include ./groups.head
include ./groups-preview.html
//include ./group-overview.html
include ./footer.foot

View File

@ -1,43 +1,56 @@
<md-content ng-if="!load && submenuNavItem =='logs'" ng-controller="osseclogController" layout="row" flex>
<div class='uil-ring-css' ng-show="load"><div></div></div>
<md-virtual-repeat-container ng-show="!load" auto-size-container ng-if="!load" flex layout="column" layout-padding ng-style="autoSizeStyle" style="background: white;">
<div flex layout="row" layout-align="start start" class="horizontal-menu-right" style="background: #f7f7f7">
<div flex ng-cloak ng-if="!loading && submenuNavItem == 'logs'" layout="column" ng-controller="managerLogController">
<div layout="row" layout-align="start start" class="horizontal-menu-right" style="background: #f7f7f7; height: 70px;">
<md-input-container class="md-whiteframe-z1" flex="20" style="margin-right: 15px;margin-left: 20px;padding: 3px;margin-right: 10px;">
<md-select id="categoryBox" ng-model="$parent._category" ng-change="categoryFilter(_category)" aria-label="Logs category">
<md-select id="categoryBox" ng-model="category" ng-change="category == 'all' ? logs.removeFilter('category', true) : logs.addFilter('category', category)" aria-label="Logs category">
<md-option selected value="all">Choose daemon</md-option>
<md-option ng-repeat="(key, value) in summary" value="{{key}}">{{key}}</md-option>
</md-select>
</md-input-container>
<md-input-container class="md-whiteframe-z1" flex="20" style="margin-right: 0px;margin-left: 20px;padding: 3px;margin-right: 10px;">
<md-select id="levelBox" ng-model="$parent._level" ng-change="levelFilter(_level)" aria-label="Logs level">
<md-select id="levelBox" ng-model="type_log" ng-change="type_log == 'all' ? logs.removeFilter('type_log', true) : logs.addFilter('type_log', type_log)" aria-label="Logs level">
<md-option selected value="all">Choose log level</md-option>
<md-option value="info">Info</md-option>
<md-option value="error">Error</md-option>
</md-select>
</md-input-container>
<div flex layout="row" layout-align="end end">
<span><md-button ng-if="!realtime" class="md-primary md-whiteframe-z1 buttonMenu" ng-click="playRealtime()" style="margin-top: 20px; width: 180px" >
<span>
<md-button ng-if="!realtime" class="md-primary md-whiteframe-z1 buttonMenu" ng-click="playRealtime()" style="margin-top: 20px; width: 180px">
<i class="fa fa-play" aria-hidden="true" style="margin-top: 0px; margin-right: 15px; margin-bottom: 5px;"></i>
Play realtime
</md-button>
<md-button style="margin-top: 20px; width: 180px" ng-if="realtime" class="md-primary md-whiteframe-z1 buttonMenu"
ng-click="playRealtime()">
<md-button style="margin-top: 20px; width: 180px" ng-if="realtime" class="md-primary md-whiteframe-z1 buttonMenu" ng-click="playRealtime()">
<i class="fa fa-stop" aria-hidden="true" style="margin-top: 0px; margin-right: 15px; margin-bottom: 5px;"></i>
Stop realtime</md-button></span>
Stop realtime
</md-button>
</span>
</div>
</div>
<div md-virtual-repeat="line in textObj" md-on-demand>
<table class="logTable" flex>
<tbody>
<tr flex>
<td class="logTableNumber">{{$index}}</td>
<td class="logTableCode" ng-class="{ logTableCodeOdd : ($index % 2) != 0}" ng-bind-html="colorLine(line)">{{colorLine(line)}}</td>
</tr>
</tbody>
</table>
<input placeholder="Filter" type="text" ng-model="searchTerm" ng-change="logs.addFilter('search', searchTerm)" style="height: 55px;">
<md-toolbar flex layout="row" class="md-toolbar-tools">
<span flex=10>Timestamp</span>
<span flex=10>Tag</span>
<span flex=10>Level</span>
<span flex>Description</span>
</md-toolbar>
<div flex layout="row">
<div layout="column" flex>
<div flex style="overflow: auto; height:400px;" id="groups-id" layout="column" when-scrolled="logs.nextPage('')">
<md-list>
<md-list-item ng-repeat="log in logs.items | filter : searchTerm" ng-mouseover="log.hovered=true" ng-mouseleave="log.hovered=false" layout="row" class="groups-button">
<span flex= 10>{{log.timestamp}}</span>
<span flex= 10>{{log.tag}}</span>
<span flex= 10>{{log.level}}</span>
<span flex>{{log.description}}</span>
<div flex layout="row" layout-align="end center"></div>
</md-list-item>
</md-list>
</div>
</md-virtual-repeat-container>
</md-content>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
<md-content flex layout="column" ng-if="!load && submenuNavItem == 'status'" ng-controller="managerStatusController">
<div class='uil-ring-css' ng-show="load"><div></div></div>
<div flex layout="column" ng-show="!load" layout-align="start stretch">
<div flex layout="column" ng-show="!load" layout-align="start stretch">
<md-content class="joinCardsRow" layout="row" layout-align="start start">
<md-card flex layout-align="start stretch" ng-repeat="(k,v) in daemons">
<md-card-content layout="column" flex layout-align="start center">
@ -10,7 +10,6 @@
</md-card>
</md-content>
<div class="joinCardsRow" layout="row" layout-align="start start">
<md-card flex layout="column">
<md-card-content style="text-align: center;">
@ -36,7 +35,6 @@
<div class="ng-binding">Never connected</div>
</md-card-content>
</md-card>
<md-card flex layout="column" >
<md-card-content style="text-align: center;">
<div class="metric-value ng-binding" style="font-size: 19pt;text-align: center;">{{(agentsCoverity | number:2)}}%</div>
@ -126,7 +124,5 @@
</md-card-content>
</md-card>
</div>
</div>
</md-content>

View File

@ -19,6 +19,7 @@
<md-nav-item md-nav-click="submenuNavItem = 'ruleset'" name="ruleset">Ruleset</md-nav-item>
<md-nav-item md-nav-click="submenuNavItem = 'configuration'" name="configuration">Configuration</md-nav-item>
<md-nav-item md-nav-click="submenuNavItem = 'logs'" name="logs">Logs</md-nav-item>
<md-nav-item md-nav-click="submenuNavItem = 'groups'" name="groups">Groups</md-nav-item>
</md-nav-bar>
</md-content>

View File

@ -2,5 +2,6 @@ include ./manager.head
include ./manager-status.html
include ./manager-configuration.html
include ./manager-osseclog.html
include ./groups.jade
include ./ruleset.jade
include ./footer.foot

View File

@ -1,7 +1,7 @@
<md-content flex layout="column" ng-if="submenuNavItem == 'general'" ng-controller="overviewGeneralController" layout-align="start">
<!-- Kibana search bar -->
<kbn-searchbar ng-if="tabView == 'panels'"></kbn-searchbar>
<kbn-searchbar dis-a="(columns:!(_source),filters:!(),index:'wazuh-alerts-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc))" ng-if="tabView == 'panels'"></kbn-searchbar>
<div class='uil-ring-css' ng-if="tabView == 'panels'" ng-show='!hideRing(15)'><div></div></div>
<!-- No results message -->
@ -13,12 +13,9 @@
</md-card>
</md-content>
<!-- View: Discover -->
<md-content style="background-color: white" flex layout="column" layout-align="start space-around" ng-if="tabView == 'discover'">
<kbn-disfull table-height="1000px;" dis-a="(columns:!(_source),filters:!(),index:'wazuh-alerts-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc))"
infinite-scroll="true">
</kbn-disfull>
<kbn-disfull table-height="1000px;" dis-a="(columns:!(_source),filters:!(),index:'wazuh-alerts-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc))"></kbn-disfull>
</md-content>
<!-- View: Panels -->

View File

@ -1,6 +1,6 @@
<md-content layout="column" style="height: 100%;" flex layout-padding ng-if="!load && $parent.submenuNavItem2 == 'decoders'" ng-controller="decodersController" layout-align="start space-around">
<div class='uil-ring-css' ng-show="load"><div></div></div>
<div ng-if="!load" layout="row" layout-align="center start" style="padding: 0px; height: 250px; min-height: 250px; ">
<md-content layout="column" style="height: 100%;" flex layout-padding ng-if="!loading && $parent.submenuNavItem2 == 'decoders'" ng-controller="decodersController" layout-align="start space-around">
<div class='uil-ring-css' ng-show="loading"><div></div></div>
<div ng-if="!loading" layout="row" layout-align="center start" style="padding: 0px; height: 250px; min-height: 250px; ">
<md-card flex="100" style="margin: 0">
<md-card-content>
<span class="md-headline-small">Top 24h - Decoder name</span>
@ -9,70 +9,56 @@
</kbn-vis>
</md-card-content>
</md-card>
</div>
<div infinite-scroll-module='decoders.nextPage()' ng-show="!load" infinite-scroll-disabled='decoders.busy' infinite-scroll-distance='0' style="padding: 0">
<div when-scrolled="decoders.nextPage('')" ng-show="!loading" style="padding: 0">
<div id="content" layout="row" layout-align="start start" style="padding-left: 0px; padding-right: 0px; min-height: 53px; height: 53px;padding-top: 5px; padding-bottom: 0px; ">
<span layout="row" style="padding-left: 0px;margin-top: 6px;margin-right: 5px; " flex layout-align="space-between center">
<md-autocomplete flex md-no-cache="true" md-selected-item="_filter" md-selected-item-change="decodersApplyFilter(_filter)" md-search-text="$parent.search"
md-items="item in filtersSearch($parent.search)" md-item-text="item.value" md-min-length="0" md-select-on-match="true" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar"
placeholder="Search file">
<md-autocomplete flex md-select-on-match="true" md-no-cache="true" md-selected-item="filter" md-selected-item-change="decoders.addFilter(filter.type, filter.name)" md-search-text="searchTerm" md-items="decoder in autoComplete | filter : searchTerm" md-item-text="decoder.name" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar" md-search-text-change="analizeDecoders(searchTerm)" placeholder="Search file">
<md-item-template>
<span class="item-title">
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{item.value}} </strong></span>
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{decoder.name}} </strong></span>
</span>
<span class="item-metadata">
<span class="item-metastat"> {{item.type}} </span>
<span class="item-metastat"> {{decoder.type}} </span>
</span>
</md-item-template>
<md-not-found>
No results matching "{{search}}" were found.
</md-not-found>
<md-not-found> No results matching "{{searchTerm}}" were found. </md-not-found>
</md-autocomplete>
</span>
<md-button style="padding: 2px;" flex="10" ng-class="(submenuNavItem2 == 'rules') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('rules')"
class="md-primary">
<md-button style="padding: 2px;" flex="10" ng-class="(submenuNavItem2 == 'rules') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('rules')" class="md-primary">
Rules
</md-button>
<md-button style="padding: 2px;" flex="10" ng-class="(submenuNavItem2 == 'decoders') ? 'button-active' : 'button-disabled'"
ng-class="button-disabled" ng-click="setRulesTab('decoders')" class="md-primary">
<md-button style="padding: 2px;" flex="10" ng-class="(submenuNavItem2 == 'decoders') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('decoders')" class="md-primary">
Decoders
</md-button>
<md-input-container flex="20" style="margin-top: 6px;margin-bottom: 0;border-radius: 3px;margin-left: 10px;"
class="md-whiteframe-z1">
<md-select ng-model="typeFilter" ng-change="decoderTypeFilter(typeFilter)" aria-label="Filter by type">
<md-input-container flex="20" style="margin-top: 6px;margin-bottom: 0;border-radius: 3px;margin-left: 10px;" class="md-whiteframe-z1">
<md-select ng-model="typeFilter" ng-change="applyFilter(typeFilter)" aria-label="Filter by type">
<md-option value="all">All</md-option>
<md-option value="parents">Parents only</md-option>
</md-select>
</md-input-container>
</div>
<md-chips style="background-color: #f7f7f7; margin-top: 16px; " readonly="true" ng-show="decodersHasFilter('search') || decodersHasFilter('file')">
<md-chip ng-click="decodersUnset('search')" ng-if="decodersHasFilter('search')">
<span class="bold">Search: {{decodersGetFilter('search')}} <i class="fa fa-times" aria-hidden="true"></i></span>
<md-chips style="background-color: #f7f7f7; margin-top: 16px; " readonly="true" ng-show="decoders.hasFilter('search') || decoders.hasFilter('file')">
<md-chip ng-click="decoders.removeFilter('search', true)" ng-if="decoders.hasFilter('search')">
<span class="bold">Search: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip>
<md-chip ng-click="decodersUnset('file')" ng-if="decodersHasFilter('file');">
<span class="bold">File: {{decodersGetFilter('file')}} <i class="fa fa-times" aria-hidden="true"></i></span>
<md-chip ng-click="decoders.removeFilter('file', true)" ng-if="decoders.hasFilter('file');">
<span class="bold">File: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip>
</md-chips>
<md-toolbar layout="row" class="md-toolbar-tools" style=" margin-top: 13px; min-height: 38px;height: 38px; padding: 8px; padding-top: 10px; ">
<span flex="20" 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="decoders.sort('name')">Name <i class="fa" ng-class="decoders.sortValue === 'name' ? (decoders.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="20">Program name</span>
<span flex="40">Fields</span>
<span flex="20" ng-click="setSort('file')">File <i class="fa" ng-class="_sort === 'file' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="20" ng-click="decoders.sort('file')">File <i class="fa" ng-class="decoders.sortValue === 'file' ? (decoders.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
</md-toolbar>
<md-list class="agents-preview-table" ng-class-odd="'odd'" ng-class-even="'even'" ng-repeat='decoder in decoders.items' ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<md-list class="agents-preview-table" ng-class-odd="'odd'" ng-class-even="'even'" ng-repeat='decoder in decoders.items | orderBy : decoders.sortValue : decoders.sortDir' ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<md-list-item class="rules-item-list" ng-click="showDetails[decoder.name] = ! showDetails[decoder.name]" ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<span flex="20">{{decoder.name}}</span>
<span flex="20">{{decoder.details["program_name"]}}</span>
@ -83,7 +69,7 @@
<md-list ng-show="showDetails[decoder.name]" ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<md-list-item>
<span style="font-weight: bold" flex="15">Full path</span>
<span flex="35">{{decoder.full_path}}</span>
<span flex="35">{{decoder.path}}</span>
</md-list-item>
<md-list-item>
<span style="font-weight: bold" flex="15">Position</span>
@ -104,6 +90,4 @@
<md-divider></md-divider>
</div>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="decoders.busy"></md-progress-linear></md-content>
</div>
</md-content>

View File

@ -1,6 +1,6 @@
<md-content style="height: 100%;" id="rulesContainer" layout="column" flex layout-padding ng-if="!load && submenuNavItem == 'ruleset' && $parent.submenuNavItem2 == 'rules'" ng-controller="rulesController" layout-align="start space-around" >
<div class='uil-ring-css' ng-show="load"><div></div></div>
<div ng-if="!load" layout="row" layout-align="center stretch">
<md-content style="height: 100%;" id="rulesContainer" layout="column" flex layout-padding ng-if="!loading && submenuNavItem == 'ruleset' && $parent.submenuNavItem2 == 'rules'" ng-controller="rulesController" layout-align="start space-around" >
<div class='uil-ring-css' ng-show="loading"><div></div></div>
<div ng-if="!loading" layout="row" layout-align="center stretch">
<md-card flex="25" style="margin: 0">
<md-card-content>
<span class="md-headline-small">Top 24h - Rule ID</span>
@ -38,24 +38,21 @@
</md-card>
</div>
<div infinite-scroll-module='rules.nextPage()' ng-show="!load" infinite-scroll-disabled='rules.busy' infinite-scroll-distance='0' style="padding: 0">
<div when-scrolled="rules.nextPage('')" ng-show="!loading" style="padding: 0">
<div id="content" layout="row" layout-align="start start" style="padding-left: 0px; padding-right: 0px; min-height: 53px; height: 53px;padding-top: 5px; padding-bottom: 0px; ">
<span layout="row" style="padding-left: 0px;margin-top: 6px;margin-right: 5px; " flex layout-align="space-between center">
<md-autocomplete flex md-select-on-match="true" md-no-cache="true" md-selected-item="_filter" md-selected-item-change="rulesApplyFilter(_filter)" md-search-text="$parent.search"
md-items="item in filtersSearch($parent.search)" md-item-text="item.value" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar"
placeholder="Search for rule file, group or PCI requirement" md-search-text-change="fileSearchFilter(search)">
<md-autocomplete flex md-select-on-match="true" md-no-cache="true" md-selected-item="filter" md-selected-item-change="rules.addFilter(filter.type, filter.name)" md-search-text="searchTerm" md-items="rule in autoComplete | filter : searchTerm" md-item-text="rule.name" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar" md-search-text-change="analizeRules(searchTerm)" placeholder="Search for rule file, group or PCI requirement">
<md-item-template>
<span class="item-title">
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{item.value}} </strong></span>
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{rule.name}} </strong></span>
</span>
<span class="item-metadata">
<span class="item-metastat" ng-if="item.type != 'pci'"> {{item.type}} </span>
<span class="item-metastat" ng-if="item.type == 'pci'">PCI control</span>
<span class="item-metastat" ng-if="rule.type != 'pci'"> {{rule.type}} </span>
<span class="item-metastat" ng-if="rule.type == 'pci'">PCI control</span>
</span>
</md-item-template>
<md-not-found>
No results matching "{{search}}" were found.
No results matching "{{searchTerm}}" were found.
</md-not-found>
</md-autocomplete>
</span>
@ -68,38 +65,33 @@
ng-class="button-disabled" ng-click="setRulesTab('decoders')" class="md-primary">
Decoders
</md-button>
</div>
<md-chips style="background-color: #f7f7f7; margin-top: 16px; " readonly="true" ng-show="rulesHasFilter('search') || rulesHasFilter('file') || rulesHasFilter('group') || rulesHasFilter('pci')">
<md-chip ng-click="rulesUnset('search')" ng-if="rulesHasFilter('search')">
<span class="bold">Search: {{rulesGetFilter('search')}} <i class="fa fa-times" aria-hidden="true"></i></span>
<md-chips style="background-color: #f7f7f7; margin-top: 16px; " readonly="true" ng-show="rules.hasFilter('search') || rules.hasFilter('file') || rules.hasFilter('group') || rules.hasFilter('pci')">
<md-chip ng-click="rules.removeFilter('search', true)" ng-if="rules.hasFilter('search')">
<span class="bold">Search: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip>
<md-chip ng-click="rulesUnset('file')" ng-if="rulesHasFilter('file');">
<span class="bold">File: {{rulesGetFilter('file')}} <i class="fa fa-times" aria-hidden="true"></i></span>
<md-chip ng-click="rules.removeFilter('file', true)" ng-if="rules.hasFilter('file');">
<span class="bold">File: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip>
<md-chip ng-click="rulesUnset('group')" ng-if="rulesHasFilter('group');">
<span class="bold">Group: {{rulesGetFilter('group')}} <i class="fa fa-times" aria-hidden="true"></i></span>
<md-chip ng-click="rules.removeFilter('group', true)" ng-if="rules.hasFilter('group');">
<span class="bold">Group: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip>
<md-chip ng-click="rulesUnset('pci')" ng-if="rulesHasFilter('pci');">
<span>PCI control: {{rulesGetFilter('pci')}} <i class="fa fa-times" aria-hidden="true"></i></span>
<md-chip ng-click="rules.removeFilter('pci', true)" ng-if="rules.hasFilter('pci');">
<span>PCI control: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip>
</md-chips>
<md-toolbar layout="row" class="md-toolbar-tools" style=" margin-top: 13px; min-height: 38px;height: 38px; padding: 8px; padding-top: 10px; ">
<span flex="5" 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="15" ng-click="setSort('file')">File <i class="fa" ng-class="_sort === 'file' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="35" ng-click="setSort('description')">Description <i class="fa" ng-class="_sort === 'description' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="5" ng-click="rules.sort('id')">ID <i class="fa" ng-class="rules.sortValue === 'id' ? (rules.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="rules.sort('file')">File <i class="fa" ng-class="rules.sortValue === 'file' ? (rules.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="35" ng-click="rules.sort('description')">Description <i class="fa" ng-class="rules.sortValue === 'description' ? (rules.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="25">Groups</span>
<span flex="15">Requirement</span>
<span flex="5" ng-click="setSort('level')">Level <i class="fa" ng-class="_sort === 'level' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="5" ng-click="rules.sort('level')">Level <i class="fa" ng-class="rules.sortValue === 'level' ? (rules.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
</md-toolbar>
<md-list ng-repeat='rule in rules.items' ng-class-odd="'odd'" ng-class-even="'even'" class="agents-preview-table" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''">
<md-list ng-repeat='rule in rules.items | orderBy : rules.sortValue : rules.sortDir' ng-class-odd="'odd'" ng-class-even="'even'" class="agents-preview-table" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''">
<md-list-item class="rules-item-list" ng-click="showDetails[rule.id] = !showDetails[rule.id]" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''">
<span flex="5">{{rule.id}}</span>
<span flex="15">{{rule.file}}</span>
@ -112,26 +104,22 @@
<div class="ruleset_card_info" layout="column" flex layout-align="start stretch" ng-show="showDetails[rule.id]" style="margin-top: 19px; height: 100%;padding: 0px; padding-top: 3px; margin-top: 15px;">
<md-content flex>
<div class="ruleset_card_info" layout="row" flex layout-align="center start" ng-show="showDetails[rule.id]" style="padding-left: 0px; padding-right: 0px; padding-bottom: 0px;">
<md-card flex="10" layout="column">
<md-card-content style="text-align: center;">
<div class="ng-binding" style="font-weight: bold">ID</div>
<div class="metric-value ng-binding" style="font-size: 12pt;">{{rule.id}}</div>
</md-card-content>
</md-card>
<md-card flex layout="column">
<md-card-content style="text-align: center;">
<div class="ng-binding" style="font-weight: bold">Description</div>
<div class="metric-value ng-binding" style="font-size: 12pt;">{{rule.description}}</div>
</md-card-content>
</md-card>
<md-card flex="10" layout="column">
<md-card-content style="text-align: center;">
<div class="ng-binding" style="font-weight: bold">Level</div>
<div class="metric-value ng-binding" style="font-size: 12pt;">{{rule.level}}</div>
</md-card-content>
</md-card>
<md-card class="cardHover" ng-click="rulesApplyFilter({type: 'file', value: rule.file}); $event.stopPropagation();" flex="20" layout="column">
@ -142,10 +130,7 @@
</md-card>
</div>
<div class="ruleset_card_info" layout="row" flex layout-align="space-between stretch" ng-show="showDetails[rule.id]" style="padding-left: 0px; padding-right: 0px; padding-bottom: 0px; ">
<md-card flex layout="column" ng-if="rule.groups.length > 0">
<md-card-content>
<h3 class="wazuh-h3">Groups</h3>
@ -178,12 +163,10 @@
</span>
</md-card-content>
</md-card>
</div>
</md-content>
</div>
</md-list>
</div>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="rules.busy"></md-progress-linear></md-content>
</md-content>

View File

@ -1,5 +0,0 @@
<div ng-controller="testController">
<kbn-searchbar></kbn-searchbar>
</div>