You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ar...@apache.org on 2017/11/01 15:19:05 UTC

mesos git commit: Updated pailer to work with jquery 3.2.1.

Repository: mesos
Updated Branches:
  refs/heads/master 5995bd1bd -> c5c1debb1


Updated pailer to work with jquery 3.2.1.

jQuery 3 changed the itnerface of `$.getJSON()` such that the
equivalent function of `success()` is now `then` while `error()`
should now be used as `fail()`.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c5c1debb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c5c1debb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c5c1debb

Branch: refs/heads/master
Commit: c5c1debb1944898b3ced644964e2f921b27f8ad7
Parents: 5995bd1
Author: Benjamin Hindman <be...@gmail.com>
Authored: Mon Oct 30 18:03:45 2017 -0700
Committer: Alexander Rojas <al...@mesosphere.io>
Committed: Wed Nov 1 16:18:35 2017 +0100

----------------------------------------------------------------------
 src/webui/master/static/js/jquery.pailer.js | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c5c1debb/src/webui/master/static/js/jquery.pailer.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/jquery.pailer.js b/src/webui/master/static/js/jquery.pailer.js
index 537fe00..6c68383 100644
--- a/src/webui/master/static/js/jquery.pailer.js
+++ b/src/webui/master/static/js/jquery.pailer.js
@@ -6,7 +6,7 @@
 // bytes). This function should expect an "options" object with the
 // fields 'offset' and 'length' set for reading the data. The result
 // from of the function should be a "promise" like value which has a
-// 'success' and 'error' callback which each take a function. An
+// 'then' and 'fail' callback which each take a function. An
 // object with at least two fields defined ('offset' and 'data') is
 // expected on success. The length of 'data' may be smaller than the
 // amount requested. If the offset requested is greater than the
@@ -119,7 +119,7 @@
     this_.indicate('(LOADING)');
 
     this_.read({'offset': -1})
-      .success(function(data) {
+      .then(function(data) {
         this_.indicate('');
 
         // Get the last page of data.
@@ -133,7 +133,7 @@
         this_.element.html('');
         setTimeout(function() { this_.tail(); }, 0);
       })
-      .error(function(response, msg, code) {
+      .fail(function(response, msg, code) {
         if ([401, 403].indexOf(response.status) > -1) {
           // Unauthorized user.
           this_.indicate('YOU ARE UNAUTHORIZED TO ACCESS THIS CONTENT');
@@ -182,7 +182,7 @@
 
     var read = function(offset, length) {
       this_.read({'offset': offset, 'length': length})
-        .success(function(data) {
+        .then(function(data) {
           if (data.data.length < length) {
             buffer += data.data;
             read(offset + data.data.length, length - data.data.length);
@@ -214,7 +214,7 @@
             this_.paging = false;
           }
         })
-        .error(function() {
+        .fail(function() {
           this_.indicate('(FAILED TO PAGE ... RETRYING)');
           setTimeout(function() {
             this_.indicate('');
@@ -235,7 +235,7 @@
     }
 
     this_.read({'offset': this_.end, 'length': this_.truncate_length})
-      .success(function(data) {
+      .then(function(data) {
         var scrollTop = this_.element.scrollTop();
         var height = this_.element.height();
         var scrollHeight = this_.element[0].scrollHeight;
@@ -283,7 +283,7 @@
           setTimeout(function() { this_.tail(); }, 1000);
         }
       })
-      .error(function() {
+      .fail(function() {
         this_.indicate('(FAILED TO TAIL ... RETRYING)');
         this_.initialized = false;
         setTimeout(function() {
@@ -318,8 +318,8 @@
     var settings = $.extend({
       read: function() {
         return {
-          success: function() {},
-          error: function(f) { f(); }
+          then: function() {},
+          fail: function(f) { f(); }
         };
       },
       'page_size': 8 * 4096, // 8 "pages".