diff --git a/op25/gr-op25_repeater/www/images/1x1.png b/op25/gr-op25_repeater/www/images/1x1.png new file mode 100644 index 0000000..559d2b0 Binary files /dev/null and b/op25/gr-op25_repeater/www/images/1x1.png differ diff --git a/op25/gr-op25_repeater/www/www-static/index.html b/op25/gr-op25_repeater/www/www-static/index.html new file mode 100644 index 0000000..506e52c --- /dev/null +++ b/op25/gr-op25_repeater/www/www-static/index.html @@ -0,0 +1,44 @@ + +
+
+
+This program comes with ABSOLUTELY NO WARRANTY. ";
+ html += " ";
+ html += "
+OP25 is free software, and you are welcome to redistribute it
+under certain conditions. For further details refer to this link:
+LICENSE
+
+
+
+
diff --git a/op25/gr-op25_repeater/www/www-static/main.css b/op25/gr-op25_repeater/www/www-static/main.css
new file mode 100644
index 0000000..cad6b17
--- /dev/null
+++ b/op25/gr-op25_repeater/www/www-static/main.css
@@ -0,0 +1,5 @@
+body {background-color: yellow;}
+table { border-style: solid; background-color: #00c000; border-collapse: collapse}
+th {border-style: solid;}
+td {border-style: solid;}
+input#s_table_nac {text-align: right;}
diff --git a/op25/gr-op25_repeater/www/www-static/main.js b/op25/gr-op25_repeater/www/www-static/main.js
new file mode 100644
index 0000000..353326e
--- /dev/null
+++ b/op25/gr-op25_repeater/www/www-static/main.js
@@ -0,0 +1,230 @@
+
+// Copyright 2017, 2018 Max H. Parke KA1RBI
+//
+// This file is part of OP25
+//
+// OP25 is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// OP25 is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+// License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with OP25; see the file COPYING. If not, write to the Free
+// Software Foundation, Inc., 51 Franklin Street, Boston, MA
+// 02110-1301, USA.
+
+function find_parent(ele, tagname) {
+ while (ele) {
+ if (ele.nodeName == tagname)
+ return (ele);
+ else if (ele.nodeName == "HTML")
+ return null;
+ ele = ele.parentNode;
+ }
+ return null;
+}
+
+function f_command(ele, command) {
+ var myrow = find_parent(ele, "TR");
+ if (command == "delete") {
+ var ok = confirm ("Confirm delete");
+ if (ok)
+ myrow.parentNode.removeChild(myrow);
+ } else if (command == "clone") {
+ var newrow = myrow.cloneNode(true);
+ if (myrow.nextSibling)
+ myrow.parentNode.insertBefore(newrow, myrow.nextSibling);
+ else
+ myrow.parentNode.appendChild(newrow);
+ } else if (command == "new") {
+ var mytbl = find_parent(ele, "TABLE");
+ var newrow = null;
+ if (mytbl.id == "chtable")
+ newrow = document.getElementById("chrow").cloneNode(true);
+ else if (mytbl.id == "devtable")
+ newrow = document.getElementById("devrow").cloneNode(true);
+ else
+ return;
+ mytbl.appendChild(newrow);
+ }
+}
+
+function f_select(command) {
+ var div_list = ["status", "plot"];
+ for (var i=0; i
";
+ var div_s2 = document.getElementById("div_s2");
+ div_s2.innerHTML = html;
+ div_s2.style["display"] = "";
+ if (d['tgid'] != null)
+ current_tgid = d['tgid'];
+ if (current_tgid != null) {
+ var div_s3 = document.getElementById("div_s3");
+ div_s3.style["display"] = "";
+ }
+}
+
+function adjacent_data(d) {
+ if (Object.keys(d).length < 1) {
+ var html = "";
+ return html;
+ }
+ var html = "";
+ html += "
";
+ return html;
+}
+
+function trunk_update(d) {
+ var do_hex = {"syid":0, "sysid":0, "wacn": 0};
+ var do_float = {"rxchan":0, "txchan":0};
+ var html = "";
+ for (var nac in d) {
+ if (!is_digit(nac.charAt(0)))
+ continue;
+ html += "";
+ html += "NAC " + "0x" + parseInt(nac).toString(16) + " ";
+ html += d[nac]['rxchan'] / 1000000.0;
+ html += " / ";
+ html += d[nac]['txchan'] / 1000000.0;
+ html += " tsbks " + d[nac]['tsbks'];
+ html += " ";
+ html += "Adjacent Sites ";
+ var ct = 0;
+ for (var freq in d) {
+ var color = "#d0d0d0";
+ if ((ct & 1) == 0)
+ color = "#c0c0c0";
+ ct += 1;
+ html += "Frequency RF Id Site Id Uplink ";
+ }
+ html += "" + freq / 1000000.0 + " " + d[freq]["rfid"] + " " + d[freq]["stid"] + " " + (d[freq]["uplink"] / 1000000.0) + "
";
+ html += "WACN " + "0x" + parseInt(d[nac]['wacn']).toString(16) + " ";
+ html += "System ID " + "0x" + parseInt(d[nac]['sysid']).toString(16) + " ";
+ html += "RF ID " + d[nac]['rfid'] + " ";
+ html += "Site ID " + d[nac]['stid'] + "
";
+ if (d[nac]["secondary"].length) {
+ html += "Secondary control channel(s): ";
+ for (i=0; i";
+ html += "
";
+ html += adjacent_data(d[nac]['adjacent_data']);
+ }
+ var div_s1 = document.getElementById("div_s1");
+ div_s1.innerHTML = html;
+}
+
+function http_req_cb() {
+ s = http_req.readyState;
+ if (s != 4)
+ return;
+ if (http_req.status != 200)
+ return;
+ var dl = JSON.parse(http_req.responseText);
+ var dispatch = {'trunk_update': trunk_update, 'change_freq': change_freq, 'rx_update': rx_update}
+ for (var i=0; i ";
+ html += "System Frequencies ";
+ var ct = 0;
+ for (var freq in d[nac]['frequency_data']) {
+ tg2 = d[nac]['frequency_data'][freq]['tgids'][1];
+ if (tg2 == null)
+ tg2 = " ";
+ var color = "#d0d0d0";
+ if ((ct & 1) == 0)
+ color = "#c0c0c0";
+ ct += 1;
+ html += "Frequency Last Seen Talkgoup ID(s) Count ";
+ }
+ html += "" + parseInt(freq) / 1000000.0 + " " + d[nac]['frequency_data'][freq]['last_activity'] + " " + d[nac]['frequency_data'][freq]['tgids'][0] + " " + tg2 + " " + d[nac]['frequency_data'][freq]['counter'] + "