happle的使用

hpple在網(wǎng)頁(yè)解析方面有很重要的作用,本次項(xiàng)目中用到合作單位提供的一個(gè)信號(hào)標(biāo)識(shí),但是對(duì)方不提供接口只提供HTML網(wǎng)頁(yè)解析,所以客戶端只能拿到HTML源碼之后對(duì)HTML源碼進(jìn)行解析,拿到自己需要的數(shù)據(jù)。

demo地址:https://github.com/misszero8090/httpParse

  • 先下載hpple庫(kù),推薦使用cocoapods導(dǎo)入,但因我們項(xiàng)目原因,這里重點(diǎn)說(shuō)后者,手動(dòng)導(dǎo)入。去github下載包,地址:https://github.com/topfunky/hpple

  • 將庫(kù)引入project , 添加靜態(tài)庫(kù)libxml2.2.dylib,注意我使用的是xcode8.3.3 iOS10開(kāi)發(fā),默認(rèn)情況下是.tbd, 因?yàn)閹?kù)需要用.dylib,所以在/usr/lib目錄下還有.dylib文件。

  • header search path設(shè)置$(SDKROOT)/usr/lib/libxml2。

  • user Heather search path設(shè)置$(SDKROOT)/usr/include/libxml2

  • FrameWork search path設(shè)置/usr/lib/libxml2.2.dylib

  • 以上設(shè)置完成之后,導(dǎo)入#import "TFHpple.h"

Objective-C解析HTML<后附 RSSI.html源代碼>
拿到rssi后面的值:

NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"RSSI" ofType:@"html"];
    NSData *htmlData = [NSData dataWithContentsOfFile:htmlPath];

    TFHpple *doc = [[TFHpple alloc] initWithHTMLData:htmlData];
    NSArray *elements = [doc searchWithXPathQuery:@"http://fieldset[@class='cbi-section']"];

    for (TFHppleElement *elment in elements) {
    for (TFHppleElement *el in [elment children]) {

        NSArray *els =  [el searchWithXPathQuery:@"http://table"];
        for (TFHppleElement *e in els) {
            for (TFHppleElement *table in [e children]) {

                NSArray *tables = [table children];
                for (TFHppleElement *tr in tables) {

                    if ([[tr text] isEqualToString:@"RSSI"]) {
                        NSUInteger index = [tables indexOfObject:tr];
                        NSLog(@"text:%@",[tr text]);
                        NSLog(@"index:%ld",index);

                        TFHppleElement *rssi = tables[index + 1];

                        NSLog(@"rssi:%@",[rssi text]);
                    }  
                }
            }
        }    
    }
}

//方法2:硬拿 <知道元素的位置,且網(wǎng)頁(yè)結(jié)構(gòu)不會(huì)發(fā)生改變>
TFHppleElement *element = elements[2];
NSArray *els = [element children];
TFHppleElement *el = els[3];
NSArray *es = [el children];
TFHppleElement *e = es[9];
NSArray *ls = [e children];
TFHppleElement *l = ls.lastObject;
 NSLog(@"html:%@",[l text]);

附:RSSI.HTML文件

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/cascade.css" />
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/ie7.css" /><![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/ie8.css" /><![endif]-->
<script type="text/javascript" src="/luci-static/resources/xhr.js"></script>
<title>NHRT - 總覽 - LuCI</title>
</head>
<body class="lang_zh-cn">

<p class="skiplink">
<span id="skiplink1"><a href="#navigation">跳轉(zhuǎn)到導(dǎo)航</a></span>
<span id="skiplink2"><a href="#content">跳到內(nèi)容</a></span>
</p>

<div id="menubar">
<h2 class="navigation"><a id="navigation" name="navigation">導(dǎo)航</a></h2>

<div class="hostinfo">
    NHRT | Cobra  P015C005B025 |
    負(fù)載: 0.45 0.47 0.21
    <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
        | 自動(dòng)刷新:
        <span id="xhr_poll_status_on">開(kāi)</span>
        <span id="xhr_poll_status_off" style="display:none">關(guān)</span>
    </span>
