mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-21 04:19:37 +02:00
Enhance K8s and Docker features:
* Implement `description` and `visible` labels/annotations * Find app by `name` or `url` instead of just `name` for update
This commit is contained in:
parent
446b4095f6
commit
5282679f09
2 changed files with 25 additions and 4 deletions
|
@ -43,6 +43,9 @@ const useKubernetes = async (apps) => {
|
|||
name: annotations['flame.pawelmalak/name'],
|
||||
url: annotations['flame.pawelmalak/url'],
|
||||
icon: annotations['flame.pawelmalak/icon'] || 'kubernetes',
|
||||
// Add description and visibility
|
||||
description: annotations['flame.pawelmalak/description'] || '',
|
||||
isPublic: (annotations['flame.pawelmalak/visible'] && /^true$/.test(annotations['flame.pawelmalak/visible']) ? 1 : 0),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -54,8 +57,9 @@ const useKubernetes = async (apps) => {
|
|||
}
|
||||
|
||||
for (const item of kubernetesApps) {
|
||||
if (apps.some((app) => app.name === item.name)) {
|
||||
const app = apps.find((a) => a.name === item.name);
|
||||
// Find by name or url
|
||||
if (apps.some((app) => app.name === item.name || app.url === item.url)) {
|
||||
const app = apps.find((a) => a.name === item.name || app.url === item.url);
|
||||
await app.update({ ...item, isPinned: true });
|
||||
} else {
|
||||
await App.create({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue