2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 ===================================================================
8 Unless otherwise specified, all software contained herein is licensed
9 under the Apache License, Version 2.0 (the “License”);
10 you may not use this software except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
21 Unless otherwise specified, all documentation contained herein is licensed
22 under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23 you may not use this documentation except in compliance with the License.
24 You may obtain a copy of the License at
26 https://creativecommons.org/licenses/by/4.0/
28 Unless required by applicable law or agreed to in writing, documentation
29 distributed under the License is distributed on an "AS IS" BASIS,
30 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 See the License for the specific language governing permissions and
32 limitations under the License.
34 ============LICENSE_END============================================
36 ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 <div class="application-details-modal">
40 <div class="b2b-modal-header">
41 <h2 class="account-details-title" id="application-details-title">Application Details</h2>
43 <div class="corner-button in">
44 <button type="button" class="close" aria-label="Closhhhe"
45 ng-click="$dismiss('cancel')"></button>
49 <div class="b2b-modal-body">
50 <div class="app-properties-main" scroll-top="appDetails.scrollApi">
51 <form name="appForm" novalidate autocomplete="off">
52 <!-- We can remove this script once we get to Firefox version 47
53 autocomplete="off" won't work until v47 -->
54 <!-- <script type="text/javascript">
55 document.getElementById("appForm").reset();
57 <div id="app-left-container" class="left-container">
58 <div class="property-label checkbox-label">
59 <label for="checkbox-app-is-restricted" class="checkbox">
60 <input type="checkbox" ng-model="appDetails.app.restrictedApp" id="checkbox-app-is-restricted" ng-disabled="appDetails.isEditMode" ng-checked="appDetails.app.restrictedApp"/>
62 <span>Hyperlink only application</span>
65 <div class="property required">
66 <div class="property-label">Application Name</div>
67 <input id="input-app-name" type="text"
68 ng-model="appDetails.app.name"
71 ng-pattern="/^[a-zA-Z0-9_\-\s\&]*$/"
74 <div id="error-container-conflict" class="error-container" ng-show="appDetails.conflictMessages.name" id="conflictMessages-name">
75 <small id="app-name-error-conflict" class="err-message" ng-bind="appDetails.conflictMessages.name"></small>
77 <div id="error-container-edit" class="error-container" ng-show="appForm.name.$dirty || appDetails.isEditMode">
78 <div ng-messages="appForm.name.$error" class="error-container">
79 <small id="app-name-error-required" class="err-message" ng-message="required">Application name is required</small>
80 <small id="app-name-error-alpha-num" class="err-message" ng-message="pattern">Application name must be alphanumeric</small>
84 <!--<div class="property">-->
85 <!--<div class="property-label">Description</div>-->
86 <!--<input class="input-field" type="text" ng-model="appDetails.app.description"/>-->
88 <!--<div class="property">-->
89 <!--<div class="property-label">Notes</div>-->
90 <!--<input class="input-field" type="text" ng-model="appDetails.app.notes"/>-->
92 <div class="property required">
93 <div id="url-property-label" class="property-label">URL</div>
94 <input id="input-app-url"
95 ng-model="appDetails.app.url"
98 type="url" placeholder="https://"
99 ng-pattern="appDetails.ECOMP_URL_REGEX"
101 <div id="app-error-url" class="error-container" ng-show="appDetails.conflictMessages.url" id="div-app-name-err-url">
102 <small class="err-message" ng-bind="appDetails.conflictMessages.url"></small>
104 <div id="app-error-url-message" class="error-container" ng-show="appForm.url.$dirty || appDetails.isEditMode">
105 <div ng-messages="appForm.url.$error" class="error-container">
106 <small id="error-app-url-req" class="err-message" ng-message="required">Application URL is required</small>
107 <!--<small id="error-app-url-invalid" class="err-message" ng-message="pattern">Application URL must be a valid URL</small>-->
108 <small id="error-app-url-invalid" class="err-message" ng-show="appForm.url.$error.url">Application URL must be a valid URL</small>
111 <!--<span class="err-message" ng-show="appForm.url.$error.url"> Not valid URL!</span>-->
115 <div class="property" ng-show="!appDetails.app.restrictedApp">
116 <div class="property-label">Rest API URL</div>
117 <input id="input-app-rest-url"
118 ng-model="appDetails.app.restUrl"
120 type="url" placeholder="https://"
121 ng-pattern="appDetails.ECOMP_URL_REGEX"
123 <div id="app-error-rest-message" class="error-container" ng-show="appForm.restUrl.$dirty || appDetails.isEditMode">
124 <div ng-messages="appForm.restUrl.$error" class="error-container">
125 <!--<small class="err-message" ng-message="pattern">Application REST URL must be a valid URL</small>-->
126 <small class="err-message" ng-show="appForm.restUrl.$error.url">Application REST URL must be a valid URL</small>
131 <div class="property required" ng-show="!appDetails.app.restrictedApp">
132 <div id="username-property-label" class="property-label">Username</div>
134 ng-model="appDetails.app.username"
137 ng-required="!appDetails.app.restrictedApp"/>
138 <div id="app-error-username-container" class="error-container" ng-show="appForm.username.$dirty || appDetails.isEditMode">
139 <div ng-messages="appForm.username.$error" class="error-container">
140 <small id="error-appusername-reqd" class="err-message" ng-message="required">My Logins App Username is required</small>
144 <div class="property required" ng-show="!appDetails.app.restrictedApp">
145 <div id="pwd-property-label" class="property-label">Password</div>
146 <input type="password" id="input-mylogins-password"
147 ng-model="appDetails.app.appPassword" autocomplete="new-password"
150 ng-required="!appDetails.app.restrictedApp"/>
151 <div id="app-error-password-container" class="error-container" ng-show="appForm.appPassword.$dirty || appDetails.isEditMode">
152 <div ng-messages="appForm.appPassword.$error" class="error-container">
153 <small id="error-mylogins-password-reqd" class="err-message" ng-message="required">My Logins App Password is required</small>
157 <div class="property" ng-show="!appDetails.app.restrictedApp">
158 <div id="pwd-property-label" class="property-label">Name Space</div>
159 <input type="text" id="input-mylogins-auth-namespace"
160 ng-model="appDetails.app.nameSpace"
161 name="appAuthNameSpace"
166 <div class="right-container">
167 <div class="property">
168 <div class="property-label">Upload Image</div>
169 <input type="file" id="input-app-image-upload"
170 class="input-file-field"
172 ng-model="appDetails.originalImage"
174 image-upload="appDetails.originalImage"
175 image-upload-resize-max-height="300"
176 image-upload-resize-max-width="360"
177 image-upload-resize-quality="0.7"
178 image-upload-api="appDetails.imageApi" style="height: 24px;"/>
180 <div id="app-error-image-upload" class="error-container" ng-show="appForm.appImage.$dirty">
181 <div ng-messages="appForm.appImage.$error" class="error-container">
182 <small id="error-app-invalid-image" class="err-message" ng-message="mimeType">Uploaded file must be an image</small>
183 <small id="error-app-invalid-image-size" class="err-message" ng-message="imageSize">Image file must be smaller than 1MB</small>
187 <div class="property-label preview">
188 <span class="left-label">Preview</span>
189 <span class="remove" ng-click="appDetails.removeImage()">Remove</span>
191 <img id="image-app-preview" class="image-preview" ng-src="{{appDetails.app.imageLink || appDetails.app.thumbnail || appDetails.emptyImgForPreview}}"/>
192 <div id="property-communication-inbox" class="property" ng-show="!appDetails.app.restrictedApp">
193 <div id="property-communication-inbox-label" class="property-label">Communication Inbox</div>
194 <input type="text" id="input-UEB-topicname"
195 ng-model="appDetails.app.uebTopicName"
196 name="uebTopicName" readonly="readonly"/>
199 <div id="property-communication-key" class="property" ng-show="!appDetails.app.restrictedApp">
200 <div id="property-communication-key-label" class="property-label">Communication Key</div>
201 <input type="text" id="input-UEB-communication-key"
202 ng-model="appDetails.app.uebKey"
203 name="uebKey" readonly="readonly" />
206 <div id="property-communication-secret" class="property" ng-show="!appDetails.app.restrictedApp">
207 <div id="property-communication-secret-label" class="property-label">Communication Secret</div>
208 <input type="text" id="input-UEB-communication-secret"
209 ng-model="appDetails.app.uebSecret"
210 name="uebSecret" readonly="readonly" />
213 <div id="property-guest-access" class="property">
214 <label for="checkbox-app-is-open" class="checkbox">
215 <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"/>
217 <span>Allow guest access</span>
220 <div id="property-active" class="property">
221 <label for="checkbox-app-is-enabled" class="checkbox">
222 <input type="checkbox" ng-model="appDetails.app.isEnabled" id="checkbox-app-is-enabled"/>
227 <div id="property-is-central-auth" class="property" ng-show="!appDetails.app.restrictedApp">
228 <label for="checkbox-app-is-central-auth" class="checkbox">
229 <input type="checkbox" ng-model="appDetails.app.isCentralAuth" id="checkbox-app-is-central-auth"/>
231 <span>Centralized</span>
243 <div class="b2b-modal-footer">
244 <div class="dialog-control">
245 <span class="ecomp-save-spinner" ng-show="appDetails.isSaving"></span>
246 <button id="button-save-app" class="btn btn-alt btn-small" ng-class="{disabled: appForm.$invalid}" ng-click="appDetails.saveChanges()">Save</button>
247 <button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')"role="button" tabindex="0">Cancel</button>
259 <script type="application/javascript">
260 $(document).ready(function(){
261 $(".ngdialog-content").css("top","-150px")