</div>



<div id="savemenu">
    <a href="#">修改數(shù): 0</a>
    </div>

<div class="clear"></div>
</div>

<div id="maincontainer">
    <div id="tabmenu">

    <div class="tabmenu1">
    <ul class="tabmenu l1">

            <li class="tabmenu-item-status active">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/">狀態(tài)</a>
            </li>

            <li class="tabmenu-item-system">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/system/">系統(tǒng)</a>
            </li>

            <li class="tabmenu-item-services">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/services/">服務(wù)</a>
            </li>

            <li class="tabmenu-item-network">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/network/">網(wǎng)絡(luò)</a>
            </li>

            <li class="tabmenu-item-logout">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/logout/">退出</a>
            </li>

    </ul>
    <br style="clear:both" />

    <div class="tabmenu2">
    <ul class="tabmenu l2">

            <li class="tabmenu-item-overview active">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/overview/">總覽</a>
            </li>

            <li class="tabmenu-item-iptables">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/iptables/">防火墻</a>
            </li>

            <li class="tabmenu-item-routes">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/routes/">路由表</a>
            </li>

            <li class="tabmenu-item-syslog">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/syslog/">系統(tǒng)日志</a>
            </li>

            <li class="tabmenu-item-dmesg">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/dmesg/">內(nèi)核日志</a>
            </li>

            <li class="tabmenu-item-modemlog">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/modemlog/">Modem日志</a>
            </li>

            <li class="tabmenu-item-rules">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/rules/">路由規(guī)則</a>
            </li>

            <li class="tabmenu-item-realtime">
                <a href="/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b/admin/status/realtime/">實(shí)時(shí)信息</a>
            </li>

    </ul>
    <br style="clear:both" />

    </div>

    </div>

    </div>

    <div id="maincontent">
        <noscript>
            <div class="errorbox">
                <strong>需要Java Script!</strong><br />
                LUCI的正常運(yùn)行需要開(kāi)啟瀏覽器的Java Script支持。
            </div>
        </noscript>


<script type="text/javascript" src="/luci-static/resources/cbi.js"></script>
<script type="text/javascript">//<![CDATA[
    function progressbar(v, m)
    {
        var vn = parseInt(v) || 0;
        var mn = parseInt(m) || 100;
        var pc = Math.floor((100 / mn) * vn);

        return String.format(
            '<div style="width:200px; position:relative; border:1px solid #999999">' +
                '<div style="background-color:#CCCCCC; width:%d%%; height:15px">' +
                    '<div style="position:absolute; left:0; top:0; text-align:center; width:100%%; color:#000000">' +
                        '<small>%s / %s (%d%%)</small>' +
                    '</div>' +
                '</div>' +
            '</div>', pc, v, m, pc
        );
    }

    var wifidevs = null;
    var arptable = null;

    XHR.poll(5, '/cgi-bin/luci/;stok=d5b2f26bea057631a936bc623259991b', { status: 1 },
        function(x, info)
        {
            var si = document.getElementById('wan4_i');
            var ss = document.getElementById('wan4_s');
            var ifc = info.wan;

            if (ifc && ifc.ifname )
            {
                var s = String.format(
                    '<strong>類型: </strong>%s<br />' +
                    '<strong>地址: </strong>%s<br />' +
                    '<strong>掩碼: </strong>%s<br />' +
                    '<strong>網(wǎng)關(guān): </strong>%s<br />',
                        ifc.proto,
                        (ifc.ipaddr) ? ifc.ipaddr : '0.0.0.0',
                        (ifc.netmask && ifc.netmask != ifc.ipaddr) ? ifc.netmask : '255.255.255.255',
                        (ifc.gwaddr) ? ifc.gwaddr : '0.0.0.0'
                );

                for (var i = 0; i < ifc.dns.length; i++)
                {
                    s += String.format(
                        '<strong>DNS %d: </strong>%s<br />',
                        i + 1, ifc.dns[i]
                    );
                }

                if (ifc.expires > -1)
                {
                    s += String.format(
                        '<strong>到期時(shí)間: </strong>%t<br />',
                        ifc.expires
                    );
                }

                if (ifc.uptime > 0)
                {
                    s += String.format(
                        '<strong>已連接: </strong>%t<br />',
                        ifc.uptime
                    );
                }

                ss.innerHTML = String.format('<small>%s</small>', s);
                si.innerHTML = String.format(
                    '![](/luci-static/resources/icons/ethernet.png)' +
                    '<br /><small><a href="%s">%s</a></small>',
                        ifc.link, ifc.ifname
                );
            }
            else
            {
                si.innerHTML = '![](/luci-static/resources/icons/ethernet_disabled.png)<br /><small>?</small>';
                ss.innerHTML = '<em>未連接</em>';
            }


            var si6 = document.getElementById('wan6_i');
            var ss6 = document.getElementById('wan6_s');
            var ifc6 = info.wan6;

            if (ifc6 && ifc6.ifname )
            {
                var s = String.format(
                    '<strong>地址: </strong>%s<br />' +
                    '<strong>網(wǎng)關(guān): </strong>%s<br />',
                        (ifc6.ip6addr) ? ifc6.ip6addr : '::',
                        (ifc6.gw6addr) ? ifc6.gw6addr : '::'
                );

                for (var i = 0; i < ifc6.dns.length; i++)
                {
                    s += String.format(
                        '<strong>DNS %d: </strong>%s<br />',
                        i + 1, ifc6.dns[i]
                    );
                }

                if (ifc6.uptime > 0)
                {
                    s += String.format(
                        '<strong>已連接: </strong>%t<br />',
                        ifc6.uptime
                    );
                }

                ss6.innerHTML = String.format('<small>%s</small>', s);
                si6.innerHTML = String.format(
                    '![](/luci-static/resources/icons/ethernet.png)' +
                    '<br /><small><a href="%s">%s</a></small>',
                        ifc6.link, ifc6.ifname
                );
            }
            else
            {
                si6.innerHTML = '![](/luci-static/resources/icons/ethernet_disabled.png)<br /><small>?</small>';
                ss6.innerHTML = '<em>未連接</em>';
            }





            var ls = document.getElementById('lease_status_table');
            if (ls)
            {
                /* clear all rows */
                while( ls.rows.length > 1 )
                    ls.rows[0].parentNode.deleteRow(1);

                for( var i = 0; i < info.leases.length; i++ )
                {
                    var timestr;

                    if (info.leases[i].expires <= 0)
                        timestr = '<em>過(guò)期時(shí)間</em>';
                    else
                        timestr = String.format('%t', info.leases[i].expires);

                    var tr = ls.rows[0].parentNode.insertRow(-1);
                        tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);

                    tr.insertCell(-1).innerHTML = info.leases[i].hostname ? info.leases[i].hostname : '?';
                    tr.insertCell(-1).innerHTML = info.leases[i].ipaddr;
                    tr.insertCell(-1).innerHTML = info.leases[i].macaddr;
                    tr.insertCell(-1).innerHTML = timestr;
                }

                if( ls.rows.length == 1 )
                {
                    var tr = ls.rows[0].parentNode.insertRow(-1);
                        tr.className = 'cbi-section-table-row';

                    var td = tr.insertCell(-1);
                        td.colSpan = 4;
                        td.innerHTML = '<em><br />沒(méi)有已分配的租約。</em>';
                }
            }

            var ls6 = document.getElementById('lease6_status_table');
            if (ls6 && info.leases6)
            {
                ls6.parentNode.style.display = 'block';

                /* clear all rows */
                while( ls6.rows.length > 1 )
                    ls6.rows[0].parentNode.deleteRow(1);

                for( var i = 0; i < info.leases6.length; i++ )
                {
                    var timestr;

                    if (info.leases6[i].expires <= 0)
                        timestr = '<em>過(guò)期時(shí)間</em>';
                    else
                        timestr = String.format('%t', info.leases6[i].expires);

                    var tr = ls6.rows[0].parentNode.insertRow(-1);
                        tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);

                    tr.insertCell(-1).innerHTML = info.leases6[i].hostname ? info.leases6[i].hostname : '?';
                    tr.insertCell(-1).innerHTML = info.leases6[i].ip6addr;
                    tr.insertCell(-1).innerHTML = info.leases6[i].duid;
                    tr.insertCell(-1).innerHTML = timestr;
                }

                if( ls6.rows.length == 1 )
                {
                    var tr = ls6.rows[0].parentNode.insertRow(-1);
                        tr.className = 'cbi-section-table-row';

                    var td = tr.insertCell(-1);
                        td.colSpan = 4;
                        td.innerHTML = '<em><br />沒(méi)有已分配的租約。</em>';
                }
            }



            var assoclist = [ ];

            var ws = document.getElementById('wifi_status_table');
            if (ws)
            {
                var wsbody = ws.rows[0].parentNode;
                while (ws.rows.length > 0)
                    wsbody.deleteRow(0);

                for (var didx = 0; didx < info.wifinets.length; didx++)
                {
                    var dev = info.wifinets[didx];

                    var tr = wsbody.insertRow(-1);
                    var td;

                    td = tr.insertCell(-1);
                    td.width     = "33%";
                    td.innerHTML = dev.name;
                    td.style.verticalAlign = "top";

                    td = tr.insertCell(-1);

                    var s = '';

                    for (var nidx = 0; nidx < dev.networks.length; nidx++)
                    {
                        var net = dev.networks[nidx];
                        var is_assoc = (net.bssid != '00:00:00:00:00:00' && net.channel && !net.disabled);

                        var icon;
                        if (!is_assoc)
                            icon = "/luci-static/resources/icons/signal-none.png";
                        else if (net.quality == 0)
                            icon = "/luci-static/resources/icons/signal-0.png";
                        else if (net.quality < 25)
                            icon = "/luci-static/resources/icons/signal-0-25.png";
                        else if (net.quality < 50)
                            icon = "/luci-static/resources/icons/signal-25-50.png";
                        else if (net.quality < 75)
                            icon = "/luci-static/resources/icons/signal-50-75.png";
                        else
                            icon = "/luci-static/resources/icons/signal-75-100.png";

                        s += String.format(
                            '<table><tr><td style="text-align:center; width:32px; padding:3px">' +
                                '![](%s)' +
                                '<br /><small>%d%%</small>' +
                            '</td><td style="text-align:left; padding:3px"><small>' +
                                '<strong>SSID:</strong> <a href="%s">%h</a><br />' +
                                '<strong>模式:</strong> %s<br />' +
                                '<strong>信道:</strong> %d (%.3f GHz)<br />' +
                                '<strong>傳輸速率:</strong> %s Mbit/s<br />',
                                icon, net.signal, net.noise,
                                net.quality,
                                net.link, net.ssid,
                                net.mode,
                                net.channel, net.frequency,
                                net.bitrate || '?'
                        );

                        if (is_assoc)
                        {
                            s += String.format(
                                '<strong>BSSID:</strong> %s<br />' +
                                '<strong>加密:</strong> %s',
                                    net.bssid,
                                    net.encryption
                            );
                        }
                        else
                        {
                            s += '<em>未開(kāi)啟或未關(guān)聯(lián)無(wú)線</em>';
                        }

                        s += '</small></td></tr></table>';

                        for (var bssid in net.assoclist)
                        {
                            assoclist.push({
                                bssid:    bssid,
                                signal:   net.assoclist[bssid].signal,
                                noise:    net.assoclist[bssid].noise,
                                rx_rate:  net.assoclist[bssid].rx_rate,
                                rx_mcs:   net.assoclist[bssid].rx_mcs,
                                rx_40mhz: net.assoclist[bssid].rx_40mhz,
                                tx_rate:  net.assoclist[bssid].tx_rate,
                                tx_mcs:   net.assoclist[bssid].tx_mcs,
                                tx_40mhz: net.assoclist[bssid].tx_40mhz,
                                link:     net.link,
                                name:     net.name
                            });
                        }
                    }

                    if (!s)
                        s = '<em>無(wú)可用信息</em>';

                    td.innerHTML = s;
                }
            }

            var ac = document.getElementById('wifi_assoc_table');
            if (ac)
            {
                /* clear all rows */
                while( ac.rows.length > 1 )
                    ac.rows[0].parentNode.deleteRow(1);

                assoclist.sort(function(a, b) {
                    return (a.name == b.name)
                        ? (a.bssid < b.bssid)
                        : (a.name  > b.name )
                    ;
                });

                for( var i = 0; i < assoclist.length; i++ )
                {
                    var tr = ac.rows[0].parentNode.insertRow(-1);
                        tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2));

                    var icon;
                    var q = (-1 * (assoclist[i].noise - assoclist[i].signal)) / 5;
                    if (q < 1)
                        icon = "/luci-static/resources/icons/signal-0.png";
                    else if (q < 2)
                        icon = "/luci-static/resources/icons/signal-0-25.png";
                    else if (q < 3)
                        icon = "/luci-static/resources/icons/signal-25-50.png";
                    else if (q < 4)
                        icon = "/luci-static/resources/icons/signal-50-75.png";
                    else
                        icon = "/luci-static/resources/icons/signal-75-100.png";

                    tr.insertCell(-1).innerHTML = String.format(
                        '![](%s)',
                        icon, assoclist[i].signal, assoclist[i].noise
                    );

                    tr.insertCell(-1).innerHTML = assoclist[i].bssid;

                    tr.insertCell(-1).innerHTML = String.format(
                        '<a href="%s">%s</a>',
                            assoclist[i].link,
                            '%h'.format(assoclist[i].name).nobr()
                    );

                    tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[i].signal).nobr();
                    tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[i].noise).nobr();

                    tr.insertCell(-1).innerHTML = (assoclist[i].rx_mcs > -1)
                        ? String.format('%.1f Mbit/s, MCS %d, %dMHz', assoclist[i].rx_rate / 1000, assoclist[i].rx_mcs, assoclist[i].rx_40mhz ? 40 : 20).nobr()
                        : String.format('%.1f Mbit/s', assoclist[i].rx_rate / 1000).nobr()
                    ;

                    tr.insertCell(-1).innerHTML = (assoclist[i].tx_mcs > -1)
                        ? String.format('%.1f Mbit/s, MCS %d, %dMHz', assoclist[i].tx_rate / 1000, assoclist[i].tx_mcs, assoclist[i].tx_40mhz ? 40 : 20).nobr()
                        : String.format('%.1f Mbit/s', assoclist[i].tx_rate / 1000).nobr()
                    ;
                }

                if (ac.rows.length == 1)
                {
                    var tr = ac.rows[0].parentNode.insertRow(-1);
                        tr.className = 'cbi-section-table-row';

                    var td = tr.insertCell(-1);
                        td.colSpan = 7;
                        td.innerHTML = '<br /><em>無(wú)可用信息</em>';
                }
            }


            var e;

            if (e = document.getElementById('localtime'))
                e.innerHTML = info.localtime;

            if (e = document.getElementById('uptime'))
                e.innerHTML = String.format('%t', info.uptime);

            if (e = document.getElementById('loadavg'))
                e.innerHTML = String.format(
                    '%.02f, %.02f, %.02f',
                    info.loadavg[0] / 65535.0,
                    info.loadavg[1] / 65535.0,
                    info.loadavg[2] / 65535.0
                );

            if (e = document.getElementById('memtotal'))
                e.innerHTML = progressbar(
                    ((info.memory.free + info.memory.buffered) / 1024) + " kB",
                    (info.memory.total / 1024) + " kB"
                );

            if (e = document.getElementById('memfree'))
                e.innerHTML = progressbar(
                    (info.memory.free / 1024) + " kB",
                    (info.memory.total / 1024) + " kB"
                );

            if (e = document.getElementById('membuff'))
                e.innerHTML = progressbar(
                    (info.memory.buffered / 1024) + " kB",
                    (info.memory.total / 1024) + " kB"
                );

            if (e = document.getElementById('swaptotal'))
                e.innerHTML = progressbar(
                    (info.swap.free / 1024) + " kB",
                    (info.swap.total / 1024) + " kB"
                );

            if (e = document.getElementById('swapfree'))
                e.innerHTML = progressbar(
                    (info.swap.free / 1024) + " kB",
                    (info.swap.total / 1024) + " kB"
                );

            if (e = document.getElementById('conns'))
                e.innerHTML = progressbar(info.conncount, info.connmax);

        }
    );
