Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
- <meta NAME="pragma" CONTENT="no-cache">
- <title>encoder control</title>
- <link rel="stylesheet" type="text/css" href="style.css">
- </head>
- <body>
- <div id="wrapper-out">
- <div id="wrapper-center">
- <div id="header">
- <a id="logo" href="http://www.pixel2media.com" target="_blank"></a>
- </div>
- <div id="navigation">
- <ul>
- <li><a href="javascript:showonlyone('maincontrol');">Control</a></li>
- <li><a href="javascript:showonlyone('statistics');">Statistics</a></li>
- <li><a href="javascript:showonlyone('template');">Template</a></li>
- <li><a href="javascript:showonlyone('audio');">Audio</a></li>
- <li><a href="javascript:showonlyone('edid');">EDID</a></li>
- <li><a href="javascript:showonlyone('system');">System</a></li>
- <li><a href="javascript:showonlyone('matterhorn');">Matterhorn</a></li>
- <li><a href="manual.pdf" target="_blank">Documentation</a></li>
- <li><a href="http://www.pixel2media.com" target="_blank">Contact</a></li>
- </ul>
- </div>
- <div id="content-container">
- <div id="section-navigation">
- <table id="status" cellpadding="5px" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0px; overflow: auto; ">
- <thead>
- <tr class="method_header">
- <th width="100%" colspan="2" scope="col" class="method_header_left">System</th>
- </tr>
- </thead>
- <tbody>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">model</th>
- <td class="model-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">serial #</th>
- <td class="serial-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">firmware</th>
- <td class="firmware-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">hardware</th>
- <td class="hardware-field"></td>
- </tr>
- </tr>
- </tbody>
- </table>
- <br/>
- <table id="info" cellpadding="5px" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0px; overflow: auto; ">
- <thead>
- <tr class="method_header">
- <th width="100%" colspan="2" scope="col" class="method_header_left">Status</th>
- </tr>
- </thead>
- <tbody>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">stream</th>
- <td class="stream-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">record</th>
- <td class="record-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">total</th>
- <td class="total-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">free</th>
- <td class="free-field"></td>
- </tr>
- <tr class="status">
- <th width="50px" style="color:#0099FF" scope="row">duration</th>
- <td class="sduration-field"></td>
- </tr>
- </tbody>
- </table>
- </div>
- <div onclick="clk('maincontrol')" class="newboxes content" id="maincontrol">
- <table class="control" cellpadding="0px" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0 0 10px 0; margin: 0 0 0 0; overflow: auto;">
- <thead>
- <tr class="method_header">
- <th colspan="2" scope="col" class="method_header_left"> Main control</th>
- </tr>
- </thead>
- <tbody>
- <tr class="method">
- <th width="50px" style="color:#0099FF" scope="row">get</th>
- <td>
- <button formaction="/api/system">system</button>
- <button formaction="/api/date">date</button>
- <br/>
- <button formaction="/api/storage">storage</button>
- <button formaction="/api/network">network</button>
- </td>
- </tr>
- <tr class="method">
- <th style="color: #0099FF" scope="row">record</th>
- <td>
- <button formaction="/api/record" post="action=start">start</button>
- <button formaction="/api/record" post="action=pause">pause</button>
- <button formaction="/api/record" post="action=stop">stop</button>
- <br/>
- <button formaction="/api/record">status</button>
- <button formaction="/api/statistics">statistics</button>
- <br/>
- <button formaction="/api/recordings">recordings</button>
- </td>
- </tr>
- <tr class="method">
- <th style="color: #0099FF" scope="row">stream</th>
- <td>
- <button formaction="/api/stream" post="action=start">start</button>
- <button formaction="/api/stream" post="action=stop">stop</button>
- <br/>
- <button formaction="/api/stream">status</button>
- <button formaction="/api/statistics">statistics</button>
- <br/>
- </td>
- </tr>
- <tr class="method">
- <th style="color: #0099FF" scope="row">live<br/>change</th>
- <td>
- <div class="method">
- <form class="form_test_form" action="/api/stream" method="post">
- <input class="form_field form_param_path form_param_required form_param_submit"
- name="video" type="text" value="2000" size="6"/>
- <input type="submit" value="video"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/stream" method="post">
- <input class="form_field form_param_path form_param_required form_param_submit"
- name="gop" type="text" value="30" size="6"/>
- <input type="submit" value="gop"/></form>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div onclick="clk('statistics')" style="display: none;" class="newboxes content" id="statistics">
- <table class="control" cellpadding="0px" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0 0 10px 0; margin: 0 0 0 0; overflow: auto;">
- <thead>
- <tr class="method_header">
- <th colspan="2" scope="col" class="method_header_left">Statistics</th>
- </tr>
- </thead>
- <tbody>
- <tr class="method">
- <th style="color: #0099FF" scope="row">statistics</th>
- <td>
- <div class="method">
- <form class="form_test_form" action="/api/statistics" method="post">
- <table cellpadding="4" cellspacing="0">
- <tbody>
- <tr class="form_field_description">
- <td class="form_label"><label>videoBitrate</label></td>
- <td><input id="field-videoBitrate"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>videoCurBitrate</label></td>
- <td><input id="field-videoCurBitrate"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>audioBitrate</label></td>
- <td><input id="field-audioBitrate"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>frameRate</label></td>
- <td><input id="field-frameRate"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>totalFrames</label></td>
- <td><input id="field-totalFrames"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>encodedFrames</label></td>
- <td><input id="field-encodedFrames"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>failFrames</label></td>
- <td><input id="field-failFrames"
- class="form_field form_param_path form_param_required form_param_submit"
- name="" type="text" value="" size="10"/></td>
- </tr>
- </tbody>
- </table>
- </form>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div onclick="clk('template')" style="display: none;" class="newboxes content" id="template">
- <table class="control" cellpadding="0px" cellspacing="2px"
- style="width: 100%; border: 1px solid #999; padding: 0 0 10px 0; margin: 0 0 0 0; overflow: auto;">
- <thead>
- <tr class="method_header">
- <th colspan="2" scope="col" class="method_header_left">template&overlay</th>
- </tr>
- </thead>
- <tbody>
- <tr class="method">
- <th width="40px" style="color: #0099FF" scope="row">get</th>
- <td>
- <div class="method">
- <button formaction="/api/template" width="100px">get templates</button>
- </div>
- </td>
- </tr>
- <tr class="method">
- <th width="50px" style="color:#0099FF" scope="col">template</th>
- <td>
- <div class="method">
- <form id="form20" class="form_test_form" action="/api/template" method="post">
- <input class="form_field form_param_path form_param_required form_param_submit" name="template"
- type="text" value="" size="8"/><br/>
- <br/>
- <input type="submit" value="template"/></form>
- </div>
- </td>
- </tr>
- <tr class="method">
- <th style="color:#0099FF" scope="row"></th>
- <td title="template">
- <button formaction="/api/template" post="template=1">T1</button>
- <button formaction="/api/template" post="template=2">T2</button>
- <button formaction="/api/template" post="template=3">T3</button>
- <br/>
- <button formaction="/api/template" post="template=4">T4</button>
- <button formaction="/api/template" post="template=5">T5</button>
- <button formaction="/api/template" post="template=6">T6</button>
- </td>
- </tr>
- <tr class="method">
- <th width="50px" style="color:#0099FF" scope="row">overlay</th>
- <td>
- <div class="method">
- <form class="form_test_form" action="/api/template" method="post">
- <input class="form_field form_param_path form_param_required form_param_submit" name="overlay"
- type="text" value="" size="6"/><br/>
- <br/>
- <input type="submit" value="overlay"/></form>
- </div>
- </td>
- </tr>
- <td title="overlay">
- <tr>
- <th colspan="2">
- <button formaction="/api/template" post="overlay=0">0</button>
- <button formaction="/api/template" post="overlay=1">1</button>
- <button formaction="/api/template" post="overlay=2">2</button>
- <button formaction="/api/template" post="overlay=3">3</button>
- <button formaction="/api/template" post="overlay=4">4</button>
- <button formaction="/api/template" post="overlay=5">5</button>
- <button formaction="/api/template" post="overlay=6">6</button>
- <button formaction="/api/template" post="overlay=7">7</button>
- <button formaction="/api/template" post="overlay=8">8</button>
- <button formaction="/api/template" post="overlay=9">9</button>
- </th>
- </tr>
- </td>
- </tbody>
- </table>
- </div>
- <div onclick="clk('audio')" style="display: none;" class="newboxes content" id="audio">
- <table class="control" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0 0 10px; margin: 0 0 0 0; overflow: auto;">
- <thead>
- <tr class="method_header">
- <th colspan="2" scope="row" class="method_header_left">Audio settings</th>
- </tr>
- </thead>
- <tbody>
- <tr class="method">
- <th style="color: #0099FF" scope="row">audio</th>
- <td>
- <div class="method">
- <form class="form_test_form" action="/api/audio" method="post">
- <table cellpadding="4" cellspacing="0">
- <tbody>
- <tr class="form_field_description">
- <td class="form_label"><label>MicL</label></td>
- <td><input id="MicL" class="form_field form_param_path form_param_required form_param_submit"
- name="MicL" type="text" value="" size="4"/></td>
- <td class="form_label"><label>MicR</label></td>
- <td><input id="MicR" class="form_field form_param_path form_param_required form_param_submit"
- name="MicR" type="text" value="" size="4"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>HDMI1</label></td>
- <td><input id="HDMI1" class="form_field form_param_path form_param_required form_param_submit"
- name="HDMI1" type="text" value="" size="4"/></td>
- <td class="form_label"><label>HDMI2</label></td>
- <td><input id="HDMI2" class="form_field form_param_path form_param_required form_param_submit"
- name="HDMI2" type="text" value="" size="4"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>Line1</label></td>
- <td><input id="Line1" class="form_field form_param_path form_param_required form_param_submit"
- name="Line1" type="text" value="mute" size="4"/></td>
- <td class="form_label"><label>Line2</label></td>
- <td><input id="Line2" class="form_field form_param_path form_param_required form_param_submit"
- name="Line2" type="text" value="mute" size="4"/></td>
- </tr>
- <tr class="form_field_description">
- <td class="form_label"><label>W1</label></td>
- <td><input id="W1" class="form_field form_param_path form_param_required form_param_submit"
- name="W1" type="text" value="" size="4"/></td>
- <td><input type="submit" value="submit" style="width:50px; margin-left: 10px;"/></td>
- </tr>
- </tbody>
- </table>
- </form>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div onclick="clk('system')" style="display: none;" class="newboxes content" id="system">
- <table class="control" cellpadding="0px" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0 0 10px 0; margin: 0 0 0 0; overflow: auto;">
- <thead>
- <tr class="method_header">
- <th colspan="2" scope="col" class="method_header_left">System configuration</th>
- </tr>
- </thead>
- <tbody>
- <tr class="method">
- <th style="color: #0099FF" scope="row">network</th>
- <td>
- <button formaction="/api/network" style="width: 195px;">get network settings</button>
- </br/>
- <div class="method">
- <form class="form_test_form" action="/api/network" method="post">
- <input id="field_ip" class="form_field form_param_path form_param_required form_param_submit"
- name="ip" type="text" value="" size="16"/>
- <input type="submit" value="ip" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/network" method="post">
- <input id="field_subnet"
- class="form_field form_param_path form_param_required form_param_submit" name="subnet"
- type="text" value="" size="16"/>
- <input type="submit" value="subnet" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/network" method="post">
- <input id="field_gateway"
- class="form_field form_param_path form_param_required form_param_submit" name="gateway"
- type="text" value="" size="16"/>
- <input type="submit" value="gateway" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/network" method="post">
- <input id="field_dns" class="form_field form_param_path form_param_required form_param_submit"
- name="dns" type="text" value="" size="16"/>
- <input type="submit" value="dns" style="width: 70px;"/></form>
- </div>
- <button id="dhcpon" formaction="/api/network" post="dhcp=1" style="width: 96px;">DHCP</button>
- <button id="dhcpoff" formaction="/api/network" post="dhcp=0" style="width: 96px;">DHCP off</button>
- <input id="checksave" type="checkbox"><label for="checksave"> save</label>
- </td>
- </tr>
- <tr class="method">
- <th style="color: #0099FF" scope="row">date</th>
- <td>
- <button formaction="/api/date" style="width: 195px;">get date settings</button>
- </br/>
- <div class="method">
- <form class="form_test_form" action="/api/date" method="post">
- <input id="field_year" class="form_field form_param_path form_param_required form_param_submit"
- name="year" type="text" value="" size="5"/>
- <input id="field_month" class="form_field form_param_path form_param_required form_param_submit"
- name="month" type="text" value="" size="2"/>
- <input id="field_day" class="form_field form_param_path form_param_required form_param_submit"
- name="day" type="text" value="" size="2"/>
- <input type="submit" value="date" style="width: 90px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/date" method="post">
- <input id="field_hour" class="form_field form_param_path form_param_required form_param_submit"
- name="hour" type="text" value="" size="3"/>
- <input id="field_minute"
- class="form_field form_param_path form_param_required form_param_submit" name="minute"
- type="text" value="" size="3"/>
- <input id="field_second"
- class="form_field form_param_path form_param_required form_param_submit" name="second"
- type="text" value="" size="3"/>
- <input type="submit" value="time" style="width: 90px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/date" method="post">
- <input id="field_timezone"
- class="form_field form_param_path form_param_required form_param_submit" name="timeZone"
- type="text" value="UTC" size="13"/>
- <input type="submit" value="timezone" style="width: 90px;"/></form>
- </div>
- <button formaction="/api/date/ntp" style="width: 195px;">get ntp settings</button>
- </br/>
- <div class="method">
- <form class="form_test_form" action="/api/date/ntp" method="post">
- <input id="field_utcoffset"
- class="form_field form_param_path form_param_required form_param_submit" name="utcOffset"
- type="text" value="" size="13"/>
- <input type="submit" value="utc offset" style="width: 90px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/date/ntp" method="post">
- <input id="field_ntp" class="form_field form_param_path form_param_required form_param_submit"
- name="ntp" type="text" value="" size="13"/>
- <input type="submit" value="ntp server" style="width: 90px;"/></form>
- </div>
- </td>
- </tr>
- <tr class="method">
- <th style="color: #0099FF" scope="row">www</th>
- <td>
- <button formaction="/api/www" post="action=copy" alt="copy USB/www to wwwroot">copy</button>
- <button formaction="/api/www" post="action=backup">backup</button>
- </td>
- </tr>
- <tr class="method">
- <th style="color: #0099ff" scope="row">ir</th>
- <td>
- <div class="method">
- <form class="form_test_form" action="/api/system" method="post">
- <select name="ir">
- <option id="0">0</option>
- <option id="1">1</option>
- <option id="2">2</option>
- <option id="3">3</option>
- <option id="4">4</option>
- <option id="5">5</option>
- <option id="6">6</option>
- <option id="7">7</option>
- <option id="8">8</option>
- <option id="9">9</option>
- <option id="10">10</option>
- <option id="11">11</option>
- <option id="12">12</option>
- <option id="13">13</option>
- <option id="14">14</option>
- <option id="15">15</option>
- <option id="16">16</option>
- <option id="17">17</option>
- <option id="18">18</option>
- <option id="19">19</option>
- <option id="20">20</option>
- <option id="21">21</option>
- <option id="22">22</option>
- <option id="23">23</option>
- <option id="24">24</option>
- <option id="25">25</option>
- <option id="26">26</option>
- <option id="27">27</option>
- <option id="28">28</option>
- <option id="29">29</option>
- <option id="30">30</option>
- <option id="31">31</option>
- <option id="255">255</option>
- </select>
- <input type="submit" value="submit" style="width: 70px;">
- </form>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div onclick="clk('matterhorn')" style="display: none;" class="newboxes content" id="matterhorn">
- <table class="control" cellpadding="0px" cellspacing="0px"
- style="width: 100%; border: 1px solid #999; padding: 0 0 10px 0; margin: 0 0 0 0; overflow: auto;">
- <thead>
- <tr class="method_header">
- <th colspan="2" scope="col" class="method_header_left">Matterhorn</th>
- </tr>
- </thead>
- <tbody>
- <tr class="method">
- <th width="50px" style="color:#0099FF" scope="row">matterhorn</th>
- <td>
- <div class="method">
- <button formaction="/api/matterhorn" style="width: 195px;">get matterhorn settings</button>
- </br/>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/matterhorn" method="post">
- <input id="field_mhserver"
- class="form_field form_param_path form_param_required form_param_submit" name="server"
- type="text" value="" size="16"/>
- <input type="submit" value="ip" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/matterhorn" method="post">
- <input id="field_cagent"
- class="form_field form_param_path form_param_required form_param_submit"
- name="capture_agent" type="text" value="" size="16"/>
- <input type="submit" value="agent" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/matterhorn" method="post">
- <input id="field_username"
- class="form_field form_param_path form_param_required form_param_submit" name="username"
- type="text" value="" size="16"/>
- <input type="submit" value="username" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/matterhorn" method="post">
- <input id="field_password"
- class="form_field form_param_path form_param_required form_param_submit" name="password"
- type="text" value="" size="16"/>
- <input type="submit" value="password" style="width: 70px;"/></form>
- </div>
- <div class="method">
- <form class="form_test_form" action="/api/matterhorn" method="post">
- <input id="field_activate"
- class="form_field form_param_path form_param_required form_param_submit" name="activate"
- type="text" value="" size="16"/>
- <input type="submit" value="activate" style="width: 70px;"/></form>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div id="aside">
- <h3>Request</h3>
- <p>
- <div class="test_form_response">
- <div style="width: 100%; border: 1px solid #999; padding: 5px; ">
- <div class="request-url-field"
- style="margin-top: 10px; width: 100%; padding-left: 10px; min-height: 18px; "></div>
- <div class="post-field"
- style="width: 100%; padding-left: 10px; margin-bottom: 10px; "></div>
- </div>
- <h3><br/>Response</h3>
- <pre class="response-field"
- style="width: 100%; border: 1px solid #999; padding: 5px; overflow: auto; min-height: 274px; "></pre>
- </div>
- </p>
- </div>
- <div id="footer">
- <table width="100%">
- <tr>
- <td width="8%" style="float:left;">version 1.0</td>
- <td style="float:right;">Copyright pixel2media GmbH, 2014</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="functions.js"></script>
- <script type="text/javascript">
- (function statistics(){
- var audio;
- $.ajax({
- type: "GET",
- url: "/api/statistics",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- audio = jQuery.parseJSON(data);
- var statistics = jQuery.parseJSON(data);
- $( "input[id='field-videoBitrate']" ).val(statistics.videoBitrate);
- $( "input[id='field-videoCurBitrate']" ).val(statistics.videoCurBitrate);
- $( "input[id='field-audioBitrate']" ).val(statistics.audioBitrate);
- $( "input[id='field-frameRate']" ).val(statistics.frameRate);
- $( "input[id='field-totalFrames']" ).val(statistics.totalFrames);
- $( "input[id='field-encodedFrames']" ).val(statistics.encodedFrames);
- $( "input[id='field-failFrames']" ).val(statistics.failFrames);
- }
- });
- })();
- (function audio(){
- var audio;
- $.ajax({
- type: "GET",
- url: "/api/audio",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- audio = jQuery.parseJSON(data);
- $( "input[id='MicL']" ).val(audio.MicL);
- $( "input[id='MicR']" ).val(audio.MicR);
- $( "input[id='HDMI1']" ).val(audio.HDMI1);
- $( "input[id='HDMI2']" ).val(audio.HDMI2);
- $( "input[id='Line1']" ).val(audio.Line1);
- $( "input[id='Line2']" ).val(audio.Line2);
- $( "input[id='W1']" ).val(audio.W1);
- }
- });
- })();
- (function system(){
- var network;
- $.ajax({
- type: "GET",
- url: "/api/network",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- network = jQuery.parseJSON(data);
- $("input[id='field_ip']").val(network.ip);
- $("input[id='field_subnet']").val(network.subnet);
- $("input[id='field_gateway']").val(network.gateway);
- $("input[id='field_dns']").val(network.dns);
- if ((network.dhcp) == 0) {
- $("button[id='dhcpoff']").css("color", "red");
- } else {
- $("button[id='dhcpoff']").css("color", "black");
- }
- if ((network.dhcp) == 1) {
- $("button[id='dhcpon']").css("color", "red");
- } else {
- $("button[id='dhcpon']").css("color", "black");
- }
- }
- });
- var date;
- $.ajax({
- type: "GET",
- url: "/api/date",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- date = jQuery.parseJSON(data);
- $("input[id='field_year']").val(date.year);
- $("input[id='field_month']").val(date.month);
- $("input[id='field_day']").val(date.day);
- $("input[id='field_hour']").val(date.hour);
- $("input[id='field_minute']").val(date.minute);
- $("input[id='field_second']").val(date.second);
- $("input[id='field_timezone']").val(date.timeZone);
- }
- });
- var ntp;
- $.ajax({
- type: "GET",
- url: "/api/date/ntp",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- ntp = jQuery.parseJSON(data);
- $("input[id='field_ntp']").val(ntp.ntp);
- $("input[id='field_utcoffset']").val(ntp.utcOffset);
- }
- });
- var system;
- $.ajax({
- type: "GET",
- url: "/api/system",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- system = jQuery.parseJSON(data);
- if ((system.IRaddress) == "RC5 0") {
- $("option[id='0']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 1") {
- $("option[id='1']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 2") {
- $("option[id='2']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 3") {
- $("option[id='3']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 4") {
- $("option[id='4']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 5") {
- $("option[id='5']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 6") {
- $("option[id='6']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 7") {
- $("option[id='7']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 8") {
- $("option[id='8']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 9") {
- $("option[id='9']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 10") {
- $("option[id='10']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 11") {
- $("option[id='11']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 12") {
- $("option[id='12']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 13") {
- $("option[id='13']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 14") {
- $("option[id='14']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 15") {
- $("option[id='15']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 16") {
- $("option[id='16']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 17") {
- $("option[id='17']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 18") {
- $("option[id='18']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 19") {
- $("option[id='19']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 20") {
- $("option[id='20']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 21") {
- $("option[id='21']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 22") {
- $("option[id='22']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 23") {
- $("option[id='23']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 24") {
- $("option[id='24']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 25") {
- $("option[id='25']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 26") {
- $("option[id='26']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 27") {
- $("option[id='27']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 28") {
- $("option[id='28']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 29") {
- $("option[id='29']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 30") {
- $("option[id='30']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 31") {
- $("option[id='31']").prop("selected", true);
- }
- if ((system.IRaddress) == "RC5 255") {
- $("option[id='255']").prop("selected", true);
- }
- }
- });
- })();
- (function matterhorn(){
- var matterhorn;
- $.ajax({
- type: "GET",
- url: "/api/matterhorn",
- processData: true,
- dataType: 'text',
- cache: false,
- success: function (data, textStatus, request) {
- matterhorn = jQuery.parseJSON(data);
- $("input[id='field_mhserver']").val(matterhorn.server);
- $("input[id='field_cagent']").val(matterhorn.captureAgent);
- $("input[id='field_username']").val(matterhorn.username);
- $("input[id='field_password']").val(matterhorn.password);
- $("input[id='field_activate']").val(matterhorn.activate);
- }
- });
- })();
- function showonlyone(thechosenone) {
- $('.newboxes').each(function (index) {
- if ($(this).attr("id") == thechosenone) {
- $(this).show();
- }
- else {
- $(this).hide();
- }
- });
- }
- function clk (fn) {
- window[fn]();
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement