<!-- template for showing legacy rig main -->
<div>
<div class="legacy_container content-container">
<div class=legacy_child>
<div class=legacy_data><b>Temperature</b></div>
[% FOR i IN data.legacy.tnames -%]
<div class=legacy_data id="[% i %]">[% i %]:</div>
[% END -%]
</div>

<div class=legacy_child>
<div class=legacy_data><b>Gas</b></div>
[% FOR i IN data.legacy.gnames -%]
<div class=legacy_data id="[% i %]">[% i %]:</div>
[% END -%]
</div>

<div class=legacy_child>
<div class=legacy_data><b>Voltage</b></div>
[% FOR i IN data.legacy.vnames -%]
<div class=legacy_data id="[% i %]">[% i %]:</div>
[% END -%]
</div>

<div class=legacy_child>
<div class=legacy_data><b>Current</b></div>
[% FOR i IN data.legacy.cnames -%]
<div class=legacy_data id="[% i %]">[% i %]:</div>
[% END -%]
</div>

<div class=legacy_child>
<div class=legacy_data><b>Analog</b></div>
[% FOR i IN data.legacy.anames -%]
<div class=legacy_data id="[% i %]">[% i %]:</div>
[% END -%]
</div>
</div>
</div>

<style>

.legacy_container {
    display:flex;
    gap:20px;
    min-height:300px;
    justify-content:center;
    width:900px;
    margin:0px;
    max-width:100%;
}

.legacy_data {
    padding:2px;
}

.legacy_child {
    width:200px;
    text-align:left;
}

</style>

<script>


function set_data_old(t)
{
    var arr = t.split("\n");
    for (var i = 0; i < arr.length;i++)
    {
        if (arr[i] != null && arr[i] != "")
        {
            var item = arr[i].split("\t");
            var element = document.getElementById(item[0]);
            var str = element.innerHTML;
            var old = str.split(":");
            var newd = old[0]+': '+item[1];
            element.innerHTML = newd;
        }
    }
    get_logs();
}

function load_data()
{
    if (is_logged_in)
    {
        run_ajax('UIdata.cgi','&action=data',set_data_old);
        setTimeout(load_data,200000);
    }
}


load_data();

</script>



<!-- End legacy template -->