20180821_jeffrey - silenceuncrio/diary GitHub Wiki
0915
review
1140
commit 70825a9937df1550c99c32cb9bdc74439be56e88
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Tue Aug 21 11:38:57 2018 +0800
let 'Status' web page of nobrand to use single CGI: status.cgi
proscend/prosrc/webcgi/status.c | 18 ++
.../www/brand_nobrand/app/feature/status.html.src | 227 ++++++++++++---------
.../prosrc/www/brand_nobrand/app/feature/status.js | 162 +++------------
3 files changed, 177 insertions(+), 230 deletions(-)
1320
M300 xentino ็ status web page ้่ฆไฟฎๆญฃ
commit b8eff2294dfb7485cceedfa62315651848a71698
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Tue Aug 21 13:21:00 2018 +0800
correct the way to detect whether a variable is undefined or not
proscend/prosrc/www/brand_xentino/app/feature/status.html.src | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
1400
commit e59d195aba4d062f488a25f8dd21309a4af21f2f
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Tue Aug 21 13:56:48 2018 +0800
add the connection time for 'Status' web page for nobrand
proscend/prosrc/www/app/locale-en.json | 2 ++
proscend/prosrc/www/app/locale-fr.json | 2 ++
proscend/prosrc/www/app/locale-zh-tw.json | 2 ++
.../prosrc/www/brand_nobrand/app/feature/status.html.src | 12 ++++++++++++
4 files changed, 18 insertions(+)
1405
commit 1c673557aea62640775e1206f95e7fb7641640fd
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Tue Aug 21 14:04:11 2018 +0800
use single CGI at 'Status' web page and add wan connection time for the following brand:
- advice
- ctcu
- cxr
- digicomm
- hytec
- planet
.../www/brand_advice/app/feature/status.html.src | 239 ++++++++++++---------
.../prosrc/www/brand_advice/app/feature/status.js | 162 +++-----------
.../www/brand_ctcu/app/feature/status.html.src | 239 ++++++++++++---------
.../prosrc/www/brand_ctcu/app/feature/status.js | 162 +++-----------
.../www/brand_cxr/app/feature/status.html.src | 239 ++++++++++++---------
.../prosrc/www/brand_cxr/app/feature/status.js | 162 +++-----------
.../www/brand_digicomm/app/feature/status.html.src | 239 ++++++++++++---------
.../www/brand_digicomm/app/feature/status.js | 162 +++-----------
.../www/brand_hytec/app/feature/status.html.src | 239 ++++++++++++---------
.../prosrc/www/brand_hytec/app/feature/status.js | 162 +++-----------
.../www/brand_planet/app/feature/status.html.src | 239 ++++++++++++---------
.../prosrc/www/brand_planet/app/feature/status.js | 162 +++-----------
12 files changed, 1026 insertions(+), 1380 deletions(-)
1430
ไพๅนซ top banner ๆ้่ฆ็ CGI combine ไธไธ
top banner ๆๅฐๆ็ js ็บ proscend/prosrc/www/app/app.controller.js
ๅ็ฐก็็ฎๆจ็บ app.controller.js
่ฃก็ interval_10sec_fn
function interval_10sec_fn() {
var _operator;
var _lte_cur_proto_state;
icos.lte.shm()
.then(function(result) {
if (result.data.shm.cur_sim == 0) {
return icos.modem0.shm();
} else {
return icos.modem1.shm();
}
})
.then(function(result) {
// update to share service date
share.data.signal = result.data.shm.signal;
_operator = result.data.shm.modem_operator_name;
return icos.shm.lte_cur_proto_state();
})
.then(function(result) {
if (result.data.shm.lte_cur_proto_state == 2) {
share.data.operator = _operator;
} else {
share.data.operator = "";
}
return icos.system.status()
})
.then(function(result) {
vm.help.sysUpTime_text = time2text(result.data.status.sysUpTime);
return icos.connmgr.shm()
})
.then(function(result) {
//vm.help.wan_conn_type = result.data.shm.wan_conn_type;
vm.help.wan_conn_type_lanKey = wan_conn_type_toLanKey(result.data.shm.wan_conn_type);
});
icos.gnss.shm()
.then(function(result) {
vm.help.gnss_latitude = result.data.shm.latitude;
vm.help.gnss_longitude = result.data.shm.longitude;
if (vm.help.gnss_latitude != 0 || vm.help.gnss_longitude != 0) {
vm.help.gnss_link_to_google_maps = 1;
} else {
vm.help.gnss_link_to_google_maps = 0;
}
});
icos.shm.lte_cur_rssi()
.then(function(result) {
/*
* Display (RSSI:-xxx dBm) if there is a value
* Display (RSSI:N/A) if 0
*/
if (result.data.shm.lte_cur_rssi == 0) {
vm.help.rssi = "(RSSI: N/A)"
} else {
vm.help.rssi = "(RSSI: " + result.data.shm.lte_cur_rssi + " dBm)"
}
});
icos.shm.lte_cur_sim_no()
.then(function(result) {
/*
* Query SIM Slot: (0/1) but display (1/2)
*/
vm.help.sim_slot = result.data.shm.lte_cur_sim_no + 1;
});
}
้ๆฏ 10 ็งไฝไธๆฌก็ function ้่ฆไธ่ฟฐ็ API
icos.lte.shm()
icos.modem0.shm()
icos.modem1.shm()
icos.shm.lte_cur_proto_state()
icos.system.status()
icos.connmgr.shm()
icos.gnss.shm()
icos.shm.lte_cur_rssi()
icos.shm.lte_cur_sim_no()
ๆด็ๆๅฐๆ็ CGI
icos.lte.shm()
-cgi-bin/icos_shm.cgi?act=shm&name=lte
icos.modem0.shm()
-cgi-bin/icos_shm.cgi?act=shm&name=modem0
icos.modem1.shm()
-cgi-bin/icos_shm.cgi?act=shm&name=modem1
icos.shm.lte_cur_proto_state()
-cgi-bin/icos_shm.cgi?act=shm&name=lte_cur_proto_state
icos.system.status()
-cgi-bin/system.cgi?act=status
icos.connmgr.shm()
-cgi-bin/icos_shm.cgi?act=shm&name=wan_conn
icos.gnss.shm()
-cgi-bin/icos_shm.cgi?act=shm&name=gnss
icos.shm.lte_cur_rssi()
-cgi-bin/icos_shm.cgi?act=shm&name=lte_cur_rssi
icos.shm.lte_cur_sim_no()
-cgi-bin/icos_shm.cgi?act=shm&name=lte_cur_sim_no
ๅไพๆด็้ๆฏไธๅ่ฆๅไพ็ๅผ้ฝๅจๅๅฅ
icos.lte.shm()
- cgi-bin/icos_shm.cgi?act=shm&name=lte
icos.lte.shm()
.then(function(result) {
if (result.data.shm.cur_sim == 0) {
return icos.modem0.shm();
} else {
return icos.modem1.shm();
}
})
ๅชๆฏไพๆ cur_sim
ไพๆฑบๅฎๅพ็บ่ฉฒๅผๅซ็ๆฏ icos.modem0.shm()
ๆ icos.modem1.shm()
icos.modem0.shm()
- cgi-bin/icos_shm.cgi?act=shm&name=modem0
// update to share service date
share.data.signal = result.data.shm.signal;
_operator = result.data.shm.modem_operator_name;
่ขซ็จๅฐ็ๅผๆ
- signal
- modem_operator_name
icos.shm.lte_cur_proto_state()
- cgi-bin/icos_shm.cgi?act=shm&name=lte_cur_proto_state
if (result.data.shm.lte_cur_proto_state == 2) {
share.data.operator = _operator;
} else {
share.data.operator = "";
}
่ขซ็จๅฐ็ๅผๆ
- lte_cur_proto_state
icos.system.status()
- cgi-bin/system.cgi?act=status
vm.help.sysUpTime_text = time2text(result.data.status.sysUpTime);
่ขซ็จๅฐ็ๅผๆ
- sysUpTime
icos.connmgr.shm()
- cgi-bin/icos_shm.cgi?act=shm&name=wan_conn
vm.help.wan_conn_type_lanKey = wan_conn_type_toLanKey(result.data.shm.wan_conn_type);
็จๅฐ็ๅผๆ
- wan_conn_type
icos.gnss.shm()
- cgi-bin/icos_shm.cgi?act=shm&name=gnss
vm.help.gnss_latitude = result.data.shm.latitude;
vm.help.gnss_longitude = result.data.shm.longitude;
if (vm.help.gnss_latitude != 0 || vm.help.gnss_longitude != 0) {
vm.help.gnss_link_to_google_maps = 1;
} else {
vm.help.gnss_link_to_google_maps = 0;
}
็จๅฐ็ๅผๆ
- latitude
- longitude
icos.shm.lte_cur_rssi()
- cgi-bin/icos_shm.cgi?act=shm&name=lte_cur_rssi
if (result.data.shm.lte_cur_rssi == 0) {
vm.help.rssi = "(RSSI: N/A)"
} else {
vm.help.rssi = "(RSSI: " + result.data.shm.lte_cur_rssi + " dBm)"
}
็จๅฐ็ๅผๆ
- lte_cur_rssi
icos.shm.lte_cur_sim_no()
- cgi-bin/icos_shm.cgi?act=shm&name=lte_cur_sim_no
/*
* Query SIM Slot: (0/1) but display (1/2)
*/
vm.help.sim_slot = result.data.shm.lte_cur_sim_no + 1;
็จๅฐ็ๅผๆ
- lte_cur_sim_no
1540
top banner ๆ้่ฆ็ CGI combine ๅฎๆ
commit bb0dc75531f4b2af081a6b52229b455f1309ec3d
Author: jeffrey <[email protected]>
Date: Tue Aug 21 15:39:10 2018 +0800
use sinble CGI with top banner
proscend/prosrc/webcgi/status.c | 137 +++++++++++++++++++++++
proscend/prosrc/www/app/app.controller.js | 74 ++++--------
proscend/prosrc/www/app/services/icos.service.js | 3 +
3 files changed, 160 insertions(+), 54 deletions(-)
1545
ๅนซ็ฅ็ง็ customize
web page ๅ ไธ login ้ๆฑ
commit f3f8cd833c53ead2ff2d0b7a4383ce2d48def82c
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Tue Aug 21 15:43:22 2018 +0800
while use secrete 'customize' web page, user need login with at least 'administrator' user level
proscend/prosrc/icos/iweb/iweb.c | 7 +++++++
1 file changed, 7 insertions(+)