<commit_before>#= require jquery/dist/jquery
#= require bootstrap/dist/js/bootstrap
#= require angular/angular
#= require angular-ui-router/release/angular-ui-router
#= require modelcatalogue/util/index
#= require modelcatalogue/core/index
#= require modelcatalogue/core/ui/index
#= require modelcatalogue/core/ui/states/index
#= require modelcatalogue/core/ui/bs/index

@grailsAppName = 'model_catalogue'

metadataCurator = angular.module('metadataCurator', [
  'demo.config'
  'mc.core.ui.bs'
  'mc.core.ui.states'
  'ui.bootstrap'
])



metadataCurator.config(($urlRouterProvider)->
# For any unmatched url, send to /dataelement
  $urlRouterProvider.otherwise("/catalogue/model/all")
)

metadataCurator.controller('metadataCurator.searchCtrl', ['catalogueElementResource', 'modelCatalogueSearch','modelCatalogueDataArchitect', '$scope', '$log', '$q', '$state','$modal', 'names', (catalogueElementResource, modelCatalogueSearch, modelCatalogueDataArchitect, $scope, $log, $q, $state,$modal, names)->
  $scope.search = () ->
    if (typeof $scope.searchSelect == 'string')
      $state.go('mc.search', {searchString: $scope.searchSelect })
    else
      $state.go('mc.resource.show', {resource: names.getPropertyNameFromType($scope.searchSelect.elementType) , id: $scope.searchSelect.id})

])<commit_msg>Updating metaDataCurator to use the latest version of ModelCatalogue plugin<commit_after>#= require jquery/dist/jquery
#= require bootstrap/dist/js/bootstrap
#= require ng-file-upload-shim/angular-file-upload-shim
#= require angular/angular
#= require angular-animate/angular-animate
#= require ng-file-upload/angular-file-upload
#= require angular-http-auth/src/http-auth-interceptor
#= require angular-loading-bar/build/loading-bar
#= require angular-ui-router/release/angular-ui-router
#= require modelcatalogue/util/index
#= require modelcatalogue/util/ui/index
#= require modelcatalogue/core/index
#= require modelcatalogue/core/ui/index
#= require modelcatalogue/core/ui/states/index
#= require modelcatalogue/core/ui/bs/index

@grailsAppName = 'model_catalogue'

metadataCurator = angular.module('metadataCurator', [
  'demo.config'
  'mc.core.ui.bs'
  'mc.core.ui.states'
  'ui.bootstrap'
  'angular-loading-bar'
  'ngAnimate'
])

metadataCurator.config ($stateProvider, $urlRouterProvider)->
  $urlRouterProvider.otherwise("/catalogue/model/all")

metadataCurator.controller('metadataCurator.searchCtrl',
  ['catalogueElementResource', 'modelCatalogueSearch', '$scope', '$log', '$q', '$state', 'names',
    (catalogueElementResource, modelCatalogueSearch, $scope, $log, $q, $state, names)->
      $scope.search = () ->
        unless (typeof $scope.searchSelect == 'string')
#      $state.go('search', {searchString: $scope.searchSelect })
#    else
          $state.go('mc.resource.show',
            {resource: names.getPropertyNameFromType($scope.searchSelect.elementType), id: $scope.searchSelect.id})
  ])

metadataCurator.controller('metadataCurator.logoutCtrl', ['$scope', 'security', ($scope, security)->
  $scope.logout = ->
    security.logout()
])

metadataCurator.controller('metadataCurator.loginCtrl', ['$rootScope', '$scope', ($rootScope, $scope)->
  $scope.login = ->
    $rootScope.$broadcast 'event:auth-loginRequired'
])
{'fraction_non_alphanumeric': 0.1576521204671174, 'fraction_numerical': 0.0, 'mean_word_length': 5.497005988023952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '135956', 'n_tokens_mistral': 1021, 'n_tokens_neox': 1012, 'n_words': 164}