feat: expose some custom labels

This commit is contained in:
Joxit
2022-03-23 09:18:20 +01:00
parent 19e72e4a5f
commit ba6d817b41
7 changed files with 182 additions and 129 deletions

View File

@@ -76,7 +76,10 @@ export function getHistoryIcon(attribute) {
case 'ExposedPorts':
return 'router';
default:
'';
if (attribute.startsWith('custom-label-')) {
return 'label';
}
return '';
}
}
@@ -201,3 +204,7 @@ export function decodeURI(url) {
export function truthy(value) {
return value === true || value === 'true';
}
export function stringToArray(value) {
return value && typeof value === 'string' ? value.split(',') : [];
}