2016-09-16 12:35:56 +00:00
< md-content layout = "column" flex layout-padding ng-if = "!load && submenuNavItem2 == 'rules'" ng-controller = "rulesController" layout-align = "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-16 12:35:56 +00:00
2016-09-16 13:07:45 +00:00
< md-virtual-repeat-container ng-if = "!load" flex layout = "column" layout-padding style = "min-height: 500px;" >
2016-09-02 10:55:43 +00:00
2016-09-16 12:35:56 +00:00
< div flex id = "content" layout = "row" layout-align = "center stretch" >
2016-09-02 10:55:43 +00:00
< span layout = "row" style = "padding-left: 0px;" flex layout-align = "space-between center" >
2016-09-16 07:03:08 +00:00
< 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"
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-09-02 14:03:11 +00:00
< md-input-container flex = "15" style = "margin-left: 20px; padding: 5px; margin-right: 10px;" 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" >
< md-list >
< md-list-item ng-click = " showDetails[rule.id] = ! showDetails[rule.id]; " >
< 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 >
< md-list ng-if = "showDetails[rule.id]" >
< md-list-item >
< span style = "font-weight: bold" flex = "15" > Groups< / span >
2016-09-16 09:06:51 +00:00
< span flex = "35" layout = "column" > < span ng-repeat = "group in rule.groups" ng-click = "rulesApplyFilter({type: 'group', value: group})" > < i > {{ group }}< / i > < / span > < / span >
2016-09-02 10:55:43 +00:00
< span style = "font-weight: bold" flex = "15" ng-if = "rule.pci.length > 0" > PCI Groups< / span >
2016-09-16 09:06:51 +00:00
< span flex = "35" layout = "column" ng-if = "rule.pci.length > 0" > < span ng-repeat = "pci in rule.pci" ng-click = "rulesApplyFilter({type: 'pci', value: pci})" > < i > {{ pci }}< / i > < / 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-16 09:06:51 +00:00
< md-list-item >
< span style = "font-weight: bold" >
< md-button ng-href = "/app/kibana#/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))&_a=(columns:!(_source),index:'ossec-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'rule.sidid:{{rule.id}}')),sort:!('@timestamp',desc))" target = "_blank" >
Discover < i class = "fa fa-external-link" aria-hidden = "true" > < / i >
< / 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 >