(rows)
| 140 | nodeObj = typeof(nodeObj) == 'string' ? pgAdmin.Browser.Nodes[nodeObj] : nodeObj; |
| 141 | /* Transform the result to add image details */ |
| 142 | const transform = (rows) => { |
| 143 | let res = []; |
| 144 | |
| 145 | _.each(rows, function(r) { |
| 146 | if (filter(r)) { |
| 147 | let l = (_.isFunction(nodeObj['node_label']) ? |
| 148 | nodeObj['node_label'](r) : |
| 149 | r.label), |
| 150 | image = (_.isFunction(nodeObj['node_image']) ? |
| 151 | nodeObj['node_image'](r) : |
| 152 | (nodeObj['node_image'] || ('icon-' + nodeObj.type))); |
| 153 | |
| 154 | res.push({ |
| 155 | 'value': r._id, |
| 156 | 'image': image, |
| 157 | 'label': l, |
| 158 | }); |
| 159 | } |
| 160 | }); |
| 161 | |
| 162 | return postTransform(res); |
| 163 | }; |
| 164 | |
| 165 | return getNodeAjaxOptions('nodes', nodeObj, treeNodeInfo, itemNodeData, params, transform); |
| 166 | } |
no outgoing calls
no test coverage detected