Sort sensors alphanumerically
Sort the list of sensors in alphanumeric order.
Relatives openbmc/openbmc#3386
Change-Id: Ie30f48417038a2cdf8c67de6ac357f078c8aaae7
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index a32190f..6e46c9c 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -1039,6 +1039,11 @@
}
}
+ sensorData.sort(function(a, b) {
+ return a.title.localeCompare(
+ b.title, 'en', {numeric: true});
+ });
+
callback(sensorData, dataClone);
},
function(error) {