RIFT-14916: Code added but commented out for removing cat severity filter 56/556/1
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Thu, 20 Oct 2016 16:30:41 +0000 (12:30 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Thu, 20 Oct 2016 16:30:41 +0000 (12:30 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/logging/api/logging.js
skyquake/plugins/logging/src/loggingSource.js

index 499a814..c2f56f8 100644 (file)
@@ -112,10 +112,10 @@ function requestCallback(resolve, reject, transformFunc) {
       } else {
         var data = JSON.stringify(response.body);
       }
-      return resolve_with_delay(resolve, {
+      return resolve({
         statusCode: response.statusCode,
         data: data
-      }, 0);
+      });
     };
   };
 }
@@ -341,10 +341,10 @@ Config.deleteDefaultSyslogSeverity = function(req) {
       }));
       return Promise.all(promises).then(
         function(data) {
-          resolve({statusCode: 200, data: data[0]});
+          resolve({statusCode:  data[0].statusCode, data: data[0].data});
         },
         function(data) {
-          reject(data);
+          reject({statusCode:  data[0].statusCode, data: data[0].data});
         }
       )
     });
index 690d323..dc28aa4 100644 (file)
@@ -66,23 +66,23 @@ export default {
         return new Promise(function(resolve, reject) {
           let promises = [];
           let remove = null;
-          if(nulledCategories.length > 0) {
-            remove = $.ajax({
-              // url: apiUrl('api/config/default-severity'),
-              url: apiUrl('api/config/default-syslog-severity/' + nulledCategories.join(',')),
-              type: 'DELETE',
-              beforeSend: Utils.addAuthorizationStub,
-              success: function(data) {
-                resolve(data);
-              },
-              error: function(error) {
-                console.log("There was an error updating the logging config data",
-                  error);
-                reject(error);
-              }
-            });
-            promises.push(remove);
-          }
+          // if(nulledCategories.length > 0) {
+          //   remove = $.ajax({
+          //     // url: apiUrl('api/config/default-severity'),
+          //     url: apiUrl('api/config/default-syslog-severity/' + nulledCategories.join(',')),
+          //     type: 'DELETE',
+          //     beforeSend: Utils.addAuthorizationStub,
+          //     success: function(data) {
+          //       resolve(data);
+          //     },
+          //     error: function(error) {
+          //       console.log("There was an error updating the logging config data",
+          //         error);
+          //       reject(error);
+          //     }
+          //   });
+          //   promises.push(remove);
+          // }
           Promise.all(promises).then(function(data) {
             return $.ajax({
                 url: apiUrl('api/aggregate'),