<commit_before>import jsyaml from 'js-yaml';
import { Queue, slugid } from 'taskcluster-client-web';

import treeherder from '../js/treeherder';
import thTaskcluster from '../js/services/taskcluster';
import tcJobActionsTemplate from '../partials/main/tcjobactions.html';
import { getStatus } from '../helpers/jobHelper';
import { getBugUrl, getSlaveHealthUrl, getInspectTaskUrl, getLogViewerUrl } from '../helpers/urlHelper';

treeherder.controller('PluginCtrl', [
    '$scope', '$rootScope', '$location', '$http', '$interpolate', '$uibModal',
    'ThJobClassificationModel',
    'thClassificationTypes', 'ThJobModel', 'thEvents', 'dateFilter', 'thDateFormat',
    'numberFilter', 'ThBugJobMapModel', 'thJobFilters',
    '$q', 'thPinboard',
    'ThJobDetailModel', 'thBuildApi', 'thNotify', 'ThJobLogUrlModel', 'ThModelErrors', 'ThTaskclusterErrors',
    'thTabs', '$timeout', 'thReftestStatus', 'ThResultSetStore',
    'PhSeries', 'tcactions',
    function PluginCtrl(
        $scope, $rootScope, $location, $http, $interpolate, $uibModal,
        ThJobClassificationModel,
        thClassificationTypes, ThJobModel, thEvents, dateFilter, thDateFormat,
        numberFilter, ThBugJobMapModel, thJobFilters,
        $q, thPinboard,
        ThJobDetailModel, thBuildApi, thNotify, ThJobLogUrlModel, ThModelErrors, ThTaskclusterErrors, thTabs,
        $timeout, thReftestStatus, ThResultSetStore, PhSeries,
        tcactions) {

        $scope.job = {};
        $scope.revisionList = [];

        var reftestUrlRoot = "https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=";

        // Show the Failure Classification tab, except if there's a URL parameter to disable it.
        var showAutoClassifyTab = function () {
            thTabs.tabs.autoClassification.enabled = $location.search().noautoclassify !== true;
        };
        showAutoClassifyTab();
        $rootScope.$on('$locationChangeSuccess', function () {
            showAutoClassifyTab();
        });
        $rootScope.$on('userChange', function () {<commit_msg>Bug 1443119 - Disable "Failure Classification" (autoclassify) tab by default (#3301)<commit_after>import jsyaml from 'js-yaml';
import { Queue, slugid } from 'taskcluster-client-web';

import treeherder from '../js/treeherder';
import thTaskcluster from '../js/services/taskcluster';
import tcJobActionsTemplate from '../partials/main/tcjobactions.html';
import { getStatus } from '../helpers/jobHelper';
import { getBugUrl, getSlaveHealthUrl, getInspectTaskUrl, getLogViewerUrl } from '../helpers/urlHelper';

treeherder.controller('PluginCtrl', [
    '$scope', '$rootScope', '$location', '$http', '$interpolate', '$uibModal',
    'ThJobClassificationModel',
    'thClassificationTypes', 'ThJobModel', 'thEvents', 'dateFilter', 'thDateFormat',
    'numberFilter', 'ThBugJobMapModel', 'thJobFilters',
    '$q', 'thPinboard',
    'ThJobDetailModel', 'thBuildApi', 'thNotify', 'ThJobLogUrlModel', 'ThModelErrors', 'ThTaskclusterErrors',
    'thTabs', '$timeout', 'thReftestStatus', 'ThResultSetStore',
    'PhSeries', 'tcactions',
    function PluginCtrl(
        $scope, $rootScope, $location, $http, $interpolate, $uibModal,
        ThJobClassificationModel,
        thClassificationTypes, ThJobModel, thEvents, dateFilter, thDateFormat,
        numberFilter, ThBugJobMapModel, thJobFilters,
        $q, thPinboard,
        ThJobDetailModel, thBuildApi, thNotify, ThJobLogUrlModel, ThModelErrors, ThTaskclusterErrors, thTabs,
        $timeout, thReftestStatus, ThResultSetStore, PhSeries,
        tcactions) {

        $scope.job = {};
        $scope.revisionList = [];

        var reftestUrlRoot = "https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=";

        // Show the Failure Summary tab, except if there's a URL parameter to enable Failure Classification one.
        var showAutoClassifyTab = function () {
            thTabs.tabs.autoClassification.enabled = $location.search().autoclassify === true;
        };
        showAutoClassifyTab();
        $rootScope.$on('$locationChangeSuccess', function () {
            showAutoClassifyTab();
        });
        $rootScope.$on('userChange', function () {
{'fraction_non_alphanumeric': 0.13750882976218506, 'fraction_numerical': 0.0025900635742877325, 'mean_word_length': 4.08133971291866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5597152', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1265, 'n_words': 259}