<commit_before>angular.module('mnWizardStep3Service', [
  'mnHttp',
  'mnWizardStep1Service',
  'mnWizardStep2Service',
  'mnFilters'
]).factory('mnWizardStep3Service',
  function (mnHttp, mnWizardStep2Service, mnWizardStep1Service, mnBytesToMBFilter, bucketsFormConfiguration) {

    var mnWizardStep3Service = {};

    mnWizardStep3Service.getWizardBucketConf = function () {
      return mnHttp({
        method: 'GET',
        url: '/pools/default/buckets/default'
      }).then(function (resp) {
        var data = resp.data;
        var bucketConf = _.pick(data, _.keys( _.clone(bucketsFormConfiguration)));
        bucketConf.replicaIndex = bucketConf.replicaIndex ? 1 : 0;
        bucketConf.flushEnabled = (data.controllers !== undefined && data.controllers.flush !== undefined) ? 1 : 0;
        bucketConf.ramQuotaMB = mnBytesToMBFilter(resp.data.quota.rawRAM);
        bucketConf.uri = '/pools/default/buckets/default';
        return bucketConf;
      }, function () {
        var bucketConf = _.clone(bucketsFormConfiguration);
        bucketConf.name = 'default';
        bucketConf.isNew = true;
        bucketConf.ramQuotaMB =  mnWizardStep1Service.getDynamicRamQuota() - mnBytesToMBFilter(mnWizardStep2Service.getSampleBucketsRAMQuota())
        return bucketConf
      }).then(function (bucketConf) {
        bucketConf.ignoreWarnings = true;
        bucketConf.otherBucketsRamQuotaMB = mnBytesToMBFilter(mnWizardStep2Service.getSampleBucketsRAMQuota());
        bucketConf.isWizard = true;
        return bucketConf;
      })
    };<commit_msg>MB-12222: ignore warnings only when bucket doesn't exist yet<commit_after>angular.module('mnWizardStep3Service', [
  'mnHttp',
  'mnWizardStep1Service',
  'mnWizardStep2Service',
  'mnFilters'
]).factory('mnWizardStep3Service',
  function (mnHttp, mnWizardStep2Service, mnWizardStep1Service, mnBytesToMBFilter, bucketsFormConfiguration) {

    var mnWizardStep3Service = {};

    mnWizardStep3Service.getWizardBucketConf = function () {
      return mnHttp({
        method: 'GET',
        url: '/pools/default/buckets/default'
      }).then(function (resp) {
        var data = resp.data;
        var bucketConf = _.pick(data, _.keys( _.clone(bucketsFormConfiguration)));
        bucketConf.replicaIndex = bucketConf.replicaIndex ? 1 : 0;
        bucketConf.flushEnabled = (data.controllers !== undefined && data.controllers.flush !== undefined) ? 1 : 0;
        bucketConf.ramQuotaMB = mnBytesToMBFilter(resp.data.quota.rawRAM);
        bucketConf.uri = '/pools/default/buckets/default';
        return bucketConf;
      }, function () {
        var bucketConf = _.clone(bucketsFormConfiguration);
        bucketConf.ignoreWarnings = true;
        bucketConf.name = 'default';
        bucketConf.isNew = true;
        bucketConf.ramQuotaMB =  mnWizardStep1Service.getDynamicRamQuota() - mnBytesToMBFilter(mnWizardStep2Service.getSampleBucketsRAMQuota())
        return bucketConf
      }).then(function (bucketConf) {
        bucketConf.otherBucketsRamQuotaMB = mnBytesToMBFilter(mnWizardStep2Service.getSampleBucketsRAMQuota());
        bucketConf.isWizard = true;
        return bucketConf;
      })
    };
{'fraction_non_alphanumeric': 0.11125118184683265, 'fraction_numerical': 0.011030570438071227, 'mean_word_length': 3.5472779369627507, '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': '5936423', 'n_tokens_mistral': 1000, 'n_tokens_neox': 961, 'n_words': 152}