<commit_before>'use strict';

angular.module('nachosSettingsApp')
  .controller('ViewSettingsController', function ($scope, $state, $stateParams, $timeout) {
    if(!$stateParams.item){
      $state.go('shell.main.view');
    }

    var path = require('path');
    var item = $stateParams.item;

    var nachosApi = require('nachos-api');
    var api = {};
    api.getSettings = function(cb) {
      nachosApi.config.get(item.name, function(err, config){
        cb(err, config);
      });
    };

    api.saveSettings = function (config) {
      //nachosApi.config
    };

    item.content = {
      require: require('relative-require')(item.path),
      nachosApi: api
    };
<commit_msg>Save settings added<commit_after>'use strict';

angular.module('nachosSettingsApp')
  .controller('ViewSettingsController', function ($scope, $state, $stateParams) {
    if(!$stateParams.item){
      $state.go('shell.main.view');
    }

    var path = require('path');
    var item = $stateParams.item;

    var nachosApi = require('nachos-api');
    var api = {};
    api.getSettings = function(cb) {
      nachosApi.config.get(item.name, function(err, config){
        cb(err, config);
      });
    };

    api.saveSettings = function (config, cb) {
      nachosApi.config.save(item.name, config, function (err) {
        cb(err);
      })
    };

    item.content = {
      require: require('relative-require')(item.path),
      nachosApi: api
    };

{'fraction_non_alphanumeric': 0.1619377162629758, 'fraction_numerical': 0.0, 'mean_word_length': 2.9186991869918697, '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': '6644228', 'n_tokens_mistral': 465, 'n_tokens_neox': 461, 'n_words': 82}