mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-07 12:06:54 +03:00
v0.4
This commit is contained in:
27
README.md
27
README.md
@@ -15,44 +15,25 @@ Internet-detector is an application for checking the availability of the Interne
|
|||||||
|
|
||||||
## Installation notes
|
## Installation notes
|
||||||
|
|
||||||
**OpenWrt >= 21.02:**
|
**OpenWrt 19.07:**
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/internet-detector_0.4-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_0.4-3_all.ipk
|
wget --no-check-certificate -O /tmp/internet-detector_0.4-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/19.07/internet-detector_0.4-3_all.ipk
|
||||||
opkg install /tmp/internet-detector_0.4-3_all.ipk
|
opkg install /tmp/internet-detector_0.4-3_all.ipk
|
||||||
rm /tmp/internet-detector_0.4-3_all.ipk
|
rm /tmp/internet-detector_0.4-3_all.ipk
|
||||||
/etc/init.d/internet-detector start
|
/etc/init.d/internet-detector start
|
||||||
/etc/init.d/internet-detector enable
|
/etc/init.d/internet-detector enable
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/luci-app-internet-detector_0.4-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_0.4-3_all.ipk
|
wget --no-check-certificate -O /tmp/luci-app-internet-detector_0.4-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/19.07/luci-app-internet-detector_0.4-3_all.ipk
|
||||||
opkg install /tmp/luci-app-internet-detector_0.4-3_all.ipk
|
opkg install /tmp/luci-app-internet-detector_0.4-3_all.ipk
|
||||||
rm /tmp/luci-app-internet-detector_0.4-3_all.ipk
|
rm /tmp/luci-app-internet-detector_0.4-3_all.ipk
|
||||||
/etc/init.d/rpcd restart
|
/etc/init.d/rpcd restart
|
||||||
|
|
||||||
i18n-ru:
|
i18n-ru:
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_0.4-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_0.4-3_all.ipk
|
wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_0.4-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/19.07/luci-i18n-internet-detector-ru_0.4-3_all.ipk
|
||||||
opkg install /tmp/luci-i18n-internet-detector-ru_0.4-3_all.ipk
|
opkg install /tmp/luci-i18n-internet-detector-ru_0.4-3_all.ipk
|
||||||
rm /tmp/luci-i18n-internet-detector-ru_0.4-3_all.ipk
|
rm /tmp/luci-i18n-internet-detector-ru_0.4-3_all.ipk
|
||||||
|
|
||||||
**OpenWrt 19.07:**
|
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/internet-detector_0.3.0-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/19.07/internet-detector_0.3.0-1_all.ipk
|
|
||||||
opkg install /tmp/internet-detector_0.3.0-1_all.ipk
|
|
||||||
rm /tmp/internet-detector_0.3.0-1_all.ipk
|
|
||||||
/etc/init.d/internet-detector start
|
|
||||||
/etc/init.d/internet-detector enable
|
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/luci-app-internet-detector_0.3.0-2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/19.07/luci-app-internet-detector_0.3.0-2_all.ipk
|
|
||||||
opkg install /tmp/luci-app-internet-detector_0.3.0-2_all.ipk
|
|
||||||
rm /tmp/luci-app-internet-detector_0.3.0-2_all.ipk
|
|
||||||
/etc/init.d/rpcd restart
|
|
||||||
|
|
||||||
i18n-ru:
|
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_0.3.0-2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/19.07/luci-i18n-internet-detector-ru_0.3.0-2_all.ipk
|
|
||||||
opkg install /tmp/luci-i18n-internet-detector-ru_0.3.0-2_all.ipk
|
|
||||||
rm /tmp/luci-i18n-internet-detector-ru_0.3.0-2_all.ipk
|
|
||||||
|
|
||||||
## Screenshots:
|
## Screenshots:
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=0.4-3
|
PKG_VERSION:=0.4
|
||||||
|
PKG_RELEASE:=3
|
||||||
LUCI_TITLE:=LuCI support for internet-detector
|
LUCI_TITLE:=LuCI support for internet-detector
|
||||||
LUCI_DEPENDS:=+internet-detector
|
LUCI_DEPENDS:=+internet-detector
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
'require baseclass';
|
|
||||||
'require form';
|
'require form';
|
||||||
'require fs';
|
'require fs';
|
||||||
'require poll';
|
|
||||||
'require rpc';
|
'require rpc';
|
||||||
'require uci';
|
'require uci';
|
||||||
'require ui';
|
'require ui';
|
||||||
'require view';
|
|
||||||
|
|
||||||
const btnStyleEnabled = 'btn cbi-button-save';
|
const btnStyleEnabled = 'btn cbi-button-save';
|
||||||
const btnStyleDisabled = 'btn cbi-button-reset';
|
const btnStyleDisabled = 'btn cbi-button-reset';
|
||||||
const btnStyleApply = 'btn cbi-button-apply';
|
const btnStyleApply = 'btn cbi-button-apply';
|
||||||
|
|
||||||
return view.extend({
|
return L.view.extend({
|
||||||
execPath : '/usr/bin/internet-detector',
|
execPath : '/usr/bin/internet-detector',
|
||||||
upScriptPath : '/etc/internet-detector/up-script',
|
upScriptPath : '/etc/internet-detector/up-script',
|
||||||
downScriptPath : '/etc/internet-detector/down-script',
|
downScriptPath : '/etc/internet-detector/down-script',
|
||||||
@@ -74,14 +71,14 @@ return view.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
serviceRestart: function(ev) {
|
serviceRestart: function(ev) {
|
||||||
poll.stop();
|
L.Poll.stop();
|
||||||
return this.handleServiceAction('restart').then(() => {
|
return this.handleServiceAction('restart').then(() => {
|
||||||
this.servicePoll();
|
this.servicePoll();
|
||||||
poll.start();
|
L.Poll.start();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
fileEditDialog: baseclass.extend({
|
fileEditDialog: L.Class.extend({
|
||||||
__init__: function(file, title, description, callback, fileExists=false) {
|
__init__: function(file, title, description, callback, fileExists=false) {
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
@@ -655,7 +652,7 @@ return view.extend({
|
|||||||
settingsNode.replaceWith(settingsTabs);
|
settingsNode.replaceWith(settingsTabs);
|
||||||
|
|
||||||
if(this.currentAppMode !== '0') {
|
if(this.currentAppMode !== '0') {
|
||||||
poll.add(
|
L.Poll.add(
|
||||||
L.bind((this.currentAppMode === '2') ? this.servicePoll : this.uiPoll, this),
|
L.bind((this.currentAppMode === '2') ? this.servicePoll : this.uiPoll, this),
|
||||||
this.pollInterval
|
this.pollInterval
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
'require baseclass';
|
|
||||||
'require fs';
|
'require fs';
|
||||||
'require uci';
|
'require uci';
|
||||||
|
|
||||||
return baseclass.extend({
|
return L.Class.extend({
|
||||||
title : _('Internet'),
|
title : _('Internet'),
|
||||||
execPath : '/usr/bin/internet-detector',
|
execPath : '/usr/bin/internet-detector',
|
||||||
inetStatus : null,
|
inetStatus : null,
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
module('luci.controller.internet-detector', package.seeall)
|
||||||
|
|
||||||
|
function index()
|
||||||
|
if nixio.fs.access('/usr/bin/internet-detector', 'x') then
|
||||||
|
entry({'admin', 'services', 'internet-detector'}, view('internet-detector'), _('Internet detector'), 80).acl_depends = { 'luci-app-internet-detector' }
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user