//]]></script>

<h2><a id="content" name="content">狀態(tài)</a></h2>

<fieldset class="cbi-section">
    <legend>系統(tǒng)</legend>

    <table width="100%" cellspacing="10">
        <tr><td width="33%">主機(jī)名</td><td>NHRT</td></tr>
        <tr><td width="33%">主機(jī)型號(hào)</td><td>NHPT CR5400</td></tr>
        <tr><td width="33%">固件版本</td><td>
             Cobra  P015C005B025
        </td></tr>
        <tr><td width="33%">內(nèi)核版本</td><td>3.18.29</td></tr>
        <tr><td width="33%">本地時(shí)間</td><td id="localtime">-</td></tr>
        <tr><td width="33%">運(yùn)行時(shí)間</td><td id="uptime">-</td></tr>
        <tr><td width="33%">平均負(fù)載</td><td id="loadavg">-</td></tr>
    </table>
</fieldset>

<fieldset class="cbi-section">
    <legend>內(nèi)存</legend>

    <table width="100%" cellspacing="10">
        <tr><td width="33%">可用數(shù)</td><td id="memtotal">-</td></tr>
        <tr><td width="33%">空閑數(shù)</td><td id="memfree">-</td></tr>
        <tr><td width="33%">已緩沖</td><td id="membuff">-</td></tr>
    </table>
