2016-10-14 10:34:56 +00:00
|
|
|
<md-content layout="column" flex layout-padding ng-if="!load && submenuNavItem == 'ruleset' && $parent.submenuNavItem2 == 'rules'"
|
2016-09-20 08:55:43 +00:00
|
|
|
ng-controller="rulesController" layout-align="start space-around">
|
2016-09-02 10:55:43 +00:00
|
|
|
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>
|
2016-09-20 08:55:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-21 09:47:06 +00:00
|
|
|
<md-virtual-repeat-container layout-align="start start" ng-if="!load" flex layout="column" layout-padding auto-size-container ng-style="autoSizeStyle">
|
2016-09-02 10:55:43 +00:00
|
|
|
|
2016-10-13 19:59:04 +00:00
|
|
|
<div flex id="content" layout="row" layout-align="center start">
|
2016-09-02 10:55:43 +00:00
|
|
|
|
2016-10-13 19:59:04 +00:00
|
|
|
<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"
|
2016-09-16 07:03:08 +00:00
|
|
|
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"
|
2016-09-02 10:55:43 +00:00
|
|
|
placeholder="Search for rule file, group or PCI requirement" md-search-text-change="fileSearchFilter(search)">
|
|
|
|
<md-item-template>
|
|
|
|
<span class="item-title">
|
|
|
|
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{item.value}} </strong></span>
|
2016-09-15 13:42:28 +00:00
|
|
|
</span>
|
|
|
|
<span class="item-metadata">
|
2016-09-02 10:55:43 +00:00
|
|
|
<span class="item-metastat" ng-if="item.type != 'pci'"> {{item.type}} </span>
|
2016-09-15 13:42:28 +00:00
|
|
|
<span class="item-metastat" ng-if="item.type == 'pci'">PCI control</span>
|
|
|
|
</span>
|
|
|
|
</md-item-template>
|
|
|
|
<md-not-found>
|
|
|
|
No results matching "{{search}}" were found.
|
|
|
|
</md-not-found>
|
|
|
|
</md-autocomplete>
|
2016-09-02 10:55:43 +00:00
|
|
|
</span>
|
|
|
|
|
2016-10-14 10:34:56 +00:00
|
|
|
<md-button style="padding: 2px;" flex="10" ng-class="(submenuNavItem2 == 'rules') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('rules')"
|
2016-10-13 19:59:04 +00:00
|
|
|
class="md-primary">
|
|
|
|
Rules
|
|
|
|
</md-button>
|
|
|
|
<md-button style="padding: 2px;" flex="10" ng-class="(submenuNavItem2 == 'decoders') ? 'button-active' : 'button-disabled'"
|
2016-10-14 10:34:56 +00:00
|
|
|
ng-class="button-disabled" ng-click="setRulesTab('decoders')" class="md-primary">
|
2016-10-13 19:59:04 +00:00
|
|
|
Decoders
|
|
|
|
</md-button>
|
|
|
|
|
|
|
|
<md-input-container flex="20" style="margin-top: 6px;margin-bottom: 0;border-radius: 3px;margin-left: 10px;"
|
2016-09-20 08:55:43 +00:00
|
|
|
class="md-whiteframe-z1">
|
2016-09-02 10:55:43 +00:00
|
|
|
<md-select style="border: none;" 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>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2016-09-15 13:42:28 +00:00
|
|
|
<md-chips readonly="true" ng-show="rulesHasFilter('search') || rulesHasFilter('file') || rulesHasFilter('group') || rulesHasFilter('pci')">
|
|
|
|
<md-chip md-colors="::{background: 'primary-100', color: 'background-900'}" 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-chip>
|
2016-09-02 10:55:43 +00:00
|
|
|
<md-chip md-colors="::{background: 'primary-100', color: 'background-900'}" 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>
|
|
|
|
<md-chip md-colors="::{background: 'primary-100', color: 'background-900'}" 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>
|
|
|
|
<md-chip md-colors="::{background: 'primary-100', color: 'background-900'}" 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>
|
|
|
|
</md-chips>
|
|
|
|
|
|
|
|
|
|
|
|
<md-toolbar layout="row">
|
|
|
|
<div class="md-toolbar-tools">
|
2016-09-15 13:42:28 +00:00
|
|
|
<span flex="10" ng-click="setSort('id')">ID
|
2016-09-02 10:55:43 +00:00
|
|
|
<i class="fa" ng-class="_sort === 'id' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i>
|
|
|
|
</span>
|
|
|
|
<span flex="60">Description</span>
|
2016-09-05 19:27:05 +00:00
|
|
|
<span flex="10" ng-click="setSort('level')">Level
|
2016-09-02 10:55:43 +00:00
|
|
|
<i class="fa" ng-class="_sort === 'level' ? (_sortOrder ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i>
|
|
|
|
</span>
|
|
|
|
<span flex="20">File</span>
|
|
|
|
</div>
|
|
|
|
</md-toolbar>
|
|
|
|
<div md-virtual-repeat="rule in rulesObj" md-on-demand flex layout="column" layout-align="start stretch">
|
2016-10-13 19:59:04 +00:00
|
|
|
<md-list class="agents-preview-table" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''">
|
2016-09-29 18:35:03 +00:00
|
|
|
<md-list-item ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''" ng-click=" showDetails[rule.id] = ! showDetails[rule.id]; ">
|
2016-09-02 10:55:43 +00:00
|
|
|
<span flex="10">{{rule.id}}</span>
|
|
|
|
<span flex="60">{{rule.description}}</span>
|
|
|
|
<span flex="10">{{rule.level}}</span>
|
2016-09-16 09:06:51 +00:00
|
|
|
<md-button md-no-ink class="invisibleButton" flex="20" ng-click="rulesApplyFilter({type: 'file', value: rule.file}); $event.stopPropagation();">{{rule.file}}</md-button>
|
2016-09-02 10:55:43 +00:00
|
|
|
</md-list-item>
|
|
|
|
</md-list>
|
2016-09-29 18:35:03 +00:00
|
|
|
<md-list class="ruleset_rules_row_active" ng-if="showDetails[rule.id]">
|
2016-09-02 10:55:43 +00:00
|
|
|
<md-list-item>
|
|
|
|
<span style="font-weight: bold" flex="15">Groups</span>
|
2016-09-29 18:35:03 +00:00
|
|
|
<span flex="35" layout="column">
|
|
|
|
<span><a ng-repeat="group in rule.groups" ng-click="rulesApplyFilter({type: 'group', value: group})">{{ group }}, </a></span>
|
|
|
|
</span>
|
|
|
|
<span style="font-weight: bold" flex="15" ng-if="rule.pci.length > 0">PCI Requirements</span>
|
|
|
|
<span flex="35" layout="column" ng-if="rule.pci.length > 0">
|
|
|
|
<span>
|
|
|
|
<a ng-repeat="pci in rule.pci" ng-click="rulesApplyFilter({type: 'pci', value: pci})">{{ pci }}, </a>
|
|
|
|
</span>
|
|
|
|
</span>
|
2016-09-02 10:55:43 +00:00
|
|
|
</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>
|
2016-09-29 18:35:03 +00:00
|
|
|
<md-list-item layout-align="end end">
|
2016-09-16 09:06:51 +00:00
|
|
|
<span style="font-weight: bold">
|
2016-09-29 18:35:03 +00:00
|
|
|
|
|
|
|
<md-button ng-click="openDiscover('generic','rule.sidid:'+rule.id)">
|
|
|
|
Discover alerts <i class="fa fa-external-link" aria-hidden="true"></i>
|
2016-09-16 09:06:51 +00:00
|
|
|
</md-button>
|
|
|
|
</span>
|
|
|
|
</md-list-item>
|
2016-09-02 10:55:43 +00:00
|
|
|
|
|
|
|
</md-list>
|
|
|
|
<md-divider></md-divider>
|
|
|
|
</div>
|
|
|
|
</md-virtual-repeat-container>
|
|
|
|
|
2016-09-15 13:42:28 +00:00
|
|
|
</md-content>
|