ManageIQ/manageiq-ui-classic

View on GitHub
app/javascript/oldjs/services/subscription_service.js

Summary

Maintainability
A
0 mins
Test Coverage
ManageIQ.angular.app.service('subscriptionService', ['$timeout', function($timeout) {
  this.subscribeToEventType = function(eventType, callback) {
    listenToRx(function(event) {
      if (event.eventType === eventType) {
        $timeout(function() {
          callback(event.response);
        });
      }
    });
  };
}]);