This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/repo-view/repo-panel-info.js

35 lines
1,013 B
JavaScript
Raw Normal View History

2015-03-10 05:03:39 +00:00
/**
* An element which displays the information panel for a repository view.
*/
angular.module('quay').directive('repoPanelInfo', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/repo-view/repo-panel-info.html',
replace: false,
transclude: false,
restrict: 'C',
scope: {
2015-03-11 00:22:46 +00:00
'repository': '=repository',
'builds': '=builds',
'isEnabled': '=isEnabled'
2015-03-10 05:03:39 +00:00
},
2015-03-19 19:08:18 +00:00
controller: function($scope, $element, ApiService, Config) {
$scope.$watch('repository', function(repository) {
if (!$scope.repository) { return; }
var namespace = $scope.repository.namespace;
var name = $scope.repository.name;
$scope.pullCommand = 'docker pull ' + Config.getDomain() + '/' + namespace + '/' + name;
});
2015-03-10 05:03:39 +00:00
$scope.updateDescription = function(content) {
$scope.repository.description = content;
$scope.repository.put();
};
}
};
return directiveDefinitionObject;
});