Merge branch 'swaggerlikeus' of ssh://bitbucket.org/yackob03/quay into swaggerlikeus
This commit is contained in:
commit
a3eff7a2e8
3 changed files with 53 additions and 2 deletions
12
static/directives/application-info.html
Normal file
12
static/directives/application-info.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<div class="application-info-element" style="padding-bottom: 18px">
|
||||||
|
<div class="auth-header">
|
||||||
|
<img src="//www.gravatar.com/avatar/{{ application.organization.gravatar }}?s=48&d=identicon">
|
||||||
|
<h2><a href="{{ application.url }}" target="_blank">{{ application.name }}</a></h2>
|
||||||
|
<h4>
|
||||||
|
{{ application.organization.name }}
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div style="padding-top: 10px">
|
||||||
|
{{ application.description || '(No Description)' }}
|
||||||
|
</div>
|
||||||
|
</div>
|
15
static/directives/application-reference-dialog.html
Normal file
15
static/directives/application-reference-dialog.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="modal" tabindex="-1" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-body" style="padding: 4px; padding-left: 20px;">
|
||||||
|
<button type="button" class="close" ng-click="$hide()" style="padding: 4px;">
|
||||||
|
×
|
||||||
|
</button>
|
||||||
|
<div class="application-info" application="applicationInfo"></div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" ng-click="$hide()">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1149,6 +1149,24 @@ quayApp.directive('entityReference', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
quayApp.directive('applicationInfo', function () {
|
||||||
|
var directiveDefinitionObject = {
|
||||||
|
priority: 0,
|
||||||
|
templateUrl: '/static/directives/application-info.html',
|
||||||
|
replace: false,
|
||||||
|
transclude: false,
|
||||||
|
restrict: 'C',
|
||||||
|
scope: {
|
||||||
|
'application': '=application'
|
||||||
|
},
|
||||||
|
controller: function($scope, $element, ApiService) {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return directiveDefinitionObject;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
quayApp.directive('applicationReference', function () {
|
quayApp.directive('applicationReference', function () {
|
||||||
var directiveDefinitionObject = {
|
var directiveDefinitionObject = {
|
||||||
priority: 0,
|
priority: 0,
|
||||||
|
@ -1167,7 +1185,13 @@ quayApp.directive('applicationReference', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
ApiService.getApplicationInformation(null, params).then(function(resp) {
|
ApiService.getApplicationInformation(null, params).then(function(resp) {
|
||||||
// TODO: display the application information here.
|
$scope.applicationInfo = resp;
|
||||||
|
$modal({
|
||||||
|
title: 'Application Information',
|
||||||
|
scope: $scope,
|
||||||
|
template: '/static/directives/application-reference-dialog.html',
|
||||||
|
show: true
|
||||||
|
});
|
||||||
}, function() {
|
}, function() {
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
"message": 'The application could not be found; it might have been deleted.',
|
"message": 'The application could not be found; it might have been deleted.',
|
||||||
|
@ -1388,7 +1412,7 @@ quayApp.directive('signinForm', function () {
|
||||||
// Note: The timeout of 500ms is needed to ensure dialogs containing sign in
|
// Note: The timeout of 500ms is needed to ensure dialogs containing sign in
|
||||||
// forms get removed before the location changes.
|
// forms get removed before the location changes.
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
if (!$scope.redirectUrl || $scope.redirectUrl == $location.path()) {
|
if ($scope.redirectUrl == $location.path()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$location.path($scope.redirectUrl ? $scope.redirectUrl : '/');
|
$location.path($scope.redirectUrl ? $scope.redirectUrl : '/');
|
||||||
|
|
Reference in a new issue