function openMispAddNetworkPopup(recid) { //TODO: code for network misp
    domainname = w2ui.grd_network.get(recid).domainname
    ip = w2ui.grd_network.get(recid).ip
    port = w2ui.grd_network.get(recid).port
    notes = w2ui.grd_network.get(recid).context

    ip_port = ip + "|" + port

    records = []

    if (domainname) {
        records.push({
            recid: records.length+1,
            aurora_field_type: "Domain Name",
            misp_field_type: "domain",
            value: domainname,
            comment:notes
        })
    }

    if (ip) {
        records.push({
            recid: records.length + 1,
            aurora_field_type: "IP",
            misp_field_type: "ip-dst",
            value: ip,
            comment: notes
        })
    }

    if (ip && domainname) {
        records.push({
            recid:records.length + 1,
            aurora_field_type: "Domain IP",
            misp_field_type: "domain|ip",
            value: domainname + "|" + ip,
            comment: notes
        })
    }

    if (ip && port) {
        records.push({
            recid: records.length + 1,
            aurora_field_type: "IP Port",
            misp_field_type: "ip-dst|port",
            value: ip + "|" + port,
            comment:notes
        })
    }

    w2ui.grd_add_misp.records = records
    w2ui.grd_add_misp.refresh()

    w2popup.open({
        title: 'Add to MISP',
        width: 550,
        height: 400,
        showMax: true,
        body: '<div id="main"></div>',
        onOpen: function (event) {
            event.onComplete = function () {
                $('#w2ui-popup #main').w2render('popup_layout')
                //render grid into form
                w2ui.popup_layout.content('main', w2ui.grd_add_misp);
            };
        },
        onToggle: function (event) {
            event.onComplete = function () {
                w2ui.popup_layout.resize();
            }
        }
    });
}
Prepare and open teh popup for network misp transfer
@param recid -record id of right clicked record.