Get new docker file build action working
This commit is contained in:
parent
d09f2f6e22
commit
4b64236d8e
2 changed files with 16 additions and 1 deletions
|
@ -83,7 +83,7 @@
|
|||
Repository {{ currentPageContext.repository.namespace }}/{{ currentPageContext.repository.name }}
|
||||
</li>
|
||||
<li ng-if="currentPageContext.repository">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="javascript:void(0)" ng-click="startBuild()">
|
||||
<i class="fa fa-tasks"></i> New Dockerfile Build
|
||||
</a>
|
||||
</li>
|
||||
|
@ -186,4 +186,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="dockerfile-build-dialog"
|
||||
show-now="showBuildDialogCounter"
|
||||
repository="currentPageContext.repository"
|
||||
build-started="handleBuildStarted(build, currentPageContext)">
|
||||
</div>
|
||||
</div>
|
|
@ -17,6 +17,7 @@ angular.module('quay').directive('headerBar', function () {
|
|||
$scope.searchVisible = false;
|
||||
$scope.currentSearchQuery = null;
|
||||
$scope.searchResultState = null;
|
||||
$scope.showBuildDialogCounter = 0;
|
||||
|
||||
// Monitor any user changes and place the current user into the scope.
|
||||
UserService.updateUserIn($scope);
|
||||
|
@ -177,6 +178,14 @@ angular.module('quay').directive('headerBar', function () {
|
|||
return UserService.isOrganization(namespace);
|
||||
};
|
||||
|
||||
$scope.startBuild = function(context) {
|
||||
$scope.showBuildDialogCounter++;
|
||||
};
|
||||
|
||||
$scope.handleBuildStarted = function(build, context) {
|
||||
$location.url('/repository/' + context.repository.namespace + '/' + context.repository.name + '/build/' + build.id);
|
||||
};
|
||||
|
||||
$scope.createRobot = function(context) {
|
||||
var namespace = $scope.getNamespace(context);
|
||||
if (!namespace || !UserService.isNamespaceAdmin(namespace)) { return; }
|
||||
|
|
Reference in a new issue