getNodeById: function()

in app/scripts/core/apiProvider.js [155:175]


    getNodeById: function(nodeId, callback, context) {
        $.getJSON("/controller/nb/v2/switchmanager/" + this.container + "/nodes", function(nodes) {
            var args = Array.prototype.slice.call(arguments);

            var node = {};
            
            $.each(nodes.nodeProperties, function(index, nodeConfig) {

                if(nodeId === (nodeConfig.node.type + " | " + nodeConfig.node.id)) {
                    
                    node = nodeConfig;

                    return false;
                }

            });

            callback.apply(context, [node]);

        }.bind(this));
    },