fix(js/logs-view): check for valid date

This commit is contained in:
EvB 2017-01-30 14:02:41 -05:00
parent 55773a9c13
commit c869579cd5

View file

@ -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;