...
 
Commits (3)
    https://gitcode.net/mirror/openwrt/routing/-/commit/618e80a06a6c032d09bc9cfa333fde893ec9f8d1 oonf-olsrd2: add support to check if service is running 2023-06-11T09:37:15+02:00 Maciej Krüger mkg20001@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:mkg20001@gmail.com" title="mkg20001@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:mkg20001@gmail.com" title="mkg20001@gmail.com">Maciej Krüger</a> &lt;<a href="mailto:mkg20001@gmail.com" title="mkg20001@gmail.com">mkg20001@gmail.com</a>&gt;</span> https://gitcode.net/mirror/openwrt/routing/-/commit/dc5e428ee4a682b3420f3f02b3c1a1eb570a0a0a luci-app-olsrd2: add html table for all LAN prefixes 2023-06-11T09:40:12+02:00 Patrick Grimm patrick@lunatiki.de Maintainer: patrick@lunatiki.de @stargieg Compile tested: mips_24kc, arm_cortex-a9_vfpv3-d16, i386_pentium4, x86_64, i386_pentium-mmx, mipsel_24kc Run tested: Firefox, Safari Description: add html table for all LAN prefixes instead of a list with the one/first prefix Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:patrick@lunatiki.de" title="patrick@lunatiki.de"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:patrick@lunatiki.de" title="patrick@lunatiki.de">Patrick Grimm</a> &lt;<a href="mailto:patrick@lunatiki.de" title="patrick@lunatiki.de">patrick@lunatiki.de</a>&gt;</span> https://gitcode.net/mirror/openwrt/routing/-/commit/aab3b64e09a8c7969fdd9b4a793fda955d4fcaf5 olsrd: update to 2023-06-12 2023-06-13T15:20:23+02:00 Nick Hainke vincent@systemli.org Update to latest version. Remove upstreamed patch: - 100-rename-avl-to-olsrd_avl.patch Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:vincent@systemli.org" title="vincent@systemli.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:vincent@systemli.org" title="vincent@systemli.org">Nick Hainke</a> &lt;<a href="mailto:vincent@systemli.org" title="vincent@systemli.org">vincent@systemli.org</a>&gt;</span>
......@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-olsrd2
PKG_VERSION:=0.2.6
PKG_RELEASE:=14
PKG_RELEASE:=15
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
......
......@@ -15,33 +15,31 @@ var callgetLan = rpc.declare({
function createTable(data) {
let tableData = [];
if ( data && data[0] && data[0].version && data[0].version[0] ) {
if ( data[0].version[0].version_text != undefined ) {
tableData.push([_('Version'),data[0].version[0].version_text]);
if ( data && data.version && data.version[0] ) {
if ( data.version[0].version_text != undefined ) {
tableData.push([_('OLSRd2 Version'),data.version[0].version_text]);
}
if ( data[0].version[0].version_commit != undefined) {
tableData.push([_('GIT commit'),data[0].version[0].version_commit]);
if ( data.version[0].version_commit != undefined) {
tableData.push([_('OLSRd2 GIT commit'),data.version[0].version_commit]);
}
}
if ( data && data[1] && data[1].lan && data[1].lan[0] ) {
if ( data[1].lan[0].lan != undefined ) {
tableData.push([_('LAN IP'),data[1].lan[0].lan]);
}
if ( data[1].lan[0].domain != undefined) {
tableData.push([_('Domain'),data[1].lan[0].domain]);
}
if ( data[1].lan[0].domain_metric != undefined) {
tableData.push([_('Domain metric'),data[1].lan[0].domain_metric]);
}
if ( data[1].lan[0].domain_metric_out != undefined) {
tableData.push([_('Domain metric outgoing'),data[1].lan[0].domain_metric_out]);
}
if ( data[1].lan[0].domain_metric_out_raw != undefined) {
tableData.push([_('domain_metric_out_raw'),data[1].lan[0].domain_metric_out_raw]);
}
if ( data[1].lan[0].domain_distance != undefined) {
tableData.push([_('Domain distance'),data[1].lan[0].domain_distance]);
}
tableData.push(['']);
return tableData;
}
function createTableDomain(data) {
let tableData = [];
if ( data && data.lan && data.lan[0] ) {
data.lan.forEach(row => {
tableData.push([
row.lan,
row.domain,
row.domain_metric,
row.domain_metric_out,
row.domain_metric_out_raw,
row.domain_distance
])
});
}
return tableData;
}
......@@ -59,16 +57,26 @@ return view.extend({
E('th', { 'class': 'th left' }),
E('th', { 'class': 'th left' })
]));
var trd = E('table', { 'class': 'table' });
trd.appendChild(E('trd', { 'class': 'tr cbi-section-table-titles' }, [
E('th', { 'class': 'th left' }, [ 'LAN IP' ]),
E('th', { 'class': 'th left' }, [ 'Domain' ]),
E('th', { 'class': 'th left' }, [ 'Domain Metric' ]),
E('th', { 'class': 'th left' }, [ 'Domain Metric out' ]),
E('th', { 'class': 'th left' }, [ 'Domain Metric out' ]),
E('th', { 'class': 'th left' }, [ 'Domain distance' ])
]));
poll.add(() => {
Promise.all([
callgetVersion(),
callgetLan()
]).then((results) => {
cbi_update_table(tr, createTable(results));
cbi_update_table(tr, createTable(results[0]));
cbi_update_table(trd, createTableDomain(results[1]));
})
}, 30);
return tr;
return [tr,trd];
}
});
......@@ -6,13 +6,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=olsrd
PKG_SOURCE_DATE:=2022-03-18
PKG_RELEASE:=5
PKG_SOURCE_DATE:=2023-06-12
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/OLSR/olsrd.git
PKG_SOURCE_VERSION:=1e771b4d31e36f9ffd0a04c3f8f83abb803ec309
PKG_MIRROR_HASH:=2b238b179bc873902a0d094c0d3e43e0a373710763bdca4b6fec5eed431d4a8d
PKG_SOURCE_VERSION:=a9b3f1ac6e73a39b5bd97d1e66b1e039998314f5
PKG_MIRROR_HASH:=b7e1cd4b43a4d8607d6761267f23d28fb09c577d746c22ca60d2ed2fc19b1ea8
PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
PKG_BUILD_PARALLEL:=0
......
......@@ -118,3 +118,20 @@ reload()
oonf_add_devices_to_configuration
oonf_reread_config
}
running()
{
# check if we have a pidfile and then check if that pid still exists.
# since we don't use -e this has to be explicitly returned. exit would stop the process.
test -e "/tmp/run/olsrd2.pid" && test -e "/proc/$(cat "/tmp/run/olsrd2.pid")" && return 0
return 1
}
status()
{
if running; then
echo "running"
else
echo "stopped"
fi
}
include $(TOPDIR)/rules.mk
PKG_NAME:=oonf-olsrd2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
......
......@@ -5,4 +5,7 @@ DAEMON='olsrd2'
[ -n "$IPKG_INSTROOT" ] || {
. /lib/functions/oonf_init.sh
extra_command "running" "Check if service is running"
extra_command "status" "Service status"
}