<commit_before>'use strict';

/**
 * @ngdoc overview
 * @name angularApp
 * @description
 * # angularApp
 *
 * Main module of the application.
 */
var app = angular.module('angularApp', [
  'ngAnimate',
  'ngAria',
  'ngCookies',
  'ngMessages',
  'ngResource',
  'ngRoute',
  'ui.router',
  'ngSanitize',
  'ngTouch',
  'ng-token-auth',
  'angular-underscore',
  // 'ui.bootstrap',
  'ngDialog',
  'ui.select',
  'xeditable',
  'daterangepicker',
  'angular-loading-bar',
  'pascalprecht.translate',
  'schemaForm',
  'formly',
  'formlyBootstrap'
]);

app.constant('APP', {
  root: '/',
  apiPrefix: '/api/',
  modules: {
    main: {
      text: 'Main Menu', url: 'app', icon: 'fa fa-home fa-lg',
      links: [
        { text: 'Samples', url: 'samples', icon: 'glyphicon glyphicon-user' }
      ]
    },
    reports:  {
      text: 'Reports', url: 'reports', icon: 'glyphicon glyphicon-stats',
      links: [
        { text: 'Samples', url: 'samples', icon: 'fa fa-clipboard' },
        { text: 'Sample',  url: 'sample-info',  icon: 'fa fa-clipboard' }
      ]
    },
    setups: {
      text: 'Setups', url: 'setups', icon: 'fa fa-cogs fa-lg',
      links: [
        { text: 'Users', url: 'users', icon: 'fa fa-user' },
        { text: 'Users', url: 'form/users', icon: 'fa fa-user' },
        { text: 'Roles', url: 'roles', icon: 'fa fa-user' },
        { text: 'Sample Status', url: 'sample-statuses', icon: 'fa fa-tags' }
      ]
    }
  }
});

app.config(function ($stateProvider, $urlRouterProvider) {
  $urlRouterProvider.otherwise('/');
  $urlRouterProvider.when('/', '/dashboard'); // Default route
  $urlRouterProvider.when('/main', '/main/samples');
  $urlRouterProvider.when('/reports', '/reports/samples');
  $urlRouterProvider.when('/setups', '/setups/sample-statuses');
  $stateProvider
    .state('app', {
      url: '/',
      // abstract: true,
      templateUrl: 'views/layouts/app.html',
      controller: 'AppCtrl',
      resolve: {
        auth: function($auth, $state, $rootScope) {
          return $auth.validateUser().catch(function() { $state.go('login'); });
        }
      }
    })
    .state('login', {
      url: '/login',
      templateUrl: 'views/layouts/login.html',
      controller: 'LoginCtrl'
    })<commit_msg>Added sample usage for form url feature<commit_after>'use strict';

/**
 * @ngdoc overview
 * @name angularApp
 * @description
 * # angularApp
 *
 * Main module of the application.
 */
var app = angular.module('angularApp', [
  'ngAnimate',
  'ngAria',
  'ngCookies',
  'ngMessages',
  'ngResource',
  'ngRoute',
  'ui.router',
  'ngSanitize',
  'ngTouch',
  'ng-token-auth',
  'angular-underscore',
  // 'ui.bootstrap',
  'ngDialog',
  'ui.select',
  'xeditable',
  'daterangepicker',
  'angular-loading-bar',
  'pascalprecht.translate',
  'schemaForm',
  'formly',
  'formlyBootstrap'
]);

app.constant('APP', {
  root: '/',
  apiPrefix: '/api/',
  modules: {
    main: {
      text: 'Main Menu', url: 'app', icon: 'fa fa-home fa-lg',
      links: [
        { text: 'Samples', url: 'samples', icon: 'glyphicon glyphicon-user' }
      ]
    },
    reports:  {
      text: 'Reports', url: 'reports', icon: 'glyphicon glyphicon-stats',
      links: [
        { text: 'Samples', url: 'samples', icon: 'fa fa-clipboard' },
        { text: 'Sample',  url: 'sample-info',  icon: 'fa fa-clipboard' }
      ]
    },
    setups: {
      text: 'Setups', url: 'setups', icon: 'fa fa-cogs fa-lg',
      links: [
        { text: 'Users', url: 'users', icon: 'fa fa-user' },
        { text: 'New User', url: 'form/users', icon: 'fa fa-user' },
        { text: 'Roles', url: 'roles', icon: 'fa fa-user' },
        { text: 'Sample Status', url: 'sample-statuses', icon: 'fa fa-tags' }
      ]
    }
  }
});

app.config(function ($stateProvider, $urlRouterProvider) {
  $urlRouterProvider.otherwise('/');
  $urlRouterProvider.when('/', '/dashboard'); // Default route
  $urlRouterProvider.when('/main', '/main/samples');
  $urlRouterProvider.when('/reports', '/reports/samples');
  $urlRouterProvider.when('/setups', '/setups/sample-statuses');
  $stateProvider
    .state('app', {
      url: '/',
      // abstract: true,
      templateUrl: 'views/layouts/app.html',
      controller: 'AppCtrl',
      resolve: {
        auth: function($auth, $state, $rootScope) {
          return $auth.validateUser().catch(function() { $state.go('login'); });
        }
      }
    })
    .state('login', {
      url: '/login',
      templateUrl: 'views/layouts/login.html',
      controller: 'LoginCtrl'
    })
{'fraction_non_alphanumeric': 0.19757442116868798, 'fraction_numerical': 0.0, 'mean_word_length': 2.8053691275167787, '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': '2102083', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1565, 'n_words': 327}