Remove tag history view from tags tab
This commit is contained in:
parent
49d980f685
commit
4f567c0654
2 changed files with 228 additions and 272 deletions
|
@ -1,23 +1,5 @@
|
|||
<div class="repo-panel-tags-element">
|
||||
<div class="tab-header-controls">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn" ng-class="!showingHistory ? 'btn-primary active' : 'btn-default'" ng-click="showHistory(false)">
|
||||
<i class="fa fa-tags"></i>Current Tags
|
||||
</button>
|
||||
<button class="btn" ng-class="showingHistory ? 'btn-info active' : 'btn-default'" ng-click="showHistory(true)">
|
||||
<i class="fa fa-history"></i>History
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="tab-header"><span class="hidden-xs">Repository </span>Tags</h3>
|
||||
|
||||
<!-- History view -->
|
||||
<div class="repo-tag-history" repository="repository" filter="options.historyFilter"
|
||||
is-enabled="showingHistory" ng-show="showingHistory"></div>
|
||||
|
||||
<!-- Normal View -->
|
||||
<div ng-show="!showingHistory">
|
||||
<div class="co-alert co-alert-danger" ng-if="hasDefcon1">
|
||||
One or more of your tags has an <strong>extremely critical</strong> vulnerability which should be addressed immediately:
|
||||
<a href="{{ vuln.Link }}" ng-repeat="(key, vuln) in defcon1" style="margin-left: 10px;" ng-safenewtab>
|
||||
|
@ -269,7 +251,6 @@
|
|||
<div class="empty-primary-msg">This repository is empty.</div>
|
||||
<div class="empty-secondary-msg">Push a tag or initiate a build to populate this repository.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tag-operations-dialog" repository="repository"
|
||||
|
|
|
@ -31,9 +31,7 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
};
|
||||
|
||||
$scope.iterationState = {};
|
||||
$scope.tagHistory = {};
|
||||
$scope.tagActionHandler = null;
|
||||
$scope.showingHistory = false;
|
||||
$scope.tagsPerPage = 25;
|
||||
|
||||
$scope.imageVulnerabilities = {};
|
||||
|
@ -263,15 +261,6 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
$scope.checkedTags.setChecked($scope.tags);
|
||||
};
|
||||
|
||||
$scope.showHistory = function(value, opt_tagname) {
|
||||
$scope.options.historyFilter = opt_tagname ? opt_tagname : '';
|
||||
$scope.showingHistory = value;
|
||||
};
|
||||
|
||||
$scope.toggleHistory = function() {
|
||||
$scope.showHistory(!$scope.showingHistory);
|
||||
};
|
||||
|
||||
$scope.trackLineClass = function(index, track_info) {
|
||||
var startIndex = $.inArray(track_info.tags[0], $scope.tags);
|
||||
var endIndex = $.inArray(track_info.tags[track_info.tags.length - 1], $scope.tags);
|
||||
|
@ -368,20 +357,6 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
return names.join(',');
|
||||
};
|
||||
|
||||
$scope.loadTagHistory = function(tag) {
|
||||
delete $scope.tagHistory[tag.name];
|
||||
|
||||
var params = {
|
||||
'repository': $scope.repository.namespace + '/' + $scope.repository.name,
|
||||
'specificTag': tag.name,
|
||||
'limit': 5
|
||||
};
|
||||
|
||||
ApiService.listRepoTags(null, params).then(function(resp) {
|
||||
$scope.tagHistory[tag.name] = resp.tags;
|
||||
}, ApiService.errorDisplay('Could not load tag history'));
|
||||
};
|
||||
|
||||
$scope.askRevertTag = function(tag, image_id) {
|
||||
if ($scope.repository.can_write) {
|
||||
$scope.tagActionHandler.askRevertTag(tag, image_id);
|
||||
|
|
Reference in a new issue