luci-app-ddns: sort list of services 5970/head
authorRafał Miłecki <rafal@milecki.pl>
Mon, 12 Sep 2022 14:11:38 +0000 (16:11 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 12 Sep 2022 14:12:22 +0000 (16:12 +0200)
It makes it much easier to find selected service provider.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js

index 4b786e83c52a6df5f4e97b1f9471be0c09045743..8a8c27c71873e088440c5625957152ebda5e8e6e 100644 (file)
@@ -91,6 +91,8 @@ return view.extend({
                                _this.services[service.name.replace('.json','')] = true
                        });
 
+                       this.services = Object.fromEntries(Object.entries(this.services).sort());
+
                        list_service.forEach(function (service) {
                                if (!_this.services[service])
                                        _this.services[service] = false;