OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
showcase
/
js
/
D3Plugins
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/31/2022 06:53:36 AM
rwxr-xr-x
📄
Parallel_Coordinate_Chart.js
5.92 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
backbone.js
41.59 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
bullet.css
422 bytes
08/14/2022 11:05:11 AM
rw-r--r--
📄
bullet.js
7.89 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
d3.csv.js
2.36 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
d3.js
130.63 KB
08/14/2022 11:05:12 AM
rw-r--r--
📄
d3.layout.js
48.99 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
filter.js
2.87 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
grid.js
3.96 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
jquery-ui-1.8.16.custom.min.js
205.53 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
jquery.event.drag-2.0.min.js
4.76 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
options.js
1.25 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
parallel-coordinates-lib.js
6.51 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
pie.js
2.16 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
slick.core.js
12.36 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
slick.dataview.js
18.52 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
slick.grid.css
2.66 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
slick.grid.js
95.33 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
slick.pager.js
5.16 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
style.css
5.82 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
underscore.js
33.69 KB
08/14/2022 11:05:11 AM
rw-r--r--
Editing: filter.js
Close
// // Copyright 2011, Boundary // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // (function(undefined) { window.Filter = Backbone.Model.extend({ defaults: { filter: {} }, initialize: function() { // apply filter when data or filter changes this.bind('change:data', function() { this.run(); }); this.bind('change:filter', function() { this.run(); }); }, add: function(filter) { newFilter = this.get('filter'); newFilter[filter.field] = { min: filter.min, max: filter.max }; this.set({filter: newFilter}); this.trigger('change:filter'); // why necessary? }, remove: function(key) { newFilter = this.get('filter'); delete newFilter[key]; this.set({filter: newFilter}); this.trigger('change:filter'); // why necessary? }, run: function() { var self = this; var filtered = _(self.get('data')).filter(function(d,k) { return self.check(d); }); this.set({filtered: filtered}); }, outliers: function() { var self = this; var leftovers = _(self.get('data')).reject(function(d,k) { return self.check(d); }); if (_(leftovers).size() === 0) { if (!confirm("This will remove all the data. Are you sure about this?")) return false; } self.set({data: leftovers}); self.clearFilter(); }, inliers: function() { var self = this; var leftovers = _(self.get('data')).filter(function(d,k) { return self.check(d); }); if (_(leftovers).size() === 0) { if (!confirm("This will remove all the data. Are you sure about this?")) return false; } self.set({data: leftovers}); self.clearFilter(); }, clearFilter: function() { this.set({filter: {}}); this.trigger('change:filter'); // why necessary? }, check: function(d) { var filter = this.get('filter') for (key in this.get('filter')) { if ((d[key] < filter[key].min) || (d[key] > filter[key].max)) return false; } return true; } }); window.Selector = Backbone.Model.extend({ defaults: { selected: null }, select: function(i) { this.set({'selected': i}); }, deselect: function() { this.unset('selected'); }, }); })();