* themes/fledermaus: Register on install
authorSteven Barth <steven@midlink.org>
Mon, 9 Jun 2008 08:48:10 +0000 (08:48 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 9 Jun 2008 08:48:10 +0000 (08:48 +0000)
* applications/luci-statistics: Fixed wrong paths in templates

applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
libs/web/root/etc/config/luci
themes/fledermaus/ipkg/postinst [new file with mode: 0755]
themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus [new file with mode: 0755]

index e88ca7f58aad42e045c58f30b04491c4c3fd66d6..c211a39514e630a8366bf420cfa24144dab02474 100644 (file)
@@ -9,7 +9,7 @@ about open tcp connections, interface traffic, iptables rules etc.%></p>
        <ul>
                <% for plugin, desc in pairs(plugins) do %>
                        <% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
-                               <li><a href="/cgi-bin/luci/admin/statistics/network/<%=plugin%>"><%=desc%></a></li>
+                               <li><a href="<%=controller%>/admin/statistics/collectd/network/<%=plugin%>"><%=desc%></a></li>
                        <% end %>
                <% end %>
        </ul>
index c7945f16e4d2370a52b81cb823274d75027849bb..c2f36f2b86aab66dbea8589fb958b8fd9fb4b4ea 100644 (file)
@@ -10,7 +10,7 @@ and to transmit the data over the network to other collectd instances.%></p>
        <ul>
                <% for plugin, desc in pairs(plugins) do %>
                        <% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
-                               <li><a href="/cgi-bin/luci/admin/statistics/output/<%=plugin%>"><%=desc%></a></li>
+                               <li><a href="<%=controller%>/admin/statistics/collectd/output/<%=plugin%>"><%=desc%></a></li>
                        <% end %>
                <% end %>
        </ul>
index 8c1f714e68c727252176a22f3c562e8fde3cd586..dcedea6b892e05f353b3e03763f1279b2cc3013d 100644 (file)
@@ -6,7 +6,7 @@
        <ul>
                <% for plugin, desc in pairs(plugins) do %>
                        <% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
-                               <li><a href="/cgi-bin/luci/admin/statistics/system/<%=plugin%>"><%=desc%></a></li>
+                               <li><a href="<%=controller%>/admin/statistics/collectd/system/<%=plugin%>"><%=desc%></a></li>
                        <% end %>
                <% end %>
        </ul>
index 0b05d8439b001629488dd90fa393ecc2ff66c758..3e1e7db4f076024c013a3c5b371e5c2c6a90c4b2 100644 (file)
@@ -41,4 +41,3 @@ config internal template
                
 config internal themes
        option OpenWRT "/luci-static/openwrt.org"
-       option Fledermaus "/luci-static/fledermaus"
diff --git a/themes/fledermaus/ipkg/postinst b/themes/fledermaus/ipkg/postinst
new file mode 100755 (executable)
index 0000000..1951df5
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -n "${IPKG_INSTROOT}" ] || {
+       ( . /etc/uci-defaults/luci-theme-fledermaus ) &&        rm -f /etc/uci-defaults/luci-theme-fledermaus
+}
diff --git a/themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus b/themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus
new file mode 100755 (executable)
index 0000000..83e472b
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+uci batch <<-EOF
+       set luci.themes.Fledermaus=/luci-static/fledermaus
+        commit luci
+EOF
+