mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-02 23:44:37 +01:00
Fixed up pages and added luci redirect
This commit is contained in:
parent
164189149a
commit
943c1a3729
8 changed files with 24 additions and 12 deletions
|
|
@ -63,6 +63,7 @@ define Package/luciexpress/install
|
|||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/io/luciexpress-io $(1)/usr/libexec/
|
||||
$(LN) /usr/libexec/luciexpress-io $(1)/www/cgi-bin/luci-upload
|
||||
$(LN) /usr/libexec/luciexpress-io $(1)/www/cgi-bin/luci-backup
|
||||
$(CP) luci_redirect.sh $(1)/www/cgi-bin/luci
|
||||
endef
|
||||
|
||||
define Package/luciexpress/postinst
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
<strong>{{interface.netmask.value}}</strong>
|
||||
</luci-config-line>
|
||||
<luci-config-line title="{{'DHCP Server'|translate}}">
|
||||
<switch ng-model="dhcp.ignore.value" class="green"></switch>
|
||||
<switch ng-model="dhcp.ignore.value" class="green" inverted></switch>
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
<luci-config-lines ng-show="dhcp.ignore.value">
|
||||
<luci-config-lines ng-hide="dhcp.ignore.value">
|
||||
<hr/>
|
||||
<luci-config-line title="{{'Address Pool Start IP'|translate}}">
|
||||
<input class="form-control pull-right" style="width: 60px;" ng-model="dhcp.start.value" placeholder="1"></input>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<luci-select ng-model="dhcp.leasetime.value" ng-items="dhcpLeaseTimes" placeholder="{{'Lease Time'|translate}}"/>
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
<div ng-show="dhcp.ignore.value">
|
||||
<div ng-hide="dhcp.ignore.value">
|
||||
<hr/>
|
||||
<h3 translate>Static DHCP</h3>
|
||||
<table class="table">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! Author: Martin K. Schröder <mkschreder.uk@gmail.com>
|
||||
|
||||
JUCI.app
|
||||
.controller("SettingsConfigurationCtrl", function($scope, $rpc){
|
||||
.controller("SettingsConfigurationCtrl", function($scope, $rpc, gettext){
|
||||
$scope.sessionID = $rpc.$sid();
|
||||
$scope.resetPossible = 0;
|
||||
$rpc.luci2.system.reset_test().done(function(result){
|
||||
|
|
@ -11,9 +11,11 @@ JUCI.app
|
|||
}
|
||||
});
|
||||
$scope.onReset = function(){
|
||||
$rpc.luci2.system.reset_start().done(function(result){
|
||||
console.log("Performing reset: "+JSON.stringify(result));
|
||||
});
|
||||
if(confirm(gettext("This will reset your configuration to factory defaults. Do you want to continue?"))){
|
||||
$rpc.luci2.system.reset_start().done(function(result){
|
||||
console.log("Performing reset: "+JSON.stringify(result));
|
||||
});
|
||||
}
|
||||
}
|
||||
$scope.onSaveConfig = function(){
|
||||
$scope.showModal = 1;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@
|
|||
<p>{{'settings.upgrade.online.info'|translate}}</p>
|
||||
<luci-config-lines>
|
||||
<luci-config-line title="{{onlineUpgrade}}">
|
||||
<button ng-hide="onlineUpgradeAvailable" class="btn btn-lg btn-default" ng-click="onOnlineCheck()">{{'Check for Upgrade'|translate}}</button>
|
||||
<button ng-hide="onlineUpgradeAvailable" class="btn btn-lg btn-default" ng-click="onOnlineCheck()">
|
||||
<i class="fa fa-spinner fa-spin" ng-show="onlineCheckInProgress"/>{{'Check for Upgrade'|translate}}</button>
|
||||
<button ng-show="onlineUpgradeAvailable" class="btn btn-lg btn-default" ng-click="onUpgradeOnline()">{{'Install Upgrade'|translate}}</button>
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
|
|
@ -44,7 +45,7 @@
|
|||
<button class="btn btn-lg btn-default" ng-click="onUpgradeUSB()">{{'Install Upgrade'|translate}}</button>
|
||||
</luci-config-line>
|
||||
<luci-config-line title="{{usbUpgrade}}" ng-hide="usbUpgradeAvailable">
|
||||
<button class="btn btn-lg btn-default" ng-click="onCheckUSB()">{{'Check for Upgrade'|translate}}</button>
|
||||
<button class="btn btn-lg btn-default" ng-click="onCheckUSB()"><i class="fa fa-spinner fa-spin" ng-show="usbCheckInProgress"/>{{'Check for Upgrade'|translate}}</button>
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
</luci-config-section>
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ JUCI.app
|
|||
|
||||
$scope.onCheckOnline = function(){
|
||||
$scope.onlineUpgradeAvailable = false;
|
||||
$scope.onlineCheckInProgress = 1;
|
||||
$rpc.luci2.system.upgrade_check({type: "online"}).done(function(response){
|
||||
if(response.stdout) {
|
||||
$scope.onlineUpgrade = response.stdout.replace("\n", "");
|
||||
|
|
@ -166,6 +167,7 @@ JUCI.app
|
|||
$scope.onlineUpgrade = gettext("No upgrade has been found!");
|
||||
}
|
||||
if(response.stderr) $scope.$emit("error", "Online upgrade check failed: "+response.stderr);
|
||||
$scope.onlineCheckInProgress = 0;
|
||||
$scope.$apply();
|
||||
});
|
||||
}
|
||||
|
|
@ -175,6 +177,7 @@ JUCI.app
|
|||
|
||||
$scope.onCheckUSB = function(){
|
||||
$scope.usbUpgradeAvailable = false;
|
||||
$scope.usbCheckInProgress = 1;
|
||||
$rpc.luci2.system.upgrade_check({type: "usb"}).done(function(response){
|
||||
if(response.stdout) {
|
||||
$scope.usbUpgrade = response.stdout.replace("\n", "");
|
||||
|
|
@ -183,6 +186,7 @@ JUCI.app
|
|||
$scope.usbUpgrade = gettext("No upgrade has been found!");
|
||||
}
|
||||
if(response.stderr) $scope.$emit("error", "USB upgrade check failed: "+response.stderr);
|
||||
$scope.usbCheckInProgress = 0;
|
||||
$scope.$apply();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ JUCI.app
|
|||
$scope.selectedLogTypes = ["system", "network", "other"];
|
||||
|
||||
var groups = {
|
||||
"system": [],
|
||||
"network": ["netifd", "brcmnetlink", "dnsmasq-dhcp"],
|
||||
"system": ["dropbear", "peripheral_manager"],
|
||||
"network": ["netifd", "brcmnetlink", "dnsmasq-dhcp", "dnsmasq"],
|
||||
};
|
||||
|
||||
JUCI.interval.repeat("syslog", 1000, function(done){
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ JUCI.app
|
|||
});
|
||||
}
|
||||
});
|
||||
sections = sections.sort(function(a, b) { return a.interface.up > b.interface.up; });
|
||||
sections = sections.filter(function(x){ return x.interface !== undefined; }).sort(function(a, b) { return a.interface.up > b.interface.up; });
|
||||
for(var c = 0; c < sections.length; c++){
|
||||
var sec = sections[c];
|
||||
if(sec.interface.up) sec.status = "ok";
|
||||
|
|
|
|||
4
luciexpress/luci_redirect.sh
Normal file
4
luciexpress/luci_redirect.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/sbin/bash
|
||||
echo "Content-type: text/html"
|
||||
echo
|
||||
echo "<html><head></head><body><a href="/">Click here to go to new JUCI webgui.</a></body></html>"
|
||||
Loading…
Add table
Reference in a new issue