mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-30 16:09:38 +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
|
@ -223,7 +223,7 @@ async function retrieveDockerApps(apps, orderType, unpinStoppedApps) {
|
|||
url: urls[i] || urls[0],
|
||||
icon: icons[i] || 'docker',
|
||||
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++) {
|
||||
const category = categoriesLabels[i] ? categories.find(category => category.name.toUpperCase() === categoriesLabels[i].toUpperCase()) : dockerDefaultCategory;
|
||||
|
||||
dockerApps.push({
|
||||
kubernetesApps.push({
|
||||
name: names[i] || names[0],
|
||||
url: urls[i] || urls[0],
|
||||
icon: icons[i] || 'docker',
|
||||
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