<commit_before>module Fabric {

  export function ClusterController($scope, $location, $routeParams, workspace:Workspace, jolokia) {

    $scope.path = $routeParams["page"] || "/";

    $scope.gridOptions = {
      data: 'children',
      displayFooter: false,
      columnDefs: [
        {
          field: 'name',
          displayName: 'Name',
          cellTemplate: '<div class="ngCellText"><a href="{{childLink(row.entity)}}"><i class="{{row | fileIconClass}}"></i> {{row.getProperty(col.field)}}</a></div>',
          cellFilter: ""
        }
      ]
    };

    $scope.isTabActive = (href) => {
      var tidy = Core.trimLeading(href, "#");
      var loc = $location.path();
      if (loc === tidy) return true;
      return false;
    };


    $scope.childLink = (child) => {
      var prefix = "#/fabric/clusters/" + Core.trimLeading($scope.path, "/") + "/";
      var postFix = "";
      var path = child.name;
      return Core.createHref($location, prefix + path + postFix);
    };

    $scope.$watch('workspace.tree', function () {
      setTimeout(updateView, 50);
    });

    $scope.$on("$routeChangeSuccess", function (event, current, previous) {<commit_msg>fix clusters view on latest fabric<commit_after>module Fabric {

  export function ClusterController($scope, $location, $routeParams, workspace:Workspace, jolokia) {

    $scope.path = $routeParams["page"] || "/";
    if (!$scope.path.startsWith("/")) {
      $scope.path = "/" + $scope.path;
    }

    $scope.gridOptions = {
      data: 'children',
      displayFooter: false,
      columnDefs: [
        {
          field: 'name',
          displayName: 'Name',
          cellTemplate: '<div class="ngCellText"><a href="{{childLink(row.entity)}}"><i class="{{row | fileIconClass}}"></i> {{row.getProperty(col.field)}}</a></div>',
          cellFilter: ""
        }
      ]
    };

    $scope.isTabActive = (href) => {
      var tidy = Core.trimLeading(href, "#");
      var loc = $location.path();
      return loc === tidy;
    };


    $scope.childLink = (child) => {
      var prefix = "#/fabric/clusters/" + Core.trimLeading($scope.path, "/") + "/";
      var postFix = "";
      var path = child.name;
      return Core.createHref($location, prefix + path + postFix);
    };

    $scope.$watch('workspace.tree', function () {
      setTimeout(updateView, 50);
    });

    $scope.$on("$routeChangeSuccess", function (event, current, previous) {
{'fraction_non_alphanumeric': 0.18533772652388797, 'fraction_numerical': 0.0016474464579901153, 'mean_word_length': 2.685887708649469, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, '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': '3627042', 'n_tokens_mistral': 760, 'n_tokens_neox': 739, 'n_words': 143}