-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1948 WIP: Add datalist-header component and use it in cases, alert, …
…task and observables lists
- Loading branch information
Showing
11 changed files
with
95 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
frontend/app/scripts/components/common/datalist-header.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('theHiveComponents') | ||
.component('datalistHeader', { | ||
controller: function () { }, | ||
controllerAs: '$ctrl', | ||
templateUrl: 'views/components/common/datalist-header.component.html', | ||
bindings: { | ||
title: '@', | ||
list: '<', | ||
total: '<' | ||
} | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
frontend/app/views/components/common/datalist-header.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<span> | ||
<span class="mr-xxxs">{{$ctrl.title}}</span> | ||
<span ng-if="!!$ctrl.list.total">({{$ctrl.list.total | limitedCount}}</span> | ||
<span ng-if="!!!$ctrl.list.total">(<i class="fa fa-spinner fa-pulse"></i></span> | ||
<span ng-if="!!$ctrl.total"> of {{$ctrl.total}})</span> | ||
<span ng-if="!!!$ctrl.total"> of <i class="fa fa-spinner fa-pulse"></i>)</span> | ||
<em class="ml-xxxs text-muted" ng-show="$ctrl.list.loading"><i class="fa fa-spinner fa-pulse"></i> Fetching | ||
data...</em> | ||
<em class="ml-xxxs text-muted" ng-show="!$ctrl.list.loading && $ctrl.list.loadingCount"><i | ||
class="fa fa-spinner fa-pulse"></i> Counting records...</em> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
<center ng-show="control.total > control.pageSize"> | ||
<ul uib-pagination total-items="control.total" ng-change="control.changePage()" ng-model="control.currentPage" class="pagination-sm" boundary-links="true" items-per-page="control.pageSize" max-size="5" rotate="false"></ul> | ||
</center> | ||
<div class="text-center list-pagination"> | ||
<div class="text-center" ng-show="control.total > 0 && control.total > control.pageSize"> | ||
<ul uib-pagination total-items="control.total" ng-change="control.changePage()" ng-model="control.currentPage" | ||
class="pagination-sm" boundary-links="true" items-per-page="control.pageSize" max-size="5" rotate="false"> | ||
</ul> | ||
</div> | ||
|
||
<div class="text-center" ng-show="control.total < 0 && (-1*control.total) > control.pageSize"> | ||
<ul uib-pagination total-items="-1*control.total" ng-change="control.changePage()" | ||
ng-model="control.currentPage" class="pagination-sm" boundary-links="true" items-per-page="control.pageSize" | ||
max-size="5" rotate="false"></ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters