Lines Matching full:scope

20         '$scope', '$window', 'APIUtils', 'dataService', 'Constants',
23 $scope, $window, APIUtils, dataService, Constants, $routeParams, argument
25 $scope.dataService = dataService;
26 $scope.logs = [];
27 $scope.filteredLogs = [];
28 $scope.tmz = '';
29 $scope.itemsPerPage = Constants.PAGINATION.LOG_ITEMS_PER_PAGE;
30 $scope.loading = false;
37 $scope.selectedSeverity =
41 $scope.selectedSeverity.all = false;
42 $scope.selectedSeverity.high = true;
45 $scope.selectedStatus = {all: true, resolved: false};
47 $scope.customSearch = '';
48 $scope.searchItems = [];
49 $scope.selectedEvents = [];
52 $scope.customSearch = '#' + eventId;
53 $scope.searchItems.push('#' + eventId);
56 $scope.loadLogs = function() {
57 $scope.loading = true;
70 $scope.logs = result.data;
71 $scope.originalData = result.original;
72 $scope.loading = false;
75 $scope.jsonData = function(data) {
79 $scope.filterBySeverity = function(log) {
80 if ($scope.selectedSeverity.all) return true;
83 (log.severity_flags.low && $scope.selectedSeverity.low) ||
84 (log.severity_flags.medium && $scope.selectedSeverity.medium) ||
85 (log.severity_flags.high && $scope.selectedSeverity.high));
88 $scope.filterByStatus = function(log) {
89 if ($scope.selectedStatus.all) return true;
91 (log.Resolved && $scope.selectedStatus.resolved) ||
92 (!log.Resolved && !$scope.selectedStatus.resolved));
95 $scope.filterByDate = function(log) {
97 if ($scope.end_date &&
98 typeof $scope.end_date.getTime === 'function') {
99 endDate = new Date($scope.end_date.getTime());
103 if ($scope.start_date && endDate) {
105 log.Timestamp >= $scope.start_date &&
112 $scope.filterBySearchTerms = function(log) {
119 if (!$scope.searchItems.length) return true;
120 for (const searchTerm of $scope.searchItems) {
136 $scope.addSearchItem = function(searchTerms) {
139 if ($scope.searchItems.indexOf(searchTerm) == -1) {
140 $scope.searchItems.push(searchTerm.toLowerCase());
145 $scope.clearSearchItem = function(searchTerm) {
146 $scope.searchItems = [];
149 $scope.removeSearchItem = function(searchTerm) {
150 var termIndex = $scope.searchItems.indexOf(searchTerm);
153 $scope.searchItems.splice(termIndex, 1);
157 $scope.$watch('all', function() {
158 $scope.filteredLogs.forEach(function(item) {
159 item.selected = $scope.all;
164 $scope.export_name = ($scope.selectedEvents.length == 1) ?
165 $scope.selectedEvents[0].Id + '.json' :
168 $scope.selectedEvents.forEach(function(item) {
171 $scope.export_data = JSON.stringify(data);
174 $scope.accept = function() {
175 APIUtils.deleteLogs($scope.selectedEvents).then(function() {
176 $scope.confirm = false;
177 $scope.loadLogs();
181 $scope.resolve = function() {
182 var events = $scope.selectedEvents.filter(function(item) {
200 $scope.$watch('logs', function() {
201 $scope.selectedEvents = $scope.logs.filter(function(item) {
207 $scope.loadLogs();