config.js: adapt to new software-convention
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Wed, 23 May 2018 07:52:37 +0000 (09:52 +0200)
committerReidar Cederqvist <reidar.cederqvist@gmail.com>
Wed, 23 May 2018 07:52:37 +0000 (09:52 +0200)
juci/src/js/config.js

index bac61ad..ea14d1d 100644 (file)
@@ -40,9 +40,9 @@
                                        if(!info) return;
                                        self.board = info; 
                                        if(info.system && info.system.firmware && info.system.basemac && info.system.hardware){
-                                               var parts = info.system.firmware.split("_");
-                                               if(parts.length < 2) return;
-                                               var customer = parts[1].split("-")[0];
+                                               var parts = info.system.firmware.split("-");
+                                               if(parts.length < 3) return;
+                                               var customer = parts[2];
                                                self.filename = info.system.hardware + "-" +
                                                                customer + "-" +
                                                                info.system.basemac.replace(/:/g, "");