diff --git a/luciexpress/htdocs/js/uci.js b/luciexpress/htdocs/js/uci.js
index 4d5bab0f1..330a35f75 100644
--- a/luciexpress/htdocs/js/uci.js
+++ b/luciexpress/htdocs/js/uci.js
@@ -171,7 +171,7 @@
"fw_check_url": { dvalue: "", type: String, required: false},
"fw_path_url": { dvalue: "", type: String, required: false},
"fw_find_ext": { dvalue: "", type: String, required: false},
- "fw_down_path": { dvalue: "", type: String, required: false}
+ "fw_upload_path": { dvalue: "", type: String, required: false}
}
},
"voice_client": {
diff --git a/luciexpress/htdocs/plugins/core/widgets/luci.config.js b/luciexpress/htdocs/plugins/core/widgets/luci.config.js
index 4623de471..f3e24e3b2 100644
--- a/luciexpress/htdocs/plugins/core/widgets/luci.config.js
+++ b/luciexpress/htdocs/plugins/core/widgets/luci.config.js
@@ -10,7 +10,7 @@ $juci.module("core")
.directive("luciConfigSection", function(){
var plugin_root = $juci.module("core").plugin_root;
return {
- template: '
',
+ template: '',
replace: true,
transclude: true
};
@@ -34,7 +34,7 @@ $juci.module("core")
.directive("luciConfigLines", function(){
var plugin_root = $juci.module("core").plugin_root;
return {
- template: '',
+ template: '',
replace: true,
transclude: true
};
diff --git a/luciexpress/htdocs/plugins/internet/pages/status.nat.html b/luciexpress/htdocs/plugins/internet/pages/status.nat.html
index 6619a58f3..4af4f20ee 100644
--- a/luciexpress/htdocs/plugins/internet/pages/status.nat.html
+++ b/luciexpress/htdocs/plugins/internet/pages/status.nat.html
@@ -1,7 +1,25 @@
- {{ 'Nat table' | translate }}
+ {{ 'Connections for each Device' | translate }}
+ {{ 'status.nat.connections.info' | translate }}
+
+
+ | # |
+ Hostname |
+ IP |
+ Nr. of Connections |
+
+
+ | {{$index}} |
+ {{cl.hostname}} |
+ {{cl.ipaddr}} |
+ {{cl.active_cons||0}} |
+
+
+
+
+ {{ 'NAT Connection Table' | translate }}
{{ 'status.nat.info' | translate }}
diff --git a/luciexpress/htdocs/plugins/internet/pages/status.nat.js b/luciexpress/htdocs/plugins/internet/pages/status.nat.js
index 5b774dd42..464aa5dae 100644
--- a/luciexpress/htdocs/plugins/internet/pages/status.nat.js
+++ b/luciexpress/htdocs/plugins/internet/pages/status.nat.js
@@ -1,5 +1,14 @@
JUCI.app
.controller("StatusNATPageCtrl", function($scope, $rpc){
+ $rpc.router.clients().done(function(table){
+ var clients = [];
+ Object.keys(table).map(function(x){
+ var cl = table[x];
+ if(cl.connected) clients.push(cl);
+ });
+ $scope.clients = clients;
+ $scope.$apply();
+ });
$rpc.luci2.network.conntrack_table().done(function(table){
if(table && table.entries){
$scope.connections = table.entries.sort(function(a, b){ return (a.src+a.dest) < (b.src+b.dest); }).map(function(x){
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.configuration.js b/luciexpress/htdocs/plugins/settings/pages/settings.configuration.js
index 748fed54a..4e7a83f9c 100644
--- a/luciexpress/htdocs/plugins/settings/pages/settings.configuration.js
+++ b/luciexpress/htdocs/plugins/settings/pages/settings.configuration.js
@@ -1,4 +1,6 @@
-$juci.module("settings")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("SettingsConfigurationCtrl", function($scope, $rpc, $session){
$scope.sessionID = $session.sid;
$scope.resetPossible = 0;
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.energy.js b/luciexpress/htdocs/plugins/settings/pages/settings.energy.js
index 44b338b3a..27af07f68 100644
--- a/luciexpress/htdocs/plugins/settings/pages/settings.energy.js
+++ b/luciexpress/htdocs/plugins/settings/pages/settings.energy.js
@@ -1,4 +1,6 @@
-$juci.module("settings")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("SettingsEnergyCtrl", function($scope, $uci){
$uci.sync(["boardpanel"]).done(function(){
if($uci.boardpanel)
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.network.js b/luciexpress/htdocs/plugins/settings/pages/settings.network.js
index d16714932..264c4256a 100644
--- a/luciexpress/htdocs/plugins/settings/pages/settings.network.js
+++ b/luciexpress/htdocs/plugins/settings/pages/settings.network.js
@@ -1,4 +1,6 @@
-$juci.module("settings")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("SettingsNetworkCtrl", function($scope){
});
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.password.js b/luciexpress/htdocs/plugins/settings/pages/settings.password.js
index be331553b..1eed80a4b 100644
--- a/luciexpress/htdocs/plugins/settings/pages/settings.password.js
+++ b/luciexpress/htdocs/plugins/settings/pages/settings.password.js
@@ -1,4 +1,6 @@
-$juci.module("settings")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("SettingsPasswordCtrl", function($scope, $rpc, $tr, $session, gettext){
$scope.showPassword = 0;
$scope.showModal = 0;
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.uci.js b/luciexpress/htdocs/plugins/settings/pages/settings.uci.js
index 5d9e1320f..68ed8d110 100644
--- a/luciexpress/htdocs/plugins/settings/pages/settings.uci.js
+++ b/luciexpress/htdocs/plugins/settings/pages/settings.uci.js
@@ -1,4 +1,6 @@
-$juci.module("settings")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("SettingsUCIController", function($scope, $rpc){
var configs = {};
$scope.loading = 0;
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js b/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js
index 6e14e689e..436b1bec1 100644
--- a/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js
+++ b/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js
@@ -108,7 +108,7 @@
};
})( jQuery);
-$juci.module("settings")
+JUCI.app
.controller("SettingsUpgradeCtrl", function($scope, $uci, $rpc, $session){
$scope.sessionID = $session.sid;
$scope.uploadFilename = "/tmp/firmware.bin";
diff --git a/luciexpress/htdocs/plugins/status/pages/status.about.js b/luciexpress/htdocs/plugins/status/pages/status.about.js
index 902f0a9c3..cb8c33104 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.about.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.about.js
@@ -1,4 +1,6 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatusAbout", function($scope){
});
diff --git a/luciexpress/htdocs/plugins/status/pages/status.diagnostics.html b/luciexpress/htdocs/plugins/status/pages/status.diagnostics.html
index 67fe70397..fb900e0ef 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.diagnostics.html
+++ b/luciexpress/htdocs/plugins/status/pages/status.diagnostics.html
@@ -1,8 +1,9 @@
+
{{ 'Diagnostic Utility' | translate }}
+
{{ 'status.diagnostics.info' | translate }}
+
- {{ 'Diagnostic Utility' | translate }}
- {{ 'status.diagnostics.info' | translate }}
{{'Automated Diagnostics'|translate}}
{{'status.diagnostics.auto.info'|translate}}
@@ -10,6 +11,8 @@
+
+
{{'Ping Test'|translate}}
{{'status.diagnostics.ping.info'|translate}}
@@ -20,21 +23,18 @@
{{'Ping results'|translate}}:
{{data.pingResults}}
{{'Error'|translate}}:
{{data.pingError}}
+
+
{{'Tracing Tool'|translate}}
{{'status.diagnostics.trace.info'|translate}}
-
-
-
-
-
{{'Trace results'|translate}}:
{{data.traceResults}}
{{'Error'|translate}}:
{{data.traceError}}
-
diff --git a/luciexpress/htdocs/plugins/status/pages/status.diagnostics.js b/luciexpress/htdocs/plugins/status/pages/status.diagnostics.js
index 80fbda160..392029fb8 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.diagnostics.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.diagnostics.js
@@ -1,26 +1,24 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatusDiagnostics", function($scope, $rpc){
$scope.data = {};
$rpc.router.networks().done(function(result){
if(result){
- $scope.data.allInterfaces = Object.keys(result).map(function(x){return {label: x, id: x};});
+ $scope.data.allInterfaces = Object.keys(result).map(function(x){return {label: x, value: x};});
$scope.$apply();
}
});
$scope.onTraceTest = function(){
- var item = $scope.data.traceInterface;
- if(item && item.id){
- console.log("Performing trace on interface "+item.id);
- $rpc.luci2.network.traceroute({ data: "google.com" }).done(function(result){
- if(result.stderr) $scope.data.traceError = result.stderr;
- $scope.data.traceResults = result.stdout;
- $scope.$apply();
- }).fail(function(error){
- $scope.data.traceResults = "";
- $scope.data.traceError = JSON.stringify(error);
- $scope.$apply();
- });
- }
+ $rpc.luci2.network.traceroute({ data: $scope.data.traceHost }).done(function(result){
+ if(result.stderr) $scope.data.traceError = result.stderr;
+ $scope.data.traceResults = result.stdout;
+ $scope.$apply();
+ }).fail(function(error){
+ $scope.data.traceResults = "";
+ $scope.data.traceError = JSON.stringify(error);
+ $scope.$apply();
+ });
}
$scope.onPingTest = function(){
$scope.data.pingResults = "...";
diff --git a/luciexpress/htdocs/plugins/status/pages/status.events.html b/luciexpress/htdocs/plugins/status/pages/status.events.html
index d6fcbfeed..d7fd83374 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.events.html
+++ b/luciexpress/htdocs/plugins/status/pages/status.events.html
@@ -17,7 +17,23 @@
+
+
{{'Log' | translate}}
+
+
+ | Date |
+ Type |
+ Source |
+ Message |
+
+
+ | {{line[0]}} |
+ {{line[1]}} |
+ {{line[2]}} |
+ {{line[3]}} |
+
+
diff --git a/luciexpress/htdocs/plugins/status/pages/status.events.js b/luciexpress/htdocs/plugins/status/pages/status.events.js
index ab5740851..853749ab6 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.events.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.events.js
@@ -1,8 +1,29 @@
-$juci.module("status")
-.controller("StatusEventsPageCtrl", function($scope){
+//! Author: Martin K. Schröder
+
+JUCI.app
+.controller("StatusEventsPageCtrl", function($scope, $rpc){
$scope.selectedShowType = "all";
$scope.selectedLogTypes = [];
-
+ $rpc.luci2.system.syslog().done(function(result){
+ if(result && result.log){
+ $scope.logs = result.log.split("\n").map(function(line){
+ var fields = line.match(/(\w* \w* \w* \d{2}:\d{2}:\d{2} \d{4}) ([^\s]*) ([^\s:]*): (.*)/);
+ if(fields){
+ // remove first one because it is the whole line
+ fields.shift();
+ fields[0] = new Date(fields[0]);
+ }
+ return fields;
+ })
+ .filter(function(x){ return x != null && x[2] != "kernel"; }) // filter out all invalid matches
+ .reverse() // sort by date in descending order
+ .map(function(x){ // convert date back to string and shorten it's format
+ x[0] = x[0].toLocaleFormat("%d-%b-%Y %H:%M:%S");
+ return x;
+ });
+ $scope.$apply();
+ }
+ });
$scope.allLogTypes = [
{ label: "System", value: "system" },
{ label: "WAN", value: "wan" },
diff --git a/luciexpress/htdocs/plugins/status/pages/status.restart.js b/luciexpress/htdocs/plugins/status/pages/status.restart.js
index c6bf37cd6..26693d5d5 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.restart.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.restart.js
@@ -1,4 +1,6 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatusRestartPageCtrl", function($scope, $rpc){
$scope.onRestart = function(){
$scope.showConfirmation = 1;
diff --git a/luciexpress/htdocs/plugins/status/pages/status.status.dsl.js b/luciexpress/htdocs/plugins/status/pages/status.status.dsl.js
index c27c6dad3..116cc0697 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.status.dsl.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.status.dsl.js
@@ -1,4 +1,6 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatsCtrl", function($scope, $rpc, $session, gettext, $tr){
$scope.dslstats = {};
diff --git a/luciexpress/htdocs/plugins/status/pages/status.status.js b/luciexpress/htdocs/plugins/status/pages/status.status.js
index 6ff573117..2ec579fec 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.status.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.status.js
@@ -1,4 +1,6 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatsOverviewCtrl", function ($scope, $session, $rootScope, $rpc, gettext, $tr) {
$scope.sysinfo = {};
$scope.info = {};
@@ -50,7 +52,7 @@ $juci.module("status")
[$tr(gettext("Kernel Version")), info.system.kernel],
[$tr(gettext("Local Time")), new Date(sys.localtime)],
[$tr(gettext("Uptime")), info.system.uptime],
- [$tr(gettext("Load Average")), sys.load[0] + " " + sys.load[1] + " " + sys.load[2]]
+ //[$tr(gettext("Load Average")), sys.load[0] + " " + sys.load[1] + " " + sys.load[2]]
];
$scope.systemExtStatusTbl.rows = [
[$tr(gettext("Wifi")), (info.specs.wifi)?gettext("yes"):gettext("no")],
diff --git a/luciexpress/htdocs/plugins/status/pages/status.status.tv.js b/luciexpress/htdocs/plugins/status/pages/status.status.tv.js
index f1264d731..6703a945a 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.status.tv.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.status.tv.js
@@ -1,4 +1,6 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatusTVPageCtrl", function($scope, $rpc, gettext){
$rpc.router.igmptable().done(function(result){
if(!result.table) {
diff --git a/luciexpress/htdocs/plugins/status/pages/status.status.voice.js b/luciexpress/htdocs/plugins/status/pages/status.status.voice.js
index 036c44c97..1e2b80133 100644
--- a/luciexpress/htdocs/plugins/status/pages/status.status.voice.js
+++ b/luciexpress/htdocs/plugins/status/pages/status.status.voice.js
@@ -1,4 +1,6 @@
-$juci.module("status")
+//! Author: Martin K. Schröder
+
+JUCI.app
.controller("StatusVoicePageCtrl", function($scope, $rpc){
$rpc.asterisk.status().done(function(data){
if(data && data.sip){
diff --git a/luciexpress/htdocs/plugins/status/status.js b/luciexpress/htdocs/plugins/status/status.js
index f2824fec8..881ba186e 100644
--- a/luciexpress/htdocs/plugins/status/status.js
+++ b/luciexpress/htdocs/plugins/status/status.js
@@ -1,4 +1,7 @@
-angular.module("luci").config(function($stateProvider) {
+//! Author: Martin K. Schröder
+
+JUCI.app
+.config(function($stateProvider) {
$stateProvider.state("status", {
url: "/status",
onEnter: function($state){