2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <div class="application-details-modal">
22 <div class="b2b-modal-header">
23 <h2 class="account-details-title" id="application-details-title">Application Details</h2>
25 <div class="corner-button in">
26 <button type="button" class="close" aria-label="Closhhhe"
27 ng-click="$dismiss('cancel')"></button>
31 <div class="b2b-modal-body">
32 <div class="app-properties-main" scroll-top="appDetails.scrollApi">
33 <form name="appForm" novalidate autocomplete="off">
34 <!-- We can remove this script once we get to Firefox version 47
35 autocomplete="off" won't work until v47 -->
36 <!-- <script type="text/javascript">
37 document.getElementById("appForm").reset();
39 <div id="app-left-container" class="left-container">
40 <div class="property-label checkbox-label">
41 <label for="checkbox-app-is-restricted" class="checkbox">
42 <input type="checkbox" ng-model="appDetails.app.restrictedApp" id="checkbox-app-is-restricted" ng-disabled="appDetails.isEditMode" ng-checked="appDetails.app.restrictedApp"/>
44 <span>Hyperlink only application</span>
47 <div class="property required">
48 <div class="property-label">Application Name</div>
49 <input id="input-app-name" type="text"
50 ng-model="appDetails.app.name"
53 ng-pattern="/^[a-zA-Z0-9_\-\s\&]*$/"
56 <div id="error-container-conflict" class="error-container" ng-show="appDetails.conflictMessages.name" id="conflictMessages-name">
57 <small id="app-name-error-conflict" class="err-message" ng-bind="appDetails.conflictMessages.name"></small>
59 <div id="error-container-edit" class="error-container" ng-show="appForm.name.$dirty || appDetails.isEditMode">
60 <div ng-messages="appForm.name.$error" class="error-container">
61 <small id="app-name-error-required" class="err-message" ng-message="required">Application name is required</small>
62 <small id="app-name-error-alpha-num" class="err-message" ng-message="pattern">Application name must be alphanumeric</small>
66 <!--<div class="property">-->
67 <!--<div class="property-label">Description</div>-->
68 <!--<input class="input-field" type="text" ng-model="appDetails.app.description"/>-->
70 <!--<div class="property">-->
71 <!--<div class="property-label">Notes</div>-->
72 <!--<input class="input-field" type="text" ng-model="appDetails.app.notes"/>-->
74 <div class="property required">
75 <div id="url-property-label" class="property-label">URL</div>
76 <input id="input-app-url"
77 ng-model="appDetails.app.url"
80 type="url" placeholder="https://"
81 ng-pattern="appDetails.ECOMP_URL_REGEX"
83 <div id="app-error-url" class="error-container" ng-show="appDetails.conflictMessages.url" id="div-app-name-err-url">
84 <small class="err-message" ng-bind="appDetails.conflictMessages.url"></small>
86 <div id="app-error-url-message" class="error-container" ng-show="appForm.url.$dirty || appDetails.isEditMode">
87 <div ng-messages="appForm.url.$error" class="error-container">
88 <small id="error-app-url-req" class="err-message" ng-message="required">Application URL is required</small>
89 <!--<small id="error-app-url-invalid" class="err-message" ng-message="pattern">Application URL must be a valid URL</small>-->
90 <small id="error-app-url-invalid" class="err-message" ng-show="appForm.url.$error.url">Application URL must be a valid URL</small>
93 <!--<span class="err-message" ng-show="appForm.url.$error.url"> Not valid URL!</span>-->
97 <div class="property" ng-show="!appDetails.app.restrictedApp">
98 <div class="property-label">Rest API URL</div>
99 <input id="input-app-rest-url"
100 ng-model="appDetails.app.restUrl"
102 type="url" placeholder="https://"
103 ng-pattern="appDetails.ECOMP_URL_REGEX"
105 <div id="app-error-rest-message" class="error-container" ng-show="appForm.restUrl.$dirty || appDetails.isEditMode">
106 <div ng-messages="appForm.restUrl.$error" class="error-container">
107 <!--<small class="err-message" ng-message="pattern">Application REST URL must be a valid URL</small>-->
108 <small class="err-message" ng-show="appForm.restUrl.$error.url">Application REST URL must be a valid URL</small>
113 <div class="property required" ng-show="!appDetails.app.restrictedApp">
114 <div id="username-property-label" class="property-label">Username</div>
116 ng-model="appDetails.app.username"
119 ng-required="!appDetails.app.restrictedApp"/>
120 <div id="app-error-username-container" class="error-container" ng-show="appForm.username.$dirty || appDetails.isEditMode">
121 <div ng-messages="appForm.username.$error" class="error-container">
122 <small id="error-appusername-reqd" class="err-message" ng-message="required">My Logins App Username is required</small>
126 <div class="property required" ng-show="!appDetails.app.restrictedApp">
127 <div id="pwd-property-label" class="property-label">Password</div>
128 <input type="password" id="input-mylogins-password"
129 ng-model="appDetails.app.appPassword" autocomplete="new-password"
132 ng-required="!appDetails.app.restrictedApp"/>
133 <div id="app-error-password-container" class="error-container" ng-show="appForm.appPassword.$dirty || appDetails.isEditMode">
134 <div ng-messages="appForm.appPassword.$error" class="error-container">
135 <small id="error-mylogins-password-reqd" class="err-message" ng-message="required">My Logins App Password is required</small>
139 <div class="property" ng-show="!appDetails.app.restrictedApp">
140 <div id="pwd-property-label" class="property-label">Name Space</div>
141 <input type="text" id="input-mylogins-auth-namespace"
142 ng-model="appDetails.app.nameSpace"
143 name="appAuthNameSpace"
148 <div class="right-container">
149 <div class="property">
150 <div class="property-label">Upload Image</div>
151 <input type="file" id="input-app-image-upload"
152 class="input-file-field"
154 ng-model="appDetails.originalImage"
156 image-upload="appDetails.originalImage"
157 image-upload-resize-max-height="300"
158 image-upload-resize-max-width="360"
159 image-upload-resize-quality="0.7"
160 image-upload-api="appDetails.imageApi" style="height: 24px;"/>
162 <div id="app-error-image-upload" class="error-container" ng-show="appForm.appImage.$dirty">
163 <div ng-messages="appForm.appImage.$error" class="error-container">
164 <small id="error-app-invalid-image" class="err-message" ng-message="mimeType">Uploaded file must be an image</small>
165 <small id="error-app-invalid-image-size" class="err-message" ng-message="imageSize">Image file must be smaller than 1MB</small>
169 <div class="property-label preview">
170 <span class="left-label">Preview</span>
171 <span class="remove" ng-click="appDetails.removeImage()">Remove</span>
173 <img id="image-app-preview" class="image-preview" ng-src="{{appDetails.app.imageLink || appDetails.app.thumbnail || appDetails.emptyImgForPreview}}"/>
174 <div id="property-communication-inbox" class="property" ng-show="!appDetails.app.restrictedApp">
175 <div id="property-communication-inbox-label" class="property-label">Communication Inbox</div>
176 <input type="text" id="input-UEB-topicname"
177 ng-model="appDetails.app.uebTopicName"
178 name="uebTopicName" readonly="readonly"/>
181 <div id="property-communication-key" class="property" ng-show="!appDetails.app.restrictedApp">
182 <div id="property-communication-key-label" class="property-label">Communication Key</div>
183 <input type="text" id="input-UEB-communication-key"
184 ng-model="appDetails.app.uebKey"
185 name="uebKey" readonly="readonly" />
188 <div id="property-communication-secret" class="property" ng-show="!appDetails.app.restrictedApp">
189 <div id="property-communication-secret-label" class="property-label">Communication Secret</div>
190 <input type="text" id="input-UEB-communication-secret"
191 ng-model="appDetails.app.uebSecret"
192 name="uebSecret" readonly="readonly" />
195 <div id="property-guest-access" class="property">
196 <label for="checkbox-app-is-open" class="checkbox">
197 <input type="checkbox" ng-model="appDetails.app.isOpen" id="checkbox-app-is-open" ng-checked="appDetails.app.isOpen || appDetails.app.restrictedApp" ng-disabled="appDetails.app.restrictedApp"/>
199 <span>Allow guest access</span>
202 <div id="property-active" class="property">
203 <label for="checkbox-app-is-enabled" class="checkbox">
204 <input type="checkbox" ng-model="appDetails.app.isEnabled" id="checkbox-app-is-enabled"/>
209 <div id="property-is-central-auth" class="property" ng-show="!appDetails.app.restrictedApp">
210 <label for="checkbox-app-is-central-auth" class="checkbox">
211 <input type="checkbox" ng-model="appDetails.app.isCentralAuth" id="checkbox-app-is-central-auth"/>
213 <span>Centralized</span>
225 <div class="b2b-modal-footer">
226 <div class="dialog-control">
227 <span class="ecomp-save-spinner" ng-show="appDetails.isSaving"></span>
228 <button id="button-save-app" class="btn btn-alt btn-small" ng-class="{disabled: appForm.$invalid}" ng-click="appDetails.saveChanges()">Save</button>
229 <button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')"role="button" tabindex="0">Cancel</button>
241 <script type="application/javascript">
242 $(document).ready(function(){
243 $(".ngdialog-content").css("top","-150px")