$scope.saveConfig = function() {
      $scope.settings.loading = true;
      var params = {
        resource: $stateParams.streamId
      };