</fieldset>



<fieldset class="cbi-section">
        <legend>4G網(wǎng)絡(luò)</legend>

        <table width="100%" cellspacing="10">
        <tr><td width="33%">固件版本</td><td>10.21.3.14.xw_trk_hk_00.05
</td></tr>
        <tr><td width="33%">運(yùn)營(yíng)商</td><td>46000
</td></tr>
        <tr><td width="33%">注冊(cè)狀態(tài)</td><td>2,1,11b2,0003,7
</td></tr>
        <tr><td width="33%">小區(qū)信息</td><td>PLMN ID:46000,cell ID:418,mode:17,band:38,channel:37900,bandwidth:6,TDD UL/DL configuration:2,RSSI:50,RSRP:34 OK
</td></tr>
        <tr><td width="33%">RSSI</td><td>-104 dBm</td></tr>
        <tr><td width="33%">IMSI</td><td>460025111043733
</td></tr>
        <tr><td width="33%">IP</td><td>10.60.114.171
</td></tr>
        <tr><td width="33%">專有承載數(shù)</td><td>0
</td></tr>
        </table>
</fieldset>

<fieldset class="cbi-section">
    <legend>網(wǎng)絡(luò)</legend>

    <table width="100%" cellspacing="10">
        <tr><td width="33%" style="vertical-align:top">IPv4 WAN狀態(tài)</td><td>
            <table><tr>
                <td id="wan4_i" style="width:16px; text-align:center; padding:3px">![](/luci-static/resources/icons/ethernet_disabled.png)<br /><small>?</small></td>
                <td id="wan4_s" style="vertical-align:middle; padding: 3px"><em>收集數(shù)據(jù):</em></td>
            </tr></table>
        </td></tr>

        <tr><td width="33%" style="vertical-align:top">IPv6 WAN狀態(tài)</td><td>
            <table><tr>
                <td id="wan6_i" style="width:16px; text-align:center; padding:3px">![](/luci-static/resources/icons/ethernet_disabled.png)<br /><small>?</small></td>
                <td id="wan6_s" style="vertical-align:middle; padding: 3px"><em>收集數(shù)據(jù):</em></td>
            </tr></table>
        </td></tr>

        <tr><td width="33%">活動(dòng)連接</td><td id="conns">-</td></tr>
    </table>
