mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-25 00:51:24 +01:00
Merge pull request #510 from wknet123/master
Fixed compatibilty issues when creating/editing in dialog box showing error messages.
This commit is contained in:
commit
b61a239ac2
@ -276,6 +276,7 @@
|
||||
vm.saveTIP = false;
|
||||
console.log('Successful create replication policy.');
|
||||
vm.reload();
|
||||
vm.closeDialog();
|
||||
}
|
||||
function createReplicationPolicyFailed(data, status) {
|
||||
vm.saveTIP = false;
|
||||
@ -290,6 +291,7 @@
|
||||
console.log('Successful update replication policy.');
|
||||
vm.reload();
|
||||
vm.saveTIP = false;
|
||||
vm.closeDialog();
|
||||
}
|
||||
function updateReplicationPolicyFailed(data, status) {
|
||||
vm.saveTIP = false;
|
||||
@ -398,6 +400,7 @@
|
||||
});
|
||||
|
||||
ctrl.save = save;
|
||||
ctrl.closeDialog = closeDialog;
|
||||
|
||||
function save(form) {
|
||||
|
||||
@ -420,11 +423,10 @@
|
||||
ctrl.update(postPayload);
|
||||
break;
|
||||
}
|
||||
$timeout(function() {
|
||||
if(!ctrl.toggleErrorMessage) {
|
||||
element.find('#createPolicyModal').modal('hide');
|
||||
}
|
||||
}, 150);
|
||||
}
|
||||
|
||||
function closeDialog() {
|
||||
element.find('#createPolicyModal').modal('hide');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,7 @@
|
||||
function createDestinationSuccess(data, status) {
|
||||
console.log('Successful created destination.');
|
||||
vm.reload();
|
||||
vm.closeDialog();
|
||||
}
|
||||
|
||||
function createDestinationFailed(data, status) {
|
||||
@ -99,6 +100,7 @@
|
||||
function updateDestinationSuccess(data, status) {
|
||||
console.log('Successful update destination.');
|
||||
vm.reload();
|
||||
vm.closeDialog();
|
||||
}
|
||||
|
||||
function updateDestinationFailed(data, status) {
|
||||
@ -221,6 +223,7 @@
|
||||
});
|
||||
|
||||
ctrl.save = save;
|
||||
ctrl.closeDialog = closeDialog;
|
||||
|
||||
function save(destination) {
|
||||
if(destination) {
|
||||
@ -235,14 +238,12 @@
|
||||
ctrl.update(destination);
|
||||
break;
|
||||
}
|
||||
|
||||
$timeout(function() {
|
||||
if(!ctrl.toggleErrorMessage) {
|
||||
element.find('#createDestinationModal').modal('hide');
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
|
||||
function closeDialog() {
|
||||
element.find('#createDestinationModal').modal('hide');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user