fix(js/logs-view): check for valid date
This commit is contained in:
parent
55773a9c13
commit
c869579cd5
1 changed files with 6 additions and 1 deletions
|
@ -330,7 +330,12 @@ angular.module('quay').directive('logsView', function () {
|
||||||
var hasValidUser = !!$scope.user;
|
var hasValidUser = !!$scope.user;
|
||||||
var hasValidOrg = !!$scope.organization;
|
var hasValidOrg = !!$scope.organization;
|
||||||
var hasValidRepo = $scope.repository && $scope.repository.namespace;
|
var hasValidRepo = $scope.repository && $scope.repository.namespace;
|
||||||
var isValid = hasValidUser || hasValidOrg || hasValidRepo || $scope.allLogs;
|
var isValidEndpoint = hasValidUser || hasValidOrg || hasValidRepo || $scope.allLogs;
|
||||||
|
|
||||||
|
var hasValidLogStartDate = !!$scope.options.logStartDate;
|
||||||
|
var hadValidLogEndDate = !!$scope.options.logEndDate;
|
||||||
|
|
||||||
|
var isValid = isValidEndpoint && hasValidLogStartDate && hasValidLogEndDate;
|
||||||
|
|
||||||
if (!$scope.makevisible || !isValid) {
|
if (!$scope.makevisible || !isValid) {
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue