<commit_before>'use strict';

var app = angular.module('myApp.clients.directives', []);

app.directive('clients', ['Client', 'Location', 'Report', '$location', '$routeParams', '$cookies', '$pusher', '$route', '$mdDialog', '$mdBottomSheet', '$q', 'showErrors', 'showToast', '$rootScope', 'gettextCatalog', function(Client, Location, Report, $location, $routeParams, $cookies, $pusher, $route, $mdDialog, $mdBottomSheet, $q, showErrors, showToast, $rootScope, gettextCatalog) {

  var link = function( scope, element, attrs, controller ) {

    scope.selected = [];

    scope.options = {
      autoSelect: true,
      boundaryLinks: false,
      largeEditDialog: false,
      pageSelector: false,
      rowSelection: true
    };

    scope.query = {
      order:      'updated_at',
      limit:      $routeParams.per || 25,
      page:       $routeParams.page || 1,
      options:    [5,10,25,50,100],
      direction:  $routeParams.direction || 'desc'
    };

    // User permissions //

    var clientsMenu = function() {
      if (true) { // user permissions
        scope.clientsMenu = [];

        scope.clientsMenu.push({
          name: gettextCatalog.getString('View'),
          type: 'view',
          icon: 'pageview'
        });

        scope.clientsMenu.push({
          name: gettextCatalog.getString('Disconnect'),
          type: 'disconnect',
          icon: 'block'
        });

        scope.clientsMenu.push({
          name: gettextCatalog.getString('Logout'),
          type: 'logout',
          icon: 'exit_to_app'
        });

      }
    };

    scope.menuAction = function(type,client) {
      switch(type) {
        case 'view':
          view(client.id);
          break;
        case 'disconnect':
          client.processing = true;
          alert('I will disconnect the client');
          break;
        case 'logout':
          logout(client);
          break;<commit_msg>Removes the disconnect links for testing<commit_after>'use strict';

var app = angular.module('myApp.clients.directives', []);

app.directive('clients', ['Client', 'Location', 'Report', '$location', '$routeParams', '$cookies', '$pusher', '$route', '$mdDialog', '$mdBottomSheet', '$q', 'showErrors', 'showToast', '$rootScope', 'gettextCatalog', function(Client, Location, Report, $location, $routeParams, $cookies, $pusher, $route, $mdDialog, $mdBottomSheet, $q, showErrors, showToast, $rootScope, gettextCatalog) {

  var link = function( scope, element, attrs, controller ) {

    scope.selected = [];

    scope.options = {
      autoSelect: true,
      boundaryLinks: false,
      largeEditDialog: false,
      pageSelector: false,
      rowSelection: true
    };

    scope.query = {
      order:      'updated_at',
      limit:      $routeParams.per || 25,
      page:       $routeParams.page || 1,
      options:    [5,10,25,50,100],
      direction:  $routeParams.direction || 'desc'
    };

    // User permissions //

    var clientsMenu = function() {
      if (true) { // user permissions
        scope.clientsMenu = [];

        scope.clientsMenu.push({
          name: gettextCatalog.getString('View'),
          type: 'view',
          icon: 'pageview'
        });

        // Removed short-term while testing
        // scope.clientsMenu.push({
        //   name: gettextCatalog.getString('Disconnect'),
        //   type: 'disconnect',
        //   icon: 'block'
        // });

        // scope.clientsMenu.push({
        //   name: gettextCatalog.getString('Logout'),
        //   type: 'logout',
        //   icon: 'exit_to_app'
        // });

      }
    };

    scope.menuAction = function(type,client) {
      switch(type) {
        case 'view':
          view(client.id);
          break;
        case 'disconnect':
          client.processing = true;
          alert('I will disconnect the client');
          break;
        case 'logout':
          logout(client);
          break;
{'fraction_non_alphanumeric': 0.1520572450805009, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 2.2725752508361206, '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': '3010031', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1143, 'n_words': 250}