mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Merge pull request #1338 from cywio/reorder-websites
Add ability to reorder websites on dashboard
This commit is contained in:
commit
4de1858950
10 changed files with 238 additions and 19 deletions
|
|
@ -78,3 +78,14 @@ export function stringToColor(str) {
|
|||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
export function orderByWebsiteMap(websites, orderMap) {
|
||||
if (!websites) return [];
|
||||
|
||||
let ordered = [...websites];
|
||||
for (let website of websites) {
|
||||
ordered[orderMap[website.website_uuid]] = website;
|
||||
}
|
||||
|
||||
return ordered;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue