public/js/models/variableList.js in conjur-asset-ui-1.3.0 vs public/js/models/variableList.js in conjur-asset-ui-1.3.1
- old
+ new
@@ -1,16 +1,27 @@
+/* global conjur */
+
(function(conjur) {
'use strict';
- conjur.models.VariableList = function() {
+ this.VariableList = function() {
var options = {
- filter: function(member) {
- var idTokens = member.id.split(':');
- var id = idTokens[idTokens.length-1];
- return id.split('/').length > 1;
+ namespaceSelector: function(member) {
+ var idTokens = member.id.split('@');
+
+ if (idTokens.length > 1) {
+ return idTokens.slice(1, idTokens.length-1).join['@'];
+ } else {
+ return null;
+ }
}
};
- return conjur.models.ResourceList('variable', options);
+ var list = conjur.models.ResourceList('variable', options);
+
+ return list;
};
-})(conjur);
+}).bind(conjur.models)
+(
+ conjur
+);