Parcourir la source

removed sort panel

Rashid Khan il y a 12 ans
Parent
commit
2b864d66fd
2 fichiers modifiés avec 0 ajouts et 56 suppressions
  1. 0 5
      panels/sort/module.html
  2. 0 51
      panels/sort/module.js

+ 0 - 5
panels/sort/module.html

@@ -1,5 +0,0 @@
-<kibana-panel ng-controller='sort' ng-init="init()" style="white-space: nowrap;">
-  <label><small>{{panel.label}}</small></label>
-  <select style="width:85%" ng-model="panel.sort[0]" ng-change="set_sort()" ng-options="f for f in fields"></select>
-  <i ng-click="toggle_sort()" class="pointer" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
-</kibana-panel>

+ 0 - 51
panels/sort/module.js

@@ -1,51 +0,0 @@
-/*
-
-  ## Sort
-
-  This will probably be removed in the near future since it only interacts with 
-  the table panel and the table panel already implements all of its functionality.
-  It only interacts with the table panel in any case
-
-  ### Parameters
-  * label ::  The label to stick over the drop down
-  * sort :: An array where the first elemetn is the field to sort on an the second
-            is the direction ('asc' or 'desc')
-  ### Group Events
-  #### Sends
-  * sort :: An array where the first elemetn is the field to sort on an the second
-            is the direction ('asc' or 'desc')
-  #### Receives
-  * fields :: An array containing the fields in a table. This will be concat'd + 
-              uniqued with the curent list. 
-
-*/
-
-angular.module('kibana.sort', [])
-.controller('sort', function($scope, eventBus) {
-
-  // Set and populate defaults
-  var _d = {
-    status  : "Stable",
-    label   : "Sort",
-    sort    : ['_score','desc'],
-    group   : "default"
-  }
-  _.defaults($scope.panel,_d);
-
-  $scope.init = function() {
-    $scope.fields = [];
-    eventBus.register($scope,'fields',function(event, fields) {
-      $scope.panel.sort = _.clone(fields.sort);
-      $scope.fields     = _.union(fields.all,$scope.fields);
-    });
-  }
-
-  $scope.set_sort = function() {
-    eventBus.broadcast($scope.$id,$scope.panel.group,"sort",$scope.panel.sort)
-  }
-
-  $scope.toggle_sort = function() {
-    $scope.panel.sort[1] = $scope.panel.sort[1] == 'asc' ? 'desc' : 'asc';
-    $scope.set_sort();
-  }
-})