<commit_before>module Fabric {

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

    Fabric.initScope($scope, $location, jolokia, workspace);

    $scope.loading = true;

    $scope.mavenMBean = Maven.getMavenIndexerMBean(workspace);

    if (!angular.isDefined($scope.versionId)) {
      $scope.versionId = $routeParams.versionId;
    }
    if (!angular.isDefined($scope.profileId)) {
      $scope.profileId = $routeParams.profileId;
    }

    $scope.newFileDialog = false;
    $scope.deleteFileDialog = false;
    $scope.newFileName = '';
    $scope.markedForDeletion = '';

    $scope.newProfileName = '';
    $scope.deleteThingDialog = false;
    $scope.changeParentsDialog = false;
    $scope.removeParentDialog = false;
    $scope.newThingName = '';
    $scope.selectedParents = [];

    $scope.profilePath = Fabric.profilePath;

    if ($scope.inDirective &&
        angular.isDefined($scope.$parent.childActions) &&
        $scope.versionId) {
      var actions = $scope.$parent.childActions;

      if ($scope.profileId) {
        actions.push({
          doAction: () => {
            $scope.showChangeParentsDialog();
          },
          title: "Edit parent profiles",
          icon: "icon-edit",
          name: "Change Parents"
        });
        actions.push({
          doAction: () => {
            $scope.copyProfileDialog = true;
          },
          title: "Copy Profile",
          icon: "icon-copy",
          name: "Copy Profile"
        });
        actions.push({
          doAction: () => {
            $scope.goto('/wiki/profile/' + $scope.versionId + '/' + $scope.profileId + '/editFeatures');
          },
          title: "Edit the features defined in this profile",
          icon: "icon-edit",
          name: "Edit Features"
        });
        actions.push({
          doAction: () => {
            $location.url('/fabric/assignProfile').search({
              vid: $scope.versionId,
              pid: $scope.profileId
            });
          },
          title: "Assign profile to existing containers",
          icon: "icon-truck",
          name: "Assign to Container"
        });
        actions.push({
          doAction: () => {
            $location.url('/fabric/containers/createContainer').search({
              versionId: $scope.versionId,
              profileIds: $scope.profileId
            });
          },
          title: "Create a new container with this profile",
          icon: "icon-truck",
          name: "New Container"
        });
      }

      var createVersionDialog = $scope.createVersionDialog;
      if (createVersionDialog) {
        actions.push({
          doAction: () => {
            log.info("Creating new version")
            $scope.createVersionDialog.open();
          },<commit_msg>make it easy to create new versions from the wiki<commit_after>module Fabric {

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

    Fabric.initScope($scope, $location, jolokia, workspace);

    $scope.loading = true;

    $scope.mavenMBean = Maven.getMavenIndexerMBean(workspace);

    if (!angular.isDefined($scope.versionId)) {
      $scope.versionId = $routeParams.versionId;
    }
    if (!angular.isDefined($scope.profileId)) {
      $scope.profileId = $routeParams.profileId;
    }

    $scope.newFileDialog = false;
    $scope.deleteFileDialog = false;
    $scope.newFileName = '';
    $scope.markedForDeletion = '';

    $scope.newProfileName = '';
    $scope.deleteThingDialog = false;
    $scope.changeParentsDialog = false;
    $scope.removeParentDialog = false;
    $scope.newThingName = '';
    $scope.selectedParents = [];

    $scope.profilePath = Fabric.profilePath;

    if ($scope.inDirective &&
        angular.isDefined($scope.$parent.childActions) &&
        $scope.versionId) {
      var actions = $scope.$parent.childActions;

      if ($scope.profileId) {
        actions.push({
          doAction: () => {
            $scope.showChangeParentsDialog();
          },
          title: "Edit parent profiles",
          icon: "icon-edit",
          name: "Change Parents"
        });
        actions.push({
          doAction: () => {
            $scope.copyProfileDialog = true;
          },
          title: "Copy Profile",
          icon: "icon-copy",
          name: "Copy Profile"
        });
        actions.push({
          doAction: () => {
            $scope.goto('/wiki/profile/' + $scope.versionId + '/' + $scope.profileId + '/editFeatures');
          },
          title: "Edit the features defined in this profile",
          icon: "icon-edit",
          name: "Edit Features"
        });
        actions.push({
          doAction: () => {
            $location.url('/fabric/assignProfile').search({
              vid: $scope.versionId,
              pid: $scope.profileId
            });
          },
          title: "Assign profile to existing containers",
          icon: "icon-truck",
          name: "Assign to Container"
        });
        actions.push({
          doAction: () => {
            $location.url('/fabric/containers/createContainer').search({
              versionId: $scope.versionId,
              profileIds: $scope.profileId
            });
          },
          title: "Create a new container with this profile",
          icon: "icon-truck",
          name: "New Container"
        });
      }

      var createVersionDialog = $scope.createVersionDialog;
      if (createVersionDialog) {
        actions.push({
          doAction: () => {
            $scope.createVersionDialog.open();
          },
{'fraction_non_alphanumeric': 0.13693534100974314, 'fraction_numerical': 0.0, 'mean_word_length': 1.9684542586750788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1455774', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1551, 'n_words': 296}