Comments (3)
Hi @pduchnovsky
right now sorting is not implemented and as you saw.
Sorting by name should be easy to obtain, while a custom ordering may be more tricky to get.
If you want to submit a PR, feel free.
To implement an alphabetic sort should be sufficient to do something like:
{{ $sort_order := or (index $home_container.Labels "traefik-home.sort-by") "default" }}
...
<div class="container my-auto pb-4">
{{/* Display only containers explicitly enabled */}}
{{ $containers := whereLabelValueMatches $ "traefik.enable" "true" }}
{{ if eq $sort_order "name" }}
{{ $containers = sortObjectsByKeysAsc $containers "Name" }}
{{ end }}
<div class="row align-content-center justify-content-evenly">
At the moment I'm a bit busy, but I will try to implement it whenever I can.
from traefik-home.
I managed to get it work with the example above, however, could you please advice how to make them sorted by Alias as well ? :)
btw, I created PR to implement this name sort and some minor changes
#52
from traefik-home.
Thanks for the PR, looks great!
Few days and I will give it a try.
What do you mean by alias?
You should be able to sort by every field listed in the RuntimeContainer
here, just replace Name
with Hostname
, ID
, Gateway
, etc (probably should work even with nested fields like State.Running
)
from traefik-home.
Related Issues (12)
- Add dark theme
- Automatic update check
- Update the docs to warn about host rule expressions
- Add port 80 and 443 with web and websecure HOT 4
- Add support for multiple architectures
- Open in new tabs options instead of change page ? HOT 2
- Some subdomains are not correctly parsed
- using this with socket-proxy HOT 14
- Incompatible with defaultRule HOT 1
- Serving Static Icons HOT 1
- Minor issue with mobile view HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik-home.