Add feedback to prototype manager, application manager and the builds tab
This commit is contained in:
parent
fd354469da
commit
ab47089872
6 changed files with 34 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
<div class="application-manager-element">
|
||||
<div class="feedback-bar" feedback="feedback"></div>
|
||||
<div class="cor-loader" ng-show="loading"></div>
|
||||
<div ng-show="!loading">
|
||||
<div class="manager-header" header-title="OAuth Applications">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<div class="prototype-manager-element">
|
||||
<div class="feedback-bar" feedback="feedback"></div>
|
||||
<div class="cor-loader" ng-show="loading"></div>
|
||||
<div ng-show="!loading">
|
||||
<div class="manager-header" header-title="Default Permissions">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<div class="repo-panel-builds-element">
|
||||
<div class="feedback-bar" feedback="feedback"></div>
|
||||
<div class="tab-header-controls">
|
||||
<button class="btn btn-primary" ng-click="showNewBuildDialog()">
|
||||
<i class="fa fa-plus"></i>Start Build
|
||||
|
|
|
@ -38,6 +38,8 @@ angular.module('quay').directive('repoPanelBuilds', function () {
|
|||
$scope.triggerCredentialsModalTrigger = null;
|
||||
$scope.triggerCredentialsModalCounter = 0;
|
||||
|
||||
$scope.feedback = null;
|
||||
|
||||
var updateBuilds = function() {
|
||||
if (!$scope.allBuilds) { return; }
|
||||
|
||||
|
@ -264,6 +266,14 @@ angular.module('quay').directive('repoPanelBuilds', function () {
|
|||
$scope.allBuilds.push(build);
|
||||
}
|
||||
updateBuilds();
|
||||
|
||||
$scope.feedback = {
|
||||
'kind': 'info',
|
||||
'message': 'Build {buildid} started',
|
||||
'data': {
|
||||
'buildid': build.id
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,6 +15,7 @@ angular.module('quay').directive('applicationManager', function () {
|
|||
controller: function($scope, $element, ApiService) {
|
||||
$scope.loading = false;
|
||||
$scope.applications = [];
|
||||
$scope.feedback = null;
|
||||
|
||||
$scope.createApplication = function(appName) {
|
||||
if (!appName) { return; }
|
||||
|
@ -29,6 +30,15 @@ angular.module('quay').directive('applicationManager', function () {
|
|||
|
||||
ApiService.createOrganizationApplication(data, params).then(function(resp) {
|
||||
$scope.applications.push(resp);
|
||||
|
||||
$scope.feedback = {
|
||||
'kind': 'success',
|
||||
'message': 'Application {application_name} created',
|
||||
'data': {
|
||||
'application_name': appName
|
||||
}
|
||||
};
|
||||
|
||||
}, ApiService.errorDisplay('Cannot create application'));
|
||||
};
|
||||
|
||||
|
|
11
static/js/directives/ui/prototype-manager.js
vendored
11
static/js/directives/ui/prototype-manager.js
vendored
|
@ -17,6 +17,7 @@ angular.module('quay').directive('prototypeManager', function () {
|
|||
$scope.delegateForNew = null;
|
||||
$scope.clearCounter = 0;
|
||||
$scope.newForWholeOrg = true;
|
||||
$scope.feedback = null;
|
||||
|
||||
$scope.setRole = function(role, prototype) {
|
||||
var params = {
|
||||
|
@ -31,6 +32,11 @@ angular.module('quay').directive('prototypeManager', function () {
|
|||
|
||||
ApiService.updateOrganizationPrototypePermission(data, params).then(function(resp) {
|
||||
prototype.role = role;
|
||||
|
||||
$scope.feedback = {
|
||||
'kind': 'success',
|
||||
'message': 'Role updated'
|
||||
};
|
||||
}, ApiService.errorDisplay('Cannot modify permission'));
|
||||
};
|
||||
|
||||
|
@ -94,6 +100,11 @@ angular.module('quay').directive('prototypeManager', function () {
|
|||
ApiService.deleteOrganizationPrototypePermission(null, params).then(function(resp) {
|
||||
$scope.prototypes.splice($scope.prototypes.indexOf(prototype), 1);
|
||||
$scope.loading = false;
|
||||
|
||||
$scope.feedback = {
|
||||
'kind': 'success',
|
||||
'message': 'Default Permission deleted'
|
||||
};
|
||||
}, ApiService.errorDisplay('Cannot delete permission'));
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue