2018-11-02 16:03:15 +00:00
< div layout = "column" layout-align = "start stretch" ng-controller = "reportingController as ctrl" ng-if = "mctrl.tab === 'reporting'" >
2018-06-14 14:50:21 +00:00
<!-- Loading ring -->
2018-11-02 11:13:31 +00:00
< div class = 'uil-ring-css' ng-show = "ctrl.loading" >
2018-06-14 14:50:21 +00:00
< div > < / div >
< / div >
2018-07-02 12:54:33 +00:00
<!-- End loading ring -->
<!-- Headline -->
2018-11-02 11:13:31 +00:00
< div ng-show = "!ctrl.loading" layout = "column" layout-padding >
2018-07-02 12:54:33 +00:00
< span class = "font-size-18" > < i class = "fa fa-fw fa-file-text" aria-hidden = "true" > < / i > Reporting< / span >
< span class = "md-subheader" > List and download all the Wazuh app reports< / span >
< / div >
<!-- End headline -->
2018-06-15 13:47:50 +00:00
<!-- No reports section -->
2018-11-02 11:13:31 +00:00
< div layout = "row" layout-align = "start start" ng-show = "!ctrl.loading && (!ctrl.pagedItems || !ctrl.pagedItems.length)" >
2018-06-15 13:47:50 +00:00
< md-card flex class = "wz-md-card" flex >
2018-06-14 14:50:21 +00:00
< md-card-content class = "wz-text-center" >
2018-06-15 13:47:50 +00:00
< i class = "fa fa-fw fa-info-circle" aria-hidden = "true" > < / i > < span class = "wz-headline-title" > No reports available< / span >
< md-divider class = "wz-margin-top-10" > < / md-divider >
< div layout = "column" class = "wz-padding-top-10" >
2018-06-27 14:12:26 +00:00
< p > There are no reports yet. Go to the Overview or Agents tabs and click on the < i class = "fa fa-fw fa-print" aria-hidden = "true" > < / i > icon to create one.< / p >
2018-06-14 14:50:21 +00:00
< / div >
< / md-card-content >
< / md-card >
< / div >
2018-06-15 13:47:50 +00:00
<!-- End no reports section -->
2018-11-02 11:13:31 +00:00
< div layout = "row" ng-show = "!ctrl.loading && ctrl.pagedItems && ctrl.pagedItems.length" >
< md-button class = "wz-report-refresh-btn" ng-click = "ctrl.load()" > < i class = "fa fa-fw fa-refresh" > < / i > Refresh< / md-button >
2018-06-14 14:50:21 +00:00
< / div >
2018-11-02 11:13:31 +00:00
< div layout = "row" ng-show = "!ctrl.loading && ctrl.pagedItems && ctrl.pagedItems.length" >
2018-06-14 14:50:21 +00:00
< md-card flex class = "wz-md-card" >
2018-08-22 13:06:18 +00:00
< md-card-content >
2018-06-14 14:50:21 +00:00
< div layout = "row" class = "wz-padding-top-10" >
< table class = "table table-striped table-condensed" id = "wz_table" >
< thead class = "wz-text-bold" >
< th class = "wz-text-left" > File< / th >
< th class = "wz-text-left" > Size< / th >
< th class = "wz-text-left" > Created< / th >
< th class = "wz-text-left" > Options< / th >
< / thead >
< tbody >
2018-11-02 11:13:31 +00:00
< tr ng-repeat = "item in ctrl.pagedItems[ctrl.currentPage]" >
2018-06-14 14:50:21 +00:00
< td > {{item.name}}< / td >
< td > {{item.size / 1024 | number: 2}}KB< / td >
< td > {{item.date.split('T')[0]}} {{item.date.split('T')[1].split('.')[0]}}< / td >
< td >
2018-10-01 07:56:50 +00:00
< a ng-href = "/reports/{{item.name}}" flex class = "wz-text-right" target = "_blank" >
2018-06-14 14:50:21 +00:00
< i class = "fa fa-fw fa-download" > < / i >
< / a >
2018-11-02 11:13:31 +00:00
< a flex class = "wz-text-right cursor-pointer" ng-click = "ctrl.deleteReport(item.name)" >
2019-01-18 19:24:57 +00:00
< i class = "fa fa-fw fa-trash" > < / i >
2018-06-14 14:50:21 +00:00
< / a >
< / td >
< / tr >
< / tbody >
< tfoot >
< td colspan = "6" >
< div class = "pagination pull-right" >
< ul layout = "row" >
2018-11-02 11:13:31 +00:00
< li ng-class = "{disabled: ctrl.currentPage == 0}" class = "md-padding" >
< a href ng-click = "ctrl.prevPage()" > « Prev< / a >
2018-06-14 14:50:21 +00:00
< / li >
2018-11-02 11:13:31 +00:00
< li ng-repeat = "n in ctrl.range(ctrl.pagedItems.length, ctrl.currentPage, ctrl.currentPage + ctrl.gap) "
ng-class="{active: n == ctrl.currentPage}"
ng-click="ctrl.setPage(n)" class="md-padding">
2018-06-14 14:50:21 +00:00
< a href ng-bind = "n + 1" > 1< / a >
< / li >
2018-11-02 11:13:31 +00:00
< li ng-class = "{disabled: (ctrl.currentPage) == ctrl.pagedItems.length - 1}" class = "md-padding" >
< a href ng-click = "ctrl.nextPage()" > Next »< / a >
2018-06-14 14:50:21 +00:00
< / li >
< / ul >
< / div >
< / td >
< / tfoot >
< / table >
< / div >
< / md-card-content >
< / md-card >
< / div >
< / div >