From 223f6b60bfdf210c21661a6c6b8a010ed3a98713 Mon Sep 17 00:00:00 2001 From: alice Date: Sun, 20 Jun 2021 00:26:32 +0200 Subject: [PATCH] sort locations alphabetically --- lambdainst/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lambdainst/views.py b/lambdainst/views.py index 9f24d41..ba732dd 100644 --- a/lambdainst/views.py +++ b/lambdainst/views.py @@ -43,6 +43,7 @@ def get_locations(): loc['country_name'] = countries_d.get(code, code) loc['load_percent'] = ceil((loc['usage'].get('net', 0) / (loc['bandwidth'] / 1e6)) * 100) + locations = list(sorted(locations, key=lambda l: l[0])) return locations