<commit_before>angular.module('os.common.delete', [])
  .controller('EntityDeleteCtrl', function($scope, $modalInstance, entityProps, dependentEntities, Alerts) {

    function init() {
      $scope.entity = entityProps.entity;
      $scope.entityProps = entityProps;
      $scope.dependentEntities = dependentEntities;
      $scope.entityIds = entityProps.entityIds;
    }

    function onDeletion(entity) {
      if (!!entity) {
        Alerts.success("delete_entity.entity_deleted", entityProps);
        $modalInstance.close(entity);
      }
    }

    function onBulkDeletion(entity) {
      if (!!entity) {
        Alerts.success(entityProps.successMessage);
        $modalInstance.close(entity);
      }
    }

    function bulkDelete() {
      $scope.entity.bulkDelete($scope.entityIds).then(onBulkDeletion)
    };

    $scope.delete = function () {
      if (entityProps.entityIds) {
        bulkDelete();
      } else {
        $scope.entity.$remove().then(onDeletion)
      }
    };

    $scope.cancel = function () {
      $modalInstance.dismiss('cancel');
    };

    init();
  })


<commit_msg>OPSMN-2362 : Minor change, removing the variable from scope.<commit_after>angular.module('os.common.delete', [])
  .controller('EntityDeleteCtrl', function($scope, $modalInstance, entityProps, dependentEntities, Alerts) {

    function init() {
      $scope.entity = entityProps.entity;
      $scope.entityProps = entityProps;
      $scope.dependentEntities = dependentEntities;
    }

    function onDeletion(entity) {
      if (!!entity) {
        Alerts.success("delete_entity.entity_deleted", entityProps);
        $modalInstance.close(entity);
      }
    }

    function onBulkDeletion(entity) {
      if (!!entity) {
        Alerts.success(entityProps.successMessage);
        $modalInstance.close(entity);
      }
    }

    function bulkDelete() {
      $scope.entity.bulkDelete(entityProps.entityIds).then(onBulkDeletion)
    };

    $scope.delete = function () {
      if (entityProps.entityIds) {
        bulkDelete();
      } else {
        $scope.entity.$remove().then(onDeletion);
      }
    };

    $scope.cancel = function () {
      $modalInstance.dismiss('cancel');
    };

    init();
  })



{'fraction_non_alphanumeric': 0.13822602431337236, 'fraction_numerical': 0.0018009905447996398, 'mean_word_length': 2.7918088737201363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5815785', 'n_tokens_mistral': 676, 'n_tokens_neox': 656, 'n_words': 93}