mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-22 08:41:32 +03:00
Merge pull request #1114 from vpoverennov/fix_min_size
fix min_size to not output string with more than max characters
This commit is contained in:
commit
a9584b11db
@ -2,7 +2,7 @@ glancesApp.filter('min_size', function () {
|
||||
return function (input, max) {
|
||||
var max = max || 8;
|
||||
if (input.length > max) {
|
||||
return "_" + input.substring(input.length - max)
|
||||
return "_" + input.substring(input.length - max + 1)
|
||||
}
|
||||
return input
|
||||
};
|
||||
|
2
glances/outputs/static/public/js/main.min.js
vendored
2
glances/outputs/static/public/js/main.min.js
vendored
@ -61,7 +61,7 @@ glancesApp.filter('min_size', function () {
|
||||
return function (input, max) {
|
||||
var max = max || 8;
|
||||
if (input.length > max) {
|
||||
return "_" + input.substring(input.length - max)
|
||||
return "_" + input.substring(input.length - max + 1)
|
||||
}
|
||||
return input
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user