mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
Removed typescript
This commit is contained in:
parent
353751ea4e
commit
af0cce171e
10 changed files with 154 additions and 525 deletions
|
@ -1,30 +1,27 @@
|
|||
'use strict';
|
||||
angular.module('dockerui.filters', []).filter('truncate', function () {
|
||||
return function (text, length, end) {
|
||||
if(isNaN(length)) {
|
||||
length = 10;
|
||||
}
|
||||
if(end === undefined) {
|
||||
end = "...";
|
||||
}
|
||||
if(text.length <= length || text.length - end.length <= length) {
|
||||
return text;
|
||||
} else {
|
||||
return String(text).substring(0, length - end.length) + end;
|
||||
}
|
||||
};
|
||||
}).filter('statusbadge', function () {
|
||||
return function (text) {
|
||||
if(text === 'Ghost') {
|
||||
return 'important';
|
||||
}
|
||||
return 'success';
|
||||
};
|
||||
}).filter('isactive', function ($location) {
|
||||
return function (text) {
|
||||
if(text == $location) {
|
||||
return 'active';
|
||||
}
|
||||
return '';
|
||||
};
|
||||
});
|
||||
|
||||
angular.module('dockerui.filters', [])
|
||||
.filter('truncate', function() {
|
||||
return function(text, length, end) {
|
||||
if (isNaN(length))
|
||||
length = 10;
|
||||
|
||||
if (end === undefined)
|
||||
end = "...";
|
||||
|
||||
if (text.length <= length || text.length - end.length <= length) {
|
||||
return text;
|
||||
}
|
||||
else {
|
||||
return String(text).substring(0, length-end.length) + end;
|
||||
}
|
||||
};
|
||||
})
|
||||
.filter('statusbadge', function() {
|
||||
return function(text) {
|
||||
if (text === 'Ghost') {
|
||||
return 'important';
|
||||
}
|
||||
return 'success';
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue