Start on the new build view
This commit is contained in:
parent
5cc1c90021
commit
e227d7e526
30 changed files with 816 additions and 11 deletions
|
@ -11,9 +11,29 @@ angular.module('quay').directive('resourceView', function () {
|
|||
restrict: 'C',
|
||||
scope: {
|
||||
'resource': '=resource',
|
||||
'resources': '=resources',
|
||||
'errorMessage': '=errorMessage'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
$scope.getState = function() {
|
||||
if (!$scope.resources && !$scope.resource) {
|
||||
return 'loading';
|
||||
}
|
||||
|
||||
var resources = $scope.resources || [$scope.resource];
|
||||
for (var i = 0; i < resources.length; ++i) {
|
||||
var current = resources[i];
|
||||
if (current.loading) {
|
||||
return 'loading';
|
||||
}
|
||||
|
||||
if (current.error) {
|
||||
return 'error';
|
||||
}
|
||||
}
|
||||
|
||||
return 'ready';
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
|
|
Reference in a new issue