Skip to content

Commit

Permalink
Up to 1.0.22-20220821
Browse files Browse the repository at this point in the history
Fix TAC for MF286D.
Update of BTS search options.
  • Loading branch information
4IceG authored Aug 21, 2022
1 parent f859fb9 commit eee9bd1
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 48 deletions.
2 changes: 1 addition & 1 deletion luci-app-3ginfo-lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PKG_NAME:=luci-app-3ginfo-lite
LUCI_TITLE:=LuCI panel for 3ginfo-lite
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+sms-tool
PKG_VERSION:=1.0.21-20220817
PKG_VERSION:=1.0.22-20220821

include $(TOPDIR)/feeds/luci/luci.mk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,16 @@ return view.extend({
o = s.taboption('bts1', form.DummyValue, '_dummy');
o.rawhtml = true;
o.default = '<div class="cbi-section-descr">' +
_('Hint: To set up the BTS search engine, simply fill in the required fields.') +
_('Hint: To set up a BTS search engine, all you have to do is select the dedicated website for your location.') +
'</div>';

o = s.taboption('bts1',form.Value, 'bstart', _('Beginning of the web address'),
_('Paste the entire site address into the Cell ID value.')
o = s.taboption('bts1',form.ListValue, 'website', _('Website to search for BTS'),
_('Select a website for searching.')
);
//o.default = 'http://www.btsearch.pl/szukaj.php?mode=std&search=';
o.rmempty = true;

o = s.taboption('bts1',form.Value, 'bend', _('End of search address'),
_('Paste the string occurring after the Cell ID value.')
);
//o.default = '';
o.rmempty = true;
o.value('http://www.btsearch.pl/szukaj.php?mode=std&search=', _('BTSearch.pl'));
o.value('https://lteitaly.it/internal/map.php#bts=', _('lteitaly.it'));
o.default = 'http://www.btsearch.pl/szukaj.php?mode=std&search=';
o.modalonly = true;

return m.render();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,12 @@ return view.extend({
if (document.getElementById('lac')) {
var view = document.getElementById("lac");
if (json.lac_dec == '' || json.lac_hex == '') {
var lc = json.lac_hex + ' ' + json.lac_dec;
var lc = json.lac_dec + ' ' + json.lac_hex;
var ld = lc.split(' ').join('');
view.textContent = ld;
}
else {
view.textContent = json.lac_hex + ' (' + json.lac_dec + ')' ;
view.textContent = json.lac_dec + ' (' + json.lac_hex + ')';
}

}
Expand All @@ -514,31 +514,25 @@ return view.extend({
view.textContent = '-';
}
else {
if (json.tac_hex == json.lac_hex) {
view.textContent = json.tac_hex + ' (' + json.lac_dec + ')' ;
}
else {
view.textContent = json.tac_hex + ' (' + json.tac_dec + ')' ;
}
if (json.tac_dec == '' || json.tac_hex == '') {
view.textContent = json.lac_hex + ' (' + json.lac_dec + ')' ;
}
else {
view.textContent = json.tac + ' (' + json.tac_dec + ')' ;
if (json.tac_hex == null || json.tac_hex == '' || json.tac_hex == '-') {
view.textContent = json.tac_d + ' (' + json.tac_h + ')';
}
else {
view.textContent = json.tac_dec + ' (' + json.lac_hex + ')';
}
}
}

if (document.getElementById('cid')) {
var view = document.getElementById("cid");
if (json.cid_dec == '' || json.cid_hex == '') {
var cc = json.cid_hex + ' ' + json.cid_dec;
var cc = json.cid_dec + ' ' + json.cid_hex;
var cd = cc.split(' ').join('');
view.textContent = cd;
}
else {

view.textContent = json.cid_hex + ' (' + json.cid_dec + ')' ;
view.textContent = json.cid_dec + ' (' + json.cid_hex + ')' ;
}
}

Expand Down Expand Up @@ -777,13 +771,39 @@ return view.extend({
o.onclick = function() {

return uci.load('3ginfo').then(function() {
var wstart = (uci.get('3ginfo', '@3ginfo[0]', 'bstart'));
var wend = (uci.get('3ginfo', '@3ginfo[0]', 'bend'));
if ( wend == '' || wend == null ) {
window.open(wstart + json.cid_dec);
} else {
window.open(wstart + json.cid_dec + wend);
};
var searchsite = (uci.get('3ginfo', '@3ginfo[0]', 'website'));

if (searchsite.includes('btsearch')) {
//http://www.btsearch.pl/szukaj.php?mode=std&search=CellID

window.open(searchsite + json.cid_dec);
}

if (searchsite.includes('lteitaly')) {
//https://lteitaly.it/internal/map.php#bts=MCCMNC.CellID

var zzmnc = json.operator_mnc;
var zzcid = Math.round(json.cid_dec/256);
if ( zzmnc.length == 3 ) {
var first = zzmnc.slice(0, 1);
var second = zzmnc.slice(1, 2);
if (first.includes('0') && second.includes('0')) {
var cutmnc = zzmnc.slice(2, 3);
}
}
if ( zzmnc.length == 2 ) {
var first = zzmnc.slice(0, 1);
if (first.includes('0')) {
var cutmnc = zzmnc.slice(1, 2);
}
}
if ( zzmnc.length < 2 ) {
var cutmnc = zzmnc;
}

window.open(searchsite + json.operator_mcc + cutmnc + '.' + zzcid);
}

});

};
Expand All @@ -795,3 +815,4 @@ return view.extend({
handleSave: null,
handleReset: null
});

17 changes: 6 additions & 11 deletions luci-app-3ginfo-lite/po/pl/3ginfo.po
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,15 @@ msgstr "Szukaj"
msgid "Search BTS using Cell ID"
msgstr "Wyszukaj BTS po Cell ID"

msgid "Hint: To set up the BTS search engine, simply fill in the required fields."
msgstr "Podpowiedź: Aby skonfigurować wyszukiwarkę BTS wystarczy uzupełnić wymagane pola."
msgid "Hint: To set up a BTS search engine, all you have to do is select the dedicated website for your location."
msgstr "Wskazówka: Aby skonfigurować wyszukiwarkę BTS, wystarczy wybrać stronę odpowiednią dla swojej lokalizacji."

msgid "BTS search settings"
msgstr "Ustawienia wyszukiwania stacji bazowej"

msgid "Beginning of the web address"
msgstr "Początek adresu strony www"
msgid "Website to search for BTS"
msgstr "Strona do wyszukiwania BTS"

msgid "End of search address"
msgstr "Koniec adresu wyszukiwania"
msgid "Select a website for searching."
msgstr "Wybierz stronę internetową służącą do wyszukiwania."

msgid "Paste the entire site address into the Cell ID value."
msgstr "Wklej cały adres strony do wartości Cell ID."

msgid "Paste the string occurring after the Cell ID value."
msgstr "Wklej ciąg znaków występujący za wartością Cell ID."
3 changes: 1 addition & 2 deletions luci-app-3ginfo-lite/root/etc/config/3ginfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

config 3ginfo
option device ''
option bstart 'http://www.btsearch.pl/szukaj.php?mode=std&search='
option bend ''
option website 'http://www.btsearch.pl/szukaj.php?mode=std&search='
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ case "$MODE_NUM" in
if [ -n "$T" ]; then
[ -n "$ADDON" ] && ADDON="$ADDON,"
T_HEX=$(printf "%X" $T)
T_DEC=$T
ADDON="$ADDON"'{"TAC":"'$T' ('$T_HEX')"}'
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ case "$MODE_NUM" in
if [ -n "$T" ] && [ "x$T" != "x0" ]; then
[ -n "$ADDON" ] && ADDON="$ADDON,"
T_HEX=$(printf "%X" $T)
T_DEC=$T
fi

T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $4}' | xargs)
Expand Down
3 changes: 2 additions & 1 deletion luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ cat <<EOF
"lac_hex":"$LAC_HEX",
"tac_dec":"$TAC_DEC",
"tac_hex":"$TAC_HEX",
"tac":"$T_HEX",
"tac_h":"$T_HEX",
"tac_d":"$T_DEC",
"cid_dec":"$CID_DEC",
"cid_hex":"$CID_HEX",
"pci":"$PCI",
Expand Down

0 comments on commit eee9bd1

Please sign in to comment.