
function getServicesPanels(services, signal_templ, dc){
    let tag_add = (dc === '') ? '' : (';geo=' + dc);
    let panels = [[]];
    let signals = [];
 //   alert("beg");

    let pos = signal_templ.indexOf(':');
    let signal = signal_templ.substr(pos+1);
    let itype = signal_templ.substr(0, pos);

    for (let i=0; i<services.length; ++i){
        let next_sig = signal.replace(/-SERV-/g, services[i]);
        signals.push(next_sig);
    }
  //  alert("first");
    let serv_per_panel = 12;
    for (let j=0; j<services.length; ++j){
        let leng = panels.length;
        if (panels[leng-1].length >= serv_per_panel){
            panels.push([]);
            ++leng;
        }
        panels[leng-1].push({
            name: signals[j],
            host: 'ASEARCH',
            tag: 'itype=' + itype + tag_add,
            title: services[j]
        });
    }
 //   alert("second");
    return panels;
}
