luci/modules/luci-base/luasrc
Hannu Nyman ca75918ff3 Luci opkg/packages: Limit version string display to 26 chars
Many packages currently include a git commit hash in version string.
That makes versions string very long and the version column takes much space
when listing available/installed packages in Luci.

Longest version string is 58 characters (micropython).
85 packages have at least 50 chars and 150 packages at least 40 chars.

Adjust Luci to display max. 26 characters (= luci's own version string).

Longer version strings are cut to: "first 21c" + ".." + "last 3c"

The last 3 chars are used to preserve the possible PKG_REVISION string.
E.g. 'opkg' has only hash+PKG_REVISION, so using only start of the string
might not be optimal.

Examples:

1.3.10-20150302-f2a889564b3a215902622b040a1247af38cb8203-1
1.3.10-20150302-f2a88..3-1

0.1-20150302-654c7d288603f7dae09eb09b57fb67b38c7ac6c3-1
0.1-20150302-654c7d28..3-1

9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
9c97d5ecd795709c8584e..d-7

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-01 22:45:17 +03:00
..
cbi Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
controller/admin Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
http http.protocol: Support filehandlers for unhandled encodings 2015-08-18 17:52:48 +02:00
model Luci opkg/packages: Limit version string display to 26 chars 2015-09-01 22:45:17 +03:00
sgi Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
sys Timezone information: update to 2015f 2015-08-17 22:53:11 +03:00
tools Fix: A disabled wireless network may be shown as enabled, when multiple networks are defined on the same radio. 2015-07-27 11:37:09 +02:00
view Workaround: saved administration site user and pass may appear on the Wireless configuration page, replacing the WPA key. 2015-07-27 11:37:09 +02:00
cacheloader.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
cbi.lua cbi.lua: Fix Flag.parse() to set "self.section.changed" 2015-08-02 07:06:42 +02:00
ccache.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
config.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00
debug.lua Rework LuCI build system 2015-01-08 16:26:20 +01:00
dispatcher.lua Avoid setting duplicate cookies 2015-02-09 16:30:11 +01:00
dispatcher.luadoc Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
http.lua Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
http.luadoc Fix module lines in several luadoc files 2015-09-01 16:43:19 +02:00
i18n.lua Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
i18n.luadoc Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
ltn12.lua Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
store.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
sys.lua Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
sys.luadoc Fix module lines in several luadoc files 2015-09-01 16:43:19 +02:00
template.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00
util.lua luci-base: fix backslash escaping in luci.util.serialize_json() 2015-03-18 12:43:29 +01:00
util.luadoc Fix module lines in several luadoc files 2015-09-01 16:43:19 +02:00
version.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00