Merge pull request #620 from vatesfr/abhamonr-disable-vm-start-during-delta-import

Disable vm start during delta import and explicit notification. (fix #613)
This commit is contained in:
Olivier Lambert
2016-01-13 11:53:54 +01:00

18
app/node_modules/xo/index.js generated vendored
View File

@@ -72,9 +72,21 @@ export default angular.module('xo', [
console.error('Error for %s:', method, error)
if (notification !== false) {
const message = (error && error.code === 2)
? 'You don\'t have the permission.'
: 'The action failed for unknown reason.'
let message
if (error) {
const code = error.code
if (code === 2) {
message = 'You don\'t have the permission.'
} else if (code === 5) {
message = error.data
}
}
if (!message) {
message = 'The action failed for unknown reason.'
}
xoNotify.warning({
title: name,