mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
refactor(ui): replace ng selectors with react-select [EE-3608] (#7203)
Co-authored-by: LP B <xAt0mZ@users.noreply.github.com>
This commit is contained in:
parent
1e21961e6a
commit
ceaee4e175
66 changed files with 1188 additions and 625 deletions
|
@ -1,4 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
import { trimSHA } from './utils';
|
||||
|
||||
function includeString(text, values) {
|
||||
return values.some(function (val) {
|
||||
|
@ -253,15 +254,7 @@ angular
|
|||
})
|
||||
.filter('trimshasum', function () {
|
||||
'use strict';
|
||||
return function (imageName) {
|
||||
if (!imageName) {
|
||||
return;
|
||||
}
|
||||
if (imageName.indexOf('sha256:') === 0) {
|
||||
return imageName.substring(7, 19);
|
||||
}
|
||||
return _.split(imageName, '@sha256')[0];
|
||||
};
|
||||
return trimSHA;
|
||||
})
|
||||
.filter('trimversiontag', function () {
|
||||
'use strict';
|
||||
|
|
11
app/docker/filters/utils.ts
Normal file
11
app/docker/filters/utils.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
export function trimSHA(imageName: string) {
|
||||
if (!imageName) {
|
||||
return '';
|
||||
}
|
||||
if (imageName.indexOf('sha256:') === 0) {
|
||||
return imageName.substring(7, 19);
|
||||
}
|
||||
return _.split(imageName, '@sha256')[0];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue