juci-network-dsl: when createing new device set option name and section name ref...
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Thu, 22 Mar 2018 10:59:41 +0000 (11:59 +0100)
committerReidar Cederqvist <reidar.cederqvist@gmail.com>
Thu, 22 Mar 2018 10:59:41 +0000 (11:59 +0100)
plugins/juci-network-dsl/src/pages/network-dsl.js

index 60877e4..697f753 100644 (file)
@@ -52,13 +52,11 @@ JUCI.app
                                }
                                $uci.dsl.$create({
                                        ".type": type,
-                                       ".name": model.name
+                                       ".name": model.name,
+                                       "name": model.name
                                }).done(function(dev){
                                        if(type == "atm-device") {
                                                setAtmDevice();
-                                               // $scope.atmDevices.forEach(function(dev, index, devices){
-                                               //      devices[index].device.value = "atm"+dev.$index.current;
-                                               // });
                                        }
                                        $scope.$apply();
                                }).fail(function(e){