</fieldset>


<fieldset class="cbi-section">
    <legend>DHCP分配</legend>

    <table class="cbi-section-table" id="lease_status_table">
        <tr class="cbi-section-table-titles">
            <th class="cbi-section-table-cell">主機(jī)名</th>
            <th class="cbi-section-table-cell">IPv4-地址</th>
            <th class="cbi-section-table-cell">MAC-地址</th>
            <th class="cbi-section-table-cell">剩余租期</th>
        </tr>
        <tr class="cbi-section-table-row">
            <td colspan="4"><em><br />收集數(shù)據(jù):</em></td>
        </tr>
    </table>
</fieldset>

<fieldset class="cbi-section" style="display:none">
    <legend>DHCPv6分配</legend>

    <table class="cbi-section-table" id="lease6_status_table">
        <tr class="cbi-section-table-titles">
            <th class="cbi-section-table-cell">主機(jī)名</th>
            <th class="cbi-section-table-cell">IPv6-地址</th>
            <th class="cbi-section-table-cell">DUID(DHCP唯一標(biāo)識(shí)符)</th>
            <th class="cbi-section-table-cell">剩余租期</th>
        </tr>
        <tr class="cbi-section-table-row">
            <td colspan="4"><em><br />收集數(shù)據(jù):</em></td>
        </tr>
    </table>
