From 23b0b8e50df3d5842dc403ec5e8c055a882d1521 Mon Sep 17 00:00:00 2001 From: lgq <1015864684@qq.com> Date: 星期六, 19 七月 2025 11:04:17 +0800 Subject: [PATCH] 同步最新文件 要提交的变更: 修改: local/app/MainControl 修改: local/app/NetModule 修改: local/bin/export.sh 修改: local/bin/snmp_cfg 修改: local/bin/snmp_val.sh 修改: local/version 修改: local/www/cgi-bin/device-ctrl/reboot-service 修改: local/www/cgi-bin/snmp/enable 修改: local/www/cgi-bin/warn-list/clear 修改: local/www/js/page/home.js 修改: local/www/sys-snmp-conf.html 修改: upgrade/app.tgz --- local/bin/export.sh | 4 ++-- local/bin/snmp_val.sh | 2 +- local/www/cgi-bin/snmp/enable | 2 +- local/www/cgi-bin/warn-list/clear | 18 +++++++++++++++++- local/www/js/page/home.js | 2 +- local/www/cgi-bin/device-ctrl/reboot-service | 2 ++ local/bin/snmp_cfg | 0 local/app/MainControl | 0 local/version | 2 +- upgrade/app.tgz | 0 local/app/NetModule | 0 local/www/sys-snmp-conf.html | 2 -- 12 files changed, 25 insertions(+), 9 deletions(-) diff --git a/local/app/MainControl b/local/app/MainControl index f75a368..668df0b 100755 --- a/local/app/MainControl +++ b/local/app/MainControl Binary files differ diff --git a/local/app/NetModule b/local/app/NetModule index ffb579a..b4ce25f 100755 --- a/local/app/NetModule +++ b/local/app/NetModule Binary files differ diff --git a/local/bin/export.sh b/local/bin/export.sh index ce746be..a8e414e 100755 --- a/local/bin/export.sh +++ b/local/bin/export.sh @@ -1,7 +1,7 @@ #!/bin/sh -sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||d.type||'.'||d.id||'.'||a.passcode as OID, d.id as 璁惧ID, d.type as 璁惧绫诲瀷, a.passcode as 閫氶亾鍙�, a.name as 鏁版嵁鍚嶇О,a.note as 澶囨敞 from device d left join accuracy a on d.id=a.id where uploadFlag=0" > /tmp/oid_list.csv -sqlite3 /work/iot_cfg.db "SELECT name as 璁惧鍚嶇О, '1.3.6.1.4.1.27116.'||type||'.'||id||'.3' as OID, id as 璁惧ID, type as 璁惧绫诲瀷, 3 as 閫氶亾鍙� , '鐘舵��' as 鏁版嵁鍚嶇О, '0-姝e父;1-鍛婅' as 澶囨敞 FROM ioDevice ;" >> /tmp/oid_list.csv +sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||d.type||'.'||d.id||'.'||a.passcode as OID, d.id as 璁惧ID, a.passcode as 閫氶亾鍙�, a.name as 鏁版嵁鍚嶇О,a.note as 澶囨敞 from device d left join accuracy a on d.id=a.id where uploadFlag=0" > /tmp/oid_list.csv +sqlite3 /work/iot_cfg.db "SELECT name as 璁惧鍚嶇О, '1.3.6.1.4.1.27116.'||type||'.'||id||'.3' as OID, id as 璁惧ID, 3 as 閫氶亾鍙� , '鐘舵��' as 鏁版嵁鍚嶇О, '0-姝e父;1-鍛婅' as 澶囨敞 FROM ioDevice ;" >> /tmp/oid_list.csv sed -i 's/|/,/g' /tmp/oid_list.csv diff --git a/local/bin/snmp_cfg b/local/bin/snmp_cfg index 082fb1e..195883a 100755 --- a/local/bin/snmp_cfg +++ b/local/bin/snmp_cfg Binary files differ diff --git a/local/bin/snmp_val.sh b/local/bin/snmp_val.sh index 3512596..74115c5 100755 --- a/local/bin/snmp_val.sh +++ b/local/bin/snmp_val.sh @@ -15,7 +15,7 @@ chn=`expr $chn - 1 ` -#echo "$jsoner -g /tmp/$id value-$chn.value" +#echo "jsoner -g /tmp/$id value-$chn.value" val=`jsoner -g /tmp/$id value-$chn.value` ret=$? #echo "ret = $ret" diff --git a/local/version b/local/version index f0afde5..e784f84 100644 --- a/local/version +++ b/local/version @@ -1,3 +1,3 @@ -2025-07-07-v001 +2025-07-18-v001 type=1 IGD5300 diff --git a/local/www/cgi-bin/device-ctrl/reboot-service b/local/www/cgi-bin/device-ctrl/reboot-service index c0c00bf..d1fedaa 100755 --- a/local/www/cgi-bin/device-ctrl/reboot-service +++ b/local/www/cgi-bin/device-ctrl/reboot-service @@ -12,4 +12,6 @@ killall -9 MainControl killall -9 svr +`/usr/local/bin/export.sh` > /dev/null +killall -9 snmpd diff --git a/local/www/cgi-bin/snmp/enable b/local/www/cgi-bin/snmp/enable index 7e0cc76..f9efacf 100755 --- a/local/www/cgi-bin/snmp/enable +++ b/local/www/cgi-bin/snmp/enable @@ -15,8 +15,8 @@ if [ "$enable" == "true" ] then + `/usr/local/bin/export.sh` > /dev/null `jsoner -s /work/sysConfig.json snmp "1"` > /dev/null - else `jsoner -s /work/sysConfig.json snmp "0"` > /dev/null fi diff --git a/local/www/cgi-bin/warn-list/clear b/local/www/cgi-bin/warn-list/clear index f4397af..f4becee 100755 --- a/local/www/cgi-bin/warn-list/clear +++ b/local/www/cgi-bin/warn-list/clear @@ -6,6 +6,22 @@ echo "{\"code\": \"success\"}" -echo 0 > /usr/local/dev/do1 +# echo 0 > /usr/local/dev/do1 +# 鍘熷瀛楃涓� +str=`sqlite3 /work/iot_cfg.db "select alarm from alarm;"` +# 绉婚櫎閫楀彿锛岀敓鎴愯繛缁瓧绗﹀簭鍒� +clean_str=${str//,/} + +# 闇�瑕佹鏌ョ殑浣嶇疆鍒楄〃锛�1銆�3銆�5銆�7锛� +positions="0 1 2 3" # 绱㈠紩浠�0寮�濮嬶紝瀵瑰簲绗�1銆�3銆�5銆�7涓瓧绗� + +# 閬嶅巻浣嶇疆骞跺垽鏂� +for pos in $positions; do + char="${clean_str:$pos:1}" # 鎻愬彇鎸囧畾浣嶇疆鐨勫瓧绗� + if [[ "$char" == "1" ]]; then + actual_pos=$((pos + 1)) # 杞崲涓哄疄闄呬綅缃紙浠�1璁℃暟锛� + echo 0 > /usr/local/dev/do$actual_pos + fi +done \ No newline at end of file diff --git a/local/www/js/page/home.js b/local/www/js/page/home.js index 000ef35..2671bb5 100644 --- a/local/www/js/page/home.js +++ b/local/www/js/page/home.js @@ -291,7 +291,7 @@ var data = warnList; var html = ''; if (data != null && data.length > 0) { - for (var i = data.length - 1; i > data.length - 12; i--) { + for (var i = data.length - 1; i > data.length - 6; i--) { if(i < 0){ break; } diff --git a/local/www/sys-snmp-conf.html b/local/www/sys-snmp-conf.html index 2da61ef..aa55a86 100644 --- a/local/www/sys-snmp-conf.html +++ b/local/www/sys-snmp-conf.html @@ -201,7 +201,6 @@ thead += "<th>璁惧鍚嶇О</th>"; thead += "<th>OID</th>"; thead += "<th>璁惧ID</th>"; - thead += "<th>璁惧绫诲瀷</th>"; thead += "<th>閫氶亾鍙�</th>"; thead += "<th>鏁版嵁鍚嶇О</th>"; thead += "<th>澶囨敞</th>"; @@ -213,7 +212,6 @@ tbody += "<tr><td>" + item.device + "</td>"; tbody += "<td>" + item.oid + "</td>"; tbody += "<td>" + item.index1 + "</td>"; - tbody += "<td>" + item.type + "</td>"; tbody += "<td>" + item.index2 + "</td>"; tbody += "<td>" + item.param + "</td>"; tbody += "<td>" + (item.unit ?? "") + "</td></tr>"; diff --git a/upgrade/app.tgz b/upgrade/app.tgz index 1afc98a..b733f40 100644 --- a/upgrade/app.tgz +++ b/upgrade/app.tgz Binary files differ -- Gitblit v1.9.3