wazuh-kibana-app/public/templates/ruleset-rules.html
2016-08-31 11:45:15 +00:00

100 lines
4.6 KiB
HTML

<md-content layout="row" flex layout-padding ng-if="!load && submenuNavItem == 'rules'" ng-controller="rulesController">
<md-virtual-repeat-container ng-if="!load" flex layout="column" layout-padding>
<div flex id="content" layout="row" layout-align="space-between start">
<span layout="row" style="padding-left: 0px;" layout-align="space-between start" flex="40">
<md-autocomplete flex md-no-cache="true" md-selected-item="_filter" md-selected-item-change="rulesApplyFilter(_filter)" md-search-text="search"
md-items="item in filtersSearch(search)" md-item-text="item.value" md-min-length="0" md-no-asterisk="true" md-menu-class="autocomplete-custom-agents-bar"
placeholder="Search rule, file, group or PCI control">
<md-item-template>
<span class="item-title">
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{item.value}} </strong></span>
</span>
<span class="item-metadata">
<span class="item-metastat"> {{item.type}} </span>
</span>
</md-item-template>
<md-not-found>
No results matching "{{search}}" were found.
</md-not-found>
</md-autocomplete>
</span>
<md-input-container style="margin: 0px;">
<md-select ng-model="statusFilter" ng-change="rulesStatusFilter(statusFilter)" aria-label="Filter by status">
<md-option value="enabled">Enabled</md-option>
<md-option value="disabled">Disabled</md-option>
<md-option value="all">All</md-option>
</md-select>
</md-input-container>
<span>
<md-input-container style="margin: 0px;"><label> Min:</label><input type="number" min="0" max="{{maxLevel}}" step="1" ng-model="$parent.minLevel" ></input></md-input-container>
<md-input-container style="margin: 0px;"><label> Max:</label><input type="number" min="{{minLevel}}" max="15" step="1" ng-model="$parent.maxLevel"></input></md-input-container>
<md-button class="md-raised" ng-click="rulesLevelFilter()">Change level</md-button>
</span>
</div>
<md-chips readonly="true" ng-if="rulesHasFilter('rule');">
<md-chip md-removable="true" md-on-remove="rulesUnset('rule')">
<span class="bold">File: {{rulesGetFilter('rule')}}</span>
</md-chip>
</md-chips>
<md-chips readonly="true" ng-if="rulesHasFilter('file');">
<md-chip md-removable="true" md-on-remove="rulesUnset('file')">
<span class="bold">File: {{rulesGetFilter('file')}}</span>
</md-chip>
</md-chips>
<md-chips readonly="true" ng-if="rulesHasFilter('group');">
<md-chip md-removable="true" md-on-remove="rulesUnset('group')">
<span class="bold">Group: {{rulesGetFilter('group')}}</span>
</md-chip>
</md-chips>
<md-chips readonly="true" ng-if="rulesHasFilter('pci');">
<md-chip md-removable="true" md-on-remove="rulesUnset('pci')">
<span>PCI control: {{rulesGetFilter('pci')}}</span>
</md-chip>
</md-chips>
<md-toolbar layout="row">
<div class="md-toolbar-tools">
<span flex="20">ID</span>
<span flex="60">Description</span>
<span flex="20">Level</span>
</div>
</md-toolbar>
<div md-virtual-repeat="rule in rulesObj" md-on-demand flex layout="column" layout-align="start stretch">
<md-list>
<md-list-item ng-click=" showDetails[rule.id] = ! showDetails[rule.id]; ">
<span flex="20">{{rule.id}}</span>
<span flex="60">{{rule.description}}</span>
<span flex="19">{{rule.level}}</span>
</md-list-item>
</md-list>
<md-list ng-if="showDetails[rule.id]">
<md-list-item>
<span style="font-weight: bold" flex="15">File</span>
<span flex="40">{{rule.file}}</span>
</md-list-item>
<md-list-item>
<span style="font-weight: bold" flex="15">Groups</span>
<span flex="35" layout="column"><span ng-repeat="group in rule.groups">{{ group }}</span></span>
<span style="font-weight: bold" flex="15" ng-if="rule.pci.length > 0">PCI Groups</span>
<span flex="35" layout="column" ng-if="rule.pci.length > 0"><span ng-repeat="pci in rule.pci">{{ pci }}</span></span>
</md-list-item>
<md-list-item ng-repeat="(detailk, detailv) in rule.details">
<span style="font-weight: bold" flex="15">{{detailk}}</span>
<span flex="40">{{detailv}}</span>
</md-list-item>
</md-list>
<md-divider></md-divider>
</div>
</md-virtual-repeat-container>
</md-content>