</fieldset>





<fieldset class="cbi-section">
    <legend>無(wú)線</legend>

    <table id="wifi_status_table" width="100%" cellspacing="10">
        <tr><td><em>收集數(shù)據(jù):</em></td></tr>
    </table>
</fieldset>

<fieldset class="cbi-section">
    <legend>已連接站點(diǎn)</legend>

    <table class="cbi-section-table" id="wifi_assoc_table">
        <tr class="cbi-section-table-titles">
            <th class="cbi-section-table-cell"> </th>
            <th class="cbi-section-table-cell">MAC-地址</th>
            <th class="cbi-section-table-cell">網(wǎng)絡(luò)</th>
            <th class="cbi-section-table-cell">信號(hào)</th>
            <th class="cbi-section-table-cell">噪聲</th>
            <th class="cbi-section-table-cell">接收速率</th>
            <th class="cbi-section-table-cell">發(fā)送速率</th>
        </tr>
        <tr class="cbi-section-table-row">
            <td colspan="7"><em><br />收集數(shù)據(jù):</em></td>
        </tr>
    </table>
</fieldset>
<div class="clear"></div>
</div>
</div>

<p class="luci">
    >>>>> Cobra  P015C005B025 >>>>>
</p>
</body>
</html>

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 47,255評(píng)論 6 342
  • Spring Cloud為開(kāi)發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見(jiàn)模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,506評(píng)論 19 139
  • 想寫(xiě)寫(xiě)自己親眼看過(guò)的美景,親身體驗(yàn)過(guò)的事物,帶給我的感動(dòng)和思考。 2016年6月去法國(guó)的時(shí)候,在這個(gè)度假村里住了3...
    一顆呆麥兜閱讀 1,844評(píng)論 1 2
  • 每日知味〖054〗———包菜卷 ? (文/ 米小) 本菜譜制作耗時(shí)*60min 被菜譜適用場(chǎng)景*賢妻良母心被激發(fā)...
    越王的小館閱讀 745評(píng)論 0 0

友情鏈接更多精彩內(nèi)容