<script type="text/javascript">//<![CDATA[

    function init_mmc_page()
    {
        var table = document.getElementById('dot');
        for ( i=0;i<table.rows.length;i++){
            for(j=0;j<table.rows[i].cells.length;j++){
                table.rows[i].deleteCell(0);
            }
        }
    }


XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "mmcstorage","mmc_status" )%>', { status: 1 },
    function(x, mArray)
    {
        var data="";
        if (mArray && mArray.length && mArray.length > 0)
        {
            var min = 0;
            var max=mArray.length;
            var max_p=0;

            var table = document.getElementById('dot');
            for(var i=0;i<table.rows.length;i++) {
                max_p += table.rows[i].cells.length;
            }

            for (i = max; i > max_p ; i--) {
                var row = table.insertRow(0);
                var cell = row.insertCell(0);
                cell.innerHTML = mArray.data[i-1];
            }

        }
    }
    );
//]]></script>
        <body onload="init_mmc_page()">
            <fieldset class="cbi-section">
                <h2>Status</h2><br>
                <table width="100%"  id="dot" class='table-striped'>
                    <tr></tr>
                </table>
            </fieldset>
        </body>
