mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 05:49:40 +02:00
refactor(app): backport technical changes (#4679)
* refactor(app): backport technical changes * refactor(app): remove EE only features * feat(app): small review changes to match EE codebase layout on some files Co-authored-by: xAt0mZ <baron_l@epitech.eu>
This commit is contained in:
parent
158bdae10e
commit
ccf6babc02
40 changed files with 951 additions and 976 deletions
|
@ -16,5 +16,13 @@ class KubernetesCommonHelper {
|
|||
label = _.replace(label, /[-_.]*$/g, '');
|
||||
return label;
|
||||
}
|
||||
|
||||
static assignOrDeleteIfEmptyOrZero(obj, path, value) {
|
||||
if (!value || value === 0 || (value instanceof Array && !value.length)) {
|
||||
_.unset(obj, path);
|
||||
} else {
|
||||
_.set(obj, path, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
export default KubernetesCommonHelper;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue