To deal on $.ajax() error, the right function is .fail() instead of
.error()
Signed-off-by: Aline Manera <aline.manera(a)gmail.com>
---
ui/js/src/kimchi.api.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js
index a34b2ba3..bf9dd6ac 100644
--- a/ui/js/src/kimchi.api.js
+++ b/ui/js/src/kimchi.api.js
@@ -328,10 +328,10 @@ var kimchi = {
url += "?token=" +
wok.urlSafeB64Encode(vm+'-console').replace(/=*$/g, "");
url += '&encrypt=1';
window.open(url);
- }).error(function(data) {
+ }).fail(function(data) {
wok.message.error(data.responseJSON.reason);
});
- }).error(function(data) {
+ }).fail(function(data) {
wok.message.error(data.responseJSON.reason);
});
},
--
2.13.6