- Add a log entry for repo verb handling and make the container usage calculation take it into account
- Move all the repo push/pull/verb logging into a central track_and_log method - Readd images accidentally deleted in the last CL - Make the uncompressed size migration script better handle exceptions
This commit is contained in:
parent
c65031eea5
commit
c1398c6d2b
18 changed files with 216 additions and 85 deletions
|
@ -1537,7 +1537,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
if (metadata.updated_tags && Object.getOwnPropertyNames(metadata.updated_tags).length) {
|
||||
return 'Repository {repository} has been pushed with the following tags updated: {updated_tags}';
|
||||
} else {
|
||||
return 'Repository {repository} has been pushed';
|
||||
return 'Repository {repository} fhas been pushed';
|
||||
}
|
||||
},
|
||||
'page': function(metadata) {
|
||||
|
@ -3136,6 +3136,22 @@ quayApp.directive('logsView', function () {
|
|||
'delete_robot': 'Delete Robot Account: {robot}',
|
||||
'create_repo': 'Create Repository: {repo}',
|
||||
'push_repo': 'Push to repository: {repo}',
|
||||
'repo_verb': function(metadata) {
|
||||
var prefix = '';
|
||||
if (metadata.verb == 'squash') {
|
||||
prefix = 'Pull of squashed tag {tag}'
|
||||
}
|
||||
|
||||
if (metadata.token) {
|
||||
prefix += ' via token {token}';
|
||||
} else if (metadata.username) {
|
||||
prefix += ' by {username}';
|
||||
} else {
|
||||
prefix += ' by {_ip}';
|
||||
}
|
||||
|
||||
return prefix;
|
||||
},
|
||||
'pull_repo': function(metadata) {
|
||||
if (metadata.token) {
|
||||
return 'Pull repository {repo} via token {token}';
|
||||
|
@ -3266,6 +3282,7 @@ quayApp.directive('logsView', function () {
|
|||
'delete_robot': 'Delete Robot Account',
|
||||
'create_repo': 'Create Repository',
|
||||
'push_repo': 'Push to repository',
|
||||
'repo_verb': 'Pull Repo Verb',
|
||||
'pull_repo': 'Pull repository',
|
||||
'delete_repo': 'Delete repository',
|
||||
'change_repo_permission': 'Change repository permission',
|
||||
|
@ -3357,7 +3374,6 @@ quayApp.directive('logsView', function () {
|
|||
$scope.logsPath = '/api/v1/' + url;
|
||||
|
||||
if (!$scope.chart) {
|
||||
window.console.log('creating chart');
|
||||
$scope.chart = new LogUsageChart(logKinds);
|
||||
$($scope.chart).bind('filteringChanged', function(e) {
|
||||
$scope.$apply(function() { $scope.kindsAllowed = e.allowed; });
|
||||
|
|
|
@ -35,6 +35,22 @@
|
|||
<div class="quay-spinner" ng-show="systemUsage == null"></div>
|
||||
<div class="usage-chart" total="systemUsage.allowed" limit="systemUsageLimit"
|
||||
current="systemUsage.usage" usage-title="Container Usage"></div>
|
||||
|
||||
<!-- Alerts -->
|
||||
<div class="alert alert-danger" ng-show="systemUsageLimit == 'over' && systemUsage">
|
||||
You have deployed more containers than your plan allows. Please
|
||||
upgrade your subscription by contacting <a href="mailto:sales@coreos.com">CoreOS Sales</a>.
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning" ng-show="systemUsageLimit == 'at' && systemUsage">
|
||||
You are at your current plan's number of allowed containers. It might be time to think about
|
||||
upgrading your subscription by contacting <a href="mailto:sales@coreos.com">CoreOS Sales</a>.
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success" ng-show="systemUsageLimit == 'near' && systemUsage">
|
||||
You are nearing the number of allowed deployed containers. It might be time to think about
|
||||
upgrading your subscription by contacting <a href="mailto:sales@coreos.com">CoreOS Sales</a>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Create user tab -->
|
||||
|
|
Reference in a new issue