Migrate to AngularJS v1.8.2
This patch aligns current code with AngularJS v1.8.2 requirements. It also updates zun-ui to use the Firefox browser instead of phantomjs browser to fix "nodjs-run-test" job because phantomjs browser has some issue with backticks. Change-Id: Ibf995d6c29f64cd902834b64664cd87ef5014a45
This commit is contained in:
parent
02f04e99bf
commit
13167f3750
@ -11,14 +11,12 @@
|
||||
"eslint-plugin-angular": "3.1.x",
|
||||
"jasmine-core": "2.8.x",
|
||||
"karma": "1.7.x",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-firefox-launcher": "2.1.0",
|
||||
"karma-cli": "1.0.x",
|
||||
"karma-coverage": "1.1.x",
|
||||
"karma-jasmine": "1.1.x",
|
||||
"karma-ng-html2js-preprocessor": "1.0.x",
|
||||
"karma-phantomjs-launcher": "1.0.x",
|
||||
"karma-threshold-reporter": "0.1.x",
|
||||
"phantomjs-prebuilt": "2.1.x"
|
||||
"karma-threshold-reporter": "0.1.x"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "if [ ! -d .tox ] || [ ! -d .tox/karma ]; then tox -ekarma --notest; fi",
|
||||
|
@ -125,20 +125,14 @@ module.exports = function (config) {
|
||||
|
||||
frameworks: ['jasmine'],
|
||||
|
||||
browsers: ['PhantomJS'],
|
||||
browsers: ['Firefox'],
|
||||
|
||||
browserNoActivityTimeout: 60000,
|
||||
|
||||
phantomjsLauncher: {
|
||||
// Have phantomjs exit if a ResourceError is encountered
|
||||
// (useful if karma exits without killing phantom)
|
||||
exitOnResourceError: true
|
||||
},
|
||||
|
||||
reporters: ['progress', 'coverage', 'threshold'],
|
||||
|
||||
plugins: [
|
||||
'karma-phantomjs-launcher',
|
||||
'karma-firefox-launcher',
|
||||
'karma-jasmine',
|
||||
'karma-ng-html2js-preprocessor',
|
||||
'karma-coverage',
|
||||
|
@ -105,10 +105,10 @@
|
||||
|
||||
// for batch delete
|
||||
function afterCheck(result) {
|
||||
var outcome = $q.reject(); // Reject the promise by default
|
||||
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
|
||||
if (result.fail.length > 0) {
|
||||
toast.add('error', getMessage(notAllowedMessage, result.fail));
|
||||
outcome = $q.reject(result.fail);
|
||||
outcome = $q.reject(result.fail).catch(angular.noop);
|
||||
}
|
||||
if (result.pass.length > 0) {
|
||||
outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult);
|
||||
|
@ -112,10 +112,10 @@
|
||||
|
||||
// for batch delete
|
||||
function afterCheck(result) {
|
||||
var outcome = $q.reject(); // Reject the promise by default
|
||||
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
|
||||
if (result.fail.length > 0) {
|
||||
toast.add('error', getMessage(notAllowedMessage, result.fail));
|
||||
outcome = $q.reject(result.fail);
|
||||
outcome = $q.reject(result.fail).catch(angular.noop);
|
||||
}
|
||||
if (result.pass.length > 0) {
|
||||
outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult);
|
||||
|
@ -112,10 +112,10 @@
|
||||
|
||||
// for batch delete
|
||||
function afterCheck(result) {
|
||||
var outcome = $q.reject(); // Reject the promise by default
|
||||
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
|
||||
if (result.fail.length > 0) {
|
||||
toast.add('error', getMessage(notAllowedMessage, result.fail));
|
||||
outcome = $q.reject(result.fail);
|
||||
outcome = $q.reject(result.fail).catch(angular.noop);
|
||||
}
|
||||
if (result.pass.length > 0) {
|
||||
outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult);
|
||||
|
@ -122,10 +122,10 @@
|
||||
|
||||
// for batch delete
|
||||
function afterCheck(result) {
|
||||
var outcome = $q.reject(); // Reject the promise by default
|
||||
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
|
||||
if (result.fail.length > 0) {
|
||||
toast.add('error', getMessage(notAllowedMessage, result.fail));
|
||||
outcome = $q.reject(result.fail);
|
||||
outcome = $q.reject(result.fail).catch(angular.noop);
|
||||
}
|
||||
if (result.pass.length > 0) {
|
||||
outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult);
|
||||
|
@ -103,10 +103,10 @@
|
||||
|
||||
// for batch delete
|
||||
function afterCheck(result) {
|
||||
var outcome = $q.reject(); // Reject the promise by default
|
||||
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
|
||||
if (result.fail.length > 0) {
|
||||
toast.add('error', getMessage(notAllowedMessage, result.fail));
|
||||
outcome = $q.reject(result.fail);
|
||||
outcome = $q.reject(result.fail).catch(angular.noop);
|
||||
}
|
||||
if (result.pass.length > 0) {
|
||||
outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult);
|
||||
|
@ -83,7 +83,7 @@
|
||||
|
||||
function getContainer(id, suppressError) {
|
||||
var promise = apiService.get(containersPath + id);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
return suppressError ? promise : promise.catch(function onError() {
|
||||
var msg = gettext('Unable to retrieve the Container.');
|
||||
toastService.add('error', msg);
|
||||
});
|
||||
@ -96,7 +96,7 @@
|
||||
|
||||
function deleteContainer(id, suppressError) {
|
||||
var promise = apiService.delete(containersPath, [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
return suppressError ? promise : promise.catch(function onError() {
|
||||
var msg = gettext('Unable to delete the Container with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
});
|
||||
@ -110,7 +110,7 @@
|
||||
|
||||
function deleteContainerForce(id, suppressError) {
|
||||
var promise = apiService.delete(containersPath + id + '/force', [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
return suppressError ? promise : promise.catch(function onError() {
|
||||
var msg = gettext('Unable to delete forcely the Container with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
});
|
||||
@ -118,7 +118,7 @@
|
||||
|
||||
function deleteContainerStop(id, suppressError) {
|
||||
var promise = apiService.delete(containersPath + id + '/stop', [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
return suppressError ? promise : promise.catch(function onError() {
|
||||
var msg = gettext('Unable to stop and delete the Container with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
});
|
||||
@ -225,7 +225,7 @@
|
||||
|
||||
function deleteCapsule(id, suppressError) {
|
||||
var promise = apiService.delete(capsulesPath, [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
return suppressError ? promise : promise.catch(function onError() {
|
||||
var msg = gettext('Unable to delete the Capsule with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
});
|
||||
@ -247,7 +247,7 @@
|
||||
|
||||
function deleteImage(id, suppressError) {
|
||||
var promise = apiService.delete(imagesPath, [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
return suppressError ? promise : promise.catch(function onError() {
|
||||
var msg = gettext('Unable to delete the Image with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user