<commit_before>'use strict';

/**
 * @ngdoc function
 * @name eagleeye.controller:ChartSetCreationController
 * @description
 * # ChartSetCreationController
 * Controller of the eagleeye
 */
angular.module('eagleeye')
  .controller('ChartSetCreationController', [
    '$state',
    'EagleEyeWebService',
    function ($state, EagleEyeWebService) {
      var friendlyUrlPrefix = 's-',
        controller = this;

      EagleEyeWebService.getCharts().then(function(chartList) {
        controller.chartList = chartList;
      });

      this.settings = {
        title: '',
        description: '',
        friendlyUrl: '',
        charts: []
      };

      this.addToChartSet = function(chart) {
        if (this.settings.charts.indexOf(chart._id) < 0) {
          this.settings.charts.push(chart._id);
        }
      };

      this.save = function() {
        var data = JSON.stringify(this.settings);

        EagleEyeWebService.createChartSet(data).then(function(newChartSetId) {
          $state.go('chartSet', {
            id: newChartSetId
          });
        });
      };
    }
  ]);<commit_msg>Create chart set api updated<commit_after>'use strict';

/**
 * @ngdoc function
 * @name eagleeye.controller:ChartSetCreationController
 * @description
 * # ChartSetCreationController
 * Controller of the eagleeye
 */
angular.module('eagleeye')
  .controller('ChartSetCreationController', [
    '$state',
    'EagleEyeWebService',
    function ($state, EagleEyeWebService) {
      var friendlyUrlPrefix = 's-',
        controller = this;

      EagleEyeWebService.getCharts().then(function(chartList) {
        controller.chartList = chartList;
      });

      this.settings = {
        title: '',
        description: '',
        friendlyUrl: '',
        charts: []
      };

      this.addToChartSet = function(chart) {
        if (this.settings.charts.indexOf(chart._id) < 0) {
          this.settings.charts.push(chart._id);
        }
      };

      this.save = function() {
        var data = JSON.stringify(this.settings);

        EagleEyeWebService.createChartSet(data).then(function(newChartSet) {
          $state.go('chartSet', {
            id: newChartSet._id
          });
        });
      };
    }
  ]);
{'fraction_non_alphanumeric': 0.13515940727436013, 'fraction_numerical': 0.000898069151324652, 'mean_word_length': 2.3963414634146343, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1366399', 'n_tokens_mistral': 669, 'n_tokens_neox': 632, 'n_words': 98}