mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-31 16:39:37 +02:00
update default order ID for docker and kubernetes apps to allow custom order before apps without the order attribute
This commit is contained in:
parent
064ec83c12
commit
cb794daf73
2 changed files with 5 additions and 18 deletions
|
@ -161,7 +161,7 @@ labels:
|
||||||
- flame.url=https://example.com
|
- flame.url=https://example.com
|
||||||
- flame.category=My category # Optional, default is "Docker"
|
- flame.category=My category # Optional, default is "Docker"
|
||||||
- flame.icon=icon-name # Optional, default is "docker"
|
- flame.icon=icon-name # Optional, default is "docker"
|
||||||
- flame.order=1 # Optional, default is 1; lower number is first in the list
|
- flame.order=1 # Optional, default is 500; lower number is first in the list
|
||||||
```
|
```
|
||||||
|
|
||||||
And you must have activated the Docker sync option in the settings panel.
|
And you must have activated the Docker sync option in the settings panel.
|
||||||
|
@ -211,7 +211,7 @@ metadata:
|
||||||
- flame.pawelmalak/url=https://example.com
|
- flame.pawelmalak/url=https://example.com
|
||||||
- flame.pawelmalak/category=My category # Optional, default is "Kubernetes"
|
- flame.pawelmalak/category=My category # Optional, default is "Kubernetes"
|
||||||
- flame.pawelmalak/icon=icon-name # Optional, default is "kubernetes"
|
- flame.pawelmalak/icon=icon-name # Optional, default is "kubernetes"
|
||||||
- flame.pawelmalak/order=1 # Optional, default is 1; lower number is first in the list
|
- flame.pawelmalak/order=1 # Optional, default is 500; lower number is first in the list
|
||||||
```
|
```
|
||||||
|
|
||||||
And you must have activated the Kubernetes sync option in the settings panel.
|
And you must have activated the Kubernetes sync option in the settings panel.
|
||||||
|
|
|
@ -223,7 +223,7 @@ async function retrieveDockerApps(apps, orderType, unpinStoppedApps) {
|
||||||
url: urls[i] || urls[0],
|
url: urls[i] || urls[0],
|
||||||
icon: icons[i] || 'docker',
|
icon: icons[i] || 'docker',
|
||||||
category: category.id,
|
category: category.id,
|
||||||
orderId: orders[i] || 1,
|
orderId: orders[i] || 500,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,27 +288,14 @@ async function retrieveKubernetesApps(apps, orderType, unpinStoppedApps) {
|
||||||
for (let i = 0; i < names.length; i++) {
|
for (let i = 0; i < names.length; i++) {
|
||||||
const category = categoriesLabels[i] ? categories.find(category => category.name.toUpperCase() === categoriesLabels[i].toUpperCase()) : dockerDefaultCategory;
|
const category = categoriesLabels[i] ? categories.find(category => category.name.toUpperCase() === categoriesLabels[i].toUpperCase()) : dockerDefaultCategory;
|
||||||
|
|
||||||
dockerApps.push({
|
kubernetesApps.push({
|
||||||
name: names[i] || names[0],
|
name: names[i] || names[0],
|
||||||
url: urls[i] || urls[0],
|
url: urls[i] || urls[0],
|
||||||
icon: icons[i] || 'docker',
|
icon: icons[i] || 'docker',
|
||||||
category: category.id,
|
category: category.id,
|
||||||
orderId: orders[i] || 1,
|
orderId: orders[i] || 500,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const app = {
|
|
||||||
name: annotations['flame.pawelmalak/name'],
|
|
||||||
url: annotations['flame.pawelmalak/url'],
|
|
||||||
icon: annotations['flame.pawelmalak/icon'] || 'kubernetes',
|
|
||||||
categoryId: kubernetesDefaultCategory.id,
|
|
||||||
orderId: annotations['flame.pawelmalak/order'] || 1,
|
|
||||||
};
|
|
||||||
if (annotations['flame.pawelmalak/category']) {
|
|
||||||
const category = categories.find(category => category.name.toUpperCase() === annotations['flame.pawelmalak/category'].toUpperCase());
|
|
||||||
app.categoryId = category ? category.id : dockerDefaultCategory.id;
|
|
||||||
}
|
|
||||||
kubernetesApps.push(app);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue