<commit_before>'use strict';

angular.module('registryApp')
    .service('Sidebar', ['$rootScope', function ($rootScope) {

        var self = {};

        self.open = true;
        self.active = 'apps';

        /**
         * Toggle sidebar visibility
         */
        self.toggleOpen = function () {
            self.open = !self.open;
            $rootScope.$broadcast('sidebar:toggle', self.open);
        };

        /**
         * Set the active page
         * @param active
         */
        self.setActive = function (active) {
            self.active = active;
        };

        /**
         * Get the active page
         * @returns {string}
         */
        self.getActive = function () {
            return self.active;
        };

        return self;

    }])
    .directive('sidebar', ['$templateCache', function ($templateCache) {
        return {
            restrict: 'E',
            template: $templateCache.get('views/partials/sidebar.html'),
            scope: {},
            controller: ['$scope', 'User', 'Sidebar', function ($scope, User, Sidebar) {

                $scope.view = {};
                $scope.view.loading = true;
                $scope.view.active = Sidebar.getActive();
                $scope.view.open = Sidebar.open;

                $scope.view.navigation = [
                    {name: 'apps', link: 'apps', desc: 'Apps', icon: 'puzzle-piece'},
                    {name: 'task tpls', link: 'tasks', desc: 'Task Templates', icon: 'rocket'},
//                    {name: 'builds', link: 'builds', desc: 'Builds', icon: 'cube'},
                    {name: 'repos', link: 'repos', desc: 'Repositories', icon: 'code-fork'},
                    {name: 'workflow editor', link: 'workflow/0/new', desc: 'Workflow Editor', icon: 'terminal'},
                    {name: 'tool editor', link: 'cliche/tool', desc: 'Tool Editor', icon: 'terminal'},
                    {name: 'script editor', link: 'cliche/script', desc: 'Script Editor', icon: 'terminal'}
                ];

                $scope.SidebarService = Sidebar;

                User.getUser().then(function(result) {
                    $scope.view.user = result.user;
                    $scope.view.loading = false;

                    if (!_.isEmpty(result.user)) {<commit_msg>removed rask tpls from menu after merge effect<commit_after>'use strict';

angular.module('registryApp')
    .service('Sidebar', ['$rootScope', function ($rootScope) {

        var self = {};

        self.open = true;
        self.active = 'apps';

        /**
         * Toggle sidebar visibility
         */
        self.toggleOpen = function () {
            self.open = !self.open;
            $rootScope.$broadcast('sidebar:toggle', self.open);
        };

        /**
         * Set the active page
         * @param active
         */
        self.setActive = function (active) {
            self.active = active;
        };

        /**
         * Get the active page
         * @returns {string}
         */
        self.getActive = function () {
            return self.active;
        };

        return self;

    }])
    .directive('sidebar', ['$templateCache', function ($templateCache) {
        return {
            restrict: 'E',
            template: $templateCache.get('views/partials/sidebar.html'),
            scope: {},
            controller: ['$scope', 'User', 'Sidebar', function ($scope, User, Sidebar) {

                $scope.view = {};
                $scope.view.loading = true;
                $scope.view.active = Sidebar.getActive();
                $scope.view.open = Sidebar.open;

                $scope.view.navigation = [
                    {name: 'apps', link: 'apps', desc: 'Apps', icon: 'puzzle-piece'},
//                    {name: 'task tpls', link: 'tasks', desc: 'Task Templates', icon: 'rocket'},
//                    {name: 'builds', link: 'builds', desc: 'Builds', icon: 'cube'},
                    {name: 'repos', link: 'repos', desc: 'Repositories', icon: 'code-fork'},
                    {name: 'workflow editor', link: 'workflow/0/new', desc: 'Workflow Editor', icon: 'terminal'},
                    {name: 'tool editor', link: 'cliche/tool', desc: 'Tool Editor', icon: 'terminal'},
                    {name: 'script editor', link: 'cliche/script', desc: 'Script Editor', icon: 'terminal'}
                ];

                $scope.SidebarService = Sidebar;

                User.getUser().then(function(result) {
                    $scope.view.user = result.user;
                    $scope.view.loading = false;

                    if (!_.isEmpty(result.user)) {
{'fraction_non_alphanumeric': 0.15407920363557673, 'fraction_numerical': 0.00043280675178532783, 'mean_word_length': 1.623155505107832, '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': '3128698', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1232, 'n_words': 295}