Browse Source
Merge pull request #641 from dmytro-landiak/feature/development
opc fix
pull/652/head
Valerii Sosliuk
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
9 deletions
-
ui/src/app/extension/extensions-forms/extension-form-opc.directive.js
-
ui/src/app/extension/extensions-forms/extension-form-opc.tpl.html
|
|
|
@ -128,8 +128,8 @@ export default function ExtensionFormOpcDirective($compile, $templateCache, $tra |
|
|
|
let addedFile = event.target.result; |
|
|
|
|
|
|
|
if (addedFile && addedFile.length > 0) { |
|
|
|
model[options.fileName] = $file.name; |
|
|
|
model[options.file] = addedFile.replace(/^data.*base64,/, ""); |
|
|
|
model[options.location] = $file.name; |
|
|
|
model[options.fileContent] = addedFile.replace(/^data.*base64,/, ""); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
@ -142,8 +142,8 @@ export default function ExtensionFormOpcDirective($compile, $templateCache, $tra |
|
|
|
scope.clearFile = function(model, options) { |
|
|
|
scope.theForm.$setDirty(); |
|
|
|
|
|
|
|
model[options.fileName] = null; |
|
|
|
model[options.file] = null; |
|
|
|
model[options.location] = null; |
|
|
|
model[options.fileContent] = null; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -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.fileContent}"> |
|
|
|
<span ng-init='fieldsToFill = {"location":"location", "fileContent":"fileContent"}'></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,14 +231,14 @@ |
|
|
|
class="file-input" |
|
|
|
flow-btn id="dropFileKeystore_{{serverIndex}}" |
|
|
|
name="keystoreFile" |
|
|
|
ng-model="server.keystore.file" |
|
|
|
ng-model="server.keystore.fileContent" |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="dropdown-messages"> |
|
|
|
<div ng-if="!server.keystore[fieldsToFill.fileName]" class="tb-error-message" translate>extension.no-file</div> |
|
|
|
<div ng-if="server.keystore[fieldsToFill.fileName]">{{server.keystore[fieldsToFill.fileName]}}</div> |
|
|
|
<div ng-if="!server.keystore[fieldsToFill.location]" class="tb-error-message" translate>extension.no-file</div> |
|
|
|
<div ng-if="server.keystore[fieldsToFill.location]">{{server.keystore[fieldsToFill.location]}}</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
|
|
|
|
|