2015-04-21 19:39:11 +00:00
< div class = "resource-view manage-application"
resource="appResource"
error-message="'Application not found'">
< div class = "page-content" >
< div class = "cor-title" >
< span class = "cor-title-link" >
2015-04-21 19:39:44 +00:00
< a class = "back-link" href = "/organization/{{ organization.name }}?tab=applications" >
2015-04-21 19:39:11 +00:00
< span class = "avatar" size = "24" data = "organization.avatar" > < / span >
{{ organization.name }}
< / a >
< / span >
< span class = "cor-title-content" >
{{ application.name }}
< / span >
2014-03-20 19:46:13 +00:00
< / div >
2015-04-27 18:25:44 +00:00
< div class = "row" style = "padding: 14px; padding-top: 0px; padding-bottom: 0px;" ng-if = "!application.redirect_uri" >
2015-04-21 19:39:11 +00:00
< div class = "co-alert co-alert-warning" >
2014-03-20 19:46:13 +00:00
Warning: There is no OAuth Redirect setup for this application. Please enter it in the < strong > Settings< / strong > tab.
< / div >
< / div >
2014-11-24 21:07:38 +00:00
2017-04-28 21:03:38 +00:00
< cor-tab-panel >
< cor-tabs >
< cor-tab tab-title = "Settings" tab-id = "settings" >
2015-04-21 19:39:11 +00:00
< i class = "fa fa-gear" > < / i >
2017-04-28 21:03:38 +00:00
< / cor-tab >
2015-04-21 19:39:11 +00:00
2017-04-28 21:03:38 +00:00
< cor-tab tab-title = "OAuth Information" tab-id = "oauth" >
2015-04-21 19:39:11 +00:00
< i class = "fa fa-key" > < / i >
2017-04-28 21:03:38 +00:00
< / cor-tab >
2015-04-21 19:39:11 +00:00
2017-04-28 21:03:38 +00:00
< cor-tab tab-title = "Delete Application" tab-id = "delete" >
2015-04-21 19:39:11 +00:00
< i class = "fa fa-times" > < / i >
2017-04-28 21:03:38 +00:00
< / cor-tab >
2015-04-21 19:39:11 +00:00
2017-04-28 21:03:38 +00:00
< cor-tab tab-title = "Generate Token" tab-id = "gen-token" >
2015-04-21 19:39:11 +00:00
< i class = "fa fa-ticket" > < / i >
2017-04-28 21:03:38 +00:00
< / cor-tab >
< / cor-tabs >
2015-04-21 19:39:11 +00:00
2017-04-28 21:03:38 +00:00
< cor-tab-content >
2015-04-21 19:39:11 +00:00
<!-- Settings tab -->
2017-04-28 21:03:38 +00:00
< cor-tab-pane id = "settings" >
2015-04-21 19:39:11 +00:00
< form method = "put" name = "applicationForm" id = "applicationForm" ng-submit = "updateApplication()" >
< div class = "form-group nested" >
< label for = "fieldAppName" > Application Name< / label >
< input type = "text" class = "form-control" id = "fieldAppName" placeholder = "Application Name" required ng-model = "application.name" >
< div class = "description" > The name of the application that is displayed to users< / div >
< / div >
2014-03-20 19:46:13 +00:00
2015-04-21 19:39:11 +00:00
< div class = "form-group nested" >
< label for = "fieldAppURI" > Homepage URL< / label >
< input type = "url" class = "form-control" id = "fieldAppURI" placeholder = "Homepage URL" required ng-model = "application.application_uri" >
< div class = "description" > The URL to which the application will link in the authorization view< / div >
< / div >
2014-03-20 19:46:13 +00:00
2015-04-21 19:39:11 +00:00
< div class = "form-group nested" >
< label for = "fieldAppDescription" > Description (optional)< / label >
< input type = "text" class = "form-control" id = "fieldAppURI" placeholder = "Description" ng-model = "application.description" >
< div class = "description" > The user friendly description of the application< / div >
< / div >
2014-03-20 19:46:13 +00:00
2015-04-21 19:39:11 +00:00
< div class = "form-group nested" >
< label for = "fieldAppAvatar" > Avatar E-mail (optional)< / label >
< input type = "email" class = "form-control" id = "fieldAppAvatar" placeholder = "Avatar E-mail" ng-model = "application.avatar_email" >
2016-04-28 18:38:22 +00:00
< div class = "description" > An e-mail address representing the < a href = "http://docs.quay.io/glossary/avatar" ng-safenewtab > Avatar< / a > for the application. See above for the icon.< / div >
2015-04-21 19:39:11 +00:00
< / div >
2014-03-20 19:46:13 +00:00
2015-04-21 19:39:11 +00:00
< div class = "form-group nested" style = "margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee;" >
< label for = "fieldAppRedirect" > Redirect/Callback URL Prefix< / label >
< input type = "url" class = "form-control" id = "fieldAppRedirect" placeholder = "OAuth Redirect URL" ng-model = "application.redirect_uri" required >
< div class = "description" > Allowed prefix for the application's OAuth redirection/callback URLs< / div >
2014-03-20 19:46:13 +00:00
< / div >
2015-04-21 19:39:11 +00:00
< div class = "button-bar" >
< button class = "btn btn-success btn-large" type = "submit" ng-disabled = "applicationForm.$invalid || updating" >
Update Application
< / button >
< span class = "quay-spinner" ng-show = "updating" > < / span >
2014-11-17 19:54:07 +00:00
< / div >
2015-04-21 19:39:11 +00:00
< / form >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2014-11-17 19:54:07 +00:00
2015-04-21 19:39:11 +00:00
<!-- Delete tab -->
2017-04-28 21:03:38 +00:00
< cor-tab-pane id = "delete" >
2015-04-21 19:39:11 +00:00
< div class = "panel panel-default" >
< div class = "panel-body" >
< div style = "text-align: center" >
< div class = "co-alert co-alert-danger" > Deleting an application < b > cannot be undone< / b > . Any existing users of your application will < strong > break!< / strong > . Here be dragons!< / div >
< button class = "btn btn-danger" ng-click = "askDelete()" > Delete Application< / button >
< / div >
2014-11-17 19:54:07 +00:00
< / div >
2015-04-21 19:39:11 +00:00
< / div >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2014-11-17 19:54:07 +00:00
2015-04-21 19:39:11 +00:00
<!-- Generate Token tab -->
2017-04-28 21:03:38 +00:00
< cor-tab-pane id = "gen-token" >
2015-06-22 19:49:26 +00:00
< div class = "co-alert co-alert-info" >
< div style = "margin-bottom: 10px" >
Click the button below to generate a new < a href = "http://tools.ietf.org/html/rfc6749#section-1.4" target = "_new" > OAuth 2 Access Token< / a > .
< / div >
2014-11-17 19:54:07 +00:00
2015-06-22 19:49:26 +00:00
< div >
The generated token will act on behalf of user
< span class = "avatar" data = "user.avatar" size = "16" style = "margin-left: 6px; margin-right: 4px;" > < / span >
< span class = "user-name" > {{ user.username }}< / span >
< / div >
2014-03-20 19:46:13 +00:00
< / div >
2015-04-21 19:39:11 +00:00
< table >
< tr ng-repeat = "(scopeName, scopeInfo) in OAuthService.SCOPES" >
2015-06-22 19:49:26 +00:00
< td >
< label onclick = "event.stopPropagation()" >
< input type = "checkbox" value = "scopeInfo[0]" ng-model = "genScopes[scopeName]" > {{ scopeInfo[3] }}
< / label >
< div class = "scope-description" > {{ scopeInfo[4] }}< / div >
< / td >
2015-04-21 19:39:11 +00:00
< / tr >
< / table >
< a class = "btn btn-success"
2015-07-28 19:52:08 +00:00
href="{{ Config.getUrl('/oauth/authorize?response_type=token& client_id=' + application.client_id + '& scope=' + getScopes(genScopes).join(' ') + '& redirect_uri=' + Config.getUrl(Config['LOCAL_OAUTH_HANDLER'])) }}"
2016-04-28 18:38:22 +00:00
ng-disabled="!getScopes(genScopes).length" ng-safenewtab>
2015-04-21 19:39:11 +00:00
Generate Access Token
< / a >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2014-03-20 19:46:13 +00:00
2015-04-21 19:39:11 +00:00
<!-- OAuth tab -->
2017-04-28 21:03:38 +00:00
< cor-tab-pane id = "oauth" >
2015-04-21 19:39:11 +00:00
< dl class = "dl-horizontal" >
< dt > Client ID:< / dt >
< dd > < div class = "copy-box" hovering-message = "true" value = "application.client_id" > < / div > < / dd >
< / dl >
< dl class = "dl-horizontal" style = "margin-top: 20px;" >
< dt > Client Secret:< / dt >
< dd > {{ application.client_secret }}< / dd >
< / dl >
< button class = "btn btn-primary" ng-click = "askResetClientSecret()" > Reset Client Secret< / button >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
< / cor-tab-content >
< / cor-tab-panel >
2014-03-20 19:46:13 +00:00
< / div >
< / div >
<!-- Modal message dialog -->
< div class = "modal fade" id = "resetSecretModal" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-hidden = "true" > × < / button >
< h4 class = "modal-title" > Reset Client Secret?< / h4 >
< / div >
< div class = "modal-body" >
< div class = "alert alert-info" >
Note that resetting the Client Secret for this application will < strong > not< / strong > invalidate any user tokens.
< / div >
< div > Are you sure you want to reset your Client Secret? Any existing users of this Secret < strong > will break!< / strong > < / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-primary" ng-click = "resetClientSecret()" > Yes, I'm sure< / button >
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > Cancel< / button >
< / div >
< / div > <!-- /.modal - content -->
< / div > <!-- /.modal - dialog -->
< / div > <!-- /.modal -->
<!-- Modal message dialog -->
< div class = "modal fade" id = "deleteAppModal" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-hidden = "true" > × < / button >
< h4 class = "modal-title" > Delete Application?< / h4 >
< / div >
< div class = "modal-body" >
Are you < b > absolutely, positively< / b > sure you would like to delete this application? This < b > cannot be undone< / b > .
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-danger" ng-click = "deleteApplication()" > Delete Application< / button >
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > Close< / button >
< / div >
< / div > <!-- /.modal - content -->
< / div > <!-- /.modal - dialog -->
< / div > <!-- /.modal -->