<commit_before>angular.module(`${PKG.name}.feature.hydrator-beta`)
  .controller('PluginTemplatesCreateEditCtrl', function ($scope, PluginTemplateStoreBeta, PluginTemplateActionBeta, PluginActionsFactoryBeta, $stateParams) {
      $scope.closeTemplateCreationModal = ()=> {
        PluginTemplateActionBeta.reset();
        $scope.$close();
      };
      $scope.saveAndClose = () => {
        PluginTemplateActionBeta.triggerSave();
      };
      $scope.pluginTemplateSaveError = null;
      PluginTemplateStoreBeta.registerOnChangeListener(() => {
        let getIsSaveSuccessfull = PluginTemplateStoreBeta.getIsSaveSuccessfull();
        if (getIsSaveSuccessfull) {
          PluginTemplateActionBeta.reset();
          PluginActionsFactoryBeta.fetchTemplates({namespace: $stateParams.namespace});
          $scope.$close();
        }
      });

  });
<commit_msg>Adds a success message popup once a plugin template has been added<commit_after>angular.module(`${PKG.name}.feature.hydrator-beta`)
  .controller('PluginTemplatesCreateEditCtrl', function ($scope, PluginTemplateStoreBeta, PluginTemplateActionBeta, PluginActionsFactoryBeta, $stateParams, myAlertOnValium) {
      $scope.closeTemplateCreationModal = ()=> {
        PluginTemplateActionBeta.reset();
        $scope.$close();
      };
      $scope.saveAndClose = () => {
        PluginTemplateActionBeta.triggerSave();
      };
      $scope.pluginTemplateSaveError = null;
      PluginTemplateStoreBeta.registerOnChangeListener(() => {
        let getIsSaveSuccessfull = PluginTemplateStoreBeta.getIsSaveSuccessfull();
        if (getIsSaveSuccessfull) {
          PluginTemplateActionBeta.reset();
          PluginActionsFactoryBeta.fetchTemplates({namespace: $stateParams.namespace});
          myAlertOnValium.show({
            type: 'success',
            content: 'Plugin template creation successfull'
          });
          $scope.$close();
        }
      });

  });

{'fraction_non_alphanumeric': 0.1184346035015448, 'fraction_numerical': 0.0, 'mean_word_length': 3.425968109339408, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3233988', 'n_tokens_mistral': 531, 'n_tokens_neox': 509, 'n_words': 70}