Lines Matching full:scope

12     '$scope', '$log', '$window', 'APIUtils', 'dataService', 'Constants',
13 function($scope, $log, $window, APIUtils, dataService, Constants) { argument
14 $scope.dataService = dataService;
16 $scope.dropdown_selected = false;
18 $scope.$log = $log;
19 $scope.customSearch = '';
20 $scope.searchTerms = [];
21 $scope.messages = Constants.MESSAGES.SENSOR;
22 $scope.selectedSeverity =
24 $scope.export_name = 'sensors.json';
25 $scope.loading = false;
26 $scope.jsonData = function(data) {
34 $scope.clear = function() {
35 $scope.customSearch = '';
36 $scope.searchTerms = [];
39 $scope.doSearchOnEnter = function(event) {
41 $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
43 $scope.searchTerms = $scope.customSearch.split(' ');
46 $scope.searchTerms = [];
51 $scope.doSearchOnClick = function() {
53 $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
55 $scope.searchTerms = $scope.customSearch.split(' ');
58 $scope.searchTerms = [];
63 $scope.toggleSeverityAll = function() {
64 $scope.selectedSeverity.all = !$scope.selectedSeverity.all;
66 if ($scope.selectedSeverity.all) {
67 $scope.selectedSeverity.normal = false;
68 $scope.selectedSeverity.warning = false;
69 $scope.selectedSeverity.critical = false;
73 $scope.toggleSeverity = function(severity) {
74 $scope.selectedSeverity[severity] = !$scope.selectedSeverity[severity];
77 if ($scope.selectedSeverity[severity] == false &&
78 (!$scope.selectedSeverity.normal &&
79 !$scope.selectedSeverity.warning &&
80 !$scope.selectedSeverity.critical)) {
81 $scope.selectedSeverity.all = true;
86 if ($scope.selectedSeverity.normal && $scope.selectedSeverity.warning &&
87 $scope.selectedSeverity.critical) {
88 $scope.selectedSeverity.all = true;
89 $scope.selectedSeverity.normal = false;
90 $scope.selectedSeverity.warning = false;
91 $scope.selectedSeverity.critical = false;
93 $scope.selectedSeverity.all = false;
97 $scope.filterBySeverity = function(sensor) {
98 if ($scope.selectedSeverity.all) return true;
101 (sensor.severity_flags.normal && $scope.selectedSeverity.normal) ||
103 $scope.selectedSeverity.warning) ||
105 $scope.selectedSeverity.critical));
107 $scope.filterBySearchTerms = function(sensor) {
108 if (!$scope.searchTerms.length) return true;
110 for (var i = 0, length = $scope.searchTerms.length; i < length; i++) {
111 if (sensor.search_text.indexOf($scope.searchTerms[i].toLowerCase()) ==
118 $scope.loadSensorData = function() {
119 $scope.loading = true;
121 $scope.data = data;
122 $scope.originalData = originalData;
123 $scope.export_data = JSON.stringify(originalData);
124 $scope.loading = false;
128 $scope.loadSensorData();