thingsboard-memoizeit

opc fix

3/9/2018 2:51:03 PM

Details

diff --git a/ui/src/app/extension/extensions-forms/extension-form-opc.directive.js b/ui/src/app/extension/extensions-forms/extension-form-opc.directive.js
index bf4886c..967c561 100644
--- a/ui/src/app/extension/extensions-forms/extension-form-opc.directive.js
+++ b/ui/src/app/extension/extensions-forms/extension-form-opc.directive.js
@@ -129,7 +129,7 @@ export default function ExtensionFormOpcDirective($compile, $templateCache, $tra
 
                         if (addedFile && addedFile.length > 0) {
                             model[options.fileName] = $file.name;
-                            model[options.file] = addedFile.replace(/^data.*base64,/, "");
+                            model[options.location] = addedFile.replace(/^data.*base64,/, "");
 
                         }
                     }
@@ -143,7 +143,7 @@ export default function ExtensionFormOpcDirective($compile, $templateCache, $tra
             scope.theForm.$setDirty();
 
             model[options.fileName] = null;
-            model[options.file] = null;
+            model[options.location] = null;
 
         };
 
diff --git a/ui/src/app/extension/extensions-forms/extension-form-opc.tpl.html b/ui/src/app/extension/extensions-forms/extension-form-opc.tpl.html
index 501eeeb..99464cc 100644
--- a/ui/src/app/extension/extensions-forms/extension-form-opc.tpl.html
+++ b/ui/src/app/extension/extensions-forms/extension-form-opc.tpl.html
@@ -212,8 +212,8 @@
                                                     </md-input-container>
 
                                                     <section class="dropdown-section">
-                                                        <div class="tb-container" ng-class="{'ng-invalid':!server.keystore.file}">
-                                                            <span ng-init='fieldsToFill = {"fileName":"fileName", "file":"file"}'></span>
+                                                        <div class="tb-container" ng-class="{'ng-invalid':!server.keystore.location}">
+                                                            <span ng-init='fieldsToFill = {"fileName":"fileName", "location":"location"}'></span>
                                                             <label class="tb-label" translate>extension.opc-keystore-location</label>
                                                             <div flow-init="{singleFile:true}" flow-file-added='fileAdded($file, server.keystore, fieldsToFill)' class="tb-file-select-container">
                                                                 <div class="tb-file-clear-container">
@@ -231,7 +231,7 @@
                                                                            class="file-input"
                                                                            flow-btn id="dropFileKeystore_{{serverIndex}}"
                                                                            name="keystoreFile"
-                                                                           ng-model="server.keystore.file"
+                                                                           ng-model="server.keystore.location"
                                                                     >
                                                                 </div>
                                                             </div>