|
Lines 88-94
define([
Link Here
|
| 88 |
results = array.map(results, lang.hitch(this, function(obj) { |
88 |
results = array.map(results, lang.hitch(this, function(obj) { |
| 89 |
obj.sortlabel = obj.label; |
89 |
obj.sortlabel = obj.label; |
| 90 |
if (obj.objectType === 'dns/reverse_zone') { |
90 |
if (obj.objectType === 'dns/reverse_zone') { |
| 91 |
obj.sortlabel = array.map(obj.label.split('.'), function(v) { return sprintf('%03d', v); }).join('.'); |
91 |
// sort IP's numerical |
|
|
92 |
if (~obj.label.indexOf(':')) { |
| 93 |
// ipv6 |
| 94 |
obj.sortlabel = array.map(obj.label.split(':'), function(v) { return sprintf('%05d', parseInt(v, 16)); }).join(':'); |
| 95 |
} else { |
| 96 |
// ipv4 |
| 97 |
obj.sortlabel = array.map(obj.label.split('.'), function(v) { return sprintf('%03d', v); }).join('.'); |
| 98 |
} |
| 92 |
} |
99 |
} |
| 93 |
return obj; |
100 |
return obj; |
| 94 |
})); |
101 |
})); |