You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
808 B
JavaScript
2 lines
808 B
JavaScript
/*! © SpryMedia Ltd, Dominique Fournier, Brad Wasson, Peter Vilhan, Kevin Gilkey-Graham - datatables.net/license */
|
|
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;DataTable.ext.type.order["ip-address-pre"]=function(e){var t,r,l,a,s,n;if(!e)return"000000000000";if(2==(l=(e=e.replace(/<[\s\S]*?>/g,"")).split(":")).length?(r=l[0].split("."),a=l[1]):r=e.split("."),g=e.split(":"),n=s="",4==r.length){for(f=0;f<r.length;f++)t=r[f],s+="000".substr(t.length)+t;a&&(s+=":"+"00000".substr(a.length)+a)}else if(0<g.length){for(var i=0,f=0;f<g.length;f++)0<f&&(n+=":"),0===(t=g[f]).length?i+=0:(n+="0000".substr(t.length)+t,i+=4);var g=n.split(":"),p=0;for(f=0;f<g.length;f++)if(0===(t=g[f]).length&&0===p)for(var h=0;h<32-i;h++)s+="0",p=1;else s+=t}return s};export default DataTable; |