45501020a3fddbaf3c57f6d8d031fb7dc450dd9a
[project/luci.git] / applications / luci-olsr / luasrc / tools / olsr.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11 ]]--
12
13 module("luci.tools.olsr", package.seeall)
14
15 function etx_color(etx)
16         local color = "#bb3333"
17         if etx == 0 then
18                 color = "#bb3333"
19         elseif etx < 4 then
20                 color = "#00cc00"
21         elseif etx < 10 then
22                 color = "#ffcb05"
23         elseif etx < 100 then
24                 color = "#ff6600"
25         end
26         return color
